From 42751593fff193fdf48639f0d853b9bcd44adbe4 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Tue, 29 Jun 2021 16:20:59 +0200 Subject: [PATCH] polybar: load-avg --- polybar/config | 7 ++++++- polybar/system-cpu-loadavg.sh | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 polybar/system-cpu-loadavg.sh diff --git a/polybar/config b/polybar/config index 95da59d..e7c090c 100644 --- a/polybar/config +++ b/polybar/config @@ -40,7 +40,7 @@ font-1 = unifont:fontformat=truetype:size=8:antialias=false;0 font-2 = siji:pixelsize=10;1 modules-left = i3 modules-center = popup-calendar -modules-right = nightscout_script backlight alsa memory cpu wlan eth_intern eth_dock battery powermenu +modules-right = nightscout_script backlight alsa cpu system-cpu-loadavg memory wlan eth_intern eth_dock battery powermenu tray-position = right tray-padding = 2 tray-background = #888888 @@ -63,6 +63,11 @@ exec = /home/mg/dotfiles/polybar/popup-calendar.sh interval = 5 click-left = /home/mg/dotfiles/polybar/popup-calendar.sh --popup & +[module/system-cpu-loadavg] +type = custom/script +exec = /home/mg/dotfiles/polybar/system-cpu-loadavg.sh +interval = 5 + [module/backlight] type = custom/script exec=/home/mg/dotfiles/polybar/backlight.sh diff --git a/polybar/system-cpu-loadavg.sh b/polybar/system-cpu-loadavg.sh new file mode 100644 index 0000000..c96bf78 --- /dev/null +++ b/polybar/system-cpu-loadavg.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +awk '{print $1" "$2" "$3}' < /proc/loadavg