From 1be09af058424219de2aad4b9cc27ccf760d23f6 Mon Sep 17 00:00:00 2001 From: adikro Date: Sun, 1 Mar 2026 19:57:16 +0100 Subject: ... --- hm/conf/git.nix | 18 ++--- hm/conf/xdg-mime.nix | 58 ++++++++------- hm/editors/nixvim/nixvim.nix | 2 +- hm/env/niri/binds.nix | 168 ++++++++++++++++++++----------------------- hm/env/niri/niri.nix | 51 +++++++------ hm/shell/cli.nix | 146 +++++++++++++++++++++++++++++++------ hm/shell/fish.nix | 39 +++++++--- hm/shell/foot.nix | 20 +++++- hm/soft/czkawka-v11.nix | 97 +++++++++++++++++++++++++ hm/soft/mangohud.nix | 16 +++++ hm/soft/media.nix | 3 +- hm/soft/mpv.nix | 7 +- hm/soft/nixcord.nix | 5 ++ hm/soft/obs.nix | 6 +- hm/soft/yt-dlp.nix | 2 +- 15 files changed, 436 insertions(+), 202 deletions(-) create mode 100644 hm/soft/czkawka-v11.nix (limited to 'hm') diff --git a/hm/conf/git.nix b/hm/conf/git.nix index 67fcaa4..0e4b805 100644 --- a/hm/conf/git.nix +++ b/hm/conf/git.nix @@ -2,10 +2,12 @@ config, lib, pkgs, + osConfig, ... }: let cfg = config.hm.conf.git; + isOCI = osConfig.networking.hostName == "oci"; in { options.hm.conf.git.enable = lib.mkEnableOption "enables git vcs"; @@ -14,14 +16,15 @@ in enable = true; lfs.enable = true; signing = { - key = "EF69F2FB25C8B5A66918EA91A38ACEAB9656CD94"; signByDefault = true; + key = if isOCI then "~/.ssh/id_ed25519.pub" else "EF69F2FB25C8B5A66918EA91A38ACEAB9656CD94"; }; settings = { user = { name = "adikro"; email = "adikro@disroot.org"; }; + gpg.format = if isOCI then "ssh" else "openpgp"; init.defaultBranch = "main"; push.autoSetupRemote = true; pull.rebase = true; @@ -33,19 +36,6 @@ in ".direnv/" "secrets/*.tmp" ]; - hooks.pre-commit = pkgs.writeShellScript "sops-pre-commit" '' - for file in secrets/*.yaml; do - if [[ -f "$file" ]]; then - if ! ${pkgs.ripgrep}/bin/rg -q "sops" "$file"; then - echo "--------------------------------------------------------" - echo "ABORTING COMMIT: Unencrypted file detected: $file" - echo "Please run 'sops -e -i $file' before committing." - echo "--------------------------------------------------------" - exit 1 - fi - fi - done - ''; }; }; } diff --git a/hm/conf/xdg-mime.nix b/hm/conf/xdg-mime.nix index e024a89..cbf353d 100644 --- a/hm/conf/xdg-mime.nix +++ b/hm/conf/xdg-mime.nix @@ -7,35 +7,43 @@ in enable = lib.mkEnableOption "sets the default applications"; }; config = lib.mkIf cfg.enable { - xdg.mimeApps = { - enable = true; - defaultApplications = { - "application/pdf" = [ "org.pwmt.zathura.desktop" ]; - "application/x-bzpdf" = [ "org.pwmt.zathura.desktop" ]; - "application/x-gzpdf" = [ "org.pwmt.zathura.desktop" ]; - "application/epub+zip" = [ "org.pwmt.zathura.desktop" ]; + xdg = { + mimeApps = { + enable = true; + defaultApplications = { + "application/pdf" = [ "org.pwmt.zathura.desktop" ]; + "application/x-bzpdf" = [ "org.pwmt.zathura.desktop" ]; + "application/x-gzpdf" = [ "org.pwmt.zathura.desktop" ]; + "application/epub+zip" = [ "org.pwmt.zathura.desktop" ]; - "image/png" = [ "nsxiv.desktop" ]; - "image/jpeg" = [ "nsxiv.desktop" ]; - "image/gif" = [ "nsxiv.desktop" ]; - "image/webp" = [ "nsxiv.desktop" ]; - "image/bmp" = [ "nsxiv.desktop" ]; + "image/png" = [ "nsxiv.desktop" ]; + "image/jpeg" = [ "nsxiv.desktop" ]; + "image/gif" = [ "nsxiv.desktop" ]; + "image/webp" = [ "nsxiv.desktop" ]; + "image/bmp" = [ "nsxiv.desktop" ]; - "video/mp4" = [ "mpv.desktop" ]; - "video/x-matroska" = [ "mpv.desktop" ]; - "video/webm" = [ "mpv.desktop" ]; - "video/quicktime" = [ "mpv.desktop" ]; + "video/mp4" = [ "mpv.desktop" ]; + "video/x-matroska" = [ "mpv.desktop" ]; + "video/webm" = [ "mpv.desktop" ]; + "video/quicktime" = [ "mpv.desktop" ]; - "audio/mpeg" = [ "mpv.desktop" ]; - "audio/flac" = [ "mpv.desktop" ]; - "audio/wav" = [ "mpv.desktop" ]; - "audio/ogg" = [ "mpv.desktop" ]; + "audio/mpeg" = [ "mpv.desktop" ]; + "audio/flac" = [ "mpv.desktop" ]; + "audio/wav" = [ "mpv.desktop" ]; + "audio/ogg" = [ "mpv.desktop" ]; - "text/html" = [ "firefox.desktop" ]; - "x-scheme-handler/terminal" = [ "foot.desktop" ]; - "x-scheme-handler/http" = [ "firefox.desktop" ]; - "x-scheme-handler/https" = [ "firefox.desktop" ]; - "inode/directory" = [ "thunar.desktop" ]; + "text/html" = [ "firefox.desktop" ]; + "x-scheme-handler/terminal" = [ "foot.desktop" ]; + "x-scheme-handler/http" = [ "firefox.desktop" ]; + "x-scheme-handler/https" = [ "firefox.desktop" ]; + "inode/directory" = [ "thunar.desktop" ]; + }; + }; + terminal-exec = { + enable = true; + settings = { + default = [ "foot.desktop" ]; + }; }; }; home.sessionVariables = { diff --git a/hm/editors/nixvim/nixvim.nix b/hm/editors/nixvim/nixvim.nix index 579c9e2..068012f 100644 --- a/hm/editors/nixvim/nixvim.nix +++ b/hm/editors/nixvim/nixvim.nix @@ -229,7 +229,7 @@ in }; }; - gitsigns.enable = true; + # gitsigns.enable = true; which-key.enable = true; harpoon = { enable = true; diff --git a/hm/env/niri/binds.nix b/hm/env/niri/binds.nix index e85b867..0dc4ea5 100644 --- a/hm/env/niri/binds.nix +++ b/hm/env/niri/binds.nix @@ -2,92 +2,111 @@ config, lib, pkgs, + osConfig, ... }: with config.lib.niri.actions; let playerctl = spawn "${pkgs.playerctl}/bin/playerctl"; - ss = "${toString config.hm.conf.xdg-dirs.storagePath}/pics/ss/$(date +%Y-%m-%d_%H-%M-%S)"; + ssPath = "${toString config.hm.conf.xdg-dirs.storagePath}/pics/ss/$(date +%Y-%m-%d_%H-%M-%S)"; + obsPass = osConfig.sops.secrets."obs/websocket_password".path; in { + # --- System & Media --- + "Mod+Shift+E".action = quit; + "Mod+Slash".action = show-hotkey-overlay; + + # Audio (System-wide via wireplumber) + XF86AudioRaiseVolume.action = spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "3%+"; + XF86AudioLowerVolume.action = spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "3%-"; + XF86AudioMute.action = + spawn "sh" "-c" + "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; + XF86Tools.action = + spawn "sh" "-c" + "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; + + # Media Control + XF86AudioPlay.action = playerctl "play-pause"; + XF86AudioPrev.action = playerctl "previous"; + XF86AudioNext.action = playerctl "next"; + + # Brightness + XF86MonBrightnessUp.action = spawn "light" "-A" "10"; + XF86MonBrightnessDown.action = spawn "light" "-U" "10"; + + # --- Applications --- + "Mod+Return".action = spawn "foot"; + "Mod+D".action = spawn "fuzzel"; + "Mod+C".action = spawn "qalculate-gtk"; + "Mod+Shift+D".action = spawn "sh" "-c" "cliphist list | fuzzel --dmenu | cliphist decode | wl-copy"; + "Super+Return".action = spawn "sh" "-c" "OBS_WEBSOCKET_URL=$(cat ${obsPass}) obs-cmd replay save"; + + # --- Navigation: Columns & Workspaces --- + "Mod+H".action = focus-column-left; + "Mod+L".action = focus-column-right; + "Mod+J".action = focus-workspace-down; + "Mod+K".action = focus-workspace-up; + + "Mod+WheelScrollDown".action = focus-column-right; + "Mod+WheelScrollUp".action = focus-column-left; + "Super+WheelScrollDown".action = focus-workspace-down; + "Super+WheelScrollUp".action = focus-workspace-up; + + # --- Navigation: Monitors --- + "Super+H".action = focus-monitor-left; + "Super+L".action = focus-monitor-right; + + # --- Window Management --- + "Mod+Shift+Q".action = close-window; + "Mod+Shift+V".action = toggle-window-floating; "Mod+O" = { action = toggle-overview; repeat = false; }; - "Mod+Slash".action = show-hotkey-overlay; - XF86AudioRaiseVolume.action = playerctl "volume" "0.03+"; - XF86AudioLowerVolume.action = playerctl "volume" "0.03-"; - XF86AudioMute.action = spawn "sh" "-c" '' - wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && \ - wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle - ''; - XF86Tools.action = spawn "sh" "-c" '' - wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && \ - wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle - ''; + # Moving Windows/Columns + "Mod+Shift+H".action = move-column-left; + "Mod+Shift+L".action = move-column-right; + "Mod+Shift+J".action = move-window-down-or-to-workspace-down; + "Mod+Shift+K".action = move-window-up-or-to-workspace-up; + "Super+Shift+H".action = move-column-to-monitor-left; + "Super+Shift+L".action = move-column-to-monitor-right; - "Mod+WheelScrollDown".action = focus-column-right; - "Mod+WheelScrollUp".action = focus-column-left; "Mod+Shift+WheelScrollDown".action = move-column-right; "Mod+Shift+WheelScrollUp".action = move-column-left; - - "Super+WheelScrollDown".action = focus-workspace-down; - "Super+WheelScrollUp".action = focus-workspace-up; "Super+Shift+WheelScrollDown".action = move-window-down-or-to-workspace-down; "Super+Shift+WheelScrollUp".action = move-window-up-or-to-workspace-up; + # Container Management (Consume/Expel) + "Mod+BracketLeft".action = consume-or-expel-window-left; + "Mod+BracketRight".action = consume-or-expel-window-right; + "Mod+Comma".action = consume-window-into-column; + "Mod+Period".action = expel-window-from-column; + XF86Launch5.action = consume-or-expel-window-right; XF86Launch6.action = consume-or-expel-window-left; - XF86Launch7.action = switch-preset-column-width; - "Super+Shift+L".action = spawn "swaylock" "-f"; - XF86AudioPlay.action = playerctl "play-pause"; - XF86AudioPrev.action = playerctl "previous"; - XF86AudioNext.action = playerctl "next"; + # --- Layout & Sizing --- + "Mod+F".action = maximize-column; + "Mod+Shift+F".action = fullscreen-window; + "Mod+W".action = toggle-column-tabbed-display; + "Mod+R".action = switch-preset-column-width; + XF86Launch7.action = switch-preset-column-width; + "Mod+Shift+R".action = reset-window-height; "Mod+Minus".action = set-column-width "-10%"; "Mod+Equal".action = set-column-width "+10%"; - "Mod+Shift+Minus".action = set-window-height "-10%"; "Mod+Shift+Equal".action = set-window-height "+10%"; - "Mod+Shift+V".action = toggle-window-floating; - "Mod+W".action = toggle-column-tabbed-display; - - "Mod+XF86Launch7" = { - action = spawn "sh" "-c" '' - wayfreeze & - sleep 0.1 - GEOM=$(slurp) - if [ -n "$GEOM" ]; then - grim -g "$GEOM" - | tee ${ss}.png | wl-copy - fi - pkill -n wayfreeze - ''; - repeat = false; - }; - - "Mod+Shift+XF86Launch7" = { - action = spawn "sh" "-c" '' - wayfreeze & - sleep 0.1 - GEOM=$(slurp) - if [ -n "$GEOM" ]; then - grim -g "$GEOM" -t ppm - | satty --filename - --output-filename "${ss}-edited.png" - fi - pkill -n wayfreeze - ''; - repeat = false; - }; - + # --- Screenshots --- "Mod+S" = { action = spawn "sh" "-c" '' - wayfreeze & - sleep 0.1 + wayfreeze & sleep 0.1 GEOM=$(slurp) if [ -n "$GEOM" ]; then - grim -g "$GEOM" - | tee ${ss}.png | wl-copy + grim -g "$GEOM" - | tee ${ssPath}.png | wl-copy fi pkill -n wayfreeze ''; @@ -96,50 +115,15 @@ in "Mod+Shift+S" = { action = spawn "sh" "-c" '' - wayfreeze & - sleep 0.1 + wayfreeze & sleep 0.1 GEOM=$(slurp) if [ -n "$GEOM" ]; then - grim -g "$GEOM" -t ppm - | satty --filename - --output-filename "${ss}-edited.png" + grim -g "$GEOM" -t ppm - | satty --filename - --output-filename "${ssPath}-edited.png" fi pkill -n wayfreeze ''; repeat = false; }; - - "Mod+Shift+D".action = spawn "sh" "-c" '' - cliphist list | fuzzel --dmenu | cliphist decode | wl-copy - ''; - - "Mod+Return".action = spawn "foot"; - "Mod+D".action = spawn "fuzzel"; - "Mod+C".action = spawn "qalculate-gtk"; - "Mod+BracketLeft".action = consume-or-expel-window-left; - "Mod+BracketRight".action = consume-or-expel-window-right; - - "Mod+R".action = switch-preset-column-width; - "Mod+Shift+R".action = reset-window-height; - "Mod+F".action = maximize-column; - "Mod+Shift+F".action = fullscreen-window; - - "Mod+Comma".action = consume-window-into-column; - "Mod+Period".action = expel-window-from-column; - - "Mod+Shift+E".action = quit; - - "Mod+H".action = focus-column-left; - "Mod+L".action = focus-column-right; - "Mod+J".action = focus-workspace-down; - "Mod+K".action = focus-workspace-up; - - "Mod+Shift+H".action = move-column-left; - "Mod+Shift+L".action = move-column-right; - "Mod+Shift+J".action = move-window-down-or-to-workspace-down; - "Mod+Shift+K".action = move-window-up-or-to-workspace-up; - - "Mod+Shift+Q".action = close-window; - - "Super+Return".action = spawn "obs-cmd" "replay" "save"; } // (builtins.listToAttrs ( builtins.concatMap ( diff --git a/hm/env/niri/niri.nix b/hm/env/niri/niri.nix index 3f66f6e..f8e1542 100644 --- a/hm/env/niri/niri.nix +++ b/hm/env/niri/niri.nix @@ -2,10 +2,13 @@ config, lib, pkgs, + osConfig, ... -}: let +}: +let cfg = config.hm.env.niri; -in { +in +{ options.hm.env.niri.enable = lib.mkEnableOption "niri hm"; config = lib.mkIf cfg.enable { hm.env = { @@ -17,8 +20,15 @@ in { }; programs.niri.settings = { - debug.disable-cursor-plane = []; - binds = import ./binds.nix {inherit config lib pkgs;}; + debug.disable-cursor-plane = [ ]; + binds = import ./binds.nix { + inherit + config + osConfig + lib + pkgs + ; + }; prefer-no-csd = true; hotkey-overlay.skip-at-startup = true; @@ -41,17 +51,6 @@ in { }; power-key-handling.enable = false; }; - outputs = { - "DP-1" = { - focus-at-startup = true; - # backdrop-color = ""; - variable-refresh-rate = "on-demand"; - mode = { - width = 2560; - height = 1440; - }; - }; - }; cursor = { hide-when-typing = true; size = 48; @@ -67,14 +66,14 @@ in { # active = ; }; preset-column-widths = [ - {proportion = 1. / 3.;} - {proportion = 1. / 2.;} - {proportion = 2. / 3.;} + { proportion = 1. / 3.; } + { proportion = 1. / 2.; } + { proportion = 2. / 3.; } ]; preset-window-heights = [ - {proportion = 1. / 3.;} - {proportion = 1. / 2.;} - {proportion = 2. / 3.;} + { proportion = 1. / 3.; } + { proportion = 1. / 2.; } + { proportion = 2. / 3.; } ]; default-column-width.proportion = 0.5; tab-indicator = { @@ -85,14 +84,20 @@ in { window-rules = [ { matches = [ - {app-id = "Bitwarden";} + { app-id = "Bitwarden"; } ]; block-out-from = "screen-capture"; } ]; gestures.hot-corners.enable = false; spawn-at-startup = [ - {command = ["obs" "--disable-missing-files-check" "--startreplaybuffer"];} + { + command = [ + "obs" + "--disable-missing-files-check" + "--startreplaybuffer" + ]; + } ]; }; home.packages = with pkgs; [ diff --git a/hm/shell/cli.nix b/hm/shell/cli.nix index da9c64e..a9e8397 100644 --- a/hm/shell/cli.nix +++ b/hm/shell/cli.nix @@ -10,33 +10,75 @@ in { options.hm.shell.cli.enable = lib.mkEnableOption "modern cli tools"; config = lib.mkIf cfg.enable { + programs.yazi = { + # TODO + enable = true; + shellWrapperName = "y"; + }; + # TODO + programs.fzf = { + enable = true; + enableFishIntegration = true; + }; programs.zoxide = { enable = true; + enableFishIntegration = true; options = [ "--cmd cd" ]; }; programs.bat = { enable = true; - config.theme = "gruvbox-dark"; + config = { + theme = "gruvbox-dark"; + style = "numbers"; + pager = "less -RSFK"; + wrap = "never"; + tabs = "2"; + }; + extraPackages = [ pkgs.bat-extras.core ]; + }; + programs.fd = { + enable = true; + hidden = true; + ignores = [ + ".git/" + "*.bak" + ]; }; + programs.ripgrep-all.enable = true; + programs.btop = { + enable = true; + package = pkgs.btop.override { rocmSupport = true; }; + settings = { + presets = "cpu:1:default,proc:0:default cpu:0:default,gpu0:0:default,mem:0:default"; + vim_keys = true; + update_ms = 1000; + proc_gradient = false; + proc_filter_kernel = true; + show_uptime = false; + freq_mode = "average"; + mem_graphs = false; + show_disks = false; - programs.fzf.enable = true; - programs.fd.enable = true; - programs.ripgrep.enable = true; - programs.yazi.enable = true; - programs.btop.enable = true; + proc_gpu_summary = true; + }; + }; programs.fastfetch = { enable = true; settings = { display = { - size = { - binaryPrefix = "iec"; - }; separator = "  "; + color = { + keys = "blue"; + title = "cyan"; + }; }; multithreading = true; modules = [ "title" - "separator" + { + type = "separator"; + string = "━"; + } "os" { type = "command"; @@ -61,10 +103,23 @@ in ]; }; }; - # programs.direnv = { - # enable = true; - # nix-direnv.enable = true; - # }; + programs.direnv = { + enable = true; + enableFishIntegration = true; + nix-direnv.enable = true; + config = { + global = { + load_dotenv = true; + strict_env = true; + hide_env_diff = true; + }; + whitelist = { + prefix = [ + "~/proj" + ]; + }; + }; + }; programs.nix-your-shell = { enable = true; enableFishIntegration = true; @@ -72,18 +127,65 @@ in }; programs.bottom = { enable = true; + settings = { + flags = { + basic = true; + + current_usage = true; + unnormalized_cpu = false; + hide_k_threads = true; + + process_memory_as_value = true; + enable_cache_memory = true; + network_use_bytes = true; + network_use_binary_prefix = true; + + battery = true; + show_table_scroll_position = true; + hide_table_gap = true; + + theme = "gruvbox"; + }; + processes.columns = [ + "PID" + "Name" + "CPU%" + "Mem%" + "GPU%" + "GMem%" + "User" + ]; + disk.columns = [ + "Disk" + "Mount" + "Free" + "Total" + "R/s" + "W/s" + ]; + }; }; programs.tealdeer = { enable = true; - enableAutoUpdates = true; + settings = { + updates.auto_update = true; + style = { + description.foreground = "white"; + example_text.foreground = "cyan"; + command_name.foreground = "yellow"; + example_variable.foreground = "green"; + example_code.foreground = "blue"; + }; + }; + }; + programs.pls = { + enable = true; + enableFishIntegration = true; + }; + programs.nix-index = { + enable = true; + enableFishIntegration = true; }; - # programs.lazygit = { - # enable = true; - # enableFishIntegration = true; - # }; - programs.riff.enable = true; - programs.pls.enable = true; - programs.nix-index.enable = true; home.packages = with pkgs; [ sd diff --git a/hm/shell/fish.nix b/hm/shell/fish.nix index d7f7248..20b9a95 100644 --- a/hm/shell/fish.nix +++ b/hm/shell/fish.nix @@ -13,14 +13,33 @@ in programs.fish = { enable = true; + functions = { + rga-fzf = { + body = '' + set -l RG_PREFIX "rga --files-with-matches --smart-case" + set -l file ( + FZF_DEFAULT_COMMAND="$RG_PREFIX '$argv[1]'" \ + fzf --sort \ + --preview='test -n {}; and rga --pretty --context 5 {q} {}' \ + --phony -q "$argv[1]" \ + --bind "change:reload:$RG_PREFIX {q}" \ + --preview-window="70%:wrap" + ) + + if test -n "$file" + echo "Opening $file..." + xdg-open "$file" + end + ''; + }; + }; + interactiveShellInit = '' set fish_greeting fastfetch ''; shellAliases = { - update = "git add . && git commit -m \"$1\" && nix flake update && nh os switch ."; - ns = "nix-search -p"; nd = "nix develop ."; nos = "nh os switch ."; @@ -60,10 +79,10 @@ in name = "pisces"; src = pkgs.fishPlugins.pisces.src; } - { - name = "fzf-fish"; - src = pkgs.fishPlugins.fzf-fish.src; - } + # { + # name = "fzf-fish"; + # src = pkgs.fishPlugins.fzf-fish.src; + # } { name = "fish-you-should-use"; src = pkgs.fishPlugins.fish-you-should-use.src; @@ -72,10 +91,10 @@ in name = "colored-man-pages"; src = pkgs.fishPlugins.colored-man-pages.src; } - { - name = "fifc"; - src = pkgs.fishPlugins.fifc.src; - } + # { + # name = "fifc"; + # src = pkgs.fishPlugins.fifc.src; + # } ]; }; }; diff --git a/hm/shell/foot.nix b/hm/shell/foot.nix index 3143d12..91dbfa0 100644 --- a/hm/shell/foot.nix +++ b/hm/shell/foot.nix @@ -9,7 +9,7 @@ let cfg = config.hm.shell.foot; footTheme = pkgs.runCommand "gruvbox-dark" { } '' - sed 's/\[colors-dark\]/\[colors\]/g' ${ + sed -e 's/\[colors-dark\]/\[colors\]/g' ${ pkgs.fetchurl { url = "https://codeberg.org/dnkl/foot/raw/branch/master/themes/gruvbox-dark"; sha256 = "sha256-hlmLklG/vAEDy8I+k13+o4ZR6Cq6lTxOconjf9M75eo="; @@ -22,7 +22,7 @@ in enable = lib.mkEnableOption "foot terminal emulator"; fontSize = lib.mkOption { type = lib.types.int; - default = 14; + default = 13; description = "Font size for the foot terminal"; }; }; @@ -34,12 +34,26 @@ in settings = { main = { font = "JetBrainsMonoNFM-Regular:size=${toString cfg.fontSize}"; - box-drawings-uses-font-glyphs = true; include = "${footTheme}"; + word-delimiters = ",│`|:\"'()[]{}<>./"; + selection-target = "both"; + dpi-aware = "yes"; }; + + search-bindings = { + find-prev = "Control+p"; + find-next = "Control+n"; + commit = "Return"; + }; + scrollback = { lines = 10000; + multiplier = 3.0; + indicator-position = "none"; }; + + security.osc52 = "enabled"; + url.osc8-underline = "always"; }; }; }; diff --git a/hm/soft/czkawka-v11.nix b/hm/soft/czkawka-v11.nix new file mode 100644 index 0000000..781da99 --- /dev/null +++ b/hm/soft/czkawka-v11.nix @@ -0,0 +1,97 @@ +{ + lib, + atk, + cairo, + callPackage, + fetchFromGitHub, + gdk-pixbuf, + glib, + gobject-introspection, + gtk4, + pango, + pkg-config, + rustPlatform, + stdenv, + testers, + wrapGAppsHook4, + xvfb-run, + versionCheckHook, +}: + +let + self = rustPlatform.buildRustPackage { + pname = "czkawka"; + version = "11.0.1"; + + src = fetchFromGitHub { + owner = "qarmin"; + repo = "czkawka"; + tag = self.version; + hash = "sha256-ke6N3vuKPGolfh6XpAg3/9dtwd09eX53fN2klUwwNwQ="; + }; + + cargoHash = "sha256-fx2ZH4I2WYCdMgNoKQuBBEJrPjmgTRPeVM2L+TWYn54="; + + nativeBuildInputs = [ + gobject-introspection + pkg-config + wrapGAppsHook4 + ]; + + buildInputs = [ + atk + cairo + gdk-pixbuf + glib + gtk4 + pango + ]; + + nativeCheckInputs = [ xvfb-run ]; + + strictDeps = true; + + doCheck = stdenv.hostPlatform.isLinux && (stdenv.hostPlatform == stdenv.buildPlatform); + + checkPhase = '' + runHook preCheck + xvfb-run cargo test + runHook postCheck + ''; + + postInstall = '' + install -Dm444 -t $out/share/applications data/com.github.qarmin.czkawka.desktop + install -Dm444 -t $out/share/icons/hicolor/scalable/apps data/icons/com.github.qarmin.czkawka.svg + install -Dm444 -t $out/share/icons/hicolor/scalable/apps data/icons/com.github.qarmin.czkawka-symbolic.svg + install -Dm444 -t $out/share/metainfo data/com.github.qarmin.czkawka.metainfo.xml + ''; + + nativeInstallCheckInputs = [ versionCheckHook ]; + versionCheckProgram = "${placeholder "out"}/bin/czkawka_cli"; + doInstallCheck = true; + + passthru = { + tests.version = testers.testVersion { + package = self; + command = "czkawka_cli --version"; + }; + # Ensure you have a wrapper.nix in the same folder if using this + wrapper = callPackage ./wrapper.nix { + czkawka = self; + }; + }; + + meta = { + homepage = "https://github.com/qarmin/czkawka"; + description = "Simple, fast and easy to use app to remove unnecessary files from your computer"; + changelog = "https://github.com/qarmin/czkawka/raw/${self.version}/Changelog.md"; + license = with lib.licenses; [ mit ]; + mainProgram = "czkawka_gui"; + maintainers = with lib.maintainers; [ + yanganto + _0x4A6F + ]; + }; + }; +in +self diff --git a/hm/soft/mangohud.nix b/hm/soft/mangohud.nix index eae15d5..335014c 100644 --- a/hm/soft/mangohud.nix +++ b/hm/soft/mangohud.nix @@ -7,6 +7,22 @@ in config = lib.mkIf cfg.enable { programs.mangohud = { enable = true; + settings = { + table_columns = 4; + font_scale = 1.3; + cellpadding_y = 0.1; + round_corners = 10; + fps_limit = 240; + + gpu_temp = true; + gpu_core_clock = true; + + cpu_temp = true; + cpu_mhz = true; + + fps_metrics = "0.01"; + wine = true; + }; }; }; } diff --git a/hm/soft/media.nix b/hm/soft/media.nix index 89cbe13..72ddc64 100644 --- a/hm/soft/media.nix +++ b/hm/soft/media.nix @@ -51,7 +51,8 @@ in }; }; home.packages = with pkgs; [ - czkawka + (callPackage ./czkawka-v11.nix { }) + nsxiv pinta ffmpeg diff --git a/hm/soft/mpv.nix b/hm/soft/mpv.nix index 380d0d5..7967611 100644 --- a/hm/soft/mpv.nix +++ b/hm/soft/mpv.nix @@ -173,7 +173,7 @@ in reload mpv-subtitle-lines mpv-notify-send - mpv-cheatsheet + # mpv-cheatsheet modernx memo autosubsync-mpv @@ -182,9 +182,6 @@ in ]; }; - hm.soft = { - media.enable = true; - yt-dlp.enable = true; - }; + hm.soft.yt-dlp.enable = true; }; } diff --git a/hm/soft/nixcord.nix b/hm/soft/nixcord.nix index 52f6cd3..112a82b 100644 --- a/hm/soft/nixcord.nix +++ b/hm/soft/nixcord.nix @@ -1,6 +1,7 @@ { inputs, config, + pkgs, lib, ... }: @@ -12,6 +13,10 @@ in options.hm.soft.nixcord.enable = lib.mkEnableOption "nixcord configuration"; config = lib.mkIf cfg.enable { + home.packages = with pkgs; [ + stoat-desktop + element-desktop + ]; programs.nixcord = { enable = true; discord = { diff --git a/hm/soft/obs.nix b/hm/soft/obs.nix index 235187c..f28d8ec 100644 --- a/hm/soft/obs.nix +++ b/hm/soft/obs.nix @@ -9,6 +9,7 @@ let in { options.hm.soft.obs.enable = lib.mkEnableOption "enables obs video recording and clipping"; + config = lib.mkIf cfg.enable { programs.obs-studio = { enable = true; @@ -16,11 +17,6 @@ in obs-pipewire-audio-capture ]; }; - home.packages = [ pkgs.obs-cmd ]; - - home.sessionVariables = { - OBS_WEBSOCKET_URL = "/run/secrets/obs/password"; - }; }; } diff --git a/hm/soft/yt-dlp.nix b/hm/soft/yt-dlp.nix index e50f313..19eeeb4 100644 --- a/hm/soft/yt-dlp.nix +++ b/hm/soft/yt-dlp.nix @@ -9,7 +9,7 @@ in enable = true; settings = { format = "bestvideo+bestaudio/best"; - merge-output-format = "webm"; + # merge-output-format = "webm"; prefer-free-formats = true; paths = "~/dl/yt"; -- cgit v1.3