window: add ability to reset state
Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
parent
6dd79c2697
commit
3b48fe0a79
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue