fix: Fixes windowctl to handle when ctrl-c is hit from the window-picker, when not launched in a new terminal window. Adds a few more options to that allow to return to the window picker after performing certain actions on a selected window.

This commit is contained in:
2025-10-06 16:32:26 -04:00
parent 54fe479ee1
commit b5198a5df6
4 changed files with 94 additions and 28 deletions

View File

@@ -1,8 +1,21 @@
#!/bin/bash
#wl-copy --clear >/dev/null 2>&1 && \
if [ -n "$WAYLAND_DISPLAY" ]; then
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 ~/.local/share/clipse/clipboard_history.json >/dev/null 2>&1
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