diff options
| author | Mehdi Sadeghi <mehdi@mehdix.org> | 2024-10-28 06:44:29 +0100 |
|---|---|---|
| committer | Mehdi Sadeghi <mehdi@mehdix.org> | 2024-10-28 12:13:35 +0100 |
| commit | 0292495bc60b725a9e790ff2fbef2d0cdb0c8671 (patch) | |
| tree | 9ae0556153048a3e1a8f82584746ac37279d6ed3 /.local/bin | |
| parent | fff7d4005078e26c93d64bf1cf1f63440a21fd0e (diff) | |
Diffstat (limited to '.local/bin')
| -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 |
