494 lines
30 KiB
Nix
494 lines
30 KiB
Nix
{ pkgs, ... }@all: with all; let
|
|
nox-var = (pkgs.pkgs-version != "24.05");
|
|
tfc = pkgs.unstable.xdg-desktop-portal-termfilechooser;
|
|
in {
|
|
home.packages = [
|
|
pkgs.unar
|
|
tfc
|
|
];
|
|
programs.yazi = {
|
|
enable = true;
|
|
# package = pkgs.yazi;
|
|
package = inputs.yazi.packages.${hyper.system}.default;
|
|
enableFishIntegration = true;
|
|
# initLua = /* lua */ '' ''; # down
|
|
keymap = {
|
|
mgr.keymap = [
|
|
{ on = "<Esc>"; run = "escape"; desc = "Exit visual mode, clear selected, or cancel search"; }
|
|
{ on = "q"; run = "quit"; desc = "Exit the process"; }
|
|
{ on = "Q"; run = "quit --no-cwd-file"; desc = "Exit the process without writing cwd-file"; }
|
|
{ on = "<C-w>"; run = "close"; desc = "Close the current tab, or quit if it is last tab"; }
|
|
{ on = "<C-z>"; run = "suspend"; desc = "Suspend the process"; }
|
|
# Hopping
|
|
{ on = "k"; run = "arrow -1"; desc = "Move cursor up"; }
|
|
{ on = "j"; run = "arrow 1"; desc = "Move cursor down"; }
|
|
{ on = "<Up>"; run = "arrow -1"; desc = "Move cursor up"; }
|
|
{ on = "<Down>"; run = "arrow 1"; desc = "Move cursor down"; }
|
|
{ on = "<C-u>"; run = "arrow -50%"; desc = "Move cursor up half page"; }
|
|
{ on = "<C-d>"; run = "arrow 50%"; desc = "Move cursor down half page"; }
|
|
{ on = "<C-b>"; run = "arrow -100%"; desc = "Move cursor up one page"; }
|
|
{ on = "<C-f>"; run = "arrow 100%"; desc = "Move cursor down one page"; }
|
|
{ on = "<PageUp>"; run = "arrow -100%"; desc = "Move cursor up one page"; }
|
|
{ on = "<PageDown>"; run = "arrow 100%"; desc = "Move cursor down one page"; }
|
|
{ on = [ "g" "C" ]; run = "cd ~/.cache"; desc = "Go to the .cache directory"; }
|
|
{ on = [ "g" "c" ]; run = "cd ~/.config"; desc = "Go to the config directory"; }
|
|
{ on = [ "g" "D" ]; run = "cd ~/Documents"; desc = "Go to the Documents directory"; }
|
|
{ on = [ "g" "d" ]; run = "cd ~/Downloads"; desc = "Go to the downloads directory"; }
|
|
{ on = [ "g" "e" ]; run = "arrow bot"; desc = "Move cursor to the end"; }
|
|
{ on = [ "g" "g" ]; run = "arrow top"; desc = "Move cursor to the top"; }
|
|
{ on = [ "g" "h" ]; run = "cd ~"; desc = "Go to the home directory"; }
|
|
{ on = [ "g" "l" ]; run = "cd ~/.locale"; desc = "Go to the .locale directory"; }
|
|
{ on = [ "g" "m" ]; run = "cd ~/media"; desc = "Go to the media (udiskie mount) directory"; }
|
|
{ on = [ "g" "n" ]; run = "cd ~/nix-dots"; desc = "Go to the Nix-Dotfiles directory"; }
|
|
{ on = [ "g" "N" ]; run = "cd /nix/store"; desc = "Go to the Nix-Store"; }
|
|
{ on = [ "g" "p" ]; run = "cd ~/projects"; desc = "Go to the projects directory"; }
|
|
{ on = [ "g" "r" ]; run = "cd /"; desc = "Go to the root (/) directory"; }
|
|
{ on = [ "g" "/" ]; run = "cd /"; desc = "Go to the root (/) directory"; }
|
|
{ on = [ "g" "t" ]; run = "cd /tmp"; desc = "Go to the /tmp directory"; }
|
|
{ on = [ "g" "v" ]; run = "cd ~/Videos"; desc = "Go to the Videos directory"; }
|
|
{ on = [ "g" "<Space>" ]; run = "cd --interactive"; desc = "Go to a directory interactively"; }
|
|
(pkgs.lib.mkIf (hyper.isServer) { on = [ "g" "s" ]; run = "cd /var/lib/hugo/nx2site"; desc = "Go to the Hugo Nx2.Site directory"; })
|
|
# Navigation
|
|
{ on = "h"; run = "leave"; desc = "Go back to the parent directory"; }
|
|
{ on = "l"; run = "enter"; desc = "Enter the child directory"; }
|
|
{ on = "<Left>"; run = "leave"; desc = "Go back to the parent directory"; }
|
|
{ on = "<Right>"; run = "enter"; desc = "Enter the child directory"; }
|
|
{ on = "H"; run = "back"; desc = "Go back to the previous directory"; }
|
|
{ on = "L"; run = "forward"; desc = "Go forward to the next directory"; }
|
|
# Seeking
|
|
{ on = "K"; run = "seek -5"; desc = "Seek up 5 units in the preview"; }
|
|
{ on = "J"; run = "seek 5"; desc = "Seek down 5 units in the preview"; }
|
|
# Selection
|
|
{ on = "<Space>"; run = [ "toggle --state=none" "arrow 1" ]; desc = "Toggle the current selection state"; }
|
|
{ on = "v"; run = "visual_mode"; desc = "Enter visual mode (selection mode)"; }
|
|
{ on = "V"; run = "visual_mode --unset"; desc = "Enter visual mode (unset mode)"; }
|
|
{ on = "<C-a>"; run = "toggle_all --state=on"; desc = "Select all files"; }
|
|
{ on = "<C-n>"; run = "toggle_all --state=off"; desc = "Deselect all files"; }
|
|
{ on = "<C-r>"; run = "toggle_all --state=none"; desc = "Inverse selection of all files"; }
|
|
# Operation
|
|
{ on = "o"; run = "open"; desc = "Open selected files"; }
|
|
{ on = "O"; run = "open --interactive"; desc = "Open selected files interactively"; }
|
|
{ on = "<Enter>"; run = "open"; desc = "Open selected files"; }
|
|
{ on = "<S-Enter>"; run = "open --interactive"; desc = "Open selected files interactively"; }
|
|
{ on = "y"; run = [ ''shell -- for path in "$@"; do echo "file://$path"; done | wl-copy -t text/uri-list'' "yank" ]; desc = "Yank selected files (copy)"; }
|
|
{ on = "y"; run = "yank"; desc = "Yank selected files (copy)"; }
|
|
{ on = "x"; run = "yank --cut"; desc = "Yank selected files (cut)"; }
|
|
{ on = "p"; run = "paste"; desc = "Paste yanked "; }
|
|
{ on = "P"; run = "paste --force"; desc = "Paste yanked (overwrite if exists)"; }
|
|
{ on = "-"; run = "link"; desc = "Symlink the absolute path of yanked files"; }
|
|
{ on = "_"; run = "link --relative"; desc = "Symlink the relative path of yanked files"; }
|
|
{ on = "<C-->"; run = "hardlink"; desc = "Hardlink yanked files"; }
|
|
{ on = "Y"; run = "unyank"; desc = "Cancel the yank status"; }
|
|
{ on = "X"; run = "unyank"; desc = "Cancel the yank status"; }
|
|
{ on = "d"; run = "remove"; desc = "Trash selected files"; }
|
|
{ on = "D"; run = "remove --permanently"; desc = "Permanently delete selected files"; }
|
|
{ on = "a"; run = "create"; desc = "Create a file (ends with / for directories)"; }
|
|
{ on = "r"; run = "rename --cursor=before_ext"; desc = "Rename selected file(s)"; }
|
|
{ on = ";"; run = "shell --interactive"; desc = "Run a shell command"; }
|
|
{ on = ":"; run = "shell --block --interactive"; desc = "Run a shell command (block until finishes)"; }
|
|
{ on = "."; run = "hidden toggle"; desc = "Toggle the visibility of hidden files"; }
|
|
{ on = "s"; run = "search fd"; desc = "Search files by name using fd"; }
|
|
{ on = "S"; run = "search rg"; desc = "Search files by content using ripgrep"; }
|
|
{ on = "<C-s>"; run = "escape --search"; desc = "Cancel the ongoing search"; }
|
|
{ on = "z"; run = "plugin zoxide"; desc = "Jump to a directory using zoxide"; }
|
|
{ on = "Z"; run = "plugin fzf"; desc = "Jump to a directory or reveal a file using fzf"; }
|
|
# Linemode
|
|
{ on = [ "m" "s" ]; run = "linemode size"; desc = "Set linemode to size"; }
|
|
{ on = [ "m" "p" ]; run = "linemode permissions"; desc = "Set linemode to permissions"; }
|
|
{ on = [ "m" "c" ]; run = "linemode ctime"; desc = "Set linemode to ctime"; }
|
|
{ on = [ "m" "m" ]; run = "linemode mtime"; desc = "Set linemode to mtime"; }
|
|
{ on = [ "m" "o" ]; run = "linemode owner"; desc = "Set linemode to owner"; }
|
|
{ on = [ "m" "n" ]; run = "linemode none"; desc = "Set linemode to none"; }
|
|
# Copy
|
|
{ on = [ "c" "c" ]; run = "copy path"; desc = "Copy the file path"; }
|
|
{ on = [ "c" "d" ]; run = "copy dirname"; desc = "Copy the directory path"; }
|
|
{ on = [ "c" "f" ]; run = "copy filename"; desc = "Copy the filename"; }
|
|
{ on = [ "c" "n" ]; run = "copy name_without_ext"; desc = "Copy the filename without extension"; }
|
|
# Filter
|
|
{ on = "f"; run = "filter --smart"; desc = "Filter files"; }
|
|
# Find
|
|
{ on = "/"; run = "find --smart"; desc = "Find next file"; }
|
|
{ on = "?"; run = "find --previous --smart"; desc = "Find previous file"; }
|
|
{ on = "n"; run = "find_arrow"; desc = "Go to the next found"; }
|
|
{ on = "N"; run = "find_arrow --previous"; desc = "Go to the previous found"; }
|
|
# Sorting
|
|
{ on = [ "," "m" ]; run = [ "sort modified --reverse=no" "linemode mtime" ]; desc = "Sort by modified time"; }
|
|
{ on = [ "," "M" ]; run = [ "sort modified --reverse" "linemode mtime" ]; desc = "Sort by modified time (reverse)"; }
|
|
{ on = [ "," "c" ]; run = [ "sort created --reverse=no" "linemode ctime" ]; desc = "Sort by created time"; }
|
|
{ on = [ "," "C" ]; run = [ "sort created --reverse" "linemode ctime" ]; desc = "Sort by created time (reverse)"; }
|
|
{ on = [ "," "e" ]; run = "sort extension --reverse=no"; desc = "Sort by extension"; }
|
|
{ on = [ "," "E" ]; run = "sort extension --reverse"; desc = "Sort by extension (reverse)"; }
|
|
{ on = [ "," "a" ]; run = "sort alphabetical --reverse=no"; desc = "Sort alphabetically"; }
|
|
{ on = [ "," "A" ]; run = "sort alphabetical --reverse"; desc = "Sort alphabetically (reverse)"; }
|
|
{ on = [ "," "n" ]; run = "sort natural --reverse=no"; desc = "Sort naturally"; }
|
|
{ on = [ "," "N" ]; run = "sort natural --reverse"; desc = "Sort naturally (reverse)"; }
|
|
{ on = [ "," "s" ]; run = [ "sort size --reverse=no" "linemode size" ]; desc = "Sort by size"; }
|
|
{ on = [ "," "S" ]; run = [ "sort size --reverse" "linemode size" ]; desc = "Sort by size (reverse)"; }
|
|
# Tab
|
|
{ on = "t"; run = "tab_create --current"; desc = "Create a new tab with CWD"; }
|
|
{ on = "<C-w>"; run = "close"; desc = "Close the current tab"; }
|
|
{ on = "1"; run = "tab_switch 0"; desc = "Switch to the first tab"; }
|
|
{ on = "2"; run = "tab_switch 1"; desc = "Switch to the second tab"; }
|
|
{ on = "3"; run = "tab_switch 2"; desc = "Switch to the third tab"; }
|
|
{ on = "4"; run = "tab_switch 3"; desc = "Switch to the fourth tab"; }
|
|
{ on = "5"; run = "tab_switch 4"; desc = "Switch to the fifth tab"; }
|
|
{ on = "6"; run = "tab_switch 5"; desc = "Switch to the sixth tab"; }
|
|
{ on = "7"; run = "tab_switch 6"; desc = "Switch to the seventh tab"; }
|
|
{ on = "8"; run = "tab_switch 7"; desc = "Switch to the eighth tab"; }
|
|
{ on = "9"; run = "tab_switch 8"; desc = "Switch to the ninth tab"; }
|
|
{ on = "<C-1>"; run = "tab_swap 0"; desc = "Swap current tab with the first tab"; }
|
|
{ on = "<C-2>"; run = "tab_swap 1"; desc = "Swap current tab with the second tab"; }
|
|
{ on = "<C-3>"; run = "tab_swap 2"; desc = "Swap current tab with the third tab"; }
|
|
{ on = "<C-4>"; run = "tab_swap 3"; desc = "Swap current tab with the fourth tab"; }
|
|
{ on = "<C-5>"; run = "tab_swap 4"; desc = "Swap current tab with the fifth tab"; }
|
|
{ on = "<C-5>"; run = "tab_swap 4"; desc = "Swap current tab with "; }
|
|
{ on = "<C-6>"; run = "tab_swap 5"; desc = "Swap current tab with the sixth tab"; }
|
|
{ on = "<C-6>"; run = "tab_swap 5"; desc = "Swap current tab with "; }
|
|
{ on = "<C-7>"; run = "tab_swap 6"; desc = "Swap current tab with the seventh tab"; }
|
|
{ on = "<C-7>"; run = "tab_swap 6"; desc = "Swap current tab with tab"; }
|
|
{ on = "<C-8>"; run = "tab_swap 7"; desc = "Swap current tab with the eighth tab"; }
|
|
{ on = "<C-8>"; run = "tab_swap 7"; desc = "Swap current tab with b"; }
|
|
{ on = "<C-9>"; run = "tab_swap 8"; desc = "Swap current tab with the ninth tab"; }
|
|
{ on = "<C-9>"; run = "tab_swap 8"; desc = "Swap current tab with "; }
|
|
{ on = "["; run = "tab_switch -1 --relative"; desc = "Switch to the previous tab"; }
|
|
{ on = "["; run = "tab_switch -1 --relative"; desc = "Switch to thtab"; }
|
|
{ on = "]"; run = "tab_switch 1 --relative"; desc = "Switch to the next tab"; }
|
|
{ on = "]"; run = "tab_switch 1 --relative"; desc = "Switch ttab"; }
|
|
{ on = "{"; run = "tab_swap -1"; desc = "Swap current tab with previous tab"; }
|
|
{ on = "{"; run = "tab_swap -1"; desc = "Swap current tab wittab"; }
|
|
{ on = "}"; run = "tab_swap 1"; desc = "Swap current tab with next tab"; }
|
|
{ on = "<Tab>"; run = "spot"; desc = "Show Spot View"; }
|
|
# Tasks
|
|
{ on = "w"; run = "tasks:show"; desc = "Show Task View"; }
|
|
];
|
|
tasks.keymap = [
|
|
# Task
|
|
{ on = "w"; run = "close"; desc = "Close Task View"; }
|
|
{ on = "q"; run = "close"; desc = "Close Task View"; }
|
|
{ on = "<Esc>"; run = "close"; desc = "Close Task View"; }
|
|
{ on = "c"; run = "cancel"; desc = "Cancel Task"; }
|
|
{ on = "i"; run = "inspect"; desc = "Inspect Task"; }
|
|
{ on = "k"; run = "arrow -1"; desc = "Up in list"; }
|
|
{ on = "j"; run = "arrow 1"; desc = "Down in list"; }
|
|
{ on = "u"; run = "arrow -5"; desc = "Up in list (fast)"; }
|
|
{ on = "d"; run = "arrow 5"; desc = "Down in list (fast)"; }
|
|
];
|
|
help.keymap = [
|
|
# Help
|
|
{ on = "~"; run = "help"; desc = "Open help"; }
|
|
{ on = "?"; run = "help"; desc = "Open help"; }
|
|
{ on = "<F1>"; run = "help"; desc = "Open help"; }
|
|
];
|
|
spot.keymap = [
|
|
# Spot
|
|
{ on = "<Tab>"; run = "close"; desc = "Close Spot View"; }
|
|
{ on = "q"; run = "close"; desc = "Close Spot View"; }
|
|
{ on = "<Esc>"; run = "close"; desc = "Close Spot View"; }
|
|
{ on = "k"; run = "arrow -1"; desc = "Up in list"; }
|
|
{ on = "j"; run = "arrow 1"; desc = "Down in list"; }
|
|
{ on = "u"; run = "arrow -5"; desc = "Up in list (fast)"; }
|
|
{ on = "d"; run = "arrow 5"; desc = "Down in list (fast)"; }
|
|
{ on = [ "g" "g" ]; run = "arrow top"; desc = "Move cursor to the top"; }
|
|
{ on = [ "g" "e" ]; run = "arrow bot"; desc = "Move cursor to the end"; }
|
|
{ on = "c"; run = "copy cell"; desc = "Copy Selected Cell"; }
|
|
];
|
|
};
|
|
settings = {
|
|
mgr = {
|
|
layout = [2 3 4];
|
|
sort_by = "natural";
|
|
sort_sensitive = true;
|
|
sort_reverse = false;
|
|
sort_dir_first = true;
|
|
linemode = "size";
|
|
show_hidden = false;
|
|
show_symlink = true;
|
|
};
|
|
opener = {
|
|
"edit" = [
|
|
{ run = ''hx "$@"''; desc = "Helix"; block = true; }
|
|
{ run = ''codium "$@"''; desc = "VS Code"; orphan = true; }
|
|
{ run = ''cat "$@" | wl-copy''; desc = "Copy Contents"; }
|
|
];
|
|
"play" = [
|
|
{ run = ''mpv "$@"''; desc = "MPV"; orphan = true; }
|
|
{ run = ''mpv --vf=negate "$@"''; desc = "MPV inverted"; orphan = true; }
|
|
{ run = ''mediainfo "$1"; echo "Press enter to return to yazi"; read''; block = true; desc = "Show mediainfo"; }
|
|
];
|
|
"archive" = [
|
|
{ run = ''unar "$@"''; desc = "Extract here"; }
|
|
{ run = ''tar -x "$@"''; desc = "tar -x"; }
|
|
{ run = ''unzip "$@"''; desc = "unzip"; }
|
|
];
|
|
"image" = [
|
|
{ run = ''imv "$@"''; desc = "IMV"; orphan = true; }
|
|
{ run = ''gimp "$@"''; desc = "Gimp"; orphan = true; }
|
|
{ run = ''swww img --transition-type wipe --transition-angle 60 --transition-step 120 --transition-fps 120 "$1"''; desc = "swww wallpaper"; }
|
|
{ run = ''exiftool "$1"; echo "Press enter to return to yazi"; read''; desc = "View Exif Data"; }
|
|
{ run = ''for f in "$1"; do magick "$f" -auto-orient "''${f%.*}.pdf"; done''; desc = "Convert to PDF"; }
|
|
];
|
|
"svg" = [
|
|
{ run = ''inkscape "$@"''; desc = "Inkscape"; orphan = true; }
|
|
{ run = ''firefox "$@"''; desc = "Firefox"; orphan = true; }
|
|
];
|
|
"font" = [
|
|
{ run = ''fontpreview "$@"''; desc = "Fontpreview"; orphan = true; }
|
|
{ run = ''fontforge "$@"''; desc = "Fortforge"; orphan = true; }
|
|
];
|
|
"document" = [
|
|
{ run = ''zathura "$@"''; desc = "Zathura"; orphan = true; }
|
|
{ run = ''firefox "$@"''; desc = "Firefox"; orphan = true; }
|
|
{ run = ''nxgs flip "$@"''; desc = "nxgs flip"; }
|
|
{ run = ''nxgs rotate "$@"''; desc = "nxgs rotate"; }
|
|
{ run = ''nxgs interactive-merge "$@"''; block = true; desc = "nxgs merge"; }
|
|
];
|
|
"browser" = [
|
|
{ run = ''firefox "$@"''; desc = "Firefox"; orphan = true; }
|
|
{ run = ''chromium --enable-features=UseOzonePlatform --ozone-platform=wayland "$@"''; desc = "Chromium"; orphan = true; }
|
|
{ run = ''w3m "$@"''; desc = "w3m"; }
|
|
{ run = ''lynx "$@"''; desc = "Lynx"; }
|
|
];
|
|
"office" = [
|
|
{ run = ''libreoffice "$@"''; desc = "LibreOffice"; orphan = true; }
|
|
{ run = ''libreoffice --view "$@"''; desc = "LibreOffice read-only"; orphan = true; }
|
|
];
|
|
"shell" = [
|
|
{ run = ''bash -c "$1"; echo "Press enter to return to yazi"; read''; desc = "bash -c"; }
|
|
{ run = ''fish -c "$1"; echo "Press enter to return to yazi"; read''; desc = "fish -c"; }
|
|
{ run = ''sh -c "$1"; echo "Press enter to return to yazi"; read''; desc = "sh -c"; }
|
|
];
|
|
"python" = [
|
|
{ run = ''python "$@"; echo "Press enter to return to yazi"; read''; desc = "Python"; block = true; }
|
|
];
|
|
"directory" = [
|
|
{ run = ''lazygit "$1"''; desc = "LazyGit"; }
|
|
];
|
|
};
|
|
open.rules = [
|
|
{ mime = "text/html"; use = [ "edit" "browser" ]; }
|
|
{ mime = "text/htm"; use = [ "edit" "browser" ]; }
|
|
{ mime = "text/x-script.python"; use = [ "edit" "python" ]; }
|
|
{ mime = "text/script.python"; use = [ "edit" "python" ]; }
|
|
{ mime = "text/*"; use = "edit"; }
|
|
{ mime = "text"; use = "edit"; }
|
|
|
|
{ mine = "inode/x-empty"; use = "directory"; }
|
|
{ mine = "inode/directory"; use = "directory"; }
|
|
|
|
{ mime = "image/*"; use = "image"; }
|
|
{ mime = "image/svg"; use = [ "image" "edit" ]; }
|
|
|
|
{ mime = "video/*"; use = "play"; }
|
|
{ mime = "audio/*"; use = "play"; }
|
|
|
|
{ mime = "application/x-httpd-php"; use = [ "edit" "browser" ]; }
|
|
{ mime = "application/javascript"; use = "edit"; }
|
|
{ mime = "application/json"; use = "edit"; }
|
|
{ mime = "application/ld+json"; use = "edit"; }
|
|
{ mime = "application/pdf"; use = "document"; }
|
|
{ mime = "application/epub"; use = "document"; }
|
|
{ mime = "application/vnd.oasis.opendocument.*"; use = "office"; }
|
|
{ mime = "application/vnd.ms-powerpoint"; use = "office"; }
|
|
{ mime = "application/vnd.ms-excel"; use = "office"; }
|
|
{ mime = "application/vnd.openxmlformats-officedocument.*"; use = [ "office" "edit" ]; }
|
|
{ mime = "application/rtf"; use = "office"; }
|
|
{ mime = "application/x-sh"; use = [ "edit" "shell" ]; }
|
|
{ mime = "application/x-python-code"; use = "python"; }
|
|
{ mime = "application/xml"; use = "edit"; }
|
|
{ mime = "application/xul"; use = "edit"; }
|
|
{ mime = "application/x-bzip"; use = "archive"; }
|
|
{ mime = "application/x-bzip2"; use = "archive"; }
|
|
{ mime = "application/gzip"; use = "archive"; }
|
|
{ mime = "application/vnd.rar"; use = "archive"; }
|
|
{ mime = "application/x-tar"; use = "archive"; }
|
|
{ mime = "application/zip"; use = "archive"; }
|
|
{ mime = "application/x-7z-compressed"; use = "archive"; }
|
|
];
|
|
};
|
|
theme = with rice.color; {
|
|
mgr = {
|
|
cwd = { fg = foreground; bg = background; };
|
|
hovered = { fg = background; bg = accent.base; };
|
|
preview_hovered = { underline = false; };
|
|
find_keyword = { fg = weird.base; italic = true; };
|
|
find_position = { fg = weird.base; bg = "reset"; italic = true; };
|
|
marker_selected = { fg = accent.base; bg = accent.base; };
|
|
marker_copied = { fg = weird.base; bg = weird.base; };
|
|
marker_cut = { fg = negative.base; bg = negative.base; };
|
|
tab_active = { fg = background; bg = accent.base; };
|
|
tab_inactive = { fg = accent.base; bg = background; };
|
|
tab_width = 1;
|
|
border_symbol = "│";
|
|
border_style = { fg = border; };
|
|
};
|
|
tabs = {
|
|
active = { fg = secondary.dark; bg = secondary.base; };
|
|
inactive = { fg = secondary.base; bg = secondary.dark; };
|
|
# sep_inner = { open = "[", close = "]" };
|
|
# sep_outer = { open = "[", close = "]" };
|
|
};
|
|
mode = {
|
|
main_main = { fg = yellow.bright; bg = yellow.dark; };
|
|
select_main = { fg = cyan.bright; bg = cyan.dark; };
|
|
unset_main = { fg = blue.bright; bg = blue.dark; };
|
|
main_alternative = { fg = yellow.brighter; bg = yellow.dark; };
|
|
select_alternative = { fg = cyan.brighter; bg = cyan.dark; };
|
|
unset_alternative = { fg = blue.brighter; bg = blue.dark; };
|
|
};
|
|
confirm = {
|
|
border = { fg = border; };
|
|
title = { fg = accent.base; };
|
|
body = { fg = "#ff0000"; };
|
|
list = { fg = "#ff0000"; };
|
|
btn_yes = { fg = positive.base; };
|
|
btn_no = { fg = negative.base; };
|
|
btn_lables = { fg = foreground; };
|
|
};
|
|
spot = {
|
|
border = { fg = border; };
|
|
title = { fg = accent.base; };
|
|
tbl_col = { fg = accent.base; };
|
|
tbl_cell = { fg = secondary.base; };
|
|
};
|
|
notify = {
|
|
title_info = { fg = accent.base; };
|
|
title_warn = { fg = weird.base; };
|
|
title_error = { fg = special.base; };
|
|
};
|
|
pick = {
|
|
border = { fg = border; };
|
|
active = { fg = accent.base; };
|
|
inactive = { fg = subtle.base; };
|
|
};
|
|
status = {
|
|
# sep_right = { open = ""; close = ""; };
|
|
# sep_left = { open = ""; close = ""; };
|
|
sepr_style = { fg = accent.base; bg = black.base; };
|
|
progress_label = { fg = secondary.base; bold = true; };
|
|
progress_normal = { fg = accent.base; bg = black.base; };
|
|
progress_error = { fg = negative.base; bg = black.base; };
|
|
perm_type = { fg = special.base; };
|
|
perm_read = { fg = accent.base; };
|
|
perm_write = { fg = secondary.base; };
|
|
perm_exec = { fg = tertiary.base; };
|
|
perm_sep = { fg = special.base; };
|
|
};
|
|
indicator = { # your "cursor"
|
|
parent = { fg = secondary.darker; bg = secondary.base; };
|
|
current = { fg = accent.darker; bg = accent.base; };
|
|
preview = { fg = secondary.base; bg = secondary.dark; };
|
|
# padding = { open = " "; close = " "; };
|
|
};
|
|
cmp = {
|
|
border = { fg = border; };
|
|
active = { fg = accent.base; };
|
|
inactive = { fg = subtle.base; };
|
|
# icon_file =
|
|
# icon_folder =
|
|
# icon_command
|
|
};
|
|
input = {
|
|
border = { fg = border; };
|
|
title = {};
|
|
value = {};
|
|
selected = { reversed = true; };
|
|
};
|
|
select = {
|
|
border = { fg = border; };
|
|
active = { fg = accent.base; };
|
|
inactive = {};
|
|
};
|
|
tasks = {
|
|
border = { fg = border2; };
|
|
title = {};
|
|
hovered = { underline = true; };
|
|
};
|
|
which = {
|
|
mask = { bg = black.base; };
|
|
cand = { fg = accent.base; };
|
|
rest = { fg = secondary.base; };
|
|
desc = { fg = tertiary.base; };
|
|
separator = " ";
|
|
separator_style = { fg = foreground; };
|
|
};
|
|
help = {
|
|
on = { fg = accent.base; };
|
|
run = { fg = secondary.base; };
|
|
desc = { fg = tertiary.base; italic = true; };
|
|
hovered = { bg = accent.bright; bold = true; };
|
|
footer = { fg = accent.base; bg = subtle.dark; };
|
|
};
|
|
filetype = {
|
|
rules = [
|
|
# Empty files
|
|
{ mime = "inode/x-empty"; fg = white.dark; }
|
|
{ mime = "inode/directory"; fg = accent.base; }
|
|
|
|
{ url = "*"; is = "link"; fg = tertiary.base; }
|
|
{ url = "*"; is = "orphan"; fg = negative.base; }
|
|
{ url = "*"; is = "block"; fg = special.base; }
|
|
{ url = "*"; is = "char"; fg = special.bright; }
|
|
{ url = "*"; is = "exec"; fg = secondary.base; }
|
|
{ url = "*"; is = "fifo"; fg = weird.base; }
|
|
{ url = "*"; is = "sock"; fg = weird.bright; }
|
|
{ url = "*"; is = "sticky"; fg = special.base; }
|
|
|
|
# Fallback
|
|
{ url = "*"; fg = foreground; }
|
|
];
|
|
};
|
|
};
|
|
} // (if nox-var then {
|
|
shellWrapperName = "ya";
|
|
initLua = /* lua */ ''
|
|
require("zoxide"):setup {
|
|
update_db = true,
|
|
}
|
|
Status:children_add(function()
|
|
local h = cx.active.current.hovered
|
|
if not h or ya.target_family() ~= "unix" then
|
|
return ""
|
|
end
|
|
|
|
return ui.Line {
|
|
ui.Span(ya.user_name(h.cha.uid) or tostring(h.cha.uid)):fg("magenta"),
|
|
":",
|
|
ui.Span(ya.group_name(h.cha.gid) or tostring(h.cha.gid)):fg("magenta"),
|
|
" ",
|
|
}
|
|
end, 500, Status.RIGHT)
|
|
'';
|
|
plugins = with pkgs; {
|
|
inherit glow git;
|
|
};
|
|
} else {});
|
|
|
|
xdg = {
|
|
configFile."xdg-desktop-portal-termfilechooser/config" = {
|
|
force = true;
|
|
text = ''
|
|
[filechooser]
|
|
cmd=/home/nx2/wrapper.sh
|
|
default_dir=$HOME
|
|
env=TERMCMD=ghostty --title="terminal-file-picker -e"
|
|
open_mode=suggested
|
|
save_mode=last
|
|
'';
|
|
};
|
|
portal = {
|
|
enable = true;
|
|
xdgOpenUsePortal = true;
|
|
config.common."org.freedesktop.impl.portal.FileChooser" = "termfilechooser";
|
|
extraPortals = [ tfc ] ++ (with pkgs; [
|
|
xdg-desktop-portal-hyprland
|
|
xdg-desktop-portal
|
|
xdg-desktop-portal-gnome
|
|
xdg-desktop-portal-gtk
|
|
xdg-desktop-portal-hyprland
|
|
xdg-desktop-portal-wlr
|
|
]);
|
|
};
|
|
};
|
|
home.sessionVariables."GTK_USE_PORTAL" = "1";
|
|
}
|