From ca724c13d4d92fb8c2379c03fbc1f1389c785db4 Mon Sep 17 00:00:00 2001 From: Gabriella Bere Date: Sun, 26 Oct 2025 10:43:19 +0000 Subject: [PATCH] fixed screenshots in niri by adding a thingy that merges two attrsets, one with the syntactic sugar and one without, since that sugar is what broke the screenshots due to an issue in the upstream flake. everything works now :D oh i also added spell as a source for blink-cmp in nvf.nix --- home-manager/niri.nix | 87 +++++++++++++++++++++++-------------------- home-manager/nvf.nix | 1 + 2 files changed, 47 insertions(+), 41 deletions(-) diff --git a/home-manager/niri.nix b/home-manager/niri.nix index 4e61e97..8c10f5c 100644 --- a/home-manager/niri.nix +++ b/home-manager/niri.nix @@ -68,59 +68,64 @@ gaps = 5; struts = let - r = 5; + l = 5; in { - left = r; - right = r; - bottom = r; - top = r; + left = l; + right = l; + bottom = l; + top = l; }; preset-column-widths = [ { proportion = 1. / 2.; } { proportion = 1. / 1.; } ]; }; - binds = with config.lib.niri.actions; { - # keybinds for spawning apps - "Mod+1".action = spawn "kitty"; - "Mod+F".action = spawn "librewolf"; - "Mod+D".action = spawn "vesktop"; - "Mod+Space".action = spawn "fuzzel"; - "Mod+Alt+L".action = spawn "hyprlock"; - "Print".action = screenshot; - "Mod+2".action = show-hotkey-overlay; - # window controls - #"Super".action = toggle-overview; # this doesnt work without release binds, the PR for which is my first bookmark in ~/bookmarks.html - "Mod+F11".action = fullscreen-window; - "Mod+x".action = close-window; - "Mod+Tab".action = toggle-window-floating; + binds = + (with config.lib.niri.actions; { + # keybinds for spawning apps + "Mod+1".action = spawn "kitty"; + "Mod+F".action = spawn "librewolf"; + "Mod+D".action = spawn "vesktop"; + "Mod+Space".action = spawn "fuzzel"; + "Mod+Alt+L".action = spawn "hyprlock"; + "Print".action = spawn "sh -c niri msg action screenshot"; + "Mod+2".action = show-hotkey-overlay; + # window controls + #"Super".action = toggle-overview; # this doesnt work without release binds, the PR for which is my first bookmark in ~/bookmarks.html + "Mod+F11".action = fullscreen-window; + "Mod+x".action = close-window; + "Mod+Tab".action = toggle-window-floating; - "Mod+h".action = focus-column-or-monitor-left; - "Mod+j".action = focus-window-or-monitor-down; - "Mod+k".action = focus-window-or-monitor-up; - "Mod+l".action = focus-column-or-monitor-right; - "Mod+Shift+h".action = move-column-left-or-to-monitor-left; - "Mod+Shift+j".action = move-window-down; - "Mod+Shift+k".action = move-window-up; - "Mod+Shift+l".action = move-column-right-or-to-monitor-right; - "Mod+Ctrl+j".action = focus-workspace-down; - "Mod+Ctrl+k".action = focus-workspace-up; - "Mod+Ctrl+Shift+j".action = move-window-to-workspace-down; - "Mod+Ctrl+Shift+k".action = move-window-to-workspace-up; + "Mod+h".action = focus-column-or-monitor-left; + "Mod+j".action = focus-window-or-monitor-down; + "Mod+k".action = focus-window-or-monitor-up; + "Mod+l".action = focus-column-or-monitor-right; + "Mod+Shift+h".action = move-column-left-or-to-monitor-left; + "Mod+Shift+j".action = move-window-down; + "Mod+Shift+k".action = move-window-up; + "Mod+Shift+l".action = move-column-right-or-to-monitor-right; + "Mod+Ctrl+j".action = focus-workspace-down; + "Mod+Ctrl+k".action = focus-workspace-up; + "Mod+Ctrl+Shift+j".action = move-window-to-workspace-down; + "Mod+Ctrl+Shift+k".action = move-window-to-workspace-up; - "Mod+Comma".action = consume-or-expel-window-left; - "Mod+Period".action = consume-or-expel-window-right; - "Mod+Return".action = switch-preset-column-width; + "Mod+Comma".action = consume-or-expel-window-left; + "Mod+Period".action = consume-or-expel-window-right; + "Mod+Return".action = switch-preset-column-width; - "Mod+WheelScrollUp".action = focus-workspace-up; - "Mod+WheelScrollDown".action = focus-workspace-down; - "Mod+Up".action = focus-workspace-up; - "Mod+Down".action = focus-workspace-down; - # not sure how to do the "send window to workspace" keybinds from the hyprland config + "Mod+WheelScrollUp".action = focus-workspace-up; + "Mod+WheelScrollDown".action = focus-workspace-down; + "Mod+Up".action = focus-workspace-up; + "Mod+Down".action = focus-workspace-down; + # not sure how to do the "send window to workspace" keybinds from the hyprland config - "XF86AudioPause".action = spawn "playerctl play-pause"; - }; + "XF86AudioPause".action = spawn "playerctl play-pause"; + }) + // # this operator merges attrsets together, allowing me to use the nice syntax for most of the config, but the less nice syntax for the one option that broke in the nice-syntax-generator in the niri flake + ({ + "Print".action.screenshot.show-pointer = false; + }); window-rules = [ { geometry-corner-radius = diff --git a/home-manager/nvf.nix b/home-manager/nvf.nix index 4fcb4b1..69ffccf 100644 --- a/home-manager/nvf.nix +++ b/home-manager/nvf.nix @@ -46,6 +46,7 @@ enable = true; sourcePlugins = { emoji.enable = true; + spell.enable = true; }; }; options = {