2017-02-15 23:07:36 +00:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
with import <stockholm/lib>;
|
|
|
|
let
|
|
|
|
copyqConfig = pkgs.writeDash "copyq-config" ''
|
|
|
|
${pkgs.copyq}/bin/copyq config check_clipboard true
|
|
|
|
${pkgs.copyq}/bin/copyq config check_selection true
|
|
|
|
${pkgs.copyq}/bin/copyq config copy_clipboard true
|
|
|
|
${pkgs.copyq}/bin/copyq config copy_selection true
|
|
|
|
|
|
|
|
${pkgs.copyq}/bin/copyq config activate_closes true
|
|
|
|
${pkgs.copyq}/bin/copyq config clipboard_notification_lines 0
|
2017-03-14 10:17:26 +00:00
|
|
|
${pkgs.copyq}/bin/copyq config clipboard_tab \&clipboard
|
2017-02-15 23:07:36 +00:00
|
|
|
${pkgs.copyq}/bin/copyq config disable_tray true
|
|
|
|
${pkgs.copyq}/bin/copyq config hide_tabs true
|
|
|
|
${pkgs.copyq}/bin/copyq config hide_toolbar true
|
|
|
|
${pkgs.copyq}/bin/copyq config item_popup_interval true
|
|
|
|
${pkgs.copyq}/bin/copyq config maxitems 1000
|
|
|
|
${pkgs.copyq}/bin/copyq config move true
|
|
|
|
${pkgs.copyq}/bin/copyq config text_wrap true
|
|
|
|
'';
|
|
|
|
in {
|
2018-01-18 18:39:50 +00:00
|
|
|
systemd.user.services.copyq = {
|
|
|
|
wantedBy = [ "graphical-session.target" ];
|
|
|
|
requires = [ "xmonad.service" ];
|
2017-02-15 23:07:36 +00:00
|
|
|
environment = {
|
2017-12-03 22:13:01 +00:00
|
|
|
DISPLAY = ":${toString config.services.xserver.display}";
|
2017-02-15 23:07:36 +00:00
|
|
|
};
|
2017-10-03 09:38:11 +00:00
|
|
|
path = with pkgs; [
|
|
|
|
qt5.full
|
|
|
|
];
|
2017-02-15 23:07:36 +00:00
|
|
|
serviceConfig = {
|
|
|
|
SyslogIdentifier = "copyq";
|
|
|
|
ExecStart = "${pkgs.copyq}/bin/copyq";
|
|
|
|
ExecStartPost = copyqConfig;
|
|
|
|
Restart = "always";
|
2017-10-03 09:38:11 +00:00
|
|
|
RestartSec = "15s";
|
2017-02-15 23:07:36 +00:00
|
|
|
StartLimitBurst = 0;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|