Open villamide opened 1 year ago
bind = $mainMod SHIFT, left, movewindow, l bind = $mainMod SHIFT, right, movewindow, r bind = $mainMod SHIFT, up, movewindow, u bind = $mainMod SHIFT, down, movewindow, d
Move focused window with mainMod SHIFT + arrow keys
bind = $mainMod SHIFT, left, movewindow, l bind = $mainMod SHIFT, right, movewindow, r bind = $mainMod SHIFT, up, movewindow, u bind = $mainMod SHIFT, down, movewindow, d
Currently I have the following bindings:
# move floating window
binde = $mainMod, left, moveactive, -10 0
binde = $mainMod, right, moveactive, 10 0
binde = $mainMod, up, moveactive, 0 -10
binde = $mainMod, down, moveactive, 0 10
# move focused window
bind = $mainMod, h, movefocus, l
bind = $mainMod, l, movefocus, r
bind = $mainMod, k, movefocus, u
bind = $mainMod, j, movefocus, d
# move focused window
bind = $mainMod SHIFT, h, movewindow, l
bind = $mainMod SHIFT, l, movewindow, r
bind = $mainMod SHIFT, k, movewindow, u
bind = $mainMod SHIFT, j, movewindow, d
I was really used to using i3wm, and in i3wm the "movefocus" hyprland dispatcher acted also like my "moveactive" bindings. I mean, when the focused windows is tiled, in i3wm it would switch places with the other tiled windows, but when the focused window is floating, it would just move this floating window around.
I was wondering if this could be possible using the same bindings when the window is floating or not.
Here is a little ugly script I made up in a few minutes:
usage:
$myMoveSize = 300
$myMove = sh .config/hypr/move-window.sh $myMoveSize
bind = $mainMod SHIFT, h, exec, $myMove l
bind = $mainMod SHIFT, l, exec, $myMove r
bind = $mainMod SHIFT, k, exec, $myMove u
bind = $mainMod SHIFT, j, exec, $myMove d
This allows you to either swap tiling windows or to move floating windows by a specified amount. I come from Awesome WM where I've had a function to snap clients to screen borders, but I was too lazy to implement it here. Anyway, this is usable enough.
Thanks a lot @staticssleever668 .
That's pretty much what I was looking for but I didn't know how to interact with hyprctl or how to retrieve the current focused and active window. This helps me a lot for future scripts.
PD: I changed the last hyprctl dispatch movewindow "$DIRECTION" with hyprctl dispatch movefocus "$DIRECTION"
Hi. I've been playing around a lot with Hyprland and I find it amazing so far.
I am really used to i3wm, and I am not being able to achieve the same result with Hyprland.
In my i3wm config I have this bindings for "moving" windows.
bindsym $mod+Shift+h move left bindsym $mod+Shift+j move down bindsym $mod+Shift+k move up bindsym $mod+Shift+l move right
Whenever the focused window is in tile mode it behaves like "movefocus" Hyprland dispatcher, and when the focused window is floating it behaves like "moveactive" Hyprland dispatcher. I mean, basically, when focused window is in tile mode it switches with the next tile window in the direction you want, and when the focused window is in floating mode, you can move it around your current desktop.
Is there any way to achieve this in Hyprland with the same binding? If not, would it be possible to add a new dispatcher in order to achieve this behavior?
Thanks in advance