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]
|
||||
|
||||
Reference in New Issue
Block a user