From 4135134261f4ee0bb77536c84d5815ede9ca3f11 Mon Sep 17 00:00:00 2001 From: Hadi <112569860+anotherhadi@users.noreply.github.com> Date: Wed, 4 Sep 2024 01:53:36 +0200 Subject: [PATCH] Add wofi clipman --- home/system/clipman/default.nix | 18 ++++++++++++++++++ home/system/hyprland/default.nix | 1 + hosts/laptop/home.nix | 1 + 3 files changed, 20 insertions(+) create mode 100644 home/system/clipman/default.nix diff --git a/home/system/clipman/default.nix b/home/system/clipman/default.nix new file mode 100644 index 0000000..1a524dc --- /dev/null +++ b/home/system/clipman/default.nix @@ -0,0 +1,18 @@ +{ pkgs, ... }: +let + + clipboard-clear = pkgs.writeShellScriptBin "clipboard-clear" '' + clipman clear --all + ''; + + clipboard = pkgs.writeShellScriptBin "clipboard" '' + clipman pick --tool=wofi + ''; + +in { + wayland.windowManager.hyprland.settings.exec-once = + [ "${clipboard-clear}" "wl-paste -t text --watch clipman store" ]; + home.packages = with pkgs; [ clipman clipboard clipboard-clear ]; + services.clipman.enable = true; + +} diff --git a/home/system/hyprland/default.nix b/home/system/hyprland/default.nix index 22893d8..f0720c9 100644 --- a/home/system/hyprland/default.nix +++ b/home/system/hyprland/default.nix @@ -85,6 +85,7 @@ "$shiftMod, PRINT, exec, screenshot region" # Screenshot region "ALT, PRINT, exec, screenshot region swappy" # Screenshot region then edit + "$shiftMod, C, exec, clipboard" # Clipboard picker with wofi "$shiftMod, E, exec, ${pkgs.wofi-emoji}/bin/wofi-emoji" # Emoji picker with wofi "$mod, F2, exec, night-shift-off" # Turn off night shift "$mod, F3, exec, night-shift-on" # Turn on night shift diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index e5d4339..8f65f84 100644 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -27,6 +27,7 @@ ../../home/system/zathura ../../home/system/mime ../../home/system/udiskie + ../../home/system/clipman ./secrets # You should probably remove this line ];