CopyQ Server Declaration

I’ve installed CopyQ, but is there some service declaration to run the server in the background?

ok, so in XMonad case:

--startuphook
myStartupHook :: X ()
myStartupHook = do
   spawn "copyq &"
{ config, lib, pkgs, ... }:

{
  home-manager.users.yuu = {
    home.packages = with pkgs; [ copyq ];

    systemd.user.services.copyq = {
      Unit = {
        Description = "CopyQ, a clipboard manager";
        Documentation = [ "man:copyq(5)" ];
        Wants = [ "graphical-session.target" ];
        Requires = [ "graphical-session.target" ];
        After = [ "graphical-session.target" ];
      };

      Service = {
        Type = "simple";
        ExecStart = "${pkgs.copyq}/bin/copyq";
        KillMode = "process";
        KillSignal = "SIGINT";
      };

      Install = {
        WantedBy = [
          "graphical-session.target"
        ];
      };
    };
  };
}
1 Like