diff options
Diffstat (limited to '')
-rwxr-xr-x | .local/bin/conky/net.sh | 19 | ||||
-rwxr-xr-x | .local/bin/tmp_os.sh | 13 |
2 files changed, 15 insertions, 17 deletions
diff --git a/.local/bin/conky/net.sh b/.local/bin/conky/net.sh index 528e4a6..ab9b543 100755 --- a/.local/bin/conky/net.sh +++ b/.local/bin/conky/net.sh @@ -1,21 +1,6 @@ #!/bin/sh -os="$(uname)" -tmpfile="/tmp/os" - -if [ -e "/tmp/os" ]; then - os=$(cat $tmpfile) -else - if [ "$os" = "Linux" ]; then - grep "Artix" /etc/issue >/dev/null 2>&1 && os=1 || os=2 - elif [ "$os" = "FreeBSD" ]; then - os=3 - else - echo "unknown OS" - exit 1 - fi - echo $os >$tmpfile -fi +os=$(cat "/tmp/os") case $os in 1) @@ -47,7 +32,7 @@ ${color #928374}LAN IP: ${font1}${color #ebdbb2}${addr '$if_main'}${font} ${color #928374}DNS IP: ${font1}${color #ebdbb2}${nameserver 0}${font} ${color #928374}WAN IP: ${color #ebdbb2}${font1}${execi 300 curl -s https://ifconfig.me || echo No WAN}${font} ${hr} -${color #928374}Speed: ${font1}down: ${color #ebdbb2}${font1}${downspeed '$if_main'} ${color grey}- up: ${color #ebdbb2}${font1}${upspeed '$if_main'}${font} +${color #928374}Speed: ${font1}down: ${color #ebdbb2}${font1}${downspeed '$if_main'} ${color #928374}- up: ${color #ebdbb2}${font1}${upspeed '$if_main'}${font} ${color #928374}Down: ${color #ebdbb2}${downspeedgraph '$if_main' bfbfbf c0c0c0 125829120} ${color #928374}Up: ${color #ebdbb2}${upspeedgraph '$if_main' bfbfbf c0c0c0 125829120} ${hr}' diff --git a/.local/bin/tmp_os.sh b/.local/bin/tmp_os.sh new file mode 100755 index 0000000..e0fa13f --- /dev/null +++ b/.local/bin/tmp_os.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +os="$(uname)" + +if [ "$os" = "Linux" ]; then + grep "Artix" /etc/issue >/dev/null 2>&1 && os=1 || os=2 +elif [ "$os" = "FreeBSD" ]; then + os=3 +else + echo "unknown OS" + exit 1 +fi +echo $os >$tmpfile |