Skip to content

Commit

Permalink
feat(gnome): Add bazzite-menu extension to desktop images, modify def…
Browse files Browse the repository at this point in the history
…aults to show gamemode option on deck builds.
  • Loading branch information
KyleGospo committed Nov 15, 2023
1 parent 0391221 commit 5831b1d
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 12 deletions.
7 changes: 5 additions & 2 deletions Containerfile
Expand Up @@ -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 \
Expand Down Expand Up @@ -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
Expand Down
20 changes: 19 additions & 1 deletion system_files/deck/shared/usr/etc/X11/Xsession.d/50rotate-screen
Expand Up @@ -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
11 changes: 2 additions & 9 deletions system_files/desktop/shared/usr/bin/bazzite-user-setup
Expand Up @@ -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"
Expand Down Expand Up @@ -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'
Expand All @@ -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
Expand Down

0 comments on commit 5831b1d

Please sign in to comment.