From 512483106110b5f9209bb03238d44b991fe15d22 Mon Sep 17 00:00:00 2001 From: adikro Date: Thu, 12 Feb 2026 23:04:24 +0100 Subject: thinkpad configuration finalization --- hm/conf/xdg-dirs.nix | 32 ++--- hm/conf/xdg-mime.nix | 1 + hm/editors/editors.nix | 2 +- hm/editors/nixvim.nix | 271 --------------------------------------- hm/editors/nixvim/binds.nix | 0 hm/editors/nixvim/nixvim.nix | 271 +++++++++++++++++++++++++++++++++++++++ hm/env/niri/binds.nix | 299 ++++++++++++++++++++++--------------------- hm/soft/media.nix | 2 +- hm/soft/mpv.nix | 12 +- 9 files changed, 450 insertions(+), 440 deletions(-) delete mode 100644 hm/editors/nixvim.nix create mode 100644 hm/editors/nixvim/binds.nix create mode 100644 hm/editors/nixvim/nixvim.nix (limited to 'hm') diff --git a/hm/conf/xdg-dirs.nix b/hm/conf/xdg-dirs.nix index ee34bd0..ba5b063 100644 --- a/hm/conf/xdg-dirs.nix +++ b/hm/conf/xdg-dirs.nix @@ -6,10 +6,10 @@ in options.hm.conf.xdg-dirs = { enable = lib.mkEnableOption "enables xdg dirs"; - mediaPath = lib.mkOption { + storagePath = lib.mkOption { type = lib.types.path; default = config.home.homeDirectory; - description = "base path for media"; + description = "base path for storage"; }; }; config = lib.mkIf cfg.enable { @@ -20,8 +20,8 @@ in download = "${config.home.homeDirectory}/dl"; documents = "${config.home.homeDirectory}/docs"; - pictures = "${toString cfg.mediaPath}/pics"; - videos = "${toString cfg.mediaPath}/vids"; + pictures = "${toString cfg.storagePath}/pics"; + videos = "${toString cfg.storagePath}/vids"; desktop = null; music = null; @@ -31,23 +31,23 @@ in extraConfig = { PROJECTS = "${config.home.homeDirectory}/proj"; GAMES = "${config.home.homeDirectory}/games"; - MEDIA = "${toString cfg.mediaPath}"; - SS = "${toString cfg.mediaPath}/pics/ss"; - CLIPS = "${toString cfg.mediaPath}/vids/clips"; - MOVIES = "${toString cfg.mediaPath}/movies"; - ANIME = "${toString cfg.mediaPath}/anime"; - ARCHIVE = "${toString cfg.mediaPath}/archive"; + storage = "${toString cfg.storagePath}"; + SS = "${toString cfg.storagePath}/pics/ss"; + CLIPS = "${toString cfg.storagePath}/vids/clips"; + MOVIES = "${toString cfg.storagePath}/movies"; + ANIME = "${toString cfg.storagePath}/anime"; + ARCHIVE = "${toString cfg.storagePath}/archive"; }; }; home.sessionVariables = { PROJECTS = "${config.home.homeDirectory}/proj"; GAMES = "${config.home.homeDirectory}/games"; - MEDIA = "${toString cfg.mediaPath}"; - SS = "${toString cfg.mediaPath}/pics/ss"; - CLIPS = "${toString cfg.mediaPath}/vids/clips"; - MOVIES = "${toString cfg.mediaPath}/movies"; - ANIME = "${toString cfg.mediaPath}/anime"; - ARCHIVE = "${toString cfg.mediaPath}/archive"; + storage = "${toString cfg.storagePath}"; + SS = "${toString cfg.storagePath}/pics/ss"; + CLIPS = "${toString cfg.storagePath}/vids/clips"; + MOVIES = "${toString cfg.storagePath}/movies"; + ANIME = "${toString cfg.storagePath}/anime"; + ARCHIVE = "${toString cfg.storagePath}/archive"; }; }; } diff --git a/hm/conf/xdg-mime.nix b/hm/conf/xdg-mime.nix index 0f55c5d..e024a89 100644 --- a/hm/conf/xdg-mime.nix +++ b/hm/conf/xdg-mime.nix @@ -32,6 +32,7 @@ in "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" ]; diff --git a/hm/editors/editors.nix b/hm/editors/editors.nix index bca92dd..02c349b 100644 --- a/hm/editors/editors.nix +++ b/hm/editors/editors.nix @@ -2,7 +2,7 @@ { imports = [ ./helix.nix - ./nixvim.nix + ./nixvim/nixvim.nix # ./nvf.nix ]; } diff --git a/hm/editors/nixvim.nix b/hm/editors/nixvim.nix deleted file mode 100644 index 579c9e2..0000000 --- a/hm/editors/nixvim.nix +++ /dev/null @@ -1,271 +0,0 @@ -{ - inputs, - config, - lib, - pkgs, - ... -}: -let - cfg = config.hm.editors.nixvim; -in -{ - imports = [ inputs.nixvim.homeModules.nixvim ]; - - options.hm.editors.nixvim.enable = lib.mkEnableOption "enables nixvim config framework"; - - config = lib.mkIf cfg.enable { - programs.nixvim = { - diagnostics.virtual_text = false; - enable = true; - package = inputs.neovim-nightly-overlay.packages.${pkgs.stdenv.hostPlatform.system}.default; - - viAlias = true; - vimAlias = true; - defaultEditor = true; - waylandSupport = true; - colorschemes.gruvbox.enable = true; - - globals.mapleader = " "; - - clipboard = { - providers.wl-copy.enable = true; - register = "unnamedplus"; - }; - - opts = { - smartindent = true; - autoindent = true; - breakindent = true; - number = true; - relativenumber = true; - termguicolors = true; - ignorecase = true; - smartcase = true; - expandtab = true; - shiftwidth = 2; - encoding = "utf-8"; - fileencoding = "utf-8"; - undofile = true; - swapfile = true; - backup = false; - autoread = true; - cursorline = true; - ruler = true; - gdefault = true; - scrolloff = 5; - }; - - keymaps = [ - { - mode = [ "" ]; - key = ""; - action = ""; - options.silent = true; - } - { - mode = "n"; - key = "gs"; - action = "Neogit"; - options.desc = "Neogit Status"; - } - { - mode = "n"; - key = "ff"; - action = "Telescope find_files"; - options.desc = "Find Files"; - } - { - mode = "n"; - key = "gd"; - action = "lua vim.lsp.buf.definition()"; - options.desc = "Go to Definition"; - } - { - mode = "n"; - key = "K"; - action = "lua vim.lsp.buf.hover()"; - options.desc = "Hover Docs"; - } - { - mode = "n"; - key = "ca"; - action = "lua vim.lsp.buf.code_action()"; - options.desc = "Code Actions"; - } - { - mode = "n"; - key = "rn"; - action = "lua vim.lsp.buf.rename()"; - options.desc = "Rename Symbol"; - } - { - mode = "n"; - key = "fs"; - action = "Telescope lsp_document_symbols"; - options.desc = "Find Symbols (Functions/Variables)"; - } - { - mode = "n"; - key = "fg"; - action = "Telescope live_grep"; - options.desc = "Live Grep"; - } - { - mode = "n"; - key = "ma"; - action = "MCpattern"; - options.desc = "Select all matches of pattern"; - } - { - mode = "n"; - key = "ha"; - action = ''lua require("harpoon.mark").add_file()''; - options.desc = "Harpoon: Mark File"; - } - { - mode = "n"; - key = "hh"; - action = ''lua require("harpoon.ui").toggle_quick_menu()''; - options.desc = "Harpoon: Show Menu"; - } - { - mode = "n"; - key = "xx"; - action = "Trouble diagnostics toggle"; - options.desc = "Toggle Trouble (Diagnostics)"; - } - { - mode = "n"; - key = "p"; - action = "Telescope yank_history"; - options.desc = "Open Yank History"; - } - ]; - - plugins = { - overseer.enable = true; - neotest.enable = true; - - tiny-inline-diagnostic = { - enable = true; - settings = { - preset = "minimal"; - show_all_diags_on_cursorline = true; - options = { - multilines = { - enabled = true; - always_show = true; - }; - }; - }; - }; - comment.enable = true; - flash = { - enable = true; - settings = { - search.enabled = true; - jump.autojump = true; - }; - }; - notify = { - enable = true; - settings.topDown = false; - }; - yanky = { - enable = true; - settings.ring.history_length = 100; - settings.system_clipboard.sync_with_ring = true; - }; - lualine = { - enable = true; - settings = { - options.theme = "gruvbox-material"; - sections = { - lualine_b = [ "diagnostics" ]; - lualine_c = [ "filename" ]; - lualine_x = [ "filetype" ]; - }; - }; - }; - - treesitter-context = { - enable = true; - settings = { - indent.enable = true; - max_lines = 2; - trim_scope = "outer"; - }; - }; - oil.enable = true; - nvim-autopairs.enable = true; - neoscroll.enable = true; - bufferline.enable = true; - web-devicons.enable = true; - lsp-kind.enable = true; - - blink-cmp = { - enable = true; - settings = { - keymap = { - preset = "default"; - "" = [ - "show" - "show_documentation" - "hide" - ]; - # "" = [ - # "accept" - # "fallback" - # ]; - # "" = [ - # "select_next" - # "fallback" - # ]; - # "" = [ - # "select_prev" - # "fallback" - # ]; - }; - }; - }; - - gitsigns.enable = true; - which-key.enable = true; - harpoon = { - enable = true; - enableTelescope = true; - }; - toggleterm.enable = true; - treesitter.enable = true; - telescope = { - enable = true; - extensions.fzf-native.enable = true; - }; - noice.enable = true; - dressing.enable = true; - - conform-nvim = { - enable = true; - settings = { - formatters_by_ft = { - nix = [ "alejandra" ]; - }; - format_on_save = { - lsp_fallback = true; - timeout_ms = 500; - }; - }; - }; - - lsp = { - enable = true; - servers = { - # zls.enable = true; - nil_ls.enable = true; - clangd.enable = true; - }; - }; - }; - }; - }; -} diff --git a/hm/editors/nixvim/binds.nix b/hm/editors/nixvim/binds.nix new file mode 100644 index 0000000..e69de29 diff --git a/hm/editors/nixvim/nixvim.nix b/hm/editors/nixvim/nixvim.nix new file mode 100644 index 0000000..579c9e2 --- /dev/null +++ b/hm/editors/nixvim/nixvim.nix @@ -0,0 +1,271 @@ +{ + inputs, + config, + lib, + pkgs, + ... +}: +let + cfg = config.hm.editors.nixvim; +in +{ + imports = [ inputs.nixvim.homeModules.nixvim ]; + + options.hm.editors.nixvim.enable = lib.mkEnableOption "enables nixvim config framework"; + + config = lib.mkIf cfg.enable { + programs.nixvim = { + diagnostics.virtual_text = false; + enable = true; + package = inputs.neovim-nightly-overlay.packages.${pkgs.stdenv.hostPlatform.system}.default; + + viAlias = true; + vimAlias = true; + defaultEditor = true; + waylandSupport = true; + colorschemes.gruvbox.enable = true; + + globals.mapleader = " "; + + clipboard = { + providers.wl-copy.enable = true; + register = "unnamedplus"; + }; + + opts = { + smartindent = true; + autoindent = true; + breakindent = true; + number = true; + relativenumber = true; + termguicolors = true; + ignorecase = true; + smartcase = true; + expandtab = true; + shiftwidth = 2; + encoding = "utf-8"; + fileencoding = "utf-8"; + undofile = true; + swapfile = true; + backup = false; + autoread = true; + cursorline = true; + ruler = true; + gdefault = true; + scrolloff = 5; + }; + + keymaps = [ + { + mode = [ "" ]; + key = ""; + action = ""; + options.silent = true; + } + { + mode = "n"; + key = "gs"; + action = "Neogit"; + options.desc = "Neogit Status"; + } + { + mode = "n"; + key = "ff"; + action = "Telescope find_files"; + options.desc = "Find Files"; + } + { + mode = "n"; + key = "gd"; + action = "lua vim.lsp.buf.definition()"; + options.desc = "Go to Definition"; + } + { + mode = "n"; + key = "K"; + action = "lua vim.lsp.buf.hover()"; + options.desc = "Hover Docs"; + } + { + mode = "n"; + key = "ca"; + action = "lua vim.lsp.buf.code_action()"; + options.desc = "Code Actions"; + } + { + mode = "n"; + key = "rn"; + action = "lua vim.lsp.buf.rename()"; + options.desc = "Rename Symbol"; + } + { + mode = "n"; + key = "fs"; + action = "Telescope lsp_document_symbols"; + options.desc = "Find Symbols (Functions/Variables)"; + } + { + mode = "n"; + key = "fg"; + action = "Telescope live_grep"; + options.desc = "Live Grep"; + } + { + mode = "n"; + key = "ma"; + action = "MCpattern"; + options.desc = "Select all matches of pattern"; + } + { + mode = "n"; + key = "ha"; + action = ''lua require("harpoon.mark").add_file()''; + options.desc = "Harpoon: Mark File"; + } + { + mode = "n"; + key = "hh"; + action = ''lua require("harpoon.ui").toggle_quick_menu()''; + options.desc = "Harpoon: Show Menu"; + } + { + mode = "n"; + key = "xx"; + action = "Trouble diagnostics toggle"; + options.desc = "Toggle Trouble (Diagnostics)"; + } + { + mode = "n"; + key = "p"; + action = "Telescope yank_history"; + options.desc = "Open Yank History"; + } + ]; + + plugins = { + overseer.enable = true; + neotest.enable = true; + + tiny-inline-diagnostic = { + enable = true; + settings = { + preset = "minimal"; + show_all_diags_on_cursorline = true; + options = { + multilines = { + enabled = true; + always_show = true; + }; + }; + }; + }; + comment.enable = true; + flash = { + enable = true; + settings = { + search.enabled = true; + jump.autojump = true; + }; + }; + notify = { + enable = true; + settings.topDown = false; + }; + yanky = { + enable = true; + settings.ring.history_length = 100; + settings.system_clipboard.sync_with_ring = true; + }; + lualine = { + enable = true; + settings = { + options.theme = "gruvbox-material"; + sections = { + lualine_b = [ "diagnostics" ]; + lualine_c = [ "filename" ]; + lualine_x = [ "filetype" ]; + }; + }; + }; + + treesitter-context = { + enable = true; + settings = { + indent.enable = true; + max_lines = 2; + trim_scope = "outer"; + }; + }; + oil.enable = true; + nvim-autopairs.enable = true; + neoscroll.enable = true; + bufferline.enable = true; + web-devicons.enable = true; + lsp-kind.enable = true; + + blink-cmp = { + enable = true; + settings = { + keymap = { + preset = "default"; + "" = [ + "show" + "show_documentation" + "hide" + ]; + # "" = [ + # "accept" + # "fallback" + # ]; + # "" = [ + # "select_next" + # "fallback" + # ]; + # "" = [ + # "select_prev" + # "fallback" + # ]; + }; + }; + }; + + gitsigns.enable = true; + which-key.enable = true; + harpoon = { + enable = true; + enableTelescope = true; + }; + toggleterm.enable = true; + treesitter.enable = true; + telescope = { + enable = true; + extensions.fzf-native.enable = true; + }; + noice.enable = true; + dressing.enable = true; + + conform-nvim = { + enable = true; + settings = { + formatters_by_ft = { + nix = [ "alejandra" ]; + }; + format_on_save = { + lsp_fallback = true; + timeout_ms = 500; + }; + }; + }; + + lsp = { + enable = true; + servers = { + # zls.enable = true; + nil_ls.enable = true; + clangd.enable = true; + }; + }; + }; + }; + }; +} diff --git a/hm/env/niri/binds.nix b/hm/env/niri/binds.nix index fd46c17..e85b867 100644 --- a/hm/env/niri/binds.nix +++ b/hm/env/niri/binds.nix @@ -4,156 +4,159 @@ pkgs, ... }: -with config.lib.niri.actions; let +with config.lib.niri.actions; +let playerctl = spawn "${pkgs.playerctl}/bin/playerctl"; - ss = "${toString config.hm.conf.xdg-dirs.mediaPath}/pics/ss/$(date +%Y-%m-%d_%H-%M-%S)"; + ss = "${toString config.hm.conf.xdg-dirs.storagePath}/pics/ss/$(date +%Y-%m-%d_%H-%M-%S)"; in - { - "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 +{ + "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 + ''; + + "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; + + 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"; + + "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 ''; - XF86Tools.action = spawn "sh" "-c" '' - wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && \ - wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle + 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 ''; - - "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; - - 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"; - - "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; - }; - - "Mod+S" = { - 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+S" = { - 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; - }; - - "Mod+Shift+D".action = spawn "sh" "-c" '' - cliphist list | fuzzel --dmenu | cliphist decode | wl-copy + repeat = false; + }; + + "Mod+S" = { + 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 ''; - - "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 ( - keyNum: let - key = toString keyNum; - targetWS = keyNum + 1; - in [ - { - name = "Mod+${key}"; - value.action = focus-workspace targetWS; - } - { - name = "Mod+Shift+${key}"; - value.action.move-column-to-workspace = [targetWS]; - } - ] - ) (lib.range 1 9) - )) + repeat = false; + }; + + "Mod+Shift+S" = { + 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; + }; + + "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 ( + keyNum: + let + key = toString keyNum; + targetWS = keyNum + 1; + in + [ + { + name = "Mod+${key}"; + value.action = focus-workspace targetWS; + } + { + name = "Mod+Shift+${key}"; + value.action.move-column-to-workspace = [ targetWS ]; + } + ] + ) (lib.range 1 9) +)) diff --git a/hm/soft/media.nix b/hm/soft/media.nix index b307904..89cbe13 100644 --- a/hm/soft/media.nix +++ b/hm/soft/media.nix @@ -51,11 +51,11 @@ in }; }; home.packages = with pkgs; [ + czkawka nsxiv pinta ffmpeg imagemagick - exiftool mediainfo sox syncplay-nogui diff --git a/hm/soft/mpv.nix b/hm/soft/mpv.nix index 4af4198..380d0d5 100644 --- a/hm/soft/mpv.nix +++ b/hm/soft/mpv.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.hm.soft.mpv; s = "~~/shaders/shim"; @@ -12,7 +17,8 @@ in ]; home.file = { - ".config/mpv/shaders/shim".source = "${pkgs.mpv-shim-default-shaders}/share/mpv-shim-default-shaders/shaders"; + ".config/mpv/shaders/shim".source = + "${pkgs.mpv-shim-default-shaders}/share/mpv-shim-default-shaders/shaders"; }; programs.mpv = { @@ -69,7 +75,7 @@ in screenshot-format = "png"; screenshot-sw = "no"; - screenshot-directory = "${toString config.hm.conf.xdg-dirs.mediaPath}/pics/ss"; + screenshot-directory = "${toString config.hm.conf.xdg-dirs.storagePath}/pics/ss"; screenshot-template = "mpv-%f-%wH.%wM.%wS-#%#00n"; }; -- cgit v1.3