Add toggle for switching between dwindle/scrolling layout per workspace on Super + L

This commit is contained in:
David Heinemeier Hansson
2026-02-28 14:23:42 +01:00
parent b746958823
commit 42a437ad48
4 changed files with 19 additions and 3 deletions
+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
# Toggle the layout on the current active workspace between dwindle and scrolling
ACTIVE_WORKSPACE=$(hyprctl activeworkspace -j | jq -r '.id')
CURRENT_LAYOUT=$(hyprctl activeworkspace -j | jq -r '.tiledLayout')
case "$CURRENT_LAYOUT" in
dwindle) NEW_LAYOUT=scrolling ;;
*) NEW_LAYOUT=dwindle ;;
esac
hyprctl keyword workspace $ACTIVE_WORKSPACE, layout:$NEW_LAYOUT
notify-send "󱂬 Workspace layout set to $NEW_LAYOUT"
+2 -1
View File
@@ -161,12 +161,13 @@ show_share_menu() {
}
show_toggle_menu() {
case $(menu "Toggle" "󱄄 Screensaver\n󰔎 Nightlight\n󱫖 Idle Lock\n󰍜 Top Bar\n Window Gaps\n 1-Window Ratio\n󰍹 Display Scaling") in
case $(menu "Toggle" "󱄄 Screensaver\n󰔎 Nightlight\n󱫖 Idle Lock\n󰍜 Top Bar\n󱂬 Workspace Layout\n Window Gaps\n 1-Window Ratio\n󰍹 Display Scaling") in
*Screensaver*) omarchy-toggle-screensaver ;;
*Nightlight*) omarchy-toggle-nightlight ;;
*Idle*) omarchy-toggle-idle ;;
*Bar*) omarchy-toggle-waybar ;;
*Layout*) omarchy-hyprland-workspace-layout-toggle ;;
*Ratio*) omarchy-hyprland-window-single-square-aspect-toggle ;;
*Gaps*) omarchy-hyprland-window-gaps-toggle ;;
*Scaling*) omarchy-hyprland-monitor-scaling-toggle ;;
+2 -2
View File
@@ -7,8 +7,8 @@ general {
# gaps_out = 0
# border_size = 0
# Use master layout instead of dwindle
# layout = master
# Possible layouts: dwindle (default), scrolling (niri-like), master (dwm), monocle (single app)
# layout = scrolling
}
# https://wiki.hyprland.org/Configuring/Variables/#decoration
+1
View File
@@ -10,6 +10,7 @@ bindd = SUPER, F, Full screen, fullscreen, 0
bindd = SUPER CTRL, F, Tiled full screen, fullscreenstate, 0 2
bindd = SUPER ALT, F, Full width, fullscreen, 1
bindd = SUPER, O, Pop window out (float & pin), exec, omarchy-hyprland-window-pop
bindd = SUPER, L, Toggle workspace layout, exec, omarchy-hyprland-workspace-layout-toggle
# Move focus with SUPER + arrow keys
bindd = SUPER, LEFT, Move window focus left, movefocus, l