Compare commits

...

2 commits

Author SHA1 Message Date
63cad61e35
aerospace: create script to toggle tiling 2025-10-05 01:52:17 +10:00
0d75b9d258
sketchybar: use corner radius from matugen 2025-10-05 01:51:51 +10:00
4 changed files with 51 additions and 2 deletions

View file

@ -93,6 +93,8 @@ alt-shift-f = 'exec-and-forget open ~'
alt-shift-b = 'exec-and-forget /opt/homebrew/bin/firefox --new-window'
alt-s = 'exec-and-forget screencapture -i -c'
alt-shift-w = 'exec-and-forget $HOME/.config/aerospace/toggle-tiling.sh off'
# Layout
# See: https://nikitabobko.github.io/AeroSpace/commands#layout
alt-c = 'layout tiles horizontal vertical'

View file

@ -0,0 +1,45 @@
#!/bin/sh
disableTiling () {
defaults write com.apple.dock orientation bottom
defaults write com.apple.dock autohide -bool FALSE
defaults write com.apple.finder CreateDesktop true
killall Finder Dock sketchybar borders
aerospace enable off # fails when script called from aerospace directly, bin not in path
/run/current-system/sw/bin/aerospace enable off
osascript -e 'tell application "System Events"
tell dock preferences
set properties to {autohide menu bar:false, autohide:false}
end tell
end tell' -e 'tell application "System Events" to set visible of (every application process whose visible is true and name is not "Finder") to false'
}
enableTiling () {
aerospace enable on
sketchybar & disown
sh ~/.cache/matugen-jankyborders.sh & disown
defaults write com.apple.dock orientation right
defaults write com.apple.dock autohide -bool FALSE
defaults write com.apple.finder CreateDesktop false
killall Dock Finder
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

View file

@ -1,3 +1,5 @@
export PRIMARY_COLOUR=0xFF{{colors.primary.default.hex_stripped}}
export SECONDARY_COLOUR=0xFF{{colors.secondary.default.hex_stripped}}
export BACKGROUND_COLOUR=0xFF{{colors.background.default.hex_stripped}}
export ROUNDING={{custom.rounding}}

View file

@ -38,7 +38,7 @@ default=(
icon.padding_right=1
label.padding_left=7
label.padding_right=7
background.corner_radius=5
background.corner_radius=$ROUNDING
)
sketchybar --default "${default[@]}"
@ -65,12 +65,12 @@ for sid in $(aerospace list-workspaces --all); do
background.border_width=0 \
background.padding_right=0 \
background.padding_left=0 \
background.corner_radius=0 \
label.color=$PRIMARY_COLOUR \
label="$sid" \
click_script="aerospace workspace $sid" \
script="$CONFIG_DIR/plugins/aerospace.sh $sid"
done
# background.corner_radius=0 \
# Currently playing music status (only works for Music.app)
sketchybar --add item music left \