Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

dwm-statusbar: s/eth0/enp4s0/

  • Loading branch information...
commit 4517a482b11da8f7e96f95419ff8c88342dafda1 1 parent be1b9c6
@w0ng authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 dwm-statusbar
View
8 dwm-statusbar
@@ -79,8 +79,8 @@ print_datetime() {
# network (from: http://dzen.geekmode.org/dwiki/doku.php?id=dzen:network-meter)
# cpu (from: https://bbs.archlinux.org/viewtopic.php?pid=661641#p661641)
-rx_old=$(cat /sys/class/net/eth0/statistics/rx_bytes)
-tx_old=$(cat /sys/class/net/eth0/statistics/tx_bytes)
+rx_old=$(cat /sys/class/net/enp4s0/statistics/rx_bytes)
+tx_old=$(cat /sys/class/net/enp4s0/statistics/tx_bytes)
while true; do
# get new cpu idle and total usage
@@ -90,8 +90,8 @@ while true; do
let cpu_used="100 * ($cpu_interval - ($cpu_idle_now-${cpu_idle_old:-0})) / $cpu_interval"
# get new rx/tx counts
- rx_now=$(cat /sys/class/net/eth0/statistics/rx_bytes)
- tx_now=$(cat /sys/class/net/eth0/statistics/tx_bytes)
+ rx_now=$(cat /sys/class/net/enp4s0/statistics/rx_bytes)
+ tx_now=$(cat /sys/class/net/enp4s0/statistics/tx_bytes)
# calculate the rate (K) and total (M)
let rx_rate=($rx_now-$rx_old)/1024
let tx_rate=($tx_now-$tx_old)/1024
Please sign in to comment.
Something went wrong with that request. Please try again.