mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 06:12:34 +00:00
22 lines
511 B
Bash
Executable File
22 lines
511 B
Bash
Executable File
#!/bin/bash
|
|
|
|
notify_flag="0"
|
|
XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share}
|
|
|
|
while [[ $# -gt 0 ]]; do
|
|
if [[ $1 == "-n" ]] || [[ $1 == "--notify-complete" ]]; then
|
|
notify_flag="1"
|
|
fi
|
|
shift
|
|
done
|
|
|
|
if [[ -n "$WAYLAND_DISPLAY" ]]; then
|
|
wl-copy --clear
|
|
fi
|
|
|
|
rm $XDG_DATA_HOME/clipse/clipboard_history.json >/dev/null 2>&1
|
|
|
|
if [[ $notify_flag == "1" ]] && [[ -n "$WAYLAND_DISPLAY" ]]; then
|
|
notify-send --urgency=low --expire-time=3000 --app-name="Clipboard History" "✅ Cleared clipboard history"
|
|
fi
|