summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.config/wall.pngbin536445 -> 0 bytes
-rwxr-xr-x.local/bin/statusbar/nettraf16
l---------.local/share/bg2
-rw-r--r--.local/share/thiemeyer_road_to_samarkand.jpgbin0 -> 403799 bytes
4 files changed, 8 insertions, 10 deletions
diff --git a/.config/wall.png b/.config/wall.png
deleted file mode 100644
index 6e9889c..0000000
--- a/.config/wall.png
+++ /dev/null
Binary files differ
diff --git a/.local/bin/statusbar/nettraf b/.local/bin/statusbar/nettraf
index 3c41dfc..9a81ad2 100755
--- a/.local/bin/statusbar/nettraf
+++ b/.local/bin/statusbar/nettraf
@@ -10,16 +10,14 @@ case "$BLOCK_BUTTON" in
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
-rxfile="${XDG_CACHE_HOME:-$HOME/.cache}/rxlog"
-txfile="${XDG_CACHE_HOME:-$HOME/.cache}/txlog"
+logfile="${XDG_CACHE_HOME:-$HOME/.cache}/netlog"
+prevdata="$(cat "$logfile")"
-rxcurrent="$(cat /sys/class/net/*/statistics/rx_bytes | paste -sd '+' | bc)"
-txcurrent="$(cat /sys/class/net/*/statistics/tx_bytes | paste -sd '+' | bc)"
+rxcurrent="$(($(cat /sys/class/net/*/statistics/rx_bytes | paste -sd '+')))"
+txcurrent="$(($(cat /sys/class/net/*/statistics/tx_bytes | paste -sd '+')))"
printf "🔻%sKiB 🔺%sKiB\\n" \
- "$(printf -- "(%s-%s)/1024\\n" "$rxcurrent" "$(cat "$rxfile")" | bc)" \
- "$(printf -- "(%s-%s)/1024\\n" "$txcurrent" "$(cat "$txfile")" | bc)"
+ "$(((rxcurrent-${prevdata%% *})/1024))" \
+ "$(((txcurrent-${prevdata##* })/1024))"
-# Log the current values for next run.
-echo "$rxcurrent" > "$rxfile"
-echo "$txcurrent" > "$txfile"
+echo "$rxcurrent $txcurrent" > "$logfile"
diff --git a/.local/share/bg b/.local/share/bg
index 6c5d299..b41641d 120000
--- a/.local/share/bg
+++ b/.local/share/bg
@@ -1 +1 @@
-../../.config/wall.png \ No newline at end of file
+thiemeyer_road_to_samarkand.jpg \ No newline at end of file
diff --git a/.local/share/thiemeyer_road_to_samarkand.jpg b/.local/share/thiemeyer_road_to_samarkand.jpg
new file mode 100644
index 0000000..6a30adb
--- /dev/null
+++ b/.local/share/thiemeyer_road_to_samarkand.jpg
Binary files differ