yazi only with hotkey
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
hyprswitch = { url = "github:h3rmt/hyprswitch/release"; };
|
||||
|
||||
# firefox-addons = { url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; inputs.nixpkgs.follows = "nixpkgs"; };
|
||||
yazi.url = "github:sxyazi/yazi";
|
||||
zen-browser.url = "github:MarceColl/zen-browser-flake";
|
||||
};
|
||||
|
||||
|
||||
@@ -91,6 +91,8 @@ lib.mkIf (user != "tv")
|
||||
if not set -q IN_NIX_SHELL
|
||||
nxfetch
|
||||
# yazi
|
||||
if set -q SESSION_FROM_DE
|
||||
set -e SESSION_FROM_DE
|
||||
set tmp (mktemp -t "yazi-cwd.XXXXX")
|
||||
yazi $argv --cwd-file="$tmp"
|
||||
if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
|
||||
@@ -98,6 +100,7 @@ lib.mkIf (user != "tv")
|
||||
end
|
||||
rm -f -- "$tmp"
|
||||
end
|
||||
end
|
||||
'';
|
||||
functions = {
|
||||
# gpg = '';
|
||||
|
||||
@@ -385,7 +385,7 @@ lib.mkIf (user != "tv")
|
||||
"SUPER, R, exec, rofi -show drun"
|
||||
# "SUPER, T, exec, alacritty"
|
||||
# "SUPER SHIFT, T, exec, alacritty -e sh -c "ssh nxace""
|
||||
"SUPER, T, exec, kitty"
|
||||
"SUPER, T, exec, SESSION_FROM_DE=TRUE kitty"
|
||||
"SUPER SHIFT, T, exec, kitty -e sh -c 'ssh nxace'"
|
||||
# "SUPER, Z, "
|
||||
"SUPER, U, exec, thunderbird "
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
|
||||
{ pkgs, lib, user, rice, ... }:
|
||||
{ pkgs, lib, system, user, rice, inputs, ... }:
|
||||
lib.mkIf (user != "tv")
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
yazi
|
||||
# yazi
|
||||
dragon
|
||||
unar
|
||||
];
|
||||
|
||||
programs.yazi = {
|
||||
enable = true;
|
||||
# package = inputs.yazi.packages.${system}.default;
|
||||
package = inputs.yazi.packages.${system}.default;
|
||||
enableFishIntegration = true;
|
||||
settings = {
|
||||
manager = {
|
||||
@@ -28,59 +28,80 @@ lib.mkIf (user != "tv")
|
||||
];
|
||||
};
|
||||
opener = {
|
||||
edit = [
|
||||
"edit" = [
|
||||
{ run = ''hx "$@"''; desc = "helix"; block = true;}
|
||||
{ run = ''codium "$@"''; orphan = true;}
|
||||
{ run = ''nano "$@"''; desc = "nano"; block = true;}
|
||||
];
|
||||
play = [
|
||||
"play" = [
|
||||
{ run = ''mpv "$@"''; }
|
||||
{ run = ''mediainfo "$1"; echo "Press enter to exit"; read''; block = true; desc = "Show mediainfo";}
|
||||
];
|
||||
archive = [
|
||||
"archive" = [
|
||||
{ run = ''unar "$1"''; desc = "Extract here"; }
|
||||
{ run = ''tar -x "$1"''; desc = "tar -x"; }
|
||||
{ run = ''unzip "$1"''; desc = "unzip"; }
|
||||
];
|
||||
image = [
|
||||
"image" = [
|
||||
{ run = ''imv "$@"''; desc = "imv";}
|
||||
{ run = ''gimp "$@"''; desc = "gimp";}
|
||||
{ run = ''swww img --transition-type wipe --transition-angle 60 --transition-step 120 --transition-fps 120 "$@"''; desc = "swww wallpaper";}
|
||||
];
|
||||
font = [
|
||||
{ run = ''fontpreview "$@"''; desc = "fontpreview"; }
|
||||
"svg" = [
|
||||
{ run = ''inkscape "$@"''; desc = "inkscape";}
|
||||
{ run = ''firefoc "$@"''; desc = "firefox";}
|
||||
];
|
||||
document = [
|
||||
"font" = [
|
||||
{ run = ''fontpreview "$@"''; desc = "fontpreview"; }
|
||||
{ run = ''fontforge "$@"''; desc = "fortforge"; }
|
||||
];
|
||||
"document" = [
|
||||
{ run = ''zathura "$@"''; desc = "zathura"; }
|
||||
{ run = ''xournal "$@"''; desc = "xournal"; }
|
||||
{ run = ''firefox "$@"''; desc = "firefox"; }
|
||||
];
|
||||
browser = [
|
||||
"browser" = [
|
||||
{ run = ''firefox "$@"''; desc = "firefox"; }
|
||||
{ run = ''zen "$@"''; desc = "zen"; }
|
||||
{ run = ''chromium --enable-features=UseOzonePlatform --ozone-platform=wayland "$@"''; desc = "chromium"; }
|
||||
{ run = ''w3m "$@"''; desc = "w3m"; }
|
||||
{ run = ''lynx "$@"''; desc = "lynx"; }
|
||||
];
|
||||
office = [
|
||||
"office" = [
|
||||
{ run = ''libreoffice "$@"''; desc = "libreoffice"; }
|
||||
{ run = ''libreoffice --view "$@"''; desc = "libreoffice read-only"; }
|
||||
];
|
||||
shell = [
|
||||
{ run = ''sh -c "$@"''; desc = "sh -c"; }
|
||||
"shell" = [
|
||||
{ run = ''bash -c "$@"''; desc = "bash -c"; }
|
||||
{ run = ''fish -c "$@"''; desc = "fish -c"; }
|
||||
{ run = ''sh -c "$@"''; desc = "sh -c"; }
|
||||
];
|
||||
python = [
|
||||
"python" = [
|
||||
{ run = ''python "$@"''; desc = "python"; }
|
||||
];
|
||||
"directory" = [
|
||||
{ run = ''lazygit "$@"''; desc = "python"; }
|
||||
];
|
||||
};
|
||||
open.rules = [
|
||||
{ mime = "text/*"; use = "edit"; }
|
||||
{ mime = "text/plain"; use = "edit"; }
|
||||
{ mime = "text/html"; use = ["edit" "browser"]; }
|
||||
{ mime = "text/htm"; use = ["edit" "browser"]; }
|
||||
{ mime = "text/x-python"; use = "python"; }
|
||||
{ mime = "text/*"; use = "edit"; }
|
||||
|
||||
{ mine = "inode/x-empty"; use = "edit"; }
|
||||
{ mine = "inode/directory"; use = "edit"; }
|
||||
|
||||
{ mime = "image/*"; use = "image"; }
|
||||
{ mime = "image/svg"; use = ["image" "edit"]; }
|
||||
|
||||
{ mime = "video/*"; use = "video"; }
|
||||
|
||||
{ mime = "application/x-httpd-php"; use = ["edit" "browser"]; }
|
||||
{ mime = "application/json"; use = "edit"; }
|
||||
{ mime = "application/ld+json"; use = "edit"; }
|
||||
{ mime = "image/*"; use = "image"; }
|
||||
{ mime = "image/svg"; use = ["image" "edit"]; }
|
||||
{ mime = "application/pdf"; use = "document"; }
|
||||
{ mime = "application/epub"; use = "document"; }
|
||||
{ mime = "video/*"; use = "video"; }
|
||||
{ mime = "application/vnd.oasis.opendocument.*"; use = "office"; }
|
||||
{ mime = "application/vnd.ms-powerpoint"; use = "office"; }
|
||||
{ mime = "application/vnd.ms-excel"; use = "office"; }
|
||||
@@ -88,7 +109,6 @@ lib.mkIf (user != "tv")
|
||||
{ mime = "application/rtf"; use = "office"; }
|
||||
{ mime = "application/x-sh"; use = ["edit" "shell"]; }
|
||||
{ mime = "application/x-python-code"; use = "python"; }
|
||||
{ mime = "text/x-python"; use = "python"; }
|
||||
{ mime = "application/xml"; use = "edit"; }
|
||||
{ mime = "application/xul"; use = "edit"; }
|
||||
{ mime = "application/x-bzip"; use = "archive"; }
|
||||
|
||||
Reference in New Issue
Block a user