Skip to content

Instantly share code, notes, and snippets.

@Bryan2333
Created June 16, 2025 03:09
Show Gist options
  • Save Bryan2333/7093bde66a2cb8882ad03bab32c6e11e to your computer and use it in GitHub Desktop.
Save Bryan2333/7093bde66a2cb8882ad03bab32c6e11e to your computer and use it in GitHub Desktop.
根据电源状态动态调节屏幕刷新率 KDE
#!/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