Hyprland
Hyprland copied to clipboard
Resetting layouts
I have a small feature request: please add an option to reset layouts to as it was by default, for eg if I use something like resizeactive, swapmaster etc, there should be a way to reset it back to how it was before, i.e reverse actions of add/remove master, resizeactive, etc
Why? confusing and idiotic.
Sometimes one accidentally presses the wrong keybinds and messes up the layouts, that is why I would love such a feature
bind?
bind = $mainMod, L, exec, hyprctl keyword general:layout dwindle
bind = $mainMod, M, exec, hyprctl keyword general:layout master
But that does not reset resizeactive back to default
@drishal You could wirte script
This is a example
~/.config/hypr/scripts/toggle-layout.sh:
#!/usr/bin/env bash
CURRENT_LAYOUT=$(hyprctl getoption general:layout | sed -n '4p' | awk '{print $2}' | sed 's/\"//g')
if [[ $CURRENT_LAYOUT == dwindle ]];then
hyprctl keyword general:layout master
elif [[ $CURRENT_LAYOUT == master ]];then
hyprctl keyword general:layout dwindle
fi
in hyprland.conf:
$scripts = ~/.config/hypr/scripts
bind = $mainMod, Space, exec, sh $scripts/toggle-layout.sh
and you could do more by using script :)
@drishal You could wirte script
This is a example
~/.config/hypr/scripts/toggle-layout.sh:#!/usr/bin/env bash CURRENT_LAYOUT=$(hyprctl getoption general:layout | sed -n '4p' | awk '{print $2}' | sed 's/\"//g') if [[ $CURRENT_LAYOUT == dwindle ]];then hyprctl keyword general:layout master elif [[ $CURRENT_LAYOUT == master ]];then hyprctl keyword general:layout dwindle fiin
hyprland.conf:$scripts = ~/.config/hypr/scripts bind = $mainMod, Space, exec, sh $scripts/toggle-layout.shand you could do more by using script :)
Oh dear github for some reason did not somehow send me a mail on the ping...not sure what happened
anyways,
hyprctl keyword general:layout master does not exactly put resizeactive back to center, i.e where it should have been