summaryrefslogtreecommitdiffstats
path: root/.scripts/i3cmds/showclip
blob: f34addcf89f4b32c3590a244eadfb04f76aa9f31 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/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)

[ "$prim" != "" ] && notify-send "<b>Clipboard:</b>
$prim"
[ "$clip" != "" ] && notify-send "<b>Primary:</b>
$clip"