diff --git a/bin/cb-clear b/bin/cb-clear new file mode 100755 index 0000000..f91b53f --- /dev/null +++ b/bin/cb-clear @@ -0,0 +1,11 @@ +#!/bin/sh + +cb_clear() { + wl-copy --foreground --clear "$@" +} + +if cb_clear --primary && cb_clear; then + notify-send -t 1000 'cb-clear' +else + notify-send -t 1000 -h 'string:bgcolor:#ff0000' 'cb-clear failed to clear' +fi diff --git a/sway/config b/sway/config index 4df8c30..746c016 100644 --- a/sway/config +++ b/sway/config @@ -164,5 +164,6 @@ focus_on_window_activation smart mouse_warping output seat seat0 hide_cursor 5000 +bindsym $super+x exec cb-clear include /etc/sway/config.d/*