Updated mainly terminal filchooser from browser
This commit is contained in:
@@ -35,6 +35,14 @@
|
||||
qbittorrent
|
||||
weathr
|
||||
distrobox
|
||||
ffmpeg
|
||||
|
||||
## DEV ##
|
||||
# javascript
|
||||
elmPackages.nodejs
|
||||
# python
|
||||
python314
|
||||
uv
|
||||
# gnome
|
||||
dconf-editor
|
||||
(papers.override {supportNautilus = true;})
|
||||
|
||||
@@ -168,6 +168,10 @@
|
||||
match._props = {title = "Error";};
|
||||
open-floating = true;
|
||||
}
|
||||
{
|
||||
match._props = {app-id = "Yazi:";};
|
||||
open-floating = true;
|
||||
}
|
||||
];
|
||||
|
||||
layer-rule = [
|
||||
|
||||
@@ -30,16 +30,11 @@ in {
|
||||
};
|
||||
|
||||
xdg.configFile."${configFile}".source = toINI "config.ini" {
|
||||
manual = {
|
||||
lat = "-34.58";
|
||||
lon = "-58.64";
|
||||
};
|
||||
|
||||
general = {
|
||||
brightness-day = "1.0";
|
||||
brightness-night = "0.5";
|
||||
adjustment-method = "wayland";
|
||||
location-provider = "manual";
|
||||
location-provider = "geoclue2";
|
||||
temp-day = "5500";
|
||||
temp-night = "3500";
|
||||
};
|
||||
|
||||
@@ -48,6 +48,27 @@
|
||||
XDG_PICTURES_DIR="$HOME/Pictures"
|
||||
XDG_VIDEOS_DIR="$HOME/Videos"
|
||||
'';
|
||||
|
||||
yaziWrapper = pkgs.writeShellScriptBin "yazi-wrapper" ''
|
||||
set -e
|
||||
|
||||
multiple="$1"
|
||||
directory="$2"
|
||||
save="$3"
|
||||
path="$4"
|
||||
out="$5"
|
||||
|
||||
# We use alacritty directly to run yazi
|
||||
# For saving (save=1), yazi is passed the directory and we write the final path output
|
||||
# For directories (directory=1), we pass yazi the dir selection flag
|
||||
if [ "$save" = "1" ]; then
|
||||
exec ${pkgs.alacritty}/bin/alacritty -e ${pkgs.yazi}/bin/yazi --chooser-file="$out" "$path"
|
||||
elif [ "$directory" = "1" ]; then
|
||||
exec ${pkgs.alacritty}/bin/alacritty -e ${pkgs.yazi}/bin/yazi --chooser-file="$out" --cwd-file="$out"".1" "$path"
|
||||
else
|
||||
exec ${pkgs.alacritty}/bin/alacritty -e ${pkgs.yazi}/bin/yazi --chooser-file="$out" "$path"
|
||||
fi
|
||||
'';
|
||||
in {
|
||||
users.users.someone.packages = with pkgs; [
|
||||
xdg-utils
|
||||
@@ -59,6 +80,13 @@ in {
|
||||
enable = true;
|
||||
defaultApplications = associations;
|
||||
};
|
||||
configFile."xdg-desktop-portal-termfilechooser/config".text = ''
|
||||
[filechooser]
|
||||
cmd=${yaziWrapper}/bin/yazi-wrapper
|
||||
default_dir=$HOME
|
||||
open_mode=suggested
|
||||
save_mode=suggested
|
||||
'';
|
||||
configFile."user-dirs.dirs".source = userDirsConfig;
|
||||
configFile."mimeapps.list".text = ''
|
||||
[Default Applications]
|
||||
|
||||
+3
-1
@@ -39,7 +39,9 @@ in {
|
||||
# Laptop: laptop with GUI + battery + bluetooth
|
||||
laptop = nixosSystem {
|
||||
inherit specialArgs;
|
||||
modules = laptop ++ sharedModules;
|
||||
modules = laptop ++ sharedModules ++ [
|
||||
"${mod}/services/location.nix"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
+12
-2
@@ -2,7 +2,15 @@
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}: let
|
||||
# Patch termfilechooser .portal to add Niri to UseIn
|
||||
termfilechooser-niri = pkgs.xdg-desktop-portal-termfilechooser.overrideAttrs (old: {
|
||||
postFixup = (old.postFixup or "") + ''
|
||||
substituteInPlace $out/share/xdg-desktop-portal/portals/termfilechooser.portal \
|
||||
--replace-fail "wlroots;" "wlroots;Niri;"
|
||||
'';
|
||||
});
|
||||
in {
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
config = {
|
||||
@@ -13,12 +21,14 @@
|
||||
"org.freedesktop.impl.portal.RemoteDesktop" = "gnome";
|
||||
"org.freedesktop.impl.portal.Secret" = ["gnome-keyring"];
|
||||
"org.freedesktop.impl.portal.OpenURI" = "gtk";
|
||||
"org.freedesktop.impl.portal.OpenFile" = "gtk";
|
||||
# FileChooser covers both OpenFile and SaveFile use-cases
|
||||
"org.freedesktop.impl.portal.FileChooser" = "termfilechooser";
|
||||
};
|
||||
};
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
pkgs.xdg-desktop-portal-gnome
|
||||
termfilechooser-niri
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
@@ -5,13 +5,30 @@
|
||||
# provide location
|
||||
services.geoclue2 = {
|
||||
enable = true;
|
||||
geoProviderUrl = "https://beacondb.net/v1/geolocate";
|
||||
submissionUrl = "https://beacondb.net/v2/geosubmit";
|
||||
geoProviderUrl = "https://api.beacondb.net/v1/geolocate";
|
||||
submissionUrl = "https://api.beacondb.net/v2/geosubmit";
|
||||
submissionNick = "geoclue";
|
||||
|
||||
appConfig.gammastep = {
|
||||
appConfig = {
|
||||
gammastep = {
|
||||
isAllowed = true;
|
||||
isSystem = false;
|
||||
};
|
||||
"xdg-desktop-portal" = {
|
||||
isAllowed = true;
|
||||
isSystem = true;
|
||||
};
|
||||
"gnome-weather" = {
|
||||
isAllowed = true;
|
||||
isSystem = true;
|
||||
};
|
||||
"gnome-clocks" = {
|
||||
isAllowed = true;
|
||||
isSystem = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Automatically update system timezone based on location
|
||||
services.automatic-timezoned.enable = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user