mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
Add toggle for switching between dwindle/scrolling layout per workspace on Super + L
This commit is contained in:
Executable
+14
@@ -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
@@ -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 ;;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user