waybar update

This commit is contained in:
Tobias Maier
2022-08-07 21:18:56 +02:00
parent daef669059
commit 4b953a4e22
3 changed files with 11 additions and 59 deletions

View File

@@ -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%

View File

@@ -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

View File

@@ -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": ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"],
},
}