добавлены конфиги: Hyprland, Hyprpaper, Hyprlock, Waybar, Rofi
This commit is contained in:
1 parent
315746dbd1
commit
fc9c715351
26 files changed
+1984
-2
No files matched your search
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Get CPU model (removed "(R)", "(TM)", and clock speed)
|
||||
model=$(awk -F ': ' '/model name/{print $2}' /proc/cpuinfo | head -n 1 | sed 's/@.*//; s/ *\((R)\|(TM)\)//g; s/^[ \t]*//; s/[ \t]*$//')
|
||||
|
||||
# Get CPU usage percentage
|
||||
load=$(vmstat 1 2 | tail -1 | awk '{print 100 - $15}')
|
||||
|
||||
# Determine CPU state based on usage
|
||||
if [ "$load" -le 25 ]; then
|
||||
state="Low"
|
||||
elif [ "$load" -le 50 ]; then
|
||||
state="Medium"
|
||||
else
|
||||
state="High"
|
||||
fi
|
||||
|
||||
tooltip="${model}"
|
||||
tooltip+="\nCPU Usage: ${state}"
|
||||
|
||||
# Module and tooltip
|
||||
echo "{\"text\": \" ${load}%\", \"tooltip\": \"${tooltip}\"}"
|
||||
Reference in new issue
Block a user