latest update

This commit is contained in:
Sōon Yoru 2024-12-21 10:41:34 -03:00
parent 2f52e694bd
commit 867ad51afc
Signed by: yoru
GPG key ID: B63039394990CD72
6 changed files with 26 additions and 157 deletions

View file

@ -86,10 +86,7 @@ chsh -s /usr/bin/fish deck
install --needed xfce4 network-manager-applet nm-connection-editor xfce4-eyes-plugin xfce4-sensors-plugin thunar-archive-plugin thunar-volman xfce4-screenshooter xfce4-taskmanager gnome-software gvfs mousepad blueman gnome-calculator ffmpegthumbnailer ristretto engrampa
cp -fv startxfce4-steamos-oneshot /usr/bin/
cp -fv xfce4-steamos-oneshot.desktop /usr/share/xsessions/
cp -fv xfce4-steamos-wayland-oneshot.desktop /usr/share/wayland-sessions/
#cp -fv zz-steamos-autologin.conf /etc/sddm.conf.d/
cp -fv steamos-session-select /usr/bin/
cp -fv steam-jupiter /usr/bin/
@ -118,36 +115,10 @@ if test ! -f /usr/bin/pikaur; then
fi
aur_install --needed xfce4-pulseaudio-plugin-allow150 openrgb-bin firedragon-bin colordf backup-conf keybase-bin
install --needed python python-pip veracrypt geany virtualbox telegram-desktop
install --needed python python-pip veracrypt geany virtualbox telegram-desktop easyeffects lsp-plugins-lv2 audacity
# split due wrong size check
install --needed wine winetricks
if [[ $(pikaur -Qi pipewire | grep Version | cut -f3 -d':' | cut -f1-2 -d'.') < 1.2 ]]; then
if test ! -d pipewire; then
sudo -u deck pikaur -G pipewire
fi
pushd pipewire
git clean -fdx
uninstall --nodeps pipewire-jack
install --asdeps doxygen glib2-devel graphviz jack2 libcamera libcamera libffado meson python-docutils roc-toolkit valgrind systemd systemd-libs libdrm readline ncurses opus flac libogg libvorbis mpg123 libmysofa avahi libcanberra libusb gstreamer gst-plugins-base gst-plugins-base-libs libunwind libelf orc webrtc-audio-processing webrtc-audio-processing-1 alsa-lib openssl lilv lv2 serd sord sratom zix bluez-libs libldac libfreeaptx libfdk-aac liblc3 sdl2 libsndfile sbc speexdsp
sudo -u deck makepkg -f --skipchecksums --nocheck
uninstall --nodeps jack2
install --fromfile pipewire-1* pipewire-jack-1* pipewire-audio* pipewire-pulse-1* pipewire-v4l2* pipewire-x11* pipewire-alsa* alsa-card-profiles* libpipewire* gst-plugin-pipewire*
popd
if test ! -d easyeffects; then
sudo -u deck pikaur -G easyeffects
fi
pushd easyeffects
git clean -fdx
install --asdeps libsigc++-3.0 onetbb blas cblas hwloc gsl ladspa libebur128 rnnoise soundtouch zita-convolver docbook-xml appstream-glib itstool nlohmann-json appstream libbs2b fftw libsamplerate calf lsp-plugins-lv2 mda.lv2
sudo -u deck makepkg -f
install --fromfile easyeffects*.tar.zst
popd
fi
#sudo -u deck wineboot -u
# clean

View file

@ -1,59 +0,0 @@
#!/bin/bash
set -e
die() { echo >&2 "!! $*"; exit 1; }
SENTINEL_FILE="steamos-session-select"
SENTINEL_VALUE="x11"
# If we proceed, execute this
CHAINED_SESSION="/usr/bin/xfce4-session"
# If we decide the sentinel is consumed, execute this command instead and fail
RESTORE_SESSION=(steamos-session-select) # No arguments restores the session
# Add back portals removed by gamescope
systemctl --user set-environment XDG_DESKTOP_PORTAL_DIR=/usr/share/xdg-desktop-portal/portals
# Update environment
dbus-update-activation-environment --systemd DESKTOP_SESSION `env | grep ^XDG_ | cut -d = -f 1`
# Find or check config sentinel
function check_sentinel()
{
if [[ -z ${HOME+x} ]]; then
echo >&2 "$0: No \$HOME variable!"
# Rather than break we'll just launch plasma and hope for the best?
return 0
fi
local config_dir="${XDG_CONF_DIR:-"$HOME/.config"}"
(
cd "$HOME"
cd "$config_dir"
sentinel_value="$(cat "$SENTINEL_FILE")"
if [[ "$sentinel_value" == "wayland" ]]; then
echo "/usr/bin/startxfce4-wayland"
elif [[ "$sentinel_value" == "x11" ]]; then
echo "/usr/bin/startxfce4"
else
return 1
fi
rm "$SENTINEL_FILE"
) || return 1 # If we couldn't read the value or it wasn't what we wanted
# Found value and removed it, we're good to continue
return 0
}
if CONFIGURED_CHAINED_SESSION=$(check_sentinel); then
# We found and consumed the oneshot sentinel, proceed to launch plasma
echo >&2 "$0: Found and removed sentinel file for one-shot xfce, proceeding to launch"
exec "$CONFIGURED_CHAINED_SESSION"
else
echo >&2 "$0: Sentinel value not found, executing session-select to restore session"
"${RESTORE_SESSION[@]}" || echo >&2 "$0: !! Failed to restore previous session, executing chained session"
# Session restore should've stopped us, if it is broken at least let plasma continue to open
exec "$CHAINED_SESSION"
fi

View file

@ -4,67 +4,43 @@ set -e
die() { echo >&2 "!! $*"; exit 1; }
# FIXME Purge old files and use this one
# File this script will modify, in addition to (potentially) the per-user sentinel file
# File this script will modify
CONF_FILE="/etc/sddm.conf.d/zz-steamos-autologin.conf"
SENTINEL_FILE="steamos-session-select"
# For sanity this shipped file must be present, to ensure we're still on a normal-looking steamos setup.
CHECK_FILE="/etc/sddm.conf.d/steamos.conf"
session="${1:-gamescope}"
session_type="x11"
# Become root
if [[ $EUID != 0 ]]; then
pkexec "$(realpath $0)" "$session" --sentinel-created
# Quit existing sessions
if [[ "$2" != "--no-restart" ]]; then
systemctl --user --no-block stop gamescope-session.service
systemctl --user --no-block stop plasma-workspace.target
fi
exit
fi
if [[ "$2" != "--sentinel-created" ]]; then
die "Running $0 as root is not allowed"
fi
session_launcher=""
create_sentinel=""
if [[ "$2" == "--sentinel-created" ]]; then
SENTINEL_CREATED=1
if [[ "$3" == "x11" ]]; then
session_type="x11"
elif [[ "$3" == "wayland" ]]; then
session_type="wayland"
fi
fi
# Update config sentinel
if [[ -z $SENTINEL_CREATED ]]; then
[[ $EUID == 0 ]] && die "Running $0 as root is not allowed"
[[ -n ${HOME+x} ]] || die "No \$HOME variable"
config_dir="${XDG_CONF_DIR:-"$HOME/.config"}"
session_type=$(
cd "$HOME"
mkdir -p "$config_dir"
cd "$config_dir"
if [[ -f "steamos-session-type" ]]; then
cp steamos-session-type "$SENTINEL_FILE"
else
echo "x11" > "$SENTINEL_FILE"
fi
cat "$SENTINEL_FILE"
)
# If we were executed as a session user and then re-execute as root below, we don't want to set root's sentinel too
export SENTINEL_CREATED=1
fi
case "$session" in
plasma-wayland-persistent)
session_launcher="plasmawayland.desktop"
;;
plasma-x11-persistent)
session_launcher="plasma.desktop"
;;
plasma-x11-persistent)
session_launcher="plasmax11.desktop"
;;
plasma)
if [[ "$session_type" == "x11" ]]; then
session_launcher="xfce4-steamos-oneshot.desktop"
else
session_launcher="xfce4-steamos-wayland-oneshot.desktop"
fi
create_sentinel=1
session_launcher="xfce4-steamos-oneshot.desktop"
;;
plasma-wayland)
session_launcher="plasma-steamos-wayland-oneshot.desktop"
;;
gamescope)
session_launcher="gamescope-wayland.desktop"
@ -77,18 +53,7 @@ esac
echo "Updated user selected session to $session_launcher"
# Become root
if [[ $EUID != 0 ]]; then
exec pkexec "$(realpath $0)" "$session" --sentinel-created "$session_type"
exit 1
fi
{
echo "[Autologin]"
echo "Session=$session_launcher"
} > "$CONF_FILE"
echo "Updated system autologin session to $session_launcher"
systemctl reset-failed sddm
systemctl restart sddm
echo "Restarted SDDM"

View file

@ -1,7 +1,7 @@
[Desktop Entry]
Type=XSession
Exec=/usr/bin/startxfce4-steamos-oneshot
TryExec=/usr/bin/startxfce4-steamos-oneshot
Exec=/usr/bin/startplasma-steamos-oneshot /usr/bin/xfce4-session
TryExec=/usr/bin/startplasma-steamos-oneshot
DesktopNames=XFCE
Name=XFCE
Comment=XFCE4 - One Time Launch Redirect for SteamOS Sessions

View file

@ -1,6 +0,0 @@
[Desktop Entry]
Exec=/usr/bin/startxfce4-steamos-oneshot
TryExec=/usr/bin/startxfce4-steamos-oneshot
DesktopNames=XFCE
Name=XFCE
Comment=XFCE - One Time Launch Redirect for SteamOS Sessions

View file

@ -1,2 +0,0 @@
[Autologin]
Session=xfce4-steamos-oneshot.desktop