From 876e6ce72b60313713ee534270e3d8d98a38a367 Mon Sep 17 00:00:00 2001 From: Jonas Strassel Date: Sat, 23 Oct 2021 16:56:34 +0200 Subject: [PATCH] feat: signallify wl-paste watch --- .../sway/etc/sway/config.d/99-autostart-applications.conf | 1 + community/sway/usr/share/sway/templates/waybar/config.jsonc | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/community/sway/etc/sway/config.d/99-autostart-applications.conf b/community/sway/etc/sway/config.d/99-autostart-applications.conf index ffd2f8a51..7e7b956d2 100644 --- a/community/sway/etc/sway/config.d/99-autostart-applications.conf +++ b/community/sway/etc/sway/config.d/99-autostart-applications.conf @@ -14,6 +14,7 @@ exec { '[ -x "$(command -v foot)" ] && /usr/share/sway/scripts/foot.sh --server' '[ -x "$(command -v nwg-wrapper)" ] && [ -f $HOME/.config/nwg-wrapper/help.sh ] && /usr/share/sway/scripts/help.sh --restore' '[ -x "$(command -v wl-paste)" ] && [ -x "$(command -v cliphist)" ] && (wl-paste --watch cliphist store; rm -f ~/.cache/cliphist/db)' + '[ -x "$(command -v wl-paste)" ] && [ -x "$(command -v cliphist)" ] && (wl-paste --watch pkill -RTMIN+9 waybar; rm -f ~/.cache/cliphist/db)' } exec_always { '[ -x "$(command -v spice-vdagent)" ] && spice-vdagent' diff --git a/community/sway/usr/share/sway/templates/waybar/config.jsonc b/community/sway/usr/share/sway/templates/waybar/config.jsonc index 0196903bf..884224036 100644 --- a/community/sway/usr/share/sway/templates/waybar/config.jsonc +++ b/community/sway/usr/share/sway/templates/waybar/config.jsonc @@ -259,12 +259,12 @@ }, "custom/clipboard": { "format": "", + "interval": "once", "return-type": "json", - "on-click": "swaymsg -q exec '$clipboard'", + "on-click": "swaymsg -q exec '$clipboard'; pkill -RTMIN+9 waybar", "on-click-right": "rm -f ~/.cache/cliphist/db; pkill -RTMIN+9 waybar", "exec": "printf '{\"tooltip\":\"%s\"}' $(cliphist list | wc -l)", "exec-if": "[ -x \"$(command -v cliphist)\" ] && [ $(cliphist list | wc -l) -gt 0 ]", - "interval": 60, "signal": 9 }, "custom/weather": {