-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpbtoggle
More file actions
executable file
·43 lines (33 loc) · 889 Bytes
/
Copy pathpbtoggle
File metadata and controls
executable file
·43 lines (33 loc) · 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#! /bin/sh
#-- pbtoggle --#
# Tiny script to toggle polybar's visibility.
# Dependencies:
# - polybar
# - bspwm
# - xdo
# - hideIt.sh
# ~ ADIGEN
if [ -f ~/.cache/pbtoggle ]; then
# polybar-msg cmd show
pkill -f hideIt.sh
pbstart &
sed -i '/corner-radius/s/^\s*#\s*//' $HOME/.config/picom/picom.conf
bspc config bottom_padding 1
bspc config window_gap 10
bspc config border_width 1
rm ~/.cache/pbtoggle
else
# polybar-msg cmd hide
# switch to overlay polybar
POLYBAR_BAR=top pbstart &
hideIt.sh --name '^polybar-top' --hover -d bottom -p 1 --wait &
hideIt.sh --name '^polybar-top_eDP' --hover -d bottom -p 1 --wait &
sed -i '/corner-radius/s/^\s*[^#]/# &/' $HOME/.config/picom/picom.conf
sleep 0.3
bspc config top_padding 0
bspc config bottom_padding 1
bspc config window_gap 0
bspc config border_width 0
xdo raise -N Polybar
touch ~/.cache/pbtoggle
fi