voidrice/.local/bin/showclip

10 lines
311 B
Bash
Executable File

#!/bin/sh
# Display contents of selection via dunst if running.
clip=$(xclip -o -selection clipboard)
prim=$(xclip -o -selection primary)
[ -z "$clip" ] && notify-send "Clipboard is empty" || notify-send "Clipboard:" "$clip"
[ -z "$prim" ] && notify-send "Primary is empty" || notify-send "Primary:" "$prim"