home/sway: add cliphist script

This commit is contained in:
Asmir A 2024-01-28 12:53:43 +01:00
parent 3459bcaf39
commit 1ffa293354
Signed by: asmir
GPG Key ID: 020C42B7A9ABA3E2

View File

@ -3,7 +3,14 @@
lib,
pkgs,
...
}: {
}: let
cliphist_sway = pkgs.writeShellScriptBin "cliphist_sway" ''
${pkgs.cliphist}/bin/cliphist list | \
${pkgs.wofi}/bin/wofi --dmenu --insensitive | \
${pkgs.cliphist}/bin/cliphist decode | \
${pkgs.wl-clipboard}/bin/wl-copy
'';
in {
wayland.windowManager.sway = {
enable = true;
extraSessionCommands = "";
@ -66,6 +73,7 @@
"Alt+Shift+q" = "kill";
"Alt+Shift+Return" = "exec ${pkgs.foot}/bin/footclient";
"Alt+p" = "exec ${pkgs.dmenu-wayland}/bin/dmenu-wl_run -fn \"mono 14\"";
"Alt+c" = "exec ${pkgs.moreutils}/bin/lckdo cliphist_sway ${cliphist_sway}/bin/cliphist_sway";
"Alt+Shift+space" = "floating toggle";
"Alt+space" = "focus mode_toggle";