diff --git a/.scripts/i3cmds/showclip b/.scripts/i3cmds/showclip index 9f8a6b9..d2faff8 100755 --- a/.scripts/i3cmds/showclip +++ b/.scripts/i3cmds/showclip @@ -3,13 +3,8 @@ # Display contents of selection via dunst if running. # Separate script for i3. -! pgrep -x dunst >/dev/null && echo "dunst not running." && exit - clip=$(xclip -o -selection clipboard) - prim=$(xclip -o -selection primary) -[ "$clip" != "" ] && notify-send "Clipboard: -$clip" -[ "$prim" != "" ] && notify-send "Primary: -$prim" +[ -n "$clip" ] && notify-send "Clipboard:" "$clip" +[ -n "$prim" ] && notify-send "Primary:" "$prim"