diff --git a/options/custom/scripts/window.sh b/options/custom/scripts/window.sh index 4fe350b..e949b0d 100644 --- a/options/custom/scripts/window.sh +++ b/options/custom/scripts/window.sh @@ -24,6 +24,13 @@ move() { # Get current position position="$(hyprctl -j clients | jq -r ".[] | select(.${argc_property:-} | test(\"${argc_window:-}\")).at")" # [X,Y] + # Clear saved position if window does not exist + if ! [[ "$position" ]]; then + rm --force "${argc_file:-}" + notify-send "> window" "Cleared saved position" --urgency low + exit + fi + if [[ "${argc_current:-}" ]]; then if [[ -f "${argc_file:-}" ]]; then # Pop saved position