It's new
This commit is contained in:
parent
27a817fff3
commit
9f65e9b248
12 changed files with 75 additions and 28 deletions
|
@ -1,12 +1,18 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
state="$(grep -o '\w\+$' /proc/acpi/bbswitch)"
|
||||
if [ "$state" == "ON" ]
|
||||
if [ -f /proc/acpi/bbswitch ]
|
||||
then
|
||||
echo ""
|
||||
elif [ "$state" == "OFF" ]
|
||||
then
|
||||
echo ""
|
||||
echo -n
|
||||
state="$(grep -o '\w\+$' /proc/acpi/bbswitch)"
|
||||
if [ "$state" == "ON" ]
|
||||
then
|
||||
echo ""
|
||||
elif [ "$state" == "OFF" ]
|
||||
then
|
||||
echo ""
|
||||
else
|
||||
echo "?"
|
||||
fi
|
||||
else
|
||||
echo "?"
|
||||
echo
|
||||
fi
|
||||
|
|
|
@ -84,7 +84,7 @@ tray-transparent = false
|
|||
|
||||
[bar/secondary]
|
||||
inherit = bar/base
|
||||
modules-right = cpu memory temperature vpncheck ethMore wlanMore filesystem linuxmismatch bbswitch xbacklight volume date
|
||||
modules-right = cpu memory temperature keystore vpncheck ethMore wlanMore filesystem linuxmismatch bbswitch xbacklight volume date
|
||||
|
||||
|
||||
[module/filesystem]
|
||||
|
@ -177,9 +177,7 @@ toggle-off-foreground = #55
|
|||
[module/bbswitch]
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/bbswitch
|
||||
exec-if = test -f /proc/acpi/bbswitch
|
||||
interval = 5
|
||||
format-prefix =
|
||||
format-foreground = ${theme.redF}
|
||||
|
||||
[module/todo]
|
||||
|
@ -242,6 +240,13 @@ interval = 1
|
|||
format-foreground = ${theme.greenF}
|
||||
label = %gb_free%
|
||||
|
||||
[module/keystore]
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/keystore
|
||||
; exec-if = pgrep openvpn
|
||||
interval = 5
|
||||
format-foreground = ${theme.greenF}
|
||||
|
||||
[module/vpncheck]
|
||||
type = custom/script
|
||||
exec = echo
|
||||
|
|
9
config/polybar/keystore
Executable file
9
config/polybar/keystore
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
output="$(ssh-add -l)"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo
|
||||
else
|
||||
echo -n " "
|
||||
echo "$output" | wc -l
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue