Skip to content

Instantly share code, notes, and snippets.

@m0ppers
Created September 27, 2020 07:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m0ppers/10d64e0e97cc55fb1c5a8ed0814ce27a to your computer and use it in GitHub Desktop.
Save m0ppers/10d64e0e97cc55fb1c5a8ed0814ce27a to your computer and use it in GitHub Desktop.
asus AMD laptop + waybar
# Tested on a G14. needs jq and inotify-tools on arch linux
"custom/asus-laptop": {
"format": " {}",
"exec": "while true; do jq --unbuffered --compact-output --arg fan $(cat /sys/devices/platform/asus-nb-wmi/throttle_thermal_policy) --arg turbo $(cat /sys/devices/system/cpu/cpufreq/boost) -n '.text=\"Fan: \" + if $fan == \"0\" then \"normal\" elif $fan == \"1\" then \"boost\" else \"silent\" end + \", Turbo: \" + if $turbo==\"1\" then \"on\" else \"off\" end'; inotifywait --quiet -e modify /sys/devices/system/cpu/cpufreq/boost /sys/devices/platform/asus-nb-wmi/throttle_thermal_policy > /dev/null; done",
"return-type": "json"
},
#custom-asus-laptop {
padding: 0 10px;
margin: 0 4px;
background-color: #66cc99;
color: #000000;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment