dell setup init

This commit is contained in:
Filip Rojek
2025-12-08 09:21:52 +00:00
parent dd0546309e
commit aa0a3c702c
4 changed files with 43 additions and 42 deletions

View File

@@ -7,13 +7,15 @@
export XDG_CURRENT_DESKTOP=river export XDG_CURRENT_DESKTOP=river
export XDG_SESSION_TYPE=wayland export XDG_SESSION_TYPE=wayland
export XCURSOR_SIZE=36
## Start portals ## Start portals
dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
xdg-desktop-portal-wlr & xdg-desktop-portal-wlr &
xdg-desktop-portal & xdg-desktop-portal &
## Start easyeffects ## Start easyeffects
flatpak run com.github.wwmm.easyeffects --gapplication-service & #flatpak run com.github.wwmm.easyeffects --gapplication-service &
# Mod1+Shift+Return to start an instance of foot (https://codeberg.org/dnkl/foot) # Mod1+Shift+Return to start an instance of foot (https://codeberg.org/dnkl/foot)
riverctl map normal Mod1+Shift Return spawn foot riverctl map normal Mod1+Shift Return spawn foot
@@ -183,7 +185,7 @@ riverctl map normal Mod1+Shift Print spawn "grim -g \"\$(slurp -p)\" -t ppm - |
riverctl focus-follows-cursor normal riverctl focus-follows-cursor normal
# Borders & Colors # Borders & Colors
riverctl background-color 0x002b36 riverctl background-color 0x202223
riverctl border-color-focused 0x93a1a1 riverctl border-color-focused 0x93a1a1
riverctl border-color-unfocused 0x586e75 riverctl border-color-unfocused 0x586e75
riverctl border-width 1 riverctl border-width 1

View File

@@ -2,7 +2,7 @@
"position": "bottom", "position": "bottom",
"modules-left": ["river/tags", "river/window"], "modules-left": ["river/tags", "river/window"],
"modules-center": [], "modules-center": [],
"modules-right": ["tray", "network", "custom/audio", "clock"], "modules-right": ["tray", "bluetooth", "network", "custom/audio", "battery", "clock"],
"river/tags": { "river/tags": {
"num-tags": 9 "num-tags": 9
@@ -51,14 +51,14 @@
//"on-click-right": "~/.scripts/restart_network.sh" //"on-click-right": "~/.scripts/restart_network.sh"
}, },
//"bluetooth": { "bluetooth": {
// "on-click": "foot bluetuith", "on-click": "foot bluetuith",
// "on-click-right": "~/.scripts/toggle_bluetooth.sh", "on-click-right": "~/.scripts/toggle_bluetooth.sh",
// "format-on": "󰂯", "format-on": "󰂯",
// "format-off": "󰂲", "format-off": "󰂲",
// "format-disabled": "󰂲", "format-disabled": "󰂲",
// "format-connected": "󰂱" "format-connected": "󰂱"
//}, },
//"wireplumber": { //"wireplumber": {
// "format": "{icon} {volume}%", // "format": "{icon} {volume}%",
@@ -87,19 +87,19 @@
"on-scroll-down": "pamixer --decrease 5" "on-scroll-down": "pamixer --decrease 5"
}, },
//"battery": { "battery": {
// "states": { "states": {
// "good": 95, "good": 95,
// "warning": 30, "warning": 30,
// "critical": 15 "critical": 15
// }, },
// "format":"{icon} {capacity}%", "format":"{icon} {capacity}%",
// "format-charging": "󰂄 {capacity}%", "format-charging": "󰂄 {capacity}%",
// "format-plugged": "󱐋", "format-plugged": "󱐋",
// "format-icons": ["󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"], "format-icons": ["󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"],
// "interval": 30, "interval": 30,
// "tooltip-format": "{time}", "tooltip-format": "{time}",
//}, },
"tray": { "tray": {
"spacing": 10 "spacing": 10

View File

@@ -1,33 +1,32 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Toggle default PipeWire sink between Steinberg UR22mkII and Starship/Matisse # Toggle default PipeWire sink between Built-in Audio and Cisco 700 USB Adapter
# sinks # Get sinks section
#STEINBERG_ID=60
#STARSHIP_ID=59
SINKS=$(wpctl status | sed -n '/Sinks:/,/Sources:/p') SINKS=$(wpctl status | sed -n '/Sinks:/,/Sources:/p')
# Extract IDs (ignore default *) and match specific names # Extract IDs (ignore default * and Easy Effects virtual sinks)
STARSHIP_ID=$(echo "$SINKS" | tr -d '*' | grep -i "Starship" | grep -v "Easy Effects" | awk '{print $2}' | tr -d '.') BUILTIN_ID=$(echo "$SINKS" | tr -d '*' | grep -i "Built-in Audio" | grep -v "Easy Effects" | awk '{print $2}' | tr -d '.')
STEINBERG_ID=$(echo "$SINKS" | tr -d '*' | grep -i "Steinberg" | grep -v "Easy Effects" | awk '{print $2}' | tr -d '.') CISCO_ID=$(echo "$SINKS" | tr -d '*' | grep -i "Cisco HS 730-0TG" | grep -v "Easy Effects" | awk '{print $2}' | tr -d '.')
# Get current default sink name (not just the ID) # Get current default sink name (not just the ID)
CURRENT_SINK=$(wpctl status | awk '/Audio\/Sink/ {print $3}') CURRENT_SINK=$(wpctl status | awk '/Audio\/Sink/ {print $3}')
# Detect which sink is active and toggle # Detect which sink is active and toggle
if [[ "$CURRENT_SINK" == *"Steinberg"* ]]; then if [[ "$CURRENT_SINK" == *"alsa_output.pci-0000_00_1f.3.analog-stereo"* ]]; then
echo "Switching to Starship/Matisse output..." echo "Switching to Cisco HS 730-0TG..."
wpctl set-default "$STARSHIP_ID" wpctl set-default "$CISCO_ID"
else else
echo "Switching to Steinberg UR22mkII output..." echo "Switching to Built-in Audio..."
wpctl set-default "$STEINBERG_ID" wpctl set-default "$BUILTIN_ID"
fi fi
# Optionally move active streams # Move active streams to new default sink
echo "Moving active streams to new sink..." echo "Moving active streams to new sink..."
for stream in $(wpctl status | awk '/\. Stream/{print $1}'); do for stream in $(wpctl status | awk '/\. Stream/ {print $1}'); do
wpctl move-stream "$stream" @DEFAULT_AUDIO_SINK@ 2>/dev/null wpctl move-stream "$stream" @DEFAULT_AUDIO_SINK@ 2>/dev/null
done done
# Confirm new default # Confirm new default
echo "New default sink:" echo "New default sink:"
wpctl status | grep "Audio/Sink" wpctl status | grep "Audio/Sink"

View File

@@ -9,13 +9,13 @@ muted=$(pamixer --get-mute)
# Determine alt value for Waybar # Determine alt value for Waybar
if [ "$muted" = "true" ]; then if [ "$muted" = "true" ]; then
case "$sink_name" in case "$sink_name" in
*Steinberg*) alt="headphones-muted" ;; *Cisco*) alt="headphones-muted" ;;
*) alt="speaker-muted" ;; *) alt="speaker-muted" ;;
esac esac
else else
case "$sink_name" in case "$sink_name" in
*Steinberg*) alt="headphones" ;; *Cisco*) alt="headphones" ;;
*) alt="speaker" ;; *) alt="speaker" ;;
esac esac
fi fi