diff options
Diffstat (limited to '.local/bin/any_position_wrapper.sh')
| -rwxr-xr-x | .local/bin/any_position_wrapper.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/.local/bin/any_position_wrapper.sh b/.local/bin/any_position_wrapper.sh index f821657..242381c 100755 --- a/.local/bin/any_position_wrapper.sh +++ b/.local/bin/any_position_wrapper.sh @@ -47,11 +47,24 @@ function irdate { json_array=$(update_holder holder__jdate "$json") } +function vpn { + local json="{ \"full_text\": \"mullvad: $(mullvad status | head -n1)\", \"color\": \"#FF78D1\" }" + json_array=$(update_holder holder__vpn "$json") +} + +function temp { + local cpu_temp=$(sensors | grep 'CPU Temperature' | awk '{print $3}') + local json="{ \"full_text\": \"$cpu_temp\", \"color\": \"#FF7800\" }" + json_array=$(update_holder holder__temp "$json") +} + i3status > >(read line; echo "$line"; read line ; echo "$line" ; read line ; echo "$line" ; while true do read line json_array="$(echo $line | sed -e 's/^,//')" irdate + vpn + temp echo ",$json_array" done) & PID=$! trap "kill -TERM $PID" 0 1 2 15 |
