add clipboard manager

This commit is contained in:
notgne2 2022-12-12 08:47:33 -07:00
parent 0f165c54f5
commit 41b8416c56
Signed by: notgne2
SSH Key Fingerprint: SHA256:qlFCAimT/PvNIG3u+aYT9pIqFCWgu6sNsWjpV1vHLIE
3 changed files with 11 additions and 1 deletions

View File

@ -53,6 +53,9 @@
url = "github:mattydebie/bitwarden-rofi"; url = "github:mattydebie/bitwarden-rofi";
flake = false; flake = false;
}; };
home-manager-clipman = {
url = "github:jwygoda/home-manager/clipman";
};
}; };
outputs = { outputs = {

View File

@ -4,7 +4,7 @@ inputs: {
pkgs, pkgs,
... ...
}: { }: {
imports = [(import ./modules inputs)]; imports = [(import ./modules inputs) "${inputs.home-manager-clipman}/modules/services/clipman.nix"];
programs.direnv = { programs.direnv = {
enable = lib.mkDefault true; enable = lib.mkDefault true;

View File

@ -163,6 +163,8 @@ in {
"Print" = "exec ${config.services.flameshot.package}/bin/flameshot gui -p=\"${config.services.flameshot.settings.General.savePath}/$(date '+${config.services.flameshot.settings.General.filenamePattern}')\" --raw | ${pkgs.wl-clipboard}/bin/wl-copy -t image/png"; "Print" = "exec ${config.services.flameshot.package}/bin/flameshot gui -p=\"${config.services.flameshot.settings.General.savePath}/$(date '+${config.services.flameshot.settings.General.filenamePattern}')\" --raw | ${pkgs.wl-clipboard}/bin/wl-copy -t image/png";
"Shift+Print" = "exec ${pkgs.wl-clipboard}/bin/wl-paste > /tmp/clipup && ${if cfg.uploadScript != null then cfg.uploadScript else ":"} /tmp/clipup | ${pkgs.wl-clipboard}/bin/wl-copy && ${pkgs.libnotify}/bin/notify-send 'Clipboard uploaded!'"; "Shift+Print" = "exec ${pkgs.wl-clipboard}/bin/wl-paste > /tmp/clipup && ${if cfg.uploadScript != null then cfg.uploadScript else ":"} /tmp/clipup | ${pkgs.wl-clipboard}/bin/wl-copy && ${pkgs.libnotify}/bin/notify-send 'Clipboard uploaded!'";
"${modifier}+c" = "exec ${config.services.clipman.package}/bin/clipman pick -t rofi";
"${modifier}+minus" = volumeDown; "${modifier}+minus" = volumeDown;
"${modifier}+equal" = volumeUp; "${modifier}+equal" = volumeUp;
@ -527,7 +529,12 @@ in {
settings.General = { settings.General = {
filenamePattern = "%F_%T"; filenamePattern = "%F_%T";
savePath = "Media/Screenshots"; savePath = "Media/Screenshots";
saveAfterCopy = true;
uiColor = "#${config.ezcolors.base16.base04}";
contrastUiColor = "#${config.ezcolors.base16.base05}";
}; };
}; };
services.clipman.enable = true;
}; };
} }