zmiany....
This commit is contained in:
@ -103,7 +103,7 @@ font-3 - RobotoMono Nerd Font:antialias=true:size=18;0
|
||||
; modules-center = s4 filesystem s5
|
||||
; modules-right = s4 powermenu s1 pulseaudio s3
|
||||
|
||||
modules-left = battery wlan weather
|
||||
modules-left = battery wlan s_temp s_hum s_press s_pm25 s_pm10
|
||||
modules-center = mpd
|
||||
modules-right =
|
||||
|
||||
@ -571,11 +571,36 @@ exec = ~/.config/polybar/syngeos-sensor/sensor.sh
|
||||
format-background = ${colors.primary}
|
||||
format-prefix-foreground = ${colors.background}
|
||||
|
||||
[module/pm25]
|
||||
[module/s_temp]
|
||||
type = custom/script
|
||||
interval = 3
|
||||
format-background = ${colors.primary}
|
||||
exec = /home/paramah/bin/czujnik.sh |grep pm2_5 |awk '{print $2 $3}' |tr -d \"
|
||||
exec = ~/.config/polybar/syngeos-sensor/sensor.sh temperature
|
||||
|
||||
[module/s_hum]
|
||||
type = custom/script
|
||||
interval = 3
|
||||
format-background = ${colors.primary}
|
||||
exec = ~/.config/polybar/syngeos-sensor/sensor.sh humidity
|
||||
|
||||
[module/s_press]
|
||||
type = custom/script
|
||||
interval = 3
|
||||
format-background = ${colors.primary}
|
||||
exec = ~/.config/polybar/syngeos-sensor/sensor.sh air_pressure
|
||||
|
||||
[module/s_pm25]
|
||||
type = custom/script
|
||||
interval = 3
|
||||
format-background = ${colors.primary}
|
||||
exec = ~/.config/polybar/syngeos-sensor/level.sh pm2_5
|
||||
|
||||
[module/s_pm10]
|
||||
type = custom/script
|
||||
interval = 3
|
||||
format-background = ${colors.primary}
|
||||
exec = ~/.config/polybar/syngeos-sensor/level.sh pm10
|
||||
|
||||
|
||||
|
||||
|
||||
|
6
.config/polybar/syngeos-sensor/level.sh
Executable file
6
.config/polybar/syngeos-sensor/level.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
TYPE=$1
|
||||
DATA=$(cat /tmp/czujnik-levels |jq -r .$TYPE |grep -v null)
|
||||
|
||||
echo $TYPE\($DATA%\)
|
@ -1,5 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
DATA=$(http https://api.syngeos.pl/api/public/data/device/1554 |jq '.sensors |.[] | { (.name): (.unit + " " + (.data[0].value|tostring)) }'|grep pm2_5 |awk '{print $2 $3}' |tr -d \")
|
||||
TYPE=$1
|
||||
DATA=$(cat /tmp/czujnik |jq -r .$TYPE |grep -v null)
|
||||
|
||||
echo $DATA
|
||||
|
Reference in New Issue
Block a user