mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-01-17 19:10:33 +00:00
019704d757
Instead of the raw key being assigned, a key wrapped in quotations was incorrectly assigned
113 lines
4.3 KiB
Bash
Executable File
113 lines
4.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
|
|
IMAGE_NAME=$(jq -r '."image-name"' < $IMAGE_INFO)
|
|
BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO)
|
|
|
|
if [[ $BASE_IMAGE_NAME =~ "kinoite" ]]; then
|
|
echo 'Running setup for Kinoite'
|
|
|
|
echo 'Enabling System76-Scheduler KWin script'
|
|
kwriteconfig5 --file kwinrc --group Plugins --key kwin-system76-scheduler-integrationEnabled true
|
|
|
|
if [[ $IMAGE_NAME =~ "deck" ]]; then
|
|
echo 'Running setup for Kinoite on Steam Deck'
|
|
|
|
echo 'Creating Desktop shortcuts'
|
|
mkdir -p $HOME/Desktop/
|
|
if [[ ! -f "$HOME/Desktop/steam.desktop" ]]; then
|
|
cp /usr/share/applications/steam.desktop $HOME/Desktop/steam.desktop
|
|
fi
|
|
if [[ ! -f "$HOME/Desktop/Return.desktop" ]]; then
|
|
cp /etc/skel.d/Desktop/Return.desktop $HOME/Desktop/Return.desktop
|
|
fi
|
|
if [[ ! -f "$HOME/Desktop/net.lutris.Lutris.desktop" ]]; then
|
|
cp /usr/share/applications/net.lutris.Lutris.desktop $HOME/Desktop/net.lutris.Lutris.desktop
|
|
fi
|
|
if [[ ! -f "$HOME/Desktop/yafti.desktop" ]]; then
|
|
cp /usr/share/applications/yafti.desktop $HOME/Desktop/yafti.desktop
|
|
fi
|
|
fi
|
|
else
|
|
echo 'Running setup for Silverblue'
|
|
|
|
echo 'Enabling GNOME extensions'
|
|
gnome-extensions enable s76-scheduler@mattjakeman.com
|
|
gnome-extensions enable gsconnect@andyholmes.github.io
|
|
gnome-extensions disable background-logo@fedorahosted.org
|
|
|
|
echo 'Enabling VRR & Fractional Scaling'
|
|
gsettings set org.gnome.mutter experimental-features "['variable-refresh-rate','scale-monitor-framebuffer']"
|
|
|
|
echo 'Disabling automatic GNOME Software updates'
|
|
gsettings set org.gnome.software download-updates false
|
|
gsettings set org.gnome.software download-updates-notify false
|
|
|
|
echo 'Adjusting Nautilus settings'
|
|
gsettings set org.gnome.nautilus.preferences show-create-link true
|
|
gsettings set org.gtk.gtk4.settings.file-chooser sort-directories-first true
|
|
|
|
echo 'Installing Gradience presets'
|
|
mkdir -p $HOME/.config/presets/user/
|
|
if [[ ! -f "$HOME/.config/presets/user/vapor.json" ]]; then
|
|
ln -s /usr/share/ublue-os/bazzite/themes/vapor.json $HOME/.config/presets/user/vapor.json
|
|
fi
|
|
if [[ ! -f "$HOME/.config/presets/user/vgui2.json" ]]; then
|
|
ln -s /usr/share/ublue-os/bazzite/themes/vgui2.json $HOME/.config/presets/user/vgui2.json
|
|
fi
|
|
|
|
if [[ $IMAGE_NAME =~ "deck" ]]; then
|
|
echo 'Running setup for Silverblue on Steam Deck'
|
|
|
|
echo 'Enabling Bazzite tofu menu fork'
|
|
gnome-extensions enable tofumenu@tofu
|
|
|
|
echo 'Disabling GNOME keyboard'
|
|
gsettings set org.gnome.desktop.interface toolkit-accessibility false
|
|
gnome-extensions enable block-caribou-36@lxylxy123456.ercli.dev
|
|
|
|
echo 'Configuring search replacement with Steam Deck Keyboard support'
|
|
gnome-extensions enable search-light@icedman.github.com
|
|
|
|
echo 'Setting mouse input profile'
|
|
gsettings set org.gnome.desktop.peripherals.mouse accel-profile "flat"
|
|
|
|
echo 'Setting default power settings'
|
|
gsettings set org.gnome.desktop.session idle-delay 0
|
|
gsettings set org.gnome.settings-daemon.plugins.power ambient-enabled true
|
|
gsettings set org.gnome.settings-daemon.plugins.power idle-dim true
|
|
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 300
|
|
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 900
|
|
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type "suspend"
|
|
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type "suspend"
|
|
gsettings set org.gnome.settings-daemon.plugins.power power-button-action "suspend"
|
|
|
|
echo 'Setting up templates'
|
|
if [[ ! -f "$HOME/Templates/vkBasalt.conf" ]]; then
|
|
ln -s /etc/vkBasalt.conf $HOME/Templates/vkBasalt.conf
|
|
fi
|
|
if [[ ! -f "$HOME/Templates/dxvk.conf" ]]; then
|
|
ln -s /etc/dxvk-example.conf $HOME/Templates/dxvk.conf
|
|
fi
|
|
|
|
echo 'Tweaking GNOME indexer'
|
|
mkdir -p $HOME/.steam
|
|
touch $HOME/.steam/.trackerignore
|
|
mkdir -p $HOME/.local/share/Steam
|
|
touch $HOME/.local/share/Steam/.trackerignore
|
|
fi
|
|
fi
|
|
|
|
# Enable NTP
|
|
timedatectl set-ntp true
|
|
|
|
# Setup Flathub
|
|
if grep -qz 'fedora' <<< $(flatpak remotes); then
|
|
flatpak remote-delete --user fedora --force
|
|
fi
|
|
flatpak remote-add --if-not-exists --user flathub /etc/flatpak/remotes.d/flathub.flatpakrepo
|
|
|
|
# Prevent future executions
|
|
echo "Writing state file"
|
|
touch $HOME/.bazzite-configured
|