.dotfiles/configs/sway/toggle_gaps.sh

15 lines
283 B
Bash
Raw Normal View History

2021-11-24 14:29:06 +01:00
#!/bin/bash
GAPS_OUTER=5
GAPS_INNER=1
if [ "$(pgrep waybar)" != "" ]; then
killall waybar;
swaymsg gaps outer all set 0;
swaymsg gaps inner all set 0;
else
swaymsg gaps outer all set $GAPS_OUTER;
swaymsg gaps inner all set $GAPS_INNER;
nohup waybar & 2&> /dev/null;
fi