mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2025-06-29 04:00:42 +00:00
Major rewrite: switching back to Arch from NixOS
This commit is contained in:
parent
df585b737b
commit
254181c0fc
121 changed files with 5433 additions and 2371 deletions
36
home/.local/bin/scripts/gui/hyprland/hyprland-move-window
Normal file
36
home/.local/bin/scripts/gui/hyprland/hyprland-move-window
Normal file
|
@ -0,0 +1,36 @@
|
|||
#!/bin/sh
|
||||
|
||||
RESIZE_SIZE=${1:?Missing resize size}
|
||||
|
||||
RESIZE_PARAMS_X=0
|
||||
RESIZE_PARAMS_Y=0
|
||||
|
||||
DIRECTION=${2:?Missing move direction}
|
||||
case $DIRECTION in
|
||||
l)
|
||||
RESIZE_PARAMS_X=-$RESIZE_SIZE
|
||||
;;
|
||||
r)
|
||||
RESIZE_PARAMS_X=$RESIZE_SIZE
|
||||
;;
|
||||
u)
|
||||
RESIZE_PARAMS_Y=-$RESIZE_SIZE
|
||||
;;
|
||||
d)
|
||||
RESIZE_PARAMS_Y=$RESIZE_SIZE
|
||||
;;
|
||||
*)
|
||||
echo "kbye"
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
|
||||
ACTIVE_WINDOW=$(hyprctl activewindow -j)
|
||||
IS_FLOATING=$(echo "$ACTIVE_WINDOW" | jq .floating)
|
||||
|
||||
if [ "$IS_FLOATING" = "true" ]; then
|
||||
hyprctl dispatch moveactive "$RESIZE_PARAMS_X" "$RESIZE_PARAMS_Y"
|
||||
else
|
||||
hyprctl dispatch movewindow "$DIRECTION"
|
||||
fi
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue