mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-02-24 18:40:04 +00:00
feat(framework): Add needed kargs and extensions to setup scripts
This commit is contained in:
parent
d58f49e13e
commit
96f1be0198
@ -7,7 +7,7 @@ IMAGE_FLAVOR=$(jq -r '."image-flavor"' < $IMAGE_INFO)
|
||||
FEDORA_VERSION=$(jq -r '."fedora-version"' < $IMAGE_INFO)
|
||||
|
||||
# SCRIPT VERSION
|
||||
HWS_VER=38
|
||||
HWS_VER=39
|
||||
HWS_VER_FILE="/etc/bazzite/hws_version"
|
||||
HWS_VER_RAN=$(cat $HWS_VER_FILE)
|
||||
|
||||
@ -23,6 +23,8 @@ KNOWN_FEDORA_VERSION=$(cat $KNOWN_FEDORA_VERSION_FILE)
|
||||
|
||||
# GLOBAL
|
||||
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
|
||||
VEN_ID="$(cat /sys/devices/virtual/dmi/id/chassis_vendor)"
|
||||
CPU_VENDOR=$(grep "vendor_id" "/proc/cpuinfo" | uniq | awk -F": " '{ print $2 }')
|
||||
MINIMUM_FREE_ZRAM=$(awk '/MemTotal/ {printf "%.0f", $2 * 0.01}' /proc/meminfo)
|
||||
CURRENT_FREE_ZRAM=$(sysctl vm.min_free_kbytes | awk '{print $3}')
|
||||
KARGS=$(rpm-ostree kargs)
|
||||
@ -55,6 +57,15 @@ if [[ $IMAGE_NAME =~ "deck" && ":AOKZOE A1 AR07:" =~ ":$SYS_ID:" ]]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ":Framework:" =~ ":$VEN_ID:" ]]; then
|
||||
if [[ "GenuineIntel" == "$CPU_VENDOR" ]]; then
|
||||
if [[ ! $KARGS =~ "hid_sensor_hub" ]]; then
|
||||
echo "Intel Framework Laptop detected, applying needed keyboard fix"
|
||||
NEEDED_KARGS+=("--append-if-missing=module_blacklist=hid_sensor_hub");
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ":83E1:" =~ ":$SYS_ID:" ]]; then
|
||||
if [[ ! $KARGS =~ "video" ]]; then
|
||||
echo "Adding panel orientation for Lenovo Legion Go"
|
||||
|
@ -10,12 +10,14 @@ IMAGE_NAME=$(jq -r '."image-name"' < $IMAGE_INFO)
|
||||
BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO)
|
||||
FEDORA_VERSION=$(jq -r '."fedora-version"' < $IMAGE_INFO)
|
||||
|
||||
VEN_ID="$(cat /sys/devices/virtual/dmi/id/chassis_vendor)"
|
||||
|
||||
# INIT
|
||||
BAZZITE_CONFIG_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/bazzite"
|
||||
mkdir -p "$BAZZITE_CONFIG_DIR"
|
||||
|
||||
# SCRIPT VERSION
|
||||
USER_SETUP_VER=31
|
||||
USER_SETUP_VER=32
|
||||
USER_SETUP_VER_FILE="$BAZZITE_CONFIG_DIR/version"
|
||||
USER_SETUP_FEDORA_VER_FILE="$BAZZITE_CONFIG_DIR/fedora_version"
|
||||
USER_SETUP_IMAGE_VER_FILE=$BAZZITE_CONFIG_DIR/image_name""
|
||||
@ -104,6 +106,11 @@ else
|
||||
if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" || $IMAGE_NAME =~ "framegame" ]]; then
|
||||
echo 'Running setup for Silverblue on Steam Deck'
|
||||
|
||||
if [[ ":Framework:" =~ ":$VEN_ID:" ]]; then
|
||||
echo 'Enabling automatic power profile extension'
|
||||
gnome-extensions enable power-profile-switcher@eliapasquali.github.io
|
||||
fi
|
||||
|
||||
echo 'Setting up templates'
|
||||
mkdir -p "$HOME/Templates"
|
||||
if [[ ! -f "$HOME/Templates/vkBasalt.conf" ]]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user