From b90854bf91bba05e702e6081b5a3f62bf9404540 Mon Sep 17 00:00:00 2001 From: Thomas Ulmer Date: Sat, 10 Jan 2026 17:34:28 -0800 Subject: init: auto config for pulse vs pipewire --- bash_profile | 6 ++++++ xinitrc | 10 +++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/bash_profile b/bash_profile index 05b61f8..88f4ed4 100644 --- a/bash_profile +++ b/bash_profile @@ -1,5 +1,11 @@ # This file is sourced by bash for login shells. The following line # runs your .bashrc and is recommended by the bash info pages. + +# Ensure XDG_RUNTIME_DIR is set +if test -z "$XDG_RUNTIME_DIR"; then + export XDG_RUNTIME_DIR=$(mktemp -d /tmp/$(id -u)-runtime-dir.XXX) +fi + if [[ -f ~/.bashrc ]] ; then . ~/.bashrc fi diff --git a/xinitrc b/xinitrc index 88e7a9a..9f7e1d3 100644 --- a/xinitrc +++ b/xinitrc @@ -2,11 +2,15 @@ set -x xset r rate 210 35 setxkbmap -layout us,us -variant ,colemak -option grp:rctrl_toggle -pulseaudio -k -pulseaudio -D + +if [[ $(uname -a) == *"gentoo"* ]]; then +AUDIO="gentoo-pipewire-launcher restart & disown" +else +AUDIO="pulseaudio -k; pulseaudio -D" +fi ~/.fehbg & slstatus & unclutter --timeout 3 --hide-on-key-press & WM=${2:-dwm} -dbus-launch --exit-with-session ${WM} +exec dbus-launch --exit-with-session bash -c "${AUDIO}; exec ${WM}" -- cgit v1.2.3