From 93cc209e5217c35aa5c04591df192fba86e9ce42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Tue, 29 Nov 2022 22:49:51 +0100 Subject: [PATCH] feat: clipmenu --- configs/clipboard.nix | 21 +++++++++++++++++ configs/copyq.nix | 40 --------------------------------- configs/default.nix | 2 +- systems/kabsa/configuration.nix | 2 +- 4 files changed, 23 insertions(+), 42 deletions(-) create mode 100644 configs/clipboard.nix delete mode 100644 configs/copyq.nix diff --git a/configs/clipboard.nix b/configs/clipboard.nix new file mode 100644 index 0000000..1d7e8b5 --- /dev/null +++ b/configs/clipboard.nix @@ -0,0 +1,21 @@ +{ + config, + pkgs, + ... +}: { + services.clipmenu.enable = true; + + # synchronize all the clipboards + systemd.user.services.autocutsel = { + enable = true; + wantedBy = ["graphical-session.target"]; + after = ["graphical-session.target"]; + serviceConfig = { + Type = "forking"; + ExecStart = pkgs.writers.writeDash "autocutsel" '' + ${pkgs.autocutsel}/bin/autocutsel -fork -selection PRIMARY + ${pkgs.autocutsel}/bin/autocutsel -fork -selection CLIPBOARD + ''; + }; + }; +} diff --git a/configs/copyq.nix b/configs/copyq.nix deleted file mode 100644 index 33360a7..0000000 --- a/configs/copyq.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ - config, - pkgs, - ... -}: let - copyqConfig = pkgs.writers.writeDash "copyq-config" '' - ${pkgs.copyq}/bin/copyq config check_clipboard true - ${pkgs.copyq}/bin/copyq config check_selection false - ${pkgs.copyq}/bin/copyq config copy_clipboard true - ${pkgs.copyq}/bin/copyq config copy_selection false - - ${pkgs.copyq}/bin/copyq config activate_closes true - ${pkgs.copyq}/bin/copyq config clipboard_notification_lines 0 - ${pkgs.copyq}/bin/copyq config clipboard_tab \&clipboard - ${pkgs.copyq}/bin/copyq config disable_tray false - ${pkgs.copyq}/bin/copyq config hide_tabs false - ${pkgs.copyq}/bin/copyq config hide_toolbar false - ${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 { - environment.systemPackages = [pkgs.copyq]; - - systemd.user.services.copyq = { - wantedBy = ["graphical-session.target"]; - environment = { - DISPLAY = ":${toString config.services.xserver.display}"; - }; - serviceConfig = { - SyslogIdentifier = "copyq"; - ExecStart = "${pkgs.copyq}/bin/copyq"; - ExecStartPost = copyqConfig; - Restart = "always"; - RestartSec = "15s"; - StartLimitBurst = 0; - }; - }; -} diff --git a/configs/default.nix b/configs/default.nix index 626484a..d624781 100644 --- a/configs/default.nix +++ b/configs/default.nix @@ -218,8 +218,8 @@ in { ./ccc.nix ./khal.nix ./chromium.nix + ./clipboard.nix ./cloud.nix - ./copyq.nix ./compton.nix ./direnv.nix ./distrobump.nix diff --git a/systems/kabsa/configuration.nix b/systems/kabsa/configuration.nix index dc2a47a..5def9b6 100644 --- a/systems/kabsa/configuration.nix +++ b/systems/kabsa/configuration.nix @@ -24,7 +24,7 @@ in { max-jobs = 2; }; - environment.systemPackages = [pkgs.minecraft]; + environment.systemPackages = [pkgs.minecraft pkgs.zeroad]; networking = { hostName = "kabsa";