voidrice/.scripts/i3cmds/showclip

16 lines
350 B
Text
Raw Normal View History

2018-11-18 20:31:24 -05:00
#!/bin/sh
# 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)
2018-12-28 18:05:28 +01:00
[ "$clip" != "" ] && notify-send "<b>Clipboard:</b>
2018-11-18 20:31:24 -05:00
$clip"
2018-12-28 18:05:28 +01:00
[ "$prim" != "" ] && notify-send "<b>Primary:</b>
2018-12-12 17:51:03 -05:00
$prim"