foxygit / dotfiles Log in
commit a4e5578974a583bdf926dc3b0ebc921530ca20d4
Author:     MrJensK <jens.se@icloud.com>
AuthorDate: Thu May 14 11:38:10 2026 +0200
Commit:     MrJensK <jens.se@icloud.com>
CommitDate: Thu May 14 11:38:10 2026 +0200

    Update install script to include additional audio packages and configure autostart for X
---
 install.sh | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/install.sh b/install.sh
index 8313a91..22d17b3 100644
--- a/install.sh
+++ b/install.sh
@@ -20,7 +20,10 @@ sudo apt-get install -y \
     xinit \
     firefox-esr \
     dmenu \
-    kitty
+    kitty \
+    pipewire-audio \
+    alsa-utils \
+    patch

 mkdir -p "$BUILD_DIR"
 cd "$BUILD_DIR"
@@ -86,7 +89,6 @@ xset dpms 300 300 300
 # Svenskt tangentbord
 setxkbmap se

-# Jens SXbar
 exec sxwm
 EOF
     chmod +x "$HOME/.xinitrc"
@@ -100,5 +102,19 @@ else
     echo "  exec sxwm"
 fi

+echo "==> Konfigurerar autostart av X på TTY1..."
+BASH_PROFILE="$HOME/.bash_profile"
+AUTOSTART='if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then exec startx; fi'
+if grep -qF 'exec startx' "$BASH_PROFILE" 2>/dev/null; then
+    echo "    ~/.bash_profile redan konfigurerad, hoppar över"
+else
+    echo "" >> "$BASH_PROFILE"
+    echo "$AUTOSTART" >> "$BASH_PROFILE"
+    echo "    ~/.bash_profile uppdaterad"
+fi
+
+echo "==> Aktiverar PipeWire..."
+systemctl --user enable --now pipewire pipewire-pulse wireplumber
+
 echo ""
 echo "Installation slutförd!"