aboutsummaryrefslogtreecommitdiff
path: root/systray
blob: 0fbc768f68e7b7f1c0934b4acd116c67c5cebd83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env bash

hidden=/tmp/syshide.lock
file="$HOME/.config/polybar/config.ini"

if [[ ! -e $hidden ]]; then
    polybar-msg action "#systray.hook.1"
    xdo hide -n stalonetray
    touch "$hidden"
    sed -i 's/systray\ninitial=.*/systray\ninitial=2/g' "$file"
else
    polybar-msg action "#systray.hook.0"
    xdo show -n stalonetray
    xdo raise -n stalonetray
    rm "$hidden"
    sed -i 's/systray\ninitial=.*/systray\ninitial=1/g' "$file"
fi