-
-
Notifications
You must be signed in to change notification settings - Fork 309
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(gnome): Use auto-power-profile extension with customizations fro…
…m Universal Blue
- Loading branch information
Showing
5 changed files
with
39 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,19 @@ restore-gnome-de-settings: | |
# Restore Bazzite customized applications folders | ||
restore-gnome-folders: | ||
dconf load / < /usr/etc/dconf/db/local.d/04-bazzite-folders | ||
|
||
# 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 | ||
if [[ "${OPTION,,}" =~ enable ]]; then | ||
gnome-extensions enable [email protected] | ||
elif [[ "${OPTION,,}" =~ disable ]]; then | ||
gnome-extensions disable [email protected] | ||
fi |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
#!/usr/bin/bash | ||
|
||
if [ "${EUID:-$(id -u)}" -eq 0 ]; then | ||
echo "Bazzite user setup ran as root user. Exiting." | ||
exit 0 | ||
elif [ "$(whoami)" = "sddm" ]; then | ||
echo "Bazzite user setup ran as sddm user. Exiting." | ||
if [ "${EUID:-$(id -u)}" -lt 1000 ]; then | ||
echo "Bazzite user setup ran as unsupported user. Exiting." | ||
exit 0 | ||
fi | ||
|
||
|
@@ -112,7 +109,7 @@ else | |
if [[ ":Framework:" =~ ":$VEN_ID:" ]]; then | ||
if [[ ! -f "$BAZZITE_CONFIG_DIR/framework-initialized" ]]; then | ||
echo 'Enabling automatic power profile extension' | ||
gnome-extensions enable power-profile[email protected] | ||
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 4 | ||
|
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,19 @@ restore-gnome-de-settings: | |
# Restore Bazzite customized applications folders | ||
restore-gnome-folders: | ||
dconf load / < /usr/etc/dconf/db/local.d/04-bazzite-folders | ||
|
||
# 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 | ||
if [[ "${OPTION,,}" =~ enable ]]; then | ||
gnome-extensions enable [email protected] | ||
elif [[ "${OPTION,,}" =~ disable ]]; then | ||
gnome-extensions disable [email protected] | ||
fi |