feat(gnome): Add bazzite-menu extension to desktop images, modify defaults to show gamemode option on deck builds.

This commit is contained in:
Kyle Gospodnetich 2023-11-14 16:33:15 -08:00
parent 0391221c8b
commit 5831b1dac0
3 changed files with 26 additions and 12 deletions

View File

@ -221,6 +221,7 @@ RUN if grep -q "kinoite" <<< "${BASE_IMAGE_NAME}"; then \
gnome-shell-extension-blur-my-shell \
gnome-shell-extension-hanabi \
gnome-shell-extension-gamerzilla \
gnome-shell-extension-bazzite-menu \
rom-properties-gtk3 \
openssh-askpass && \
rpm-ostree override remove \
@ -372,10 +373,12 @@ RUN if grep -q "kinoite" <<< "${BASE_IMAGE_NAME}"; then \
; else \
rpm-ostree install \
steamdeck-gnome-presets \
gnome-shell-extension-bazzite-menu \
gnome-shell-extension-caribou-blocker \
sddm && \
wget https://raw.githubusercontent.com/doitsujin/dxvk/master/dxvk.conf -O /usr/etc/dxvk-example.conf \
wget https://raw.githubusercontent.com/doitsujin/dxvk/master/dxvk.conf -O /usr/etc/dxvk-example.conf && \
sed -i '/show-gamemode/{n;s/false/true/}' /usr/share/gnome-shell/extensions/logomenu@aryan_k/schemas/org.gnome.shell.extensions.logo-menu.gschema.xml && \
rm -f /usr/share/gnome-shell/extensions/logomenu@aryan_k/schemas/gschemas.compiled && \
glib-compile-schemas /usr/share/gnome-shell/extensions/logomenu@aryan_k/schemas/ \
; fi
# Install new packages

View File

@ -2,8 +2,26 @@
set -e
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO)
if [[ $BASE_IMAGE_NAME =~ "silverblue" && "$XDG_SESSION_TYPE" == "wayland" ]]; then
XRANDR_FUNC="gnome-randr modify"
else
XRANDR_FUNC="xrandr --output"
fi
# Steam Deck
if [[ ":Jupiter:" =~ ":$SYS_ID:" || ":Galileo:" =~ ":$SYS_ID:" ]]; then
# Rotate the builtin screen every time so it's the right way around.
xrandr --output "eDP" --rotate "right"
if [[ "$XDG_SESSION_TYPE" == "wayland" ]]
$XRANDR_FUNC "eDP" --rotate "normal"
else
$XRANDR_FUNC "eDP" --rotate "right"
fi
fi
# Lenovo Legion Go
if [[ ":83E1:" =~ ":$SYS_ID:" ]]; then
$XRANDR_FUNC "eDP" --rotate "normal"
fi

View File

@ -7,7 +7,7 @@ FEDORA_VERSION=$(jq -r '."fedora-version"' < $IMAGE_INFO)
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
# SCRIPT VERSION
USER_SETUP_VER=14
USER_SETUP_VER=15
USER_SETUP_VER_FILE="$HOME/.bazzite-configured"
USER_SETUP_VER_RAN=$(cat $USER_SETUP_VER_FILE)
USER_SETUP_FEDORA_VER_FILE="$HOME/.bazzite-configured-fedora-version"
@ -57,6 +57,7 @@ else
echo 'Enabling GNOME extensions'
gnome-extensions enable s76-scheduler@mattjakeman.com
gnome-extensions enable gsconnect@andyholmes.github.io
gnome-extensions enable logomenu@aryan_k
gnome-extensions disable background-logo@fedorahosted.org
echo 'Adjusting Nautilus settings'
@ -76,14 +77,6 @@ else
if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" || $IMAGE_NAME =~ "framegame" ]]; then
echo 'Running setup for Silverblue on Steam Deck'
if [ ${FEDORA_VERSION} -gt 38 ]; then
echo 'Enabling Bazzite Logo Menu fork'
gnome-extensions enable logomenu@aryan_k
else
echo 'Enabling Bazzite Tofu Menu fork'
gnome-extensions enable tofumenu@tofu
fi
echo 'Disabling GNOME keyboard'
gsettings set org.gnome.desktop.interface toolkit-accessibility false
gnome-extensions enable block-caribou-36@lxylxy123456.ercli.dev