[terminal]
vt = 7
[default_session]
-command = "/usr/bin/sway"
+command = "/home/plom/startup.sh"
user = "plom"
+++ /dev/null
-.include /etc/pulse/default.pa
-set-default-sink alsa_output.platform-fef05700.hdmi.hdmi-stereo
-set-sink-volume @DEFAULT_SINK@ 50%
--- /dev/null
+#!/usr/bin/sh
+# Iinitalize anything we want in our sessions opened by greetd.
+
+# Workaround to pulseaudio daemon somehow not respecting setting these with
+# ~/.config/pulse/default.pa – note that the first pactl call also seems
+# necessary, probably for forcing some init routines without which the pacmd
+# calls that follow won't work; TODO: find cleaner solutions
+pactl list sinks > /dev/null
+pacmd set-default-sink alsa_output.platform-fef05700.hdmi.hdmi-stereo
+pacmd set-sink-volume alsa_output.platform-fef05700.hdmi.hdmi-stereo 32768
+
+# Wayland environment.
+/usr/bin/sway
# so Sway won't complain about failing to access non-existant background image file
sed -i '/^output \* bg/ s/^/#/' /etc/sway/config
-# Set up users and their environments.
+# Set up root environment.
for root in "${PATH_MANY}" '..'; do
copy_dirtree "${root}${PATH_REL_HOME}" '/root' all root
done
+
+# Set up user and their environment.
adduser --disabled-password --gecos "" "${USERNAME}"
usermod -a -G sudo "${USERNAME}"
for root in "${PATH_MANY}" '..'; do