-
-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(framework): Add full/automatic support for Framework hardware (#…
- Loading branch information
Showing
5 changed files
with
68 additions
and
13 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
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 |
---|---|---|
@@ -1,14 +1,19 @@ | ||
#!/usr/bin/bash | ||
|
||
# SCRIPT VERSION | ||
USER_SETUP_VER=5 | ||
USER_SETUP_VER=6 | ||
USER_SETUP_VER_FILE="${XDG_DATA_HOME:-$HOME/.local/share}/ublue/user-setup" | ||
USER_SETUP_VER_RAN=$(cat "$USER_SETUP_VER_FILE") | ||
VEN_ID="$(cat /sys/devices/virtual/dmi/id/chassis_vendor)" | ||
|
||
mkdir -p "$(dirname "$USER_SETUP_VER_FILE")" || exit 1 | ||
|
||
dirname "$USER_SETUP_VER_FILE" | ||
|
||
# INIT | ||
UBLUE_CONFIG_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/ublue" | ||
mkdir -p "$UBLUE_CONFIG_DIR" | ||
|
||
# Upgrade from v1 to v2 changes only the location of the USER_SETUP_VER. | ||
# Exit if v1 file is present. | ||
USER_SETUP_VER_FILE_V1="$HOME/.ublue-configured" | ||
|
@@ -37,6 +42,17 @@ if [[ ! -f "$PTYXIS_DIR/catppuccin-dynamic.palette" ]]; then | |
cp "$PTYXIS_THEME_DIR/catppuccin-dynamic.palette" "$PTYXIS_DIR/catppuccin-dynamic.palette" | ||
fi | ||
|
||
if [[ ":Framework:" =~ ":$VEN_ID:" ]]; then | ||
if [[ ! -f "$UBLUE_CONFIG_DIR/framework-initialized" ]]; then | ||
echo 'Enabling automatic power profile extension' | ||
gnome-extensions enable [email protected] | ||
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 | ||
touch "$UBLUE_CONFIG_DIR/framework-initialized" | ||
fi | ||
fi | ||
|
||
# Handle privileged tasks | ||
pkexec /usr/libexec/ublue-privileged-user-setup | ||
|
||
|
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