-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Toggle border option would be nice #74
Comments
Because the padding does not take into account the width of the borders, I reckon the state of the borders should match that of yabai's padding. Say if the initial state has both padding and borders toggled on, and Frankly, what I'm trying to say is that the value assigned to borders' width in thomasbecker's command should be flipped.
Still, the padding and borders may not be coordinated at all, because the initial state is not anchored. Currently, I use this script and toggle borders alongside yabai paddings: #!/usr/bin/env zsh
file_path=~/.config/borders/switch
flags=($(awk '{ print $NF }' $file_path))
toggle_setting() {
local setting=$1
local bool_value=$2
sed -i "" "s/${setting}:.*/${setting}: ${bool_value}/" $file_path
}
if [[ ${flags[0]} = ${flags[1]} && ${flags[1]} = "on" ]]; then
toggle_setting "borders" "off"
borders width=0
toggle_setting "padding" "off"
yabai -m space --toggle padding
yabai -m space --toggle gap
elif [[ ${flags[0]} = ${flags[1]} && ${flags[1]} = "off" ]]; then
toggle_setting "borders" "on"
borders width=5
toggle_setting "padding" "on"
yabai -m space --toggle padding
yabai -m space --toggle gap
elif [[ ${flags[0]} = "off" && ${flags[1]} = "on" ]]; then
toggle_setting "padding" "on"
yabai -m space --toggle padding
yabai -m space --toggle gap
elif [[ ${flags[0]} = "on" && ${flags[1]} = "off" ]]; then
toggle_setting "padding" "off"
yabai -m space --toggle padding
yabai -m space --toggle gap
fi
awk '{ print $1, $NF }' $file_path
|
First of all: Thx for all the work you put in jankyborders and sketchy bar.
Would be nice to have a toggle border command. Currently I'm toggling yabai gap/padding and jankyborder with this skhd mapping which works, but is a little hacky:
The text was updated successfully, but these errors were encountered: