Updated mainly terminal filchooser from browser
This commit is contained in:
@@ -35,6 +35,14 @@
|
|||||||
qbittorrent
|
qbittorrent
|
||||||
weathr
|
weathr
|
||||||
distrobox
|
distrobox
|
||||||
|
ffmpeg
|
||||||
|
|
||||||
|
## DEV ##
|
||||||
|
# javascript
|
||||||
|
elmPackages.nodejs
|
||||||
|
# python
|
||||||
|
python314
|
||||||
|
uv
|
||||||
# gnome
|
# gnome
|
||||||
dconf-editor
|
dconf-editor
|
||||||
(papers.override {supportNautilus = true;})
|
(papers.override {supportNautilus = true;})
|
||||||
|
|||||||
@@ -168,6 +168,10 @@
|
|||||||
match._props = {title = "Error";};
|
match._props = {title = "Error";};
|
||||||
open-floating = true;
|
open-floating = true;
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
match._props = {app-id = "Yazi:";};
|
||||||
|
open-floating = true;
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
layer-rule = [
|
layer-rule = [
|
||||||
|
|||||||
@@ -30,16 +30,11 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
xdg.configFile."${configFile}".source = toINI "config.ini" {
|
xdg.configFile."${configFile}".source = toINI "config.ini" {
|
||||||
manual = {
|
|
||||||
lat = "-34.58";
|
|
||||||
lon = "-58.64";
|
|
||||||
};
|
|
||||||
|
|
||||||
general = {
|
general = {
|
||||||
brightness-day = "1.0";
|
brightness-day = "1.0";
|
||||||
brightness-night = "0.5";
|
brightness-night = "0.5";
|
||||||
adjustment-method = "wayland";
|
adjustment-method = "wayland";
|
||||||
location-provider = "manual";
|
location-provider = "geoclue2";
|
||||||
temp-day = "5500";
|
temp-day = "5500";
|
||||||
temp-night = "3500";
|
temp-night = "3500";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -48,6 +48,27 @@
|
|||||||
XDG_PICTURES_DIR="$HOME/Pictures"
|
XDG_PICTURES_DIR="$HOME/Pictures"
|
||||||
XDG_VIDEOS_DIR="$HOME/Videos"
|
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 {
|
in {
|
||||||
users.users.someone.packages = with pkgs; [
|
users.users.someone.packages = with pkgs; [
|
||||||
xdg-utils
|
xdg-utils
|
||||||
@@ -59,6 +80,13 @@ in {
|
|||||||
enable = true;
|
enable = true;
|
||||||
defaultApplications = associations;
|
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."user-dirs.dirs".source = userDirsConfig;
|
||||||
configFile."mimeapps.list".text = ''
|
configFile."mimeapps.list".text = ''
|
||||||
[Default Applications]
|
[Default Applications]
|
||||||
|
|||||||
+3
-1
@@ -39,7 +39,9 @@ in {
|
|||||||
# Laptop: laptop with GUI + battery + bluetooth
|
# Laptop: laptop with GUI + battery + bluetooth
|
||||||
laptop = nixosSystem {
|
laptop = nixosSystem {
|
||||||
inherit specialArgs;
|
inherit specialArgs;
|
||||||
modules = laptop ++ sharedModules;
|
modules = laptop ++ sharedModules ++ [
|
||||||
|
"${mod}/services/location.nix"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-2
@@ -2,7 +2,15 @@
|
|||||||
lib,
|
lib,
|
||||||
pkgs,
|
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 = {
|
xdg.portal = {
|
||||||
enable = true;
|
enable = true;
|
||||||
config = {
|
config = {
|
||||||
@@ -13,12 +21,14 @@
|
|||||||
"org.freedesktop.impl.portal.RemoteDesktop" = "gnome";
|
"org.freedesktop.impl.portal.RemoteDesktop" = "gnome";
|
||||||
"org.freedesktop.impl.portal.Secret" = ["gnome-keyring"];
|
"org.freedesktop.impl.portal.Secret" = ["gnome-keyring"];
|
||||||
"org.freedesktop.impl.portal.OpenURI" = "gtk";
|
"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 = [
|
extraPortals = [
|
||||||
pkgs.xdg-desktop-portal-gtk
|
pkgs.xdg-desktop-portal-gtk
|
||||||
pkgs.xdg-desktop-portal-gnome
|
pkgs.xdg-desktop-portal-gnome
|
||||||
|
termfilechooser-niri
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -5,13 +5,30 @@
|
|||||||
# provide location
|
# provide location
|
||||||
services.geoclue2 = {
|
services.geoclue2 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
geoProviderUrl = "https://beacondb.net/v1/geolocate";
|
geoProviderUrl = "https://api.beacondb.net/v1/geolocate";
|
||||||
submissionUrl = "https://beacondb.net/v2/geosubmit";
|
submissionUrl = "https://api.beacondb.net/v2/geosubmit";
|
||||||
submissionNick = "geoclue";
|
submissionNick = "geoclue";
|
||||||
|
|
||||||
appConfig.gammastep = {
|
appConfig = {
|
||||||
|
gammastep = {
|
||||||
isAllowed = true;
|
isAllowed = true;
|
||||||
isSystem = false;
|
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