Long time, no commit, big ol' changes though
This commit is contained in:
parent
3c9e2c3279
commit
501f1f4066
19 changed files with 271 additions and 352 deletions
12
config/polybar/bbswitch
Executable file
12
config/polybar/bbswitch
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
state="$(grep -o '\w\+$' /proc/acpi/bbswitch)"
|
||||
if [ "$state" == "ON" ]
|
||||
then
|
||||
echo ""
|
||||
elif [ "$state" == "OFF" ]
|
||||
then
|
||||
echo ""
|
||||
else
|
||||
echo "?"
|
||||
fi
|
|
@ -76,7 +76,7 @@ enable-ipc = true
|
|||
inherit = bar/base
|
||||
|
||||
modules-center = mpd
|
||||
modules-right = vpncheck eth wlan bbswitch xbacklight volume battery date
|
||||
modules-right = mail todo vpncheck eth wlan bbswitch xbacklight volume battery shortdate
|
||||
|
||||
tray-position = right
|
||||
tray-padding = 2
|
||||
|
@ -84,7 +84,7 @@ tray-transparent = false
|
|||
|
||||
[bar/secondary]
|
||||
inherit = bar/base
|
||||
modules-right = cpu memory temperature vpncheck ethMore wlanMore filesystem bbswitch xbacklight volume date
|
||||
modules-right = cpu memory temperature vpncheck ethMore wlanMore filesystem linuxmismatch bbswitch xbacklight volume date
|
||||
|
||||
|
||||
[module/filesystem]
|
||||
|
@ -176,12 +176,35 @@ toggle-off-foreground = #55
|
|||
|
||||
[module/bbswitch]
|
||||
type = custom/script
|
||||
exec = grep -o '\w\+$' /proc/acpi/bbswitch
|
||||
exec = ~/.config/polybar/bbswitch
|
||||
exec-if = test -f /proc/acpi/bbswitch
|
||||
interval = 5
|
||||
prefix =
|
||||
format-prefix =
|
||||
format-foreground = ${theme.redF}
|
||||
|
||||
[module/todo]
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/todo
|
||||
interval = 30
|
||||
format-prefix =
|
||||
format-foreground = ${theme.yellowF}
|
||||
|
||||
[module/mail]
|
||||
type = custom/script
|
||||
exec = cat ~/.cache/mutt/status
|
||||
interval = 1
|
||||
format-prefix =
|
||||
format-foreground = ${theme.magentaF}
|
||||
; format-background = ${theme.magentaB}
|
||||
|
||||
[module/linuxmismatch]
|
||||
type = custom/script
|
||||
exec = echo
|
||||
exec-if = ~/.config/polybar/linuxmismatch
|
||||
interval = 30
|
||||
format-foreground = ${theme.yellowF}
|
||||
; format-background = ${theme.yellowF}
|
||||
|
||||
[module/xbacklight]
|
||||
type = internal/xbacklight
|
||||
output = ${env:display:LVDS1}
|
||||
|
@ -201,7 +224,7 @@ card = intel_backlight
|
|||
|
||||
[module/cpu]
|
||||
type = internal/cpu
|
||||
interval = 0.5
|
||||
interval = 1
|
||||
format = <ramp-coreload>
|
||||
format-foreground = ${theme.redF}
|
||||
ramp-coreload-0 = ▁
|
||||
|
@ -215,7 +238,7 @@ ramp-coreload-7 = █
|
|||
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
interval = 2
|
||||
interval = 1
|
||||
format-foreground = ${theme.greenF}
|
||||
label = %gb_free%
|
||||
|
||||
|
@ -229,7 +252,7 @@ format-foreground = ${theme.blueF}
|
|||
[module/eth]
|
||||
type = internal/network
|
||||
interface = ${env:ethI:eth0}
|
||||
interval = 1
|
||||
interval = 5
|
||||
|
||||
format-connected = <label-connected>
|
||||
label-connected = %local_ip%
|
||||
|
@ -244,7 +267,7 @@ label-connected = ↑%upspeed% ↓%downspeed%
|
|||
[module/wlan]
|
||||
type = internal/network
|
||||
interface = ${env:wlanI:wlan0}
|
||||
interval = 1
|
||||
interval = 5
|
||||
|
||||
format-connected = <ramp-signal> <label-connected>
|
||||
label-connected = %local_ip% %essid%
|
||||
|
@ -281,6 +304,11 @@ format-foreground = ${theme.cyanF}
|
|||
|
||||
label = %date% %time%
|
||||
|
||||
[module/shortdate]
|
||||
inherit = module/date
|
||||
date = " %d/%m"
|
||||
|
||||
|
||||
[module/volume]
|
||||
type = internal/volume
|
||||
|
||||
|
@ -307,11 +335,12 @@ label-full =
|
|||
|
||||
format-charging = <ramp-capacity> <label-charging>
|
||||
format-charging-foreground = ${theme.yellowF}
|
||||
format-charging-prefix =
|
||||
label-charging = %percentage%% (%time%)
|
||||
|
||||
format-discharging = <ramp-capacity> <label-discharging>
|
||||
format-discharging-foreground = ${self.format-charging-foreground}
|
||||
format-discharging-background = ${theme.redB}
|
||||
; format-discharging-background = ${theme.redB}
|
||||
label-discharging = %percentage%% (%time%)
|
||||
|
||||
format-full-prefix = " "
|
||||
|
|
17
config/polybar/linuxmismatch
Executable file
17
config/polybar/linuxmismatch
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if ! which pacman &> /dev/null
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
packageVersion=$(pacman -Q linux | cut -d' ' -f2)
|
||||
runningVersion=$(uname -r)
|
||||
|
||||
if echo "$runningVersion" | grep "^$packageVersion" &> /dev/null
|
||||
then
|
||||
exit 1
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
|
21
config/polybar/todo
Executable file
21
config/polybar/todo
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
CALDIR="$HOME/.vdirsyncer/currentCalendars"
|
||||
|
||||
function status() {
|
||||
ls "$CALDIR" | while read account
|
||||
do
|
||||
displayname="$(cat "$CALDIR/$account/displayname")"
|
||||
color="$(cat "$CALDIR/$account/color")"
|
||||
nb="$(todo list "$displayname" | grep -v "^$" | wc -l)"
|
||||
|
||||
if [ $nb -gt 0 ]
|
||||
then
|
||||
echo -n " %{F$color}$nb%{F-}"
|
||||
fi
|
||||
done
|
||||
# Newline to tell polybar to update in any case
|
||||
echo
|
||||
}
|
||||
|
||||
status
|
Loading…
Add table
Add a link
Reference in a new issue