yabai: make a script to toggle tiling
This commit is contained in:
parent
bfea190a66
commit
a89b7cfe62
1 changed files with 52 additions and 0 deletions
52
stow/.config/yabai/toggle-tiling.sh
Executable file
52
stow/.config/yabai/toggle-tiling.sh
Executable file
|
|
@ -0,0 +1,52 @@
|
|||
#!/bin/sh
|
||||
|
||||
disableTiling () {
|
||||
defaults write com.apple.dock orientation bottom
|
||||
defaults write com.apple.dock autohide -bool FALSE
|
||||
|
||||
killall Finder Dock sketchybar borders
|
||||
yabai -m config menubar_opacity 1.0
|
||||
|
||||
SPACES=("1" "2" "3" "4" "5" "6" "7" "8" "9")
|
||||
for i in "${!SPACES[@]}"; do
|
||||
yabai -m space $i --layout float
|
||||
done
|
||||
|
||||
osascript -e 'tell application "System Events"
|
||||
tell dock preferences
|
||||
set properties to {autohide menu bar:false, autohide:false}
|
||||
end tell
|
||||
end tell'
|
||||
}
|
||||
|
||||
enableTiling () {
|
||||
defaults write com.apple.dock orientation right
|
||||
defaults write com.apple.dock autohide -bool FALSE
|
||||
killall Dock Finder
|
||||
|
||||
sketchybar &
|
||||
sh ~/.cache/matugen-jankyborders.sh &
|
||||
yabai -m config menubar_opacity 0.0
|
||||
|
||||
SPACES=("1" "2" "3" "4" "5" "6" "7" "8" "9")
|
||||
for i in "${!SPACES[@]}"; do
|
||||
yabai -m space $i --layout bsp
|
||||
done
|
||||
|
||||
|
||||
osascript -e '
|
||||
tell application "System Events"
|
||||
tell dock preferences
|
||||
set properties to {autohide menu bar:true, autohide:true}
|
||||
end tell
|
||||
end tell
|
||||
'
|
||||
}
|
||||
|
||||
if [ "$1" = "on" ]; then
|
||||
enableTiling
|
||||
elif [ "$1" = "off" ]; then
|
||||
disableTiling
|
||||
else
|
||||
echo "$0: [on|off]"
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue