diff --git a/home/modules/desktop/environments/hyprland.nix b/home/modules/desktop/environments/hyprland.nix index 8ce9288..b650c8e 100644 --- a/home/modules/desktop/environments/hyprland.nix +++ b/home/modules/desktop/environments/hyprland.nix @@ -15,6 +15,7 @@ exec-once = [ "hyprctl setcursor 24" + "clipse -listen" ]; monitor = [ @@ -27,6 +28,9 @@ "$mod, Space, exec, rofi -show drun" "$mod, C, exec, rofi -show calc" "$mod, P, exec, rofi -show powermenu -modi powermenu:${pkgs.rofi-power-menu}/bin/rofi-power-menu" + "$mod, X, exec, kitty --class clipse -e 'clipse'" + ", Print, exec, grim -g \"$(slurp)\" - | wl-copy" + "$mod, Print, exec, grim - | wl-copy" "$mod, 1, workspace, 1" "$mod, 2, workspace, 2" @@ -71,6 +75,11 @@ "$mod, mouse:272, movewindow" ]; + windowrulev2 = [ + "float,class:(clipse)" + "size 622 652,class:(clipse)" + ]; + general = { border_size = 1; gaps_out = "0, 8, 8, 8"; @@ -432,6 +441,49 @@ enable = true; createDirectories = true; }; + configFile = { + clipse = { + enable = true; + target = "clipse/config.json"; + text = '' + { + "historyFile": "clipboard_history.json", + "maxHistory": 100, + "allowDuplicates": false, + "themeFile": "custom_theme.json", + "tempDir": "tmp_files", + "logFile": "clipse.log", + "keyBindings": { + "choose": "enter", + "clearSelected": "S", + "down": "down", + "end": "end", + "filter": "/", + "home": "home", + "more": "?", + "nextPage": "right", + "prevPage": "left", + "preview": "t", + "quit": "q", + "remove": "x", + "selectDown": "ctrl+down", + "selectSingle": "s", + "selectUp": "ctrl+up", + "togglePin": "p", + "togglePinned": "tab", + "up": "up", + "yankFilter": "ctrl+s" + }, + "imageDisplay": { + "type": "kitty", + "scaleX": 9, + "scaleY": 9, + "heightCut": 2 + } + } + ''; + }; + }; }; catppuccin = { @@ -521,5 +573,13 @@ noto-fonts-color-emoji noto-fonts self.packages.${pkgs.system}.nerd-fonts-sf-mono-ligatures + + # Screenshot + slurp + grim + + # Clipboard + wl-clipboard + clipse ]; }