aboutsummaryrefslogtreecommitdiff
path: root/waybar/custom_modules/cpugovernor.sh
diff options
context:
space:
mode:
authorBlaster4385 <[email protected]>2025-08-15 15:09:35 +0530
committerBlaster4385 <[email protected]>2025-08-15 15:09:35 +0530
commit5690fffa9360180dcf79738cde27b918e09e6273 (patch)
treeb999d0a1f875791652bcec1a80ad8d575ad55d9a /waybar/custom_modules/cpugovernor.sh
parentaddbb7a93bf327b3f4f445805722039df457c145 (diff)
feat: added waybar and kitty configsHEADmain
Diffstat (limited to 'waybar/custom_modules/cpugovernor.sh')
-rwxr-xr-xwaybar/custom_modules/cpugovernor.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/waybar/custom_modules/cpugovernor.sh b/waybar/custom_modules/cpugovernor.sh
new file mode 100755
index 0000000..2f75469
--- /dev/null
+++ b/waybar/custom_modules/cpugovernor.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+GOVERNOR=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)
+
+if [ $GOVERNOR = performance ]; then
+ echo '{"text": "perf", "alt": "perf", "class": "performance", "tooltip": "<b>Governor</b> Performance"}'
+ if [[ $1 = switch ]]; then
+ sudo cpupower frequency-set -g ondemand;pkill -RTMIN+8 waybar;
+ fi
+ #echo ''
+elif [ $GOVERNOR = ondemand ]; then
+ echo '{"text": "ondemand", "alt": "ondemand", "class": "ondemand", "tooltip": "<b>Governor</b> On Demand"}'
+ if [[ $1 = switch ]]; then
+ sudo cpupower frequency-set -g performance;pkill -RTMIN+8 waybar;
+ fi
+fi \ No newline at end of file