Compare commits
3 Commits
e07aaedfef
...
351fc26858
Author | SHA1 | Date |
---|---|---|
maia arson crimew | 351fc26858 | |
maia arson crimew | 858a1b5e6e | |
maia arson crimew | da08d33ed1 |
|
@ -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
|
bspc rule -a Popsicle-gtk state=floating rectangle=800x300+0+0 center=on
|
||||||
|
|
||||||
# startup
|
# startup
|
||||||
|
killall picom
|
||||||
picom --experimental-backends &
|
picom --experimental-backends &
|
||||||
polybar-msg cmd quit
|
polybar-msg cmd quit
|
||||||
polybar left &
|
polybar left &
|
||||||
polybar right &
|
polybar right &
|
||||||
dunst &
|
dunst &
|
||||||
rofi-polkit-agent &
|
|
||||||
|
|
||||||
|
|
||||||
if [ ! -f /tmp/startup.lock ]; then
|
if [ ! -f /tmp/startup.lock ]; then
|
||||||
touch /tmp/startup.lock
|
touch /tmp/startup.lock
|
||||||
|
@ -103,4 +102,6 @@ if [ ! -f /tmp/startup.lock ]; then
|
||||||
firefox &
|
firefox &
|
||||||
claws-mail &
|
claws-mail &
|
||||||
obsidian &
|
obsidian &
|
||||||
|
|
||||||
|
rofi-polkit-agent &
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -57,7 +57,7 @@ font-1 = JetBrainsMono NerdFont;2
|
||||||
|
|
||||||
modules-left = bspwm xwindow
|
modules-left = bspwm xwindow
|
||||||
modules-center = date
|
modules-center = date
|
||||||
modules-right = real eth pulseaudio xkeyboard memory cpu
|
modules-right = real netatmo eth pulseaudio xkeyboard memory cpu
|
||||||
cursor-click = pointer
|
cursor-click = pointer
|
||||||
cursor-scroll = ns-resize
|
cursor-scroll = ns-resize
|
||||||
|
|
||||||
|
@ -253,6 +253,13 @@ format-prefix-foreground = ${colors.primary}
|
||||||
|
|
||||||
exec = ~/.config/polybar/scripts/real.sh
|
exec = ~/.config/polybar/scripts/real.sh
|
||||||
|
|
||||||
|
[module/netatmo]
|
||||||
|
type = custom/script
|
||||||
|
|
||||||
|
interval = 900
|
||||||
|
|
||||||
|
exec = ~/.config/polybar/scripts/netatmo.sh
|
||||||
|
|
||||||
[settings]
|
[settings]
|
||||||
screenchange-reload = true
|
screenchange-reload = true
|
||||||
pseudo-transparency = false
|
pseudo-transparency = false
|
||||||
|
|
|
@ -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
|
Loading…
Reference in New Issue