blob: 88cb88ce44f7b5cdbe08fb86008fccb67392c705 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/usr/bin/env bash
# Wipe X selections and clipmenud history in one shot.
set -eu
xsel -bc 2>/dev/null || true
xsel -pc 2>/dev/null || true
# Full reset beats clipdel due to upstream tmpdir bug (#133)
if pgrep -x clipmenud >/dev/null; then
pkill clipmenud
sleep 0.2
fi
rm -rf "/run/user/$(id -u)/clipmenu."*
setsid clipmenud >/dev/null 2>&1 &
disown 2>/dev/null || true
command -v notify-send >/dev/null 2>&1 && notify-send -u low "clipwipe" "Clipboard and history cleared"
|