From cedda8be37fbc9a2f7d91ad43f533006efebdb90 Mon Sep 17 00:00:00 2001 From: rocketcamel Date: Wed, 6 Aug 2025 19:43:00 -0700 Subject: [PATCH] feat: add screenshotting, cliphist wofi integration, some packages --- nix/modules/desktop.nix | 63 ++++++++++++++++++++++------------------- scripts/copy.sh | 1 + scripts/screenshot.sh | 1 + 3 files changed, 36 insertions(+), 29 deletions(-) create mode 100755 scripts/copy.sh create mode 100755 scripts/screenshot.sh diff --git a/nix/modules/desktop.nix b/nix/modules/desktop.nix index 139d90b..07554d0 100644 --- a/nix/modules/desktop.nix +++ b/nix/modules/desktop.nix @@ -40,6 +40,11 @@ xfce.thunar altserver-linux xdg-desktop-portal + microsoft-edge + libadwaita + grim + slurp + swappy ]; programs.hyprland = { enable = true; @@ -145,36 +150,36 @@ "$mod" = "SUPER"; "$terminal" = "ghostty"; "$menu" = "wofi"; - bind = - [ - "$mod, Return, exec, $terminal" - "$mod SHIFT, Q, killactive" - "$mod SHIFT, E, exit" - "$mod SHIFT, SPACE, togglefloating" - "$mod, d, exec, $menu" - "$mod SHIFT, D, exec, bash -c ~/dotfiles/scripts/workspace.sh" - "$mod, h, movefocus, l" - "$mod, l, movefocus, r" - "$mod, k, movefocus, u" - "$mod, j, movefocus, d" - "$mod, Space, togglesplit" + bind = [ + "$mod, Return, exec, $terminal" + "$mod SHIFT, Q, killactive" + "$mod SHIFT, E, exit" + "$mod SHIFT, SPACE, togglefloating" + "$mod, d, exec, $menu" + "$mod SHIFT, D, exec, bash -c ~/dotfiles/scripts/workspace.sh" + "$mod, h, movefocus, l" + "$mod, l, movefocus, r" + "$mod, k, movefocus, u" + "$mod, j, movefocus, d" + "$mod, Space, togglesplit" + "$mod SHIFT, v, exec, bash -c ~/dotfiles/scripts/copy.sh" - "$mod, 0, workspace, 10" - "$mod SHIFT, 0, movetoworkspacesilent, 10" - "$mod, f, fullscreen" - ] - ++ (builtins.concatLists ( - builtins.genList ( - i: - let - ws = i + 1; - in - [ - "$mod, ${toString ws}, workspace, ${toString ws}" - "$mod SHIFT, ${toString ws}, movetoworkspacesilent, ${toString ws}" - ] - ) 9 - )); + "$mod, 0, workspace, 10" + "$mod SHIFT, 0, movetoworkspacesilent, 10" + "$mod, f, fullscreen" + ] + ++ (builtins.concatLists ( + builtins.genList ( + i: + let + ws = i + 1; + in + [ + "$mod, ${toString ws}, workspace, ${toString ws}" + "$mod SHIFT, ${toString ws}, movetoworkspacesilent, ${toString ws}" + ] + ) 9 + )); bindm = [ "$mod, mouse:272, movewindow" "$mod, mouse:273, resizewindow" diff --git a/scripts/copy.sh b/scripts/copy.sh new file mode 100755 index 0000000..d4ad387 --- /dev/null +++ b/scripts/copy.sh @@ -0,0 +1 @@ +cliphist list | wofi --dmenu | cliphist decode | wl-copy diff --git a/scripts/screenshot.sh b/scripts/screenshot.sh new file mode 100755 index 0000000..5e4a0be --- /dev/null +++ b/scripts/screenshot.sh @@ -0,0 +1 @@ +grim -g "$(slurp)" - | swappy -f -