From 45fa574d8111b143a3932067b46de9b800c6df7c Mon Sep 17 00:00:00 2001 From: GHOSCHT <31184695+GHOSCHT@users.noreply.github.com> Date: Sat, 14 Dec 2024 00:43:32 +0100 Subject: [PATCH] Hyprland: Add clipboard management --- home/features/desktop/hyprland/config.nix | 20 ++++++++++++-------- home/features/desktop/hyprland/default.nix | 15 ++++++--------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/home/features/desktop/hyprland/config.nix b/home/features/desktop/hyprland/config.nix index fc2160b..b31b343 100644 --- a/home/features/desktop/hyprland/config.nix +++ b/home/features/desktop/hyprland/config.nix @@ -3,15 +3,16 @@ settings = { # autostart exec-once = [ - "picokontroller" - "systemctl --user start hyprpolkitagent" - "busctl --user -- set-property rs.wl-gammarelay / rs.wl.gammarelay Temperature q 4000" - "hyprshade on bluelight" - "fcitx5 -d" - "webcord --start-minimized --force-audio-share-support" - "kdeconnect-indicator & kdeconnect-cli -l" + "picokontroller" # volume & light control + "systemctl --user start hyprpolkitagent" # polkit agent + "hyprshade on bluelight" # set bluelight shader + "fcitx5 -d" # japanese typing + "webcord --start-minimized --force-audio-share-support" # discord but some privacy + "kdeconnect-indicator & kdeconnect-cli -l" # kde connect "signal-desktop --start-in-tray" "easyeffects --gapplication-service" + "wl-clip-persist --clipboard both &" # Keep Wayland clipboard even after programs close + "wl-paste --watch cliphist store &" # Store clipboard contents in cliphist on each change ]; input = { @@ -114,7 +115,7 @@ "$mainMod, Return, exec, $terminal" "$mainMod SHIFT, C, killactive" "$mainMod SHIFT, Q, exit" - "$mainMod, V, togglefloating" + "$mainMod, T, togglefloating" "$mainMod, Space, exec, $menu" "$mainMod, P, pseudo" # dwindle "$mainMod, J, togglesplit" # dwindle @@ -162,6 +163,9 @@ ",XF86AudioNext,exec, playerctl next" ",XF86AudioPrev,exec, playerctl previous" ",XF86AudioStop,exec, playerctl stop" + + # clipboard manager + "$mainMod, V, exec, cliphist list | wofi --show dmenu | cliphist decode | wl-copy" ]; # Move/resize windows with mainMod + LMB/RMB and dragging diff --git a/home/features/desktop/hyprland/default.nix b/home/features/desktop/hyprland/default.nix index ac95e47..acbe530 100644 --- a/home/features/desktop/hyprland/default.nix +++ b/home/features/desktop/hyprland/default.nix @@ -1,19 +1,16 @@ { pkgs, ... }: { imports = [ ./config.nix ./variables.nix ]; home.packages = with pkgs; [ - swww - hyprpicker - wofi - hyprshade + hyprpicker # color picker + wofi # dmenu replacement + hyprshade # shader control, used for rudimentary blue-light filter hyprpolkitagent grim slurp + # clipboard management wl-clip-persist + wl-clipboard cliphist - wf-recorder - glib - wayland - direnv ]; wayland.windowManager.hyprland = { enable = true; @@ -25,7 +22,7 @@ enable = true; settings = { global = { - corner_radius = 5; + corner_radius = 5; }; }; };