From 8f41327eaeaa86594bb1f0c5e5d1b06a4148ce24 Mon Sep 17 00:00:00 2001 From: Nikolaos Karaolidis Date: Wed, 10 Jul 2024 14:31:48 +0300 Subject: [PATCH] Fix cliphist regression Signed-off-by: Nikolaos Karaolidis --- .../user/configs/gui/cliphist/default.nix | 34 ++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/hosts/common/user/configs/gui/cliphist/default.nix b/hosts/common/user/configs/gui/cliphist/default.nix index d49b8e6..70abb98 100644 --- a/hosts/common/user/configs/gui/cliphist/default.nix +++ b/hosts/common/user/configs/gui/cliphist/default.nix @@ -20,7 +20,39 @@ in persistence."/cache${user.home}".directories = [ "${hmConfig.xdg.relativeCacheHome}/cliphist" ]; }; - services.cliphist.enable = true; + systemd.user.services = { + cliphist = { + Unit = { + Description = "Clipboard manager"; + BindsTo = [ "graphical-session.target" ]; + After = [ "graphical-session.target" ]; + }; + + Service.ExecStart = lib.meta.getExe (pkgs.writeShellApplication { + name = "init-cliphist"; + runtimeInputs = with pkgs; [ wl-clipboard cliphist ]; + text = "exec wl-paste --watch cliphist store"; + }); + + Install.WantedBy = [ "graphical-session.target" ]; + }; + + cliphist-image = { + Unit = { + Description = "Clipboard manager (images)"; + BindsTo = [ "graphical-session.target" ]; + After = [ "graphical-session.target" ]; + }; + + Service.ExecStart = lib.meta.getExe (pkgs.writeShellApplication { + name = "init-cliphist-image"; + runtimeInputs = with pkgs; [ wl-clipboard cliphist ]; + text = "exec wl-paste --type image --watch cliphist store"; + }); + + Install.WantedBy = [ "graphical-session.target" ]; + }; + }; wayland.windowManager.hyprland.settings.bind = let