Skip to content

Instantly share code, notes, and snippets.

@shugo
Last active March 15, 2023 05:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shugo/939bc336ca731708141c277c52ee7402 to your computer and use it in GitHub Desktop.
Save shugo/939bc336ca731708141c277c52ee7402 to your computer and use it in GitHub Desktop.
#!/bin/sh
export PATH="/bin:/usr/bin:/sbin:/usr/sbin"
if on_ac_power; then
powerprofilesctl set performance
else
powerprofilesctl set power-saver
fi
--- extension.js 2023-03-15 14:18:06.914455160 +0900
+++ /home/shugo/.local/share/gnome-shell/extensions/power-profile-switcher@eliapasquali.github.io/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