1
1
Fork 0

window: add ability to reset state

Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
Myned 2024-10-13 17:16:02 -05:00
parent 6dd79c2697
commit 3b48fe0a79
Signed by: myned
GPG key ID: C7224454F7881A34

View file

@ -24,6 +24,13 @@ move() {
# Get current position # Get current position
position="$(hyprctl -j clients | jq -r ".[] | select(.${argc_property:-} | test(\"${argc_window:-}\")).at")" # [X,Y] 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 [[ "${argc_current:-}" ]]; then
if [[ -f "${argc_file:-}" ]]; then if [[ -f "${argc_file:-}" ]]; then
# Pop saved position # Pop saved position