Added fix for 18ch audio. Updated scripts
This commit is contained in:
parent
e737e49210
commit
51d2f2a7cc
@ -7,7 +7,6 @@ monitor=,2560x1440,auto,1
|
||||
### MY PROGRAMS ###
|
||||
###################
|
||||
$terminal = kitty
|
||||
$fileManager = dolphin
|
||||
$browser = brave --new-window --hide-crash-restore-bubble
|
||||
$moonlight = com.moonlight_stream.Moonlight
|
||||
|
||||
@ -18,6 +17,7 @@ exec = gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark" # fo
|
||||
exec = gsettings set org.gnome.desktop.interface color-scheme "prefer-dark" # for GTK4 apps
|
||||
|
||||
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||
exec-once = /home/cm/linuxbox/set-xr18-2ch.sh
|
||||
exec-once = udiskie
|
||||
exec-once = waybar
|
||||
exec-once = systemctl --user start sunshine
|
||||
@ -180,6 +180,7 @@ bind = $mainMod, D, togglespecialworkspace, discord
|
||||
bind = $mainMod, W, togglespecialworkspace, web
|
||||
bind = $mainMod, F, togglespecialworkspace, fzfmenu
|
||||
bind = $mainMod, V, togglespecialworkspace, mixer
|
||||
bind = $mainMod, A, togglespecialworkspace, ranger
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
bind = $mainMod, left, movefocus, l
|
||||
@ -266,6 +267,11 @@ windowrulev2 = float, onworkspace:special:btop
|
||||
windowrulev2 = size 80% 80%, onworkspace:special:btop
|
||||
workspace = special:btop, on-created-empty:kitty btop
|
||||
|
||||
# Ranger
|
||||
windowrulev2 = float, onworkspace:special:ranger
|
||||
windowrulev2 = size 80% 80%, onworkspace:special:ranger
|
||||
workspace = special:ranger, on-created-empty:kitty ranger
|
||||
|
||||
# Discord
|
||||
windowrulev2 = size 450 253, initialTitle:^(Discord Popout)$
|
||||
windowrulev2 = float, onworkspace:special:discord
|
||||
|
||||
@ -7,7 +7,6 @@ monitor=,2560x1440,auto,1
|
||||
### MY PROGRAMS ###
|
||||
###################
|
||||
$terminal = kitty
|
||||
$fileManager = kitty ranger
|
||||
$browser = brave --new-window --hide-crash-restore-bubble
|
||||
|
||||
#################
|
||||
@ -17,6 +16,7 @@ exec = gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark" # fo
|
||||
exec = gsettings set org.gnome.desktop.interface color-scheme "prefer-dark" # for GTK4 apps
|
||||
|
||||
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||
exec-once = /home/cm/linuxbox/set-xr18-2ch.sh
|
||||
exec-once = udiskie
|
||||
exec-once = sudo udisksctl mount -b /dev/sda1
|
||||
exec-once = waybar
|
||||
@ -178,6 +178,7 @@ bind = $mainMod, D, togglespecialworkspace, discord
|
||||
bind = $mainMod, W, togglespecialworkspace, web
|
||||
bind = $mainMod, F, togglespecialworkspace, fzfmenu
|
||||
bind = $mainMod, V, togglespecialworkspace, mixer
|
||||
bind = $mainMod, A, togglespecialworkspace, ranger
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
bind = $mainMod, left, movefocus, l
|
||||
@ -264,6 +265,11 @@ windowrulev2 = float, onworkspace:special:btop
|
||||
windowrulev2 = size 80% 80%, onworkspace:special:btop
|
||||
workspace = special:btop, on-created-empty:kitty btop
|
||||
|
||||
# Ranger
|
||||
windowrulev2 = float, onworkspace:special:ranger
|
||||
windowrulev2 = size 80% 80%, onworkspace:special:ranger
|
||||
workspace = special:ranger, on-created-empty:kitty ranger
|
||||
|
||||
# Discord
|
||||
windowrulev2 = size 450 253, initialTitle:^(Discord Popout)$
|
||||
windowrulev2 = float, onworkspace:special:discord
|
||||
|
||||
29
set-xr18-2ch.sh
Executable file
29
set-xr18-2ch.sh
Executable file
@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Wait a bit for the device to be ready
|
||||
sleep 2
|
||||
|
||||
# Function to find the sink
|
||||
find_sink() {
|
||||
pactl list short sinks | grep "alsa_output.usb-BEHRINGER_X18" | awk '{print $2}'
|
||||
}
|
||||
|
||||
# Wait until the sink is found
|
||||
SINK_NAME=""
|
||||
while [ -z "$SINK_NAME" ]; do
|
||||
SINK_NAME=$(find_sink)
|
||||
if [ -n "$SINK_NAME" ]; then
|
||||
echo "Sink found: $SINK_NAME"
|
||||
else
|
||||
echo "Sink not found. Retrying..."
|
||||
sleep 2 # Wait for 2 seconds before trying again
|
||||
fi
|
||||
done
|
||||
|
||||
# Force to stereo (2 channels) once the sink is found
|
||||
if [ -n "$SINK_NAME" ]; then
|
||||
if ! pactl list short modules | grep -q "sink_name=xr18_stereo"; then
|
||||
pactl load-module module-remap-sink sink_name=xr18_stereo master=$SINK_NAME channels=2 channel_map=front-left,front-right
|
||||
pactl set-default-sink xr18_stereo
|
||||
fi
|
||||
fi
|
||||
@ -24,7 +24,7 @@ echo -e ' \e[H\e[2J
|
||||
|
||||
\e[1;32mCMtec '$HOSTNAME' install/Update script\e[0;37m
|
||||
'
|
||||
sleep 3
|
||||
sleep 1
|
||||
|
||||
# Create backup/snapshot
|
||||
if pacman -Qs timeshift >/dev/null; then
|
||||
@ -170,7 +170,7 @@ sudo touch /etc/security/autologin.conf
|
||||
# Install udisk
|
||||
printf -- '\033[33m Installing udisk\n\033[37m'
|
||||
sudo pacman --noconfirm --needed -S udisks2 udiskie
|
||||
echo 'ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{UDISKS_FILESYSTEM_SHARED}="1"' | sudo tee /etc/udev/rules.d/99-udisks2.rules
|
||||
echo 'ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{UDISKS_FILESYSTEM_SHARED}="1"' | sudo tee /lib/udev/rules.d/99-udisks2.rules
|
||||
echo 'D /media 0755 root root 0 -' | sudo tee /etc/tmpfiles.d/media.conf
|
||||
if [ "$HOSTNAME" == "STEAMBOX" ]; then
|
||||
echo "$USER ALL=(ALL:ALL) NOPASSWD: /usr/sbin/udisksctl mount -b /dev/sda1" | sudo tee /etc/sudoers.d/udisksctl
|
||||
@ -452,7 +452,7 @@ sudo pacman --noconfirm --needed -S timeshift
|
||||
printf -- '\033[33m Installing Sunshine\n\033[37m'
|
||||
sudo pacman --noconfirm --needed -S intel-media-driver
|
||||
yay --noconfirm --needed -S sunshine
|
||||
echo 'KERNEL=="uinput", SUBSYSTEM=="misc", OPTIONS+="static_node=uinput", TAG+="uaccess"' | sudo tee /etc/udev/rules.d/60-sunshine.rules
|
||||
# echo 'KERNEL=="uinput", SUBSYSTEM=="misc", OPTIONS+="static_node=uinput", TAG+="uaccess"' | sudo tee /lib/udev/rules.d/60-sunshine.rules
|
||||
mkdir -p ~/.config/systemd/user
|
||||
cp -f ~/linuxbox/config/systemd/user/sunshine.service ~/.config/systemd/user/sunshine.service
|
||||
sudo udevadm control --reload-rules
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user