2023-08-08 20:53:26 +00:00
|
|
|
#!/usr/bin/env bash
|
2023-09-22 17:59:29 +00:00
|
|
|
|
|
|
|
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
|
2023-09-23 04:47:15 +00:00
|
|
|
IMAGE_NAME=$(jq -r '."image-name"' < $IMAGE_INFO)
|
|
|
|
BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO)
|
2023-08-08 20:53:26 +00:00
|
|
|
|
|
|
|
if [[ $BASE_IMAGE_NAME =~ "kinoite" ]]; then
|
|
|
|
echo 'Running setup for Kinoite'
|
|
|
|
|
2023-08-08 21:20:09 +00:00
|
|
|
echo 'Enabling System76-Scheduler KWin script'
|
2023-08-09 02:23:10 +00:00
|
|
|
kwriteconfig5 --file kwinrc --group Plugins --key kwin-system76-scheduler-integrationEnabled true
|
2023-08-08 20:53:26 +00:00
|
|
|
|
|
|
|
if [[ $IMAGE_NAME =~ "deck" ]]; then
|
2023-08-08 21:48:45 +00:00
|
|
|
echo 'Running setup for Kinoite on Steam Deck'
|
|
|
|
|
2023-08-08 20:53:26 +00:00
|
|
|
echo 'Creating Desktop shortcuts'
|
2023-08-11 07:10:49 +00:00
|
|
|
mkdir -p $HOME/Desktop/
|
2023-09-11 04:32:49 +00:00
|
|
|
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
|
2023-08-08 20:53:26 +00:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo 'Running setup for Silverblue'
|
|
|
|
|
|
|
|
echo 'Enabling GNOME extensions'
|
2023-08-09 02:00:31 +00:00
|
|
|
gnome-extensions enable s76-scheduler@mattjakeman.com
|
|
|
|
gnome-extensions enable gsconnect@andyholmes.github.io
|
|
|
|
gnome-extensions disable background-logo@fedorahosted.org
|
2023-08-08 20:53:26 +00:00
|
|
|
|
2023-08-17 19:36:10 +00:00
|
|
|
echo 'Enabling VRR & Fractional Scaling'
|
|
|
|
gsettings set org.gnome.mutter experimental-features "['variable-refresh-rate','scale-monitor-framebuffer']"
|
2023-08-08 20:53:26 +00:00
|
|
|
|
2023-08-10 15:25:13 +00:00
|
|
|
echo 'Disabling automatic GNOME Software updates'
|
|
|
|
gsettings set org.gnome.software download-updates false
|
|
|
|
gsettings set org.gnome.software download-updates-notify false
|
|
|
|
|
2023-08-24 08:39:21 +00:00
|
|
|
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
|
|
|
|
|
2023-08-08 20:53:26 +00:00
|
|
|
echo 'Installing Gradience presets'
|
|
|
|
mkdir -p $HOME/.config/presets/user/
|
2023-09-11 04:32:49 +00:00
|
|
|
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
|
2023-08-08 20:53:26 +00:00
|
|
|
|
|
|
|
if [[ $IMAGE_NAME =~ "deck" ]]; then
|
|
|
|
echo 'Running setup for Silverblue on Steam Deck'
|
|
|
|
|
2023-08-08 21:48:45 +00:00
|
|
|
echo 'Enabling Bazzite tofu menu fork'
|
2023-08-09 02:00:31 +00:00
|
|
|
gnome-extensions enable tofumenu@tofu
|
2023-08-15 06:32:09 +00:00
|
|
|
|
|
|
|
echo 'Disabling GNOME keyboard'
|
|
|
|
gsettings set org.gnome.desktop.interface toolkit-accessibility false
|
2023-09-04 00:07:56 +00:00
|
|
|
gnome-extensions enable block-caribou-36@lxylxy123456.ercli.dev
|
2023-08-15 14:52:22 +00:00
|
|
|
|
2023-08-16 06:11:05 +00:00
|
|
|
echo 'Configuring search replacement with Steam Deck Keyboard support'
|
|
|
|
gnome-extensions enable search-light@icedman.github.com
|
|
|
|
|
2023-08-31 22:26:43 +00:00
|
|
|
echo 'Setting mouse input profile'
|
|
|
|
gsettings set org.gnome.desktop.peripherals.mouse accel-profile "flat"
|
|
|
|
|
2023-09-08 20:42:48 +00:00
|
|
|
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"
|
|
|
|
|
2023-09-15 07:30:41 +00:00
|
|
|
echo 'Setting up templates'
|
2023-09-15 07:37:38 +00:00
|
|
|
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
|
2023-09-15 07:30:41 +00:00
|
|
|
|
2023-08-15 14:52:22 +00:00
|
|
|
echo 'Tweaking GNOME indexer'
|
|
|
|
mkdir -p $HOME/.steam
|
|
|
|
touch $HOME/.steam/.trackerignore
|
2023-08-15 17:44:00 +00:00
|
|
|
mkdir -p $HOME/.local/share/Steam
|
|
|
|
touch $HOME/.local/share/Steam/.trackerignore
|
2023-08-08 20:53:26 +00:00
|
|
|
fi
|
2023-08-08 21:48:45 +00:00
|
|
|
fi
|
|
|
|
|
2023-08-20 23:26:18 +00:00
|
|
|
# Enable NTP
|
|
|
|
timedatectl set-ntp true
|
|
|
|
|
2023-08-09 04:21:05 +00:00
|
|
|
# Setup Flathub
|
|
|
|
if grep -qz 'fedora' <<< $(flatpak remotes); then
|
2023-08-09 15:50:35 +00:00
|
|
|
flatpak remote-delete --user fedora --force
|
2023-08-09 04:21:05 +00:00
|
|
|
fi
|
2023-08-09 15:50:35 +00:00
|
|
|
flatpak remote-add --if-not-exists --user flathub /etc/flatpak/remotes.d/flathub.flatpakrepo
|
2023-08-09 04:21:05 +00:00
|
|
|
|
2023-08-08 21:48:45 +00:00
|
|
|
# Prevent future executions
|
|
|
|
echo "Writing state file"
|
2023-08-09 04:21:05 +00:00
|
|
|
touch $HOME/.bazzite-configured
|