Skip to content

Instantly share code, notes, and snippets.

@aserranoni
Created October 19, 2023 01:58
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aserranoni/3ff260f52a61180036e63181fc87cd77 to your computer and use it in GitHub Desktop.
Save aserranoni/3ff260f52a61180036e63181fc87cd77 to your computer and use it in GitHub Desktop.
A life without yabai window borders
# I've been using a combination of yabai, skhd (with modal keybindings), and sketchybar.
## Recently, with the deprecation of the window border in yabai. I had to find a way to
## keep track of the skhd current mode.
# Add the following lines to sketchybarrc:
sketchybar --add item mode_indicator left
sketchybar --set mode_indicator drawing_method=separator
sketchybar --set mode_indicator label="default-mode | "
# Create a script that will manage the mode_indicator label and color
MODE=$1
COLOR=""
# Define mode colors
case $MODE in
"move-mode")
COLOR=0xff8aadf4
;;
"resize-mode")
COLOR=0xffa6da95
;;
"focus-mode")
COLOR=0xffeed49f
;;
"default-mode")
COLOR=0xffcad3f5
;;
# add other modes here
esac
sketchybar --set mode_indicator label="$MODE | "
sketchybar --set mode_indicator label.color=$COLOR
## Add the following to the skhd config
:: default : [PATH_TO_SCRIPT] default-mode
:: move @ : [PATH_TO_SCRIPT] move-mode
:: resize @ : [PATH_TO_SCRIPT] resize-mode
:: focus @ : [PATH_TO_SCRIPT] focus-mode
## To facilitate keeping track of the currently selected window
## I'm using the well-known window_title plugin with some minor tweaks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment