From 5a0a85aed973c1fe71b6c31edfa3d5ff14dc2621 Mon Sep 17 00:00:00 2001 From: Lukas Wurzinger Date: Sun, 29 Dec 2024 22:20:56 +0100 Subject: [PATCH] stuff --- .envrc | 10 +- .gitignore | 3 + devenv.nix | 14 ++ flake.lock | 277 ++++++++++++++++++++-- flake.nix | 28 ++- home/bash/.bashrc | 9 +- home/bottom/.config/bottom/bottom.toml | 15 ++ home/gitui/.config/gitui/key_bindings.ron | 31 +++ home/ssh/.ssh/config | 2 + home/yazi/.config/yazi/theme.toml | 191 +++++++++++++++ home/yazi/.config/yazi/yazi.toml | 205 ++++++++++++++++ 11 files changed, 766 insertions(+), 19 deletions(-) create mode 100644 devenv.nix create mode 100644 home/bottom/.config/bottom/bottom.toml create mode 100644 home/gitui/.config/gitui/key_bindings.ron create mode 100644 home/yazi/.config/yazi/theme.toml create mode 100644 home/yazi/.config/yazi/yazi.toml diff --git a/.envrc b/.envrc index 3550a30..cb982f0 100644 --- a/.envrc +++ b/.envrc @@ -1 +1,9 @@ -use flake +watch_file flake.nix +watch_file flake.lock + +DEVENV_ROOT_FILE="$(mktemp)" +printf %s "$PWD" > "$DEVENV_ROOT_FILE" +if ! use flake . --override-input devenv-root "file+file://$DEVENV_ROOT_FILE" +then + echo "devenv could not be built. The devenv environment was not loaded. Make the necessary changes to devenv.nix and hit enter to try again." >&2 +fi diff --git a/.gitignore b/.gitignore index 9b42106..55281ec 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ .direnv/ +.devenv/ + +.pre-commit-config.yaml diff --git a/devenv.nix b/devenv.nix new file mode 100644 index 0000000..67c93b5 --- /dev/null +++ b/devenv.nix @@ -0,0 +1,14 @@ +{ + pre-commit.hooks = { + # Nix + alejandra.enable = true; + deadnix.enable = true; + statix.enable = true; + + # Flakes + flake-checker.enable = true; + + # Shell + shellcheck.enable = true; + }; +} diff --git a/flake.lock b/flake.lock index 0e97f2c..e69b4dc 100644 --- a/flake.lock +++ b/flake.lock @@ -1,15 +1,97 @@ { "nodes": { - "flake-parts": { + "cachix": { "inputs": { - "nixpkgs-lib": "nixpkgs-lib" + "devenv": [ + "devenv" + ], + "flake-compat": [ + "devenv" + ], + "git-hooks": [ + "devenv" + ], + "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1726153070, - "narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=", + "lastModified": 1728672398, + "narHash": "sha256-KxuGSoVUFnQLB2ZcYODW7AVPAh9JqRlD5BrfsC/Q4qs=", + "owner": "cachix", + "repo": "cachix", + "rev": "aac51f698309fd0f381149214b7eee213c66ef0a", + "type": "github" + }, + "original": { + "owner": "cachix", + "ref": "latest", + "repo": "cachix", + "type": "github" + } + }, + "devenv": { + "inputs": { + "cachix": "cachix", + "flake-compat": "flake-compat", + "git-hooks": "git-hooks", + "nix": "nix", + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1735241861, + "narHash": "sha256-n8Ww/v5eCKi0+zGe+5nfAPpxGsYu4MRWokWyzryswS4=", + "owner": "cachix", + "repo": "devenv", + "rev": "991abff153b995192bf36655394246fc97ba8627", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "devenv", + "type": "github" + } + }, + "devenv-root": { + "flake": false, + "locked": { + "narHash": "sha256-d6xi4mKdjkX2JFicDIv5niSzpyI0m/Hnm8GGAIU04kY=", + "type": "file", + "url": "file:///dev/null" + }, + "original": { + "type": "file", + "url": "file:///dev/null" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "devenv", + "nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1712014858, + "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a", + "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d", "type": "github" }, "original": { @@ -18,13 +100,130 @@ "type": "github" } }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "git-hooks": { + "inputs": { + "flake-compat": [ + "devenv" + ], + "gitignore": "gitignore", + "nixpkgs": [ + "devenv", + "nixpkgs" + ], + "nixpkgs-stable": [ + "devenv" + ] + }, + "locked": { + "lastModified": 1730302582, + "narHash": "sha256-W1MIJpADXQCgosJZT8qBYLRuZls2KSiKdpnTVdKBuvU=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "af8a16fe5c264f5e9e18bcee2859b40a656876cf", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "devenv", + "git-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "libgit2": { + "flake": false, + "locked": { + "lastModified": 1697646580, + "narHash": "sha256-oX4Z3S9WtJlwvj0uH9HlYcWv+x1hqp8mhXl7HsLu2f0=", + "owner": "libgit2", + "repo": "libgit2", + "rev": "45fd9ed7ae1a9b74b957ef4f337bc3c8b3df01b5", + "type": "github" + }, + "original": { + "owner": "libgit2", + "repo": "libgit2", + "type": "github" + } + }, + "nix": { + "inputs": { + "flake-compat": [ + "devenv" + ], + "flake-parts": "flake-parts", + "libgit2": "libgit2", + "nixpkgs": "nixpkgs_2", + "nixpkgs-23-11": [ + "devenv" + ], + "nixpkgs-regression": [ + "devenv" + ], + "pre-commit-hooks": [ + "devenv" + ] + }, + "locked": { + "lastModified": 1727438425, + "narHash": "sha256-X8ES7I1cfNhR9oKp06F6ir4Np70WGZU5sfCOuNBEwMg=", + "owner": "domenkozar", + "repo": "nix", + "rev": "f6c5ae4c1b2e411e6b1e6a8181cc84363d6a7546", + "type": "github" + }, + "original": { + "owner": "domenkozar", + "ref": "devenv-2.24", + "repo": "nix", + "type": "github" + } + }, "nixpkgs": { "locked": { - "lastModified": 1726243404, - "narHash": "sha256-sjiGsMh+1cWXb53Tecsm4skyFNag33GPbVgCdfj3n9I=", + "lastModified": 1730531603, + "narHash": "sha256-Dqg6si5CqIzm87sp57j5nTaeBbWhHFaVyG7V6L8k3lY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "345c263f2f53a3710abe117f28a5cb86d0ba4059", + "rev": "7ffd9ae656aec493492b44d0ddfb28e79a1ea25d", "type": "github" }, "original": { @@ -36,20 +235,70 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1725233747, - "narHash": "sha256-Ss8QWLXdr2JCBPcYChJhz4xJm+h/xjl4G0c0XlP6a74=", + "lastModified": 1733096140, + "narHash": "sha256-1qRH7uAUsyQI7R1Uwl4T+XvdNv778H0Nb5njNrqvylY=", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz" }, "original": { "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1717432640, + "narHash": "sha256-+f9c4/ZX5MWDOuB1rKoWj+lBNm0z0rs4CK47HBLxy1o=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "88269ab3044128b7c2f4c7d68448b2fb50456870", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "release-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1716977621, + "narHash": "sha256-Q1UQzYcMJH4RscmpTkjlgqQDX5yi1tZL0O345Ri6vXQ=", + "owner": "cachix", + "repo": "devenv-nixpkgs", + "rev": "4267e705586473d3e5c8d50299e71503f16a6fb6", + "type": "github" + }, + "original": { + "owner": "cachix", + "ref": "rolling", + "repo": "devenv-nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1735291276, + "narHash": "sha256-NYVcA06+blsLG6wpAbSPTCyLvxD/92Hy4vlY9WxFI1M=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "634fd46801442d760e09493a794c4f15db2d0cbb", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" } }, "root": { "inputs": { - "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs" + "devenv": "devenv", + "devenv-root": "devenv-root", + "flake-parts": "flake-parts_2", + "nixpkgs": "nixpkgs_4" } } }, diff --git a/flake.nix b/flake.nix index e6e57f7..ac67885 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,14 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-parts.url = "github:hercules-ci/flake-parts"; + + devenv-root = { + url = "file+file:///dev/null"; + flake = false; + }; + devenv.url = "github:cachix/devenv"; }; outputs = { @@ -12,6 +19,10 @@ ... } @ inputs: flake-parts.lib.mkFlake {inherit inputs;} { + imports = [ + inputs.devenv.flakeModule + ]; + systems = nixpkgs.lib.systems.flakeExposed; perSystem = { @@ -21,10 +32,21 @@ }: { packages.plow = pkgs.callPackage ./plow {}; - devShells.default = pkgs.mkShellNoCC { - PLOW_FROM = "./home"; + devenv.shells.default = { + devenv.root = let + devenvRootFileContent = builtins.readFile inputs.devenv-root.outPath; + in + pkgs.lib.mkIf (devenvRootFileContent != "") devenvRootFileContent; - packages = [self'.packages.plow]; + env.PLOW_FROM = "./home"; + + imports = [ + ./devenv.nix + ]; + + packages = [ + self'.packages.plow + ]; }; }; }; diff --git a/home/bash/.bashrc b/home/bash/.bashrc index fc25da9..85d8a4a 100644 --- a/home/bash/.bashrc +++ b/home/bash/.bashrc @@ -1 +1,8 @@ -source /etc/bash.bashrc +# shellcheck shell=bash + +for rc in /etc/bashrc /etc/*.bashrc; do + if [[ -e $rc ]]; then + # shellcheck disable=SC1090 + source "$rc" + fi +done diff --git a/home/bottom/.config/bottom/bottom.toml b/home/bottom/.config/bottom/bottom.toml new file mode 100644 index 0000000..f276947 --- /dev/null +++ b/home/bottom/.config/bottom/bottom.toml @@ -0,0 +1,15 @@ +[flags] +rate = "1s" +retention = "10m" + +temperature_type = "celsius" + +battery = true +enable_cache_memory = true + +tree = true +show_table_scroll_position = true +process_command = false + +[styles] +theme = "gruvbox" diff --git a/home/gitui/.config/gitui/key_bindings.ron b/home/gitui/.config/gitui/key_bindings.ron new file mode 100644 index 0000000..edfc963 --- /dev/null +++ b/home/gitui/.config/gitui/key_bindings.ron @@ -0,0 +1,31 @@ +( + open_help: Some(( code: F(1), modifiers: "")), + + move_left: Some(( code: Char('h'), modifiers: "")), + move_right: Some(( code: Char('l'), modifiers: "")), + move_up: Some(( code: Char('k'), modifiers: "")), + move_down: Some(( code: Char('j'), modifiers: "")), + + popup_up: Some(( code: Char('p'), modifiers: "CONTROL")), + popup_down: Some(( code: Char('n'), modifiers: "CONTROL")), + page_up: Some(( code: Char('b'), modifiers: "CONTROL")), + page_down: Some(( code: Char('f'), modifiers: "CONTROL")), + home: Some(( code: Char('g'), modifiers: "")), + end: Some(( code: Char('G'), modifiers: "SHIFT")), + shift_up: Some(( code: Char('K'), modifiers: "SHIFT")), + shift_down: Some(( code: Char('J'), modifiers: "SHIFT")), + + edit_file: Some(( code: Char('I'), modifiers: "SHIFT")), + + status_reset_item: Some(( code: Char('U'), modifiers: "SHIFT")), + + diff_reset_lines: Some(( code: Char('u'), modifiers: "")), + diff_stage_lines: Some(( code: Char('s'), modifiers: "")), + + stashing_save: Some(( code: Char('w'), modifiers: "")), + stashing_toggle_index: Some(( code: Char('m'), modifiers: "")), + + stash_open: Some(( code: Char('l'), modifiers: "")), + + abort_merge: Some(( code: Char('M'), modifiers: "SHIFT")), +) diff --git a/home/ssh/.ssh/config b/home/ssh/.ssh/config index 7a61ca4..39f4d46 100644 --- a/home/ssh/.ssh/config +++ b/home/ssh/.ssh/config @@ -1,3 +1,5 @@ +Include local/* + Host * Compression yes ServerAliveInterval 60 diff --git a/home/yazi/.config/yazi/theme.toml b/home/yazi/.config/yazi/theme.toml new file mode 100644 index 0000000..2ae22f1 --- /dev/null +++ b/home/yazi/.config/yazi/theme.toml @@ -0,0 +1,191 @@ +# : Manager {{{ + +[manager] +cwd = { fg = "#94e2d5" } + +# Hovered +hovered = { reversed = true } +preview_hovered = { underline = true } + +# Find +find_keyword = { fg = "#f9e2af", bold = true, italic = true, underline = true } +find_position = { fg = "#f5c2e7", bg = "reset", bold = true, italic = true } + +# Marker +marker_copied = { fg = "#a6e3a1", bg = "#a6e3a1" } +marker_cut = { fg = "#f38ba8", bg = "#f38ba8" } +marker_marked = { fg = "#94e2d5", bg = "#94e2d5" } +marker_selected = { fg = "#f9e2af", bg = "#f9e2af" } + +# Tab +tab_active = { reversed = true } +tab_inactive = {} +tab_width = 1 + +# Count +count_copied = { fg = "#1e1e2e", bg = "#a6e3a1" } +count_cut = { fg = "#1e1e2e", bg = "#f38ba8" } +count_selected = { fg = "#1e1e2e", bg = "#f9e2af" } + +# Border +border_symbol = "│" +border_style = { fg = "#7f849c" } + +# : }}} + + +# : Mode {{{ + +[mode] + +normal_main = { fg = "#1e1e2e", bg = "#89b4fa", bold = true } +normal_alt = { fg = "#89b4fa", bg = "#313244" } + +# Select mode +select_main = { fg = "#1e1e2e", bg = "#a6e3a1", bold = true } +select_alt = { fg = "#a6e3a1", bg = "#313244" } + +# Unset mode +unset_main = { fg = "#1e1e2e", bg = "#f2cdcd", bold = true } +unset_alt = { fg = "#f2cdcd", bg = "#313244" } + +# : }}} + + +# : Status bar {{{ + +[status] +separator_open = "" +separator_close = "" + +# Progress +progress_label = { fg = "#ffffff", bold = true } +progress_normal = { fg = "#89b4fa", bg = "#45475a" } +progress_error = { fg = "#f38ba8", bg = "#45475a" } + +# Permissions +perm_sep = { fg = "#7f849c" } +perm_type = { fg = "#89b4fa" } +perm_read = { fg = "#f9e2af" } +perm_write = { fg = "#f38ba8" } +perm_exec = { fg = "#a6e3a1" } + +# TODO: -- remove these once Yazi 0.4 gets released +separator_style = { fg = "#313244", bg = "#313244" } +mode_normal = { fg = "#1e1e2e", bg = "#89b4fa", bold = true } +mode_select = { fg = "#1e1e2e", bg = "#a6e3a1", bold = true } +mode_unset = { fg = "#1e1e2e", bg = "#f2cdcd", bold = true } +permissions_t = { fg = "#89b4fa" } +permissions_r = { fg = "#f9e2af" } +permissions_w = { fg = "#f38ba8" } +permissions_x = { fg = "#a6e3a1" } +permissions_s = { fg = "#7f849c" } +# TODO: remove these once Yazi 0.4 gets released -- + +# : }}} + + +# : Pick {{{ + +[pick] +border = { fg = "#89b4fa" } +active = { fg = "#f5c2e7", bold = true } +inactive = {} + +# TODO: -- remove these once Yazi 0.4 gets released +[select] +border = { fg = "#89b4fa" } +active = { fg = "#f5c2e7", bold = true } +inactive = {} +# TODO: remove these once Yazi 0.4 gets released -- + +# : }}} + + +# : Input {{{ + +[input] +border = { fg = "#89b4fa" } +title = {} +value = {} +selected = { reversed = true } + +# : }}} + + +# : Completion {{{ + +[completion] +border = { fg = "#89b4fa" } + +# : }}} + + +# : Tasks {{{ + +[tasks] +border = { fg = "#89b4fa" } +title = {} +hovered = { fg = "#f5c2e7", underline = true } + +# : }}} + + +# : Which {{{ + +[which] +mask = { bg = "#313244" } +cand = { fg = "#94e2d5" } +rest = { fg = "#9399b2" } +desc = { fg = "#f5c2e7" } +separator = "  " +separator_style = { fg = "#585b70" } + +# : }}} + + +# : Help {{{ + +[help] +on = { fg = "#94e2d5" } +run = { fg = "#f5c2e7" } +hovered = { reversed = true, bold = true } +footer = { fg = "#313244", bg = "#cdd6f4" } + +# : }}} + + +# : Notify {{{ + +[notify] +title_info = { fg = "#a6e3a1" } +title_warn = { fg = "#f9e2af" } +title_error = { fg = "#f38ba8" } + +# : }}} + + +# : File-specific styles {{{ + +[filetype] + +rules = [ + # Images + { mime = "image/*", fg = "#94e2d5" }, + + # Media + { mime = "{audio,video}/*", fg = "#f9e2af" }, + + # Archives + { mime = "application/*zip", fg = "#f5c2e7" }, + { mime = "application/x-{tar,bzip*,7z-compressed,xz,rar}", fg = "#f5c2e7" }, + + # Documents + { mime = "application/{pdf,doc,rtf}", fg = "#a6e3a1" }, + + # Fallback + { name = "*", fg = "#cdd6f4" }, + { name = "*/", fg = "#89b4fa" } +] + +# : }}} diff --git a/home/yazi/.config/yazi/yazi.toml b/home/yazi/.config/yazi/yazi.toml new file mode 100644 index 0000000..ea50279 --- /dev/null +++ b/home/yazi/.config/yazi/yazi.toml @@ -0,0 +1,205 @@ +"$schema" = "https://yazi-rs.github.io/schemas/yazi.json" + +[manager] +sort_by = "natural" +sort_sensitive = true +sort_reverse = false +sort_dir_first = true +sort_translit = true + +linemode = "size" +show_hidden = false +show_symlink = true +scrolloff = 5 +title_format = "Yazi: {cwd}" + +[preview] +wrap = "no" +tab_size = 4 + +[opener] +# TODO + +edit = [ + { run = '${EDITOR:-hx} "$@"', desc = "$EDITOR", block = true, for = "unix" }, +] +open = [ + { run = 'xdg-open -- "$1"', desc = "Open", for = "unix" }, +] +reveal = [ + { run = 'xdg-open -- "$(dirname -- "$1")"', desc = "Reveal", for = "unix" }, + { run = '''exiftool -- "$1"; echo "Press enter to exit"; read _''', block = true, desc = "Show EXIF", for = "unix" }, +] +extract = [ + { run = 'ya pub extract --list "$@"', desc = "Extract here", for = "unix" }, +] +play = [ + { run = 'xdg-open -- "$@"', orphan = true, for = "unix" }, + { run = '''mediainfo "$1"; echo "Press enter to exit"; read _''', block = true, desc = "Show media info", for = "unix" }, +] + +[open] +# TODO + +rules = [ + # Folder + { name = "*/", use = [ "edit", "open", "reveal" ] }, + # Text + { mime = "text/*", use = [ "edit", "reveal" ] }, + # Image + { mime = "image/*", use = [ "open", "reveal" ] }, + # Media + { mime = "{audio,video}/*", use = [ "play", "reveal" ] }, + # Archive + { mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", use = [ "extract", "reveal" ] }, + # JSON + { mime = "application/{json,ndjson}", use = [ "edit", "reveal" ] }, + { mime = "*/javascript", use = [ "edit", "reveal" ] }, + # Empty file + { mime = "inode/empty", use = [ "edit", "reveal" ] }, + # Fallback + { name = "*", use = [ "open", "reveal" ] }, +] + +[plugin] +# TODO + +fetchers = [ + # Mimetype + { id = "mime", name = "*", run = "mime", if = "!mime", prio = "high" }, +] +spotters = [ + { name = "*/", run = "folder" }, + # Code + { mime = "text/*", run = "code" }, + { mime = "*/{xml,javascript,wine-extension-ini}", run = "code" }, + # Image + { mime = "image/{avif,hei?,jxl,svg+xml}", run = "magick" }, + { mime = "image/*", run = "image" }, + # Video + { mime = "video/*", run = "video" }, + # Fallback + { name = "*", run = "file" }, +] +preloaders = [ + # Image + { mime = "image/{avif,hei?,jxl,svg+xml}", run = "magick" }, + { mime = "image/*", run = "image" }, + # Video + { mime = "video/*", run = "video" }, + # PDF + { mime = "application/pdf", run = "pdf" }, + # Font + { mime = "font/*", run = "font" }, + { mime = "application/ms-opentype", run = "font" }, +] +previewers = [ + { name = "*/", run = "folder", sync = true }, + # Code + { mime = "text/*", run = "code" }, + { mime = "*/{xml,javascript,wine-extension-ini}", run = "code" }, + # JSON + { mime = "application/{json,ndjson}", run = "json" }, + # Image + { mime = "image/{avif,hei?,jxl,svg+xml}", run = "magick" }, + { mime = "image/*", run = "image" }, + # Video + { mime = "video/*", run = "video" }, + # PDF + { mime = "application/pdf", run = "pdf" }, + # Archive + { mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", run = "archive" }, + { mime = "application/{debian*-package,redhat-package-manager,rpm,android.package-archive}", run = "archive" }, + { name = "*.{AppImage,appimage}", run = "archive" }, + # Virtual Disk / Disk Image + { mime = "application/{iso9660-image,qemu-disk,ms-wim,apple-diskimage}", run = "archive" }, + { mime = "application/virtualbox-{vhd,vhdx}", run = "archive" }, + { name = "*.{img,fat,ext,ext2,ext3,ext4,squashfs,ntfs,hfs,hfsx}", run = "archive" }, + # Font + { mime = "font/*", run = "font" }, + { mime = "application/ms-opentype", run = "font" }, + # Empty file + { mime = "inode/empty", run = "empty" }, + # Fallback + { name = "*", run = "file" }, +] + +[input] +# TODO + +cursor_blink = false + +# cd +cd_title = "Change directory:" +cd_origin = "top-center" +cd_offset = [ 0, 2, 50, 3 ] + +# create +create_title = [ "Create:", "Create (dir):" ] +create_origin = "top-center" +create_offset = [ 0, 2, 50, 3 ] + +# rename +rename_title = "Rename:" +rename_origin = "hovered" +rename_offset = [ 0, 1, 50, 3 ] + +# filter +filter_title = "Filter:" +filter_origin = "top-center" +filter_offset = [ 0, 2, 50, 3 ] + +# find +find_title = [ "Find next:", "Find previous:" ] +find_origin = "top-center" +find_offset = [ 0, 2, 50, 3 ] + +# search +search_title = "Search via {n}:" +search_origin = "top-center" +search_offset = [ 0, 2, 50, 3 ] + +# shell +shell_title = [ "Shell:", "Shell (block):" ] +shell_origin = "top-center" +shell_offset = [ 0, 2, 50, 3 ] + +[confirm] +# TODO + +# trash +trash_title = "Trash {n} selected file{s}?" +trash_origin = "center" +trash_offset = [ 0, 0, 70, 20 ] + +# delete +delete_title = "Permanently delete {n} selected file{s}?" +delete_origin = "center" +delete_offset = [ 0, 0, 70, 20 ] + +# overwrite +overwrite_title = "Overwrite file?" +overwrite_content = "Will overwrite the following file:" +overwrite_origin = "center" +overwrite_offset = [ 0, 0, 50, 15 ] + +# quit +quit_title = "Quit?" +quit_content = "The following task is still running, are you sure you want to quit?" +quit_origin = "center" +quit_offset = [ 0, 0, 50, 15 ] + +[pick] +# TODO + +open_title = "Open with:" +open_origin = "hovered" +open_offset = [ 0, 1, 50, 7 ] + +[which] +# TODO + +sort_by = "none" +sort_sensitive = false +sort_reverse = false +sort_translit = false