From f824f6d2bd0e9020a0ad424ff720ff83122528b6 Mon Sep 17 00:00:00 2001 From: SDGDen Date: Tue, 19 May 2026 18:40:27 +0200 Subject: [PATCH] added layout switcher on super+w --- mango/binds.conf | 3 +++ sdgos/tips/tips.list | 6 +----- sdgos/tuis/layout-switch.sh | 10 ++++++++++ sdgos/tuis/layouts.list | 15 +++++++++++++++ 4 files changed, 29 insertions(+), 5 deletions(-) create mode 100755 sdgos/tuis/layout-switch.sh create mode 100644 sdgos/tuis/layouts.list diff --git a/mango/binds.conf b/mango/binds.conf index 5050d0b..86e8698 100644 --- a/mango/binds.conf +++ b/mango/binds.conf @@ -28,6 +28,7 @@ bind=SUPER,K,spawn_shell,dms ipc call keybinds toggleWithPath mangowc ~/.config/ bind=SUPER,M,spawn_shell,ghostty -e ~/.config/sdgos/mango-config.sh # show mango config editor bind=SUPER,Y,spawn_shell,ghostty -e ~/.config/sdgos/tuis/pkg-install.sh # install packages bind=SUPER+SHIFT,Y,spawn_shell,ghostty -e ~/.config/sdgos/tuis/aur-install.sh # install AUR packages +bind=SUPER,W,spawn_shell,ghostty -e ~/.config/sdgos/tuis/layout-switch.sh # switch between layouts on the current workspace #program launchers bind=SUPER,RETURN,spawn_shell,ghostty @@ -70,6 +71,8 @@ bind=SUPER,down,focusdir,down # move window between monitors with win+Alt+arrow keys bind=SUPER+SHIFT,up,exchange_stack_client,prev bind=SUPER+SHIFT,down,exchange_stack_client,next +bind=SUPER+SHIFT,left,focusstack,prev +BIND=SUPER+SHIFT,right,focusstack,next bind=SUPER+Ctrl,left,exchange_client,left bind=SUPER+Ctrl,right,exchange_client,right bind=SUPER+Ctrl,up,exchange_client,up diff --git a/sdgos/tips/tips.list b/sdgos/tips/tips.list index b4702f3..e95d65d 100644 --- a/sdgos/tips/tips.list +++ b/sdgos/tips/tips.list @@ -113,7 +113,7 @@ [SDG-OS Tips]: Did you know? You can use "!!" to repeat the last command in zsh [SDG-OS Tips]: Did you know? You can use "!$" to reference the last argument of the previous command in zsh [SDG-OS Tips]: Did you know? You can use "cd -" to switch to the previous directory in zsh -[SDG-OS Tips]: Did you know? You can use "ls "/*.txt" to recursively list all .txt files in zsh +[SDG-OS Tips]: Did you know? You can use "ls ./*.txt" to list all .txt files in the current directory in zsh [SDG-OS Tips]: Did you know? You can use "=command" (e.g., "=ls") to see the full path of a command in zsh [SDG-OS Tips]: Did you know? You can use "alt+." to insert the last argument of the previous command in zsh [SDG-OS Tips]: Did you know? You can use "alt+?" to search backward in zsh's history @@ -121,10 +121,6 @@ [SDG-OS Tips]: Did you know? You can use "history -i" to incrementally search your command history in zsh [SDG-OS Tips]: Did you know? you can use the command "cmdhist" to interactively search through past commands and send them back to the terminal input [SDG-OS Tips]: Did you know? You can use "print -z" to add a command to the buffer without executing it in zsh -[SDG-OS Tips]: Did you know? You can use "zsh-stat" to check your zsh version and configuration details -[SDG-OS Tips]: Did you know? You can use "zsh-add-file" to source a file temporarily in your zsh session -[SDG-OS Tips]: Did you know? You can use "zsh-remove-file" to unsource a file from your zsh session -[SDG-OS Tips]: Did you know? You can use "zsh-watch" to monitor a file for changes and re-source it in zsh [SDG-OS Tips]: Did you know? You can use Ctrl+Shift+T to open a new tab in ghostty [SDG-OS Tips]: Did you know? You can use Ctrl+Shift+W to close the current tab in ghostty [SDG-OS Tips]: Did you know? You can use Ctrl+Shift+F to search for text in ghostty's scrollback diff --git a/sdgos/tuis/layout-switch.sh b/sdgos/tuis/layout-switch.sh new file mode 100755 index 0000000..ae74d04 --- /dev/null +++ b/sdgos/tuis/layout-switch.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +mmsg -d togglefloating + + +SELECTED=$(cat ~/.config/sdgos/tuis/layouts.list | cut -d '|' -f 1 | fzf --layout=reverse) + +CMD=$(cat ~/.config/sdgos/tuis/layouts.list | grep -e "$SELECTED" | cut -d '|' -f 2) + +eval $CMD \ No newline at end of file diff --git a/sdgos/tuis/layouts.list b/sdgos/tuis/layouts.list new file mode 100644 index 0000000..d7f9152 --- /dev/null +++ b/sdgos/tuis/layouts.list @@ -0,0 +1,15 @@ +Scroller - horizontal | mmsg -l "S" +Scroller - vertical | mmsg -l "VS" +Tile/master - left | mmsg -l "T" +Tile/master - top | mmsg -l "VT" +Tile/master - center | mmsg -l "CT" +Tile/master - right | mmsg -l "RT" +Grid - horizontal | mmsg -l "G" +Grid - vertical | mmsg -l "VG" +Deck - horizontal | mmsg -l "K" +Deck - vertical | mmsg -l "VK" +Fair - horizontal | mmsg -l "F" +Fair - vertical | mmsg -l "VF" +Monocle | mmsg -l "M" +Dwindle | mmsg -l "DW" +