From 4b953a4e22d0244f3bd18c33535899cb2bb6a81c Mon Sep 17 00:00:00 2001 From: Tobias Maier Date: Sun, 7 Aug 2022 21:18:56 +0200 Subject: [PATCH] waybar update --- waybar/modules/cpu.sh | 9 ------- waybar/modules/powermenu.sh | 10 -------- waybar/waybar.config | 51 ++++++++----------------------------- 3 files changed, 11 insertions(+), 59 deletions(-) delete mode 100644 waybar/modules/cpu.sh delete mode 100644 waybar/modules/powermenu.sh diff --git a/waybar/modules/cpu.sh b/waybar/modules/cpu.sh deleted file mode 100644 index aa8fa1d..0000000 --- a/waybar/modules/cpu.sh +++ /dev/null @@ -1,9 +0,0 @@ -read cpu a b c previdle rest < /proc/stat -prevtotal=$((a+b+c+previdle)) -sleep 3.0 -read cpu a b c idle rest < /proc/stat -sleep 3.0 -total=$((a+b+c+idle)) -cpu=$((100*( (total-prevtotal) - (idle-previdle) ) / (total-prevtotal) )) - -echo  $cpu% \ No newline at end of file diff --git a/waybar/modules/powermenu.sh b/waybar/modules/powermenu.sh deleted file mode 100644 index 99dedc5..0000000 --- a/waybar/modules/powermenu.sh +++ /dev/null @@ -1,10 +0,0 @@ -rofiopt="Shut down\nReboot\nLock" -rofi=$(printf "$rofiopt" | rofi -dmenu -i -p "Powermenu") -[ -z "$rofi" ] && exit - -case $rofi in - "Shut down") shutdown now;; - "Reboot") reboot;; - "Lock") swaylock;; - *) -esac \ No newline at end of file diff --git a/waybar/waybar.config b/waybar/waybar.config index 1758a22..fec0e33 100644 --- a/waybar/waybar.config +++ b/waybar/waybar.config @@ -1,8 +1,8 @@ { "layer": "top", - "modules-left": ["custom/powermenu", "river/tags", "temperature"], + "modules-left": ["river/tags"], "modules-center": ["river/window"], - "modules-right": ["battery","backlight", "pulseaudio", "custom/mic","custom/cpu","custom/clock", "tray"], + "modules-right": ["tray", "battery", "pulseaudio","cpu","clock", "temperature"], "pulseaudio": { "tooltip": false, "scroll-step": 5, @@ -14,28 +14,6 @@ "default": ["", "", ""] } }, - "custom/powermenu": { - "format": "", - "interval": "once", - /*"exec": "checkupdates | wc -l",*/ - "on-click": "~/.config/waybar/modules/powermenu.sh", - "tooltip": false, - "signal": 8 - }, - - "river/tags": { - "tag-labels":[ - "", - "", - "ﭮ", - "", - "", - "", - "" - ], - "disable-click": false, - "num-tags": 7 - }, "temperature": { "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", "format": "{temperatureC}°C " @@ -44,12 +22,6 @@ "format": "{}", "max-length": 90 }, - "backlight": { - "device": "amdgpu_b10", - "format": "{icon} {}%", - "format-icons": ["", ""], - "interval": 1 - }, "battery": { "states": { "good": 100, @@ -68,16 +40,15 @@ "spacing": 10, "reverse-direction": true }, - "custom/clock": { - "interval": 1, - "return-type": "string", - "exec": "~/.config/waybar/modules/datetime.sh", - "tooltip": false + "clock": { + "interval": 60, + "format": "{:%H:%M}", + "max-length": 25 }, - "custom/cpu": { - "interval": 1, - "return-type": "string", - "exec": "~/.config/waybar/modules/cpu.sh", - "tooltip": false + "cpu": { + "interval": 10, + "format": "{icon} {}% ", + "max-length": 10 + "format-icons": ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"], }, } \ No newline at end of file