summaryrefslogtreecommitdiff
path: root/dot_config/waybar/custom_modules
diff options
context:
space:
mode:
authorSakamoto <me@sakamoto.network>2026-05-12 18:31:15 -0500
committerSakamoto <me@sakamoto.network>2026-05-12 18:31:15 -0500
commita623fed63460d6d810605ce1ce858a58a5b222f7 (patch)
tree2129e72acc82deaf624630ec271942000eae0aeb /dot_config/waybar/custom_modules
downloaddotfiles-a623fed63460d6d810605ce1ce858a58a5b222f7.tar.xz
dotfiles-a623fed63460d6d810605ce1ce858a58a5b222f7.zip
init
Diffstat (limited to 'dot_config/waybar/custom_modules')
-rw-r--r--dot_config/waybar/custom_modules/executable_cpugovernor.sh7
-rw-r--r--dot_config/waybar/custom_modules/executable_custom-gpu.sh14
2 files changed, 21 insertions, 0 deletions
diff --git a/dot_config/waybar/custom_modules/executable_cpugovernor.sh b/dot_config/waybar/custom_modules/executable_cpugovernor.sh
new file mode 100644
index 0000000..bdd0b00
--- /dev/null
+++ b/dot_config/waybar/custom_modules/executable_cpugovernor.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+if [ `cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor`="performance" ]; then
+ echo '{"text": "perf", "alt": "perf", "class": "performance", "tooltip": "<b>Governor</b> Performance"}'
+ #echo ''
+elif [ `cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor`="schedutil" ]; then
+ echo '{"text": "sched", "class": "schedutil", "tooltip": "<b>Governor</b> Schedutil"}'
+fi \ No newline at end of file
diff --git a/dot_config/waybar/custom_modules/executable_custom-gpu.sh b/dot_config/waybar/custom_modules/executable_custom-gpu.sh
new file mode 100644
index 0000000..822704b
--- /dev/null
+++ b/dot_config/waybar/custom_modules/executable_custom-gpu.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+raw_clock=$(cat /sys/class/drm/card1/device/pp_dpm_sclk | grep -oe '[0-9]{0,4}Mhz \W' | sed "s/Mhz \*//")
+# clock=$(echo "scale=1;$raw_clock/1000" | bc | sed -e 's/^-\./-0./' -e 's/^\./0./')
+
+raw_temp=$(cat /sys/class/drm/card1/device/hwmon/hwmon4/temp1_input)
+temperature=$(($raw_temp/1000))
+busypercent=$(cat /sys/class/hwmon/hwmon4/device/gpu_busy_percent)
+deviceinfo=$(glxinfo -B | grep 'Device:' | sed 's/^.*: //')
+driverinfo=$(glxinfo -B | grep "OpenGL version")
+
+# echo '{"text": "'$clock'GHz |  '$temperature'°C <span color=\"darkgray\">| '$busypercent'%</span>", "class": "custom-gpu", "tooltip": "<b>'$deviceinfo'</b>\n'$driverinfo'"}'
+
+echo '{"text": "'$temperature'°C <span color=\"darkgray\">| '$busypercent'%</span>", "class": "custom-gpu", "tooltip": "<b>'$deviceinfo'</b>\n'$driverinfo'"}'