Last active
March 15, 2023 05:36
-
-
Save shugo/939bc336ca731708141c277c52ee7402 to your computer and use it in GitHub Desktop.
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/sh | |
export PATH="/bin:/usr/bin:/sbin:/usr/sbin" | |
if on_ac_power; then | |
powerprofilesctl set performance | |
else | |
powerprofilesctl set power-saver | |
fi |
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
--- extension.js 2023-03-15 14:18:06.914455160 +0900 | |
+++ /home/shugo/.local/share/gnome-shell/extensions/[email protected]/extension.js 2023-03-15 14:31:55.699583169 +0900 | |
@@ -13,7 +13,8 @@ | |
const switchProfile = (profile) => { | |
try { | |
Gio.Subprocess.new( | |
- ["powerprofilesctl", "set", profile], | |
+ //["powerprofilesctl", "set", profile], | |
+ ["/home/shugo/bin/change_power_profile"], | |
Gio.SubprocessFlags.STDOUT_PIPE | Gio.SubprocessFlags.STDERR_PIPE | |
); | |
} catch (e) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment