Compare commits

..

3 Commits

3 changed files with 37 additions and 4 deletions

View File

@ -85,13 +85,12 @@ bspc rule -a kitty_float state=floating rectangle=1000x700+0+0 center=on
bspc rule -a Popsicle-gtk state=floating rectangle=800x300+0+0 center=on
# startup
killall picom
picom --experimental-backends &
polybar-msg cmd quit
polybar left &
polybar right &
dunst &
rofi-polkit-agent &
if [ ! -f /tmp/startup.lock ]; then
touch /tmp/startup.lock
@ -103,4 +102,6 @@ if [ ! -f /tmp/startup.lock ]; then
firefox &
claws-mail &
obsidian &
rofi-polkit-agent &
fi

View File

@ -57,7 +57,7 @@ font-1 = JetBrainsMono NerdFont;2
modules-left = bspwm xwindow
modules-center = date
modules-right = real eth pulseaudio xkeyboard memory cpu
modules-right = real netatmo eth pulseaudio xkeyboard memory cpu
cursor-click = pointer
cursor-scroll = ns-resize
@ -181,7 +181,7 @@ label = %{A1:kitty --class kitty_float htop:}%percentage_used:2%%%{A}
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = ""
format-prefix = " "
format-prefix-foreground = ${colors.primary}
label = %{A1:kitty --class kitty_float htop:}%percentage:2%%%{A}
@ -253,6 +253,13 @@ format-prefix-foreground = ${colors.primary}
exec = ~/.config/polybar/scripts/real.sh
[module/netatmo]
type = custom/script
interval = 900
exec = ~/.config/polybar/scripts/netatmo.sh
[settings]
screenchange-reload = true
pseudo-transparency = false

View File

@ -0,0 +1,25 @@
#!/bin/sh
# this script requires for https://github.com/deletescape/netatmo to be installed and set up
data_indoor="$(~/go/bin/netatmo json -i)"
data_outdoor="$(~/go/bin/netatmo json -o)"
temp_outdoor="$(jq .Temperature <<< "$data_outdoor")"
temp_indoor="$(jq .Temperature <<< "$data_indoor")"
co2="$(jq .CO2 <<< "$data_indoor")"
echo -n "%{F#cba6f7}﨎%{F-} $temp_indoor/$temp_outdoor"
if [ "$co2" -gt "700" ]; then
echo -n " %{F#cba6f7}ﳢ%{F-} "
if [ "$co2" -gt "2000" ]; then
echo "%{F#f38ba8}$co2%{F-}"
dunstify -u critical "netatmo" "indoor co2 level is at $co2"
elif [ "$co2" -gt "1000" ]; then
echo "%{F#eba0ac}$co2%{F-}"
dunstify -u normal "netatmo" "indoor co2 level is at $co2"
else
echo "$co2"
fi
fi