yazi cleanup, forget about termfilechooser it is a rabbit hole

This commit is contained in:
Matt Nish-Lapidus 2025-06-29 22:23:40 -04:00
parent 3efe104240
commit 359e58f469
9 changed files with 20 additions and 206 deletions

101
flake.lock generated
View file

@ -261,24 +261,6 @@
"type": "github"
}
},
"flake-parts_4": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_4"
},
"locked": {
"lastModified": 1722555600,
"narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "8471fe90ad337a8074e957b69ca4d0089218391d",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
@ -841,18 +823,6 @@
"type": "github"
}
},
"nixpkgs-lib_4": {
"locked": {
"lastModified": 1722555339,
"narHash": "sha256-uFf2QeW7eAHlYXuDktm9c25OxOyCoUOQmh5SZ9amE5Q=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1751048012,
@ -901,22 +871,6 @@
"type": "github"
}
},
"nixpkgs_10": {
"locked": {
"lastModified": 1720957393,
"narHash": "sha256-oedh2RwpjEa+TNxhg5Je9Ch6d3W1NKi7DbRO1ziHemA=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "693bc46d169f5af9c992095736e82c3488bf7dbb",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1735834308,
@ -1029,22 +983,6 @@
"type": "github"
}
},
"nixpkgs_9": {
"locked": {
"lastModified": 1723362943,
"narHash": "sha256-dFZRVSgmJkyM0bkPpaYRtG/kRMRTorUIDj8BxoOt1T4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "a58bc8ad779655e790115244571758e8de055e3d",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"pyproject-build-systems": {
"inputs": {
"nixpkgs": [
@ -1116,7 +1054,6 @@
"sops-nix": "sops-nix",
"waybar": "waybar",
"wezterm": "wezterm",
"xdg-desktop-portal-termfilepickers": "xdg-desktop-portal-termfilepickers",
"xwayland-satellite": "xwayland-satellite",
"yazi": "yazi",
"zen-browser": "zen-browser"
@ -1355,24 +1292,6 @@
"type": "github"
}
},
"treefmt-nix_3": {
"inputs": {
"nixpkgs": "nixpkgs_10"
},
"locked": {
"lastModified": 1723454642,
"narHash": "sha256-S0Gvsenh0II7EAaoc9158ZB4vYyuycvMGKGxIbERNAM=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "349de7bc435bdff37785c2466f054ed1766173be",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"uv2nix": {
"inputs": {
"nixpkgs": [
@ -1480,26 +1399,6 @@
"type": "github"
}
},
"xdg-desktop-portal-termfilepickers": {
"inputs": {
"flake-parts": "flake-parts_4",
"nixpkgs": "nixpkgs_9",
"treefmt-nix": "treefmt-nix_3"
},
"locked": {
"lastModified": 1750511941,
"narHash": "sha256-QB7TwZR31368HdQb4C9/s6ujiDtihwEbesTxKmz3Pbg=",
"owner": "guekka",
"repo": "xdg-desktop-portal-termfilepickers",
"rev": "1fe0479476465cc9061a8c7810a489e63ddc7fd7",
"type": "github"
},
"original": {
"owner": "guekka",
"repo": "xdg-desktop-portal-termfilepickers",
"type": "github"
}
},
"xwayland-satellite": {
"inputs": {
"flake-utils": "flake-utils_3",

View file

@ -73,8 +73,6 @@
url = "github:wez/wezterm?dir=nix";
};
xdg-desktop-portal-termfilepickers.url = "github:guekka/xdg-desktop-portal-termfilepickers";
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
@ -139,7 +137,6 @@
baseHomeModules = [
inputs.nix-flatpak.homeManagerModules.nix-flatpak
inputs.sops-nix.homeManagerModules.sops
inputs.xdg-desktop-portal-termfilepickers.homeManagerModules.default
];
baseHomeManager = {

View file

@ -151,11 +151,6 @@ in
"L /home/emenel/Documents - - - - /home/emenel/documents"
];
xdg.configFile."xdg-desktop-portal-termfilechooser" = {
source = ../../modules/home/file-chooser;
recursive = true;
};
home = {
file = {
".signature".source = ./dotfiles/dot_signature;

View file

@ -43,10 +43,6 @@
});
})
(final: prev: {
xdg-desktop-portal-termfilepickers = inputs.xdg-desktop-portal-termfilepickers.packages.${pkgs.system}.default;
})
(final: prev: {
manifold = prev.manifold.overrideAttrs (old: {
cmakeFlags = [
@ -326,7 +322,6 @@
pkgs.xdg-desktop-portal
pkgs.xdg-desktop-portal-wlr
pkgs.gnome-keyring
pkgs.xdg-desktop-portal-termfilepickers
];
};

View file

@ -211,14 +211,6 @@
};
services = {
xdg-desktop-portal-termfilepickers = {
enable = true;
package = pkgs.xdg-desktop-portal-termfilepickers;
desktopEnvironments = [ "common" "niri" ];
config = {
terminal_command = lib.getExe pkgs.wezterm;
};
};
flatpak = {
enable = true;
packages = [
@ -256,25 +248,6 @@
# xdg.configFile."wpaperd/config.toml".source = ../../homes/emenel/dotfiles/dot_config/wpaperd/config.toml;
home.file.".local/wallpapers".source = ../../assets/wallpapers;
# xdg.mime = {
# enable = true;
# };
# xdg.mimeApps = {
# enable = true;
# defaultApplications = {
# "application/pdf" = [ "zen-twilight.desktop" ];
# };
# associations = {
# added = {
# "application/pdf" = [ "zen-twilight.desktop" ];
# };
# removed = {
# "application/pdf" = [ "chromium-browser.desktop" ];
# };
# };
# };
xdg.portal = {
enable = true;
configPackages = [ pkgs.niri-unstable ];
@ -284,12 +257,9 @@
xdg-desktop-portal
xdg-desktop-portal-wlr
gnome-keyring
xdg-desktop-portal-termfilepickers
];
};
# home.sessionVariables.TERMCMD = "wezterm --class=file_chooser";
xdg.desktopEntries = {
rmpc = {
name = "rmpc (music player)";
@ -329,5 +299,5 @@
};
xdg.configFile."halloy/config.toml".source = ../../homes/emenel/dotfiles/dot_config/halloy/config.toml;
# xdg.configFile."nyxt/config.lisp".source = ../../homes/emenel/dotfiles/dot_config/nyxt/config.lisp;
xdg.configFile."nyxt/config.lisp".source = ../../homes/emenel/dotfiles/dot_config/nyxt/config.lisp;
}

View file

@ -1,5 +0,0 @@
### $XDG_CONFIG_HOME/xdg-desktop-portal-termfilechooser/config ###
[filechooser]
cmd=$HOME/.config/xdg-desktop-portal-termfilechooser/yazi-wrapper.sh
default_dir=$HOME

View file

@ -1,29 +0,0 @@
#!/usr/bin/env sh
set -ex
multiple="$1"
directory="$2"
save="$3"
path="$4"
out="$5"
cmd="yazi"
termcmd="${TERMCMD:-$HOME/.local/bin/wezlauncher}"
if [ "$save" = "1" ]; then
set -- --chooser-file="$out" "$path"
elif [ "$directory" = "1" ]; then
set -- --chooser-file="$out" --cwd-file="$out" "$path"
elif [ "$multiple" = "1" ]; then
set -- --chooser-file="$out" "$path"
else
set -- --chooser-file="$out" "$path"
fi
command="$termcmd $cmd"
for arg in "$@"; do
escaped=$(printf "%s" "$arg" | sed 's/"/\\"/g')
command="$command \"$escaped\""
done
sh -c "$command"

View file

@ -106,6 +106,9 @@
};
};
};
nushell = {
enable = true;
};
fish = {
enable = true;
shellAliases = {

View file

@ -154,15 +154,6 @@
linemode = "time_and_size";
show_symlink = true;
};
opener = {
edit = [
{ run = "emacsclient -r \"$@\""; desc = "emacsclient"; orphan = true; block = false; }
{ run = "nano \"$@\""; desc = "nano"; orphan = false; block = true; }
];
extract = [
{ run = "ouch d -y \"$@\""; desc = "Extract here with ouch"; }
];
};
open = {
prepend_rules = [
{ name = "*.zip"; use = "extract"; }
@ -184,12 +175,12 @@
prepend_previewers = [
{ mime = "audio/*"; run = "exifaudio"; }
# { name = "*.csv"; run = "rich-preview"; }
# { name = "*.md"; run = "rich-preview" ; }
# { name = "*.rst"; run = "rich-preview"; }
# { name = "*.ipynb"; run = "rich-preview"; }
# { name = "*.json"; run = "rich-preview"; }
# { name = "*.org"; run = "rich-preview"; }
{ name = "*.csv"; run = "rich-preview"; }
{ name = "*.md"; run = "rich-preview" ; }
{ name = "*.rst"; run = "rich-preview"; }
{ name = "*.ipynb"; run = "rich-preview"; }
{ name = "*.json"; run = "rich-preview"; }
{ name = "*.org"; run = "rich-preview"; }
# Office Documents
{ mime = "application/openxmlformats-officedocument.*"; run = "office"; }
@ -221,16 +212,16 @@
# run = "mime-ext";
# prio = "high";
# }
# {
# id = "git";
# name = "*";
# run = "git";
# }
# {
# id = "git";
# name = "*/";
# run = "git";
# }
{
id = "git";
name = "*";
run = "git";
}
{
id = "git";
name = "*/";
run = "git";
}
];
};
tasks = {
@ -242,6 +233,4 @@
xdg.configFile."yazi/theme.toml".source = ./yazi/theme.toml;
xdg.configFile."yazi/flavors".source = ./yazi/flavors;
# xdg.configFile."xdg-desktop-portal-termfilechooser/config".source = ./file-chooser/config;
# xdg.configFile."xdg-desktop-portal-termfilechooser/yazi-wrapper.sh".source = ./file-chooser/yazi-wrapper.sh;
}