fix(treewide): Use new image info implementation

This commit is contained in:
RJ Trujillo 2023-09-22 11:59:29 -06:00
parent 391a2afa1c
commit 66a14d300e
11 changed files with 42 additions and 19 deletions

View File

@ -1,8 +1,10 @@
#!/usr/bin/env bash
source /etc/default/bazzite
source /etc/default/desktop-wayland
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
BASE_IMAGE_NAME=$(jq '."base-image-name"' $IMAGE_INFO)
USER=$(id -nu 1000)
# SteamOS SDDM config

View File

@ -1,6 +1,7 @@
#!/usr/bin/env bash
source /etc/default/bazzite
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
BASE_IMAGE_NAME=$(jq '."base-image-name"' $IMAGE_INFO)
USER=$(id -nu 1000)

View File

@ -4,9 +4,11 @@ set -e
die() { echo >&2 "!! $*"; exit 1; }
source /etc/default/bazzite
source /etc/default/desktop-wayland
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
BASE_IMAGE_NAME=$(jq '."base-image-name"' $IMAGE_INFO)
# File this script will modify, in addition to (potentially) the per-user sentinel file
CONF_FILE="/etc/sddm.conf.d/zz-steamos-autologin.conf"

View File

@ -202,7 +202,7 @@ screens:
values:
title: "GNOME Theme"
condition:
run: grep -q 'silverblue' <<< $(cat /etc/default/bazzite)
run: grep -q 'silverblue' <<< $(jq '."base-image-name"' /usr/share/ublue-os/image-info.json)
links:
- "Vapor Theme":
run: just --unstable enable-vapor-theme

View File

@ -144,7 +144,8 @@ install-fleek:
install-fleek-themes:
#!/usr/bin/env bash
if [[ -x "/var/usrlocal/bin/fleek" ]]; then
source /etc/default/bazzite
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
BASE_IMAGE_NAME=$(jq '."base-image-name"' $BASE_IMAGE_NAME)
if [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then
fleek add adw-gtk3 --apply
else
@ -233,7 +234,8 @@ patch-gmod:
# Activate Valve-inspired Vapor theme on GNOME
enable-vapor-theme:
#!/usr/bin/env bash
source /etc/default/bazzite
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
BASE_IMAGE_NAME=$(jq '."base-image-name"' $BASE_IMAGE_NAME)
if [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then
gnome-extensions enable user-theme@gnome-shell-extensions.gcampax.github.com
gsettings set org.gnome.mutter center-new-windows true
@ -255,7 +257,8 @@ enable-vapor-theme:
# Activate Valve-inspired VGUI2 theme on GNOME
enable-vgui2-theme:
#!/usr/bin/env bash
source /etc/default/bazzite
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
BASE_IMAGE_NAME=$(jq '."base-image-name"' $BASE_IMAGE_NAME)
if [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then
gnome-extensions enable user-theme@gnome-shell-extensions.gcampax.github.com
gsettings set org.gnome.mutter center-new-windows true
@ -277,6 +280,8 @@ enable-vgui2-theme:
# Install Adwaita-for-Steam theme for CSS Loader (https://github.com/tkashkin/Adwaita-for-Steam)
install-adwaita-for-steam:
#!/usr/bin/env bash
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
BASE_IMAGE_NAME=$(jq '."base-image-name"' $BASE_IMAGE_NAME)
if [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then
if [ -d "$HOME/homebrew/themes" ]; then
git clone https://github.com/tkashkin/Adwaita-for-Steam.git --single-branch "$HOME/homebrew/themes/Adwaita-for-Steam"

View File

@ -1,5 +1,4 @@
#!/usr/bin/env bash
source /etc/default/bazzite
# Script Version
VER=1

View File

@ -1,5 +1,8 @@
#!/usr/bin/env bash
source /etc/default/bazzite
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
IMAGE_NAME=$(jq '."image-name"' $IMAGE_INFO)
BASE_IMAGE_NAME=$(jq '."base-image-name"' $IMAGE_INFO)
# SCRIPT VERSION
HWS_VER=1

View File

@ -1,5 +1,8 @@
#!/usr/bin/env bash
source /etc/default/bazzite
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
IMAGE_NAME=$(jq '."image-name"' $IMAGE_INFO)
BASE_IMAGE_NAME=$(jq '."base-image-name"' $IMAGE_INFO)
if [[ ! -f "${HOME}/.justfile" ]]; then
echo "!include /usr/share/ublue-os/just/custom.just" >> "${HOME}/.justfile"

View File

@ -1,5 +1,8 @@
#!/usr/bin/env bash
source /etc/default/bazzite
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
BASE_IMAGE_NAME=$(jq '."base-image-name"' $IMAGE_INFO)
if [[ ${BASE_IMAGE_NAME} == 'kinoite' ]]; then
SUDO_ASKPASS='/usr/bin/ksshaskpass'
elif [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then

View File

@ -57,7 +57,7 @@ screens:
values:
title: AMD Additions
condition:
run: grep -q 'main' <<< $(cat /etc/default/bazzite)
run: grep -q 'main' <<< $(jq '."image-flavor"' /usr/share/ublue-os/image-info.json)
show_terminal: true
package_manager: yafti.plugin.run
packages:
@ -67,7 +67,7 @@ screens:
values:
title: Nvidia Additions
condition:
run: grep -q 'nvidia' <<< $(cat /etc/default/bazzite)
run: grep -q 'nvidia' <<< $(jq '."image-flavor"' /usr/share/ublue-os/image-info.json)
show_terminal: true
package_manager: yafti.plugin.run
packages:
@ -196,7 +196,7 @@ screens:
values:
title: "GNOME Theme"
condition:
run: grep -q 'silverblue' <<< $(cat /etc/default/bazzite)
run: grep -q 'silverblue' <<< $(jq '."base-image-name"' /usr/share/ublue-os/image-info.json)
links:
- "Vapor Theme":
run: just --unstable enable-vapor-theme

View File

@ -40,7 +40,8 @@ setup-firefox-vaapi-nvidia:
# Set up Bazzite-Arch Distrobox container
install-bazzite-arch:
source /etc/default/bazzite && \
IMAGE_INFO="/usr/share/ublue-os/image-info.json" && \
BASE_IMAGE_NAME=$(jq '."base-image-name"' $BASE_IMAGE_NAME) && \
if grep -qz "bazzite-arch" <<< $(distrobox list); then \
echo 'Removing existing Bazzite Arch install...' && \
distrobox rm bazzite-arch --force; \
@ -145,7 +146,8 @@ install-fleek:
install-fleek-themes:
#!/usr/bin/env bash
if [[ -x "/var/usrlocal/bin/fleek" ]]; then
source /etc/default/bazzite
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
BASE_IMAGE_NAME=$(jq '."base-image-name"' $BASE_IMAGE_NAME)
if [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then
fleek add adw-gtk3 --apply
else
@ -171,7 +173,8 @@ get-greenlight:
# Enable Supergfxctl, a Nvidia GPU switcher for hybrid laptops
enable-supergfxctl:
#!/usr/bin/env bash
source /etc/default/bazzite
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
IMAGE_FLAVOR=$(jq '."image-flavor"' $IMAGE_FLAVOR)
if [[ ${IMAGE_FLAVOR} == 'nvidia' ]]; then
systemctl enable --now supergfxd.service
else
@ -201,7 +204,8 @@ patch-gmod:
# Activate Valve-inspired Vapor theme on GNOME
enable-vapor-theme:
#!/usr/bin/env bash
source /etc/default/bazzite
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
BASE_IMAGE_NAME=$(jq '."base-image-name"' $BASE_IMAGE_NAME)
if [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then
gnome-extensions enable user-theme@gnome-shell-extensions.gcampax.github.com
gsettings set org.gnome.mutter center-new-windows true
@ -225,7 +229,8 @@ enable-vapor-theme:
# Activate Valve-inspired VGUI2 theme on GNOME
enable-vgui2-theme:
#!/usr/bin/env bash
source /etc/default/bazzite
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
BASE_IMAGE_NAME=$(jq '."base-image-name"' $BASE_IMAGE_NAME)
if [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then
gnome-extensions enable user-theme@gnome-shell-extensions.gcampax.github.com
gsettings set org.gnome.mutter center-new-windows true