Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Restore power profile switcher on framework #1289

Merged
merged 2 commits into from
May 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions just/bluefin-system.just
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,22 @@ configure-vfio ACTION="":
sudo /usr/libexec/bluefin-dx-kvmfr-setup
fi

# Change automatic power profile switching behavior
configure-auto-power-profile ACTION="help":
#!/usr/bin/bash
source /usr/lib/ujust/ujust.sh
OPTION={{ ACTION }}
if [ "$OPTION" == "help" ]; then
echo "Usage: ujust configure-auto-power-profile <option>"
echo " Use 'enable' to allow automatic power profile switching based on power state
echo " Use 'disable' to prevent automatic power profile switching based on power state
exit 0
elif [[ "${OPTION,,}" =~ enable ]]; then
gnome-extensions enable auto-power-profile@dmy3k.github.io
elif [[ "${OPTION,,}" =~ disable ]]; then
gnome-extensions disable auto-power-profile@dmy3k.github.io
fi

# Install system flatpaks for rebasers
[private]
install-system-flatpaks:
Expand Down
2 changes: 1 addition & 1 deletion packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"gnome-shell-extension-gsconnect",
"gnome-shell-extension-logo-menu",
"gnome-shell-extension-search-light",
"gnome-shell-extension-power-profile-switcher",
"gnome-shell-extension-auto-power-profile",
"libgda-sqlite",
"libgda",
"libratbag-ratbagd",
Expand Down
2 changes: 2 additions & 0 deletions system_files/shared/usr/libexec/ublue-user-setup
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ fi

if [[ ":Framework:" =~ ":$VEN_ID:" ]]; then
if [[ ! -f "$UBLUE_CONFIG_DIR/framework-initialized" ]]; then
echo 'Enabling automatic power profile extension'
ujust configure-auto-power-profile enable
echo 'Setting Framework logo menu'
dconf write /org/gnome/shell/extensions/Logo-menu/symbolic-icon true
dconf write /org/gnome/shell/extensions/Logo-menu/menu-button-icon-image 31
Expand Down
4 changes: 3 additions & 1 deletion system_files/silverblue/usr/etc/dconf/db/local.d/01-ublue
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ default-profile-uuid='2871e8027773ae74d6c87a5f659bbc74'
[org/gnome/Ptyxis/Profiles/2871e8027773ae74d6c87a5f659bbc74]
palette='catppuccin-dynamic'

[org/gnome/shell/extensions/power-profile-switcher]
[org/gnome/shell/extensions/auto-power-profile]
ac='balanced'
bat='power-saver'
notify=true
lapmode=true
Loading