Created
June 16, 2025 03:09
-
-
Save Bryan2333/7093bde66a2cb8882ad03bab32c6e11e to your computer and use it in GitHub Desktop.
根据电源状态动态调节屏幕刷新率 KDE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
POWER_SOURCE="$(< /sys/class/power_supply/ADP0/online)" | |
case "$POWER_SOURCE" in | |
"0") kscreen-doctor output.eDP-1.mode.2880x1800@60 > /dev/null 2>&1 ;; | |
"1") kscreen-doctor output.eDP-1.mode.2880x1800@90 > /dev/null 2>&1 ;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment