- added mpc config

- removed language from waybar
- corrected cycle_pactl.sh to ignoe headphone and hdmi outputs
- enabled icons in fuzzel
- enforcing suspend when closing the lid with no external monitor turned on
- corrected windowrules for jetbrain tools
This commit is contained in:
2026-02-13 21:43:03 +01:00
parent ee20ccb003
commit 9438964c80
6 changed files with 48 additions and 25 deletions

View File

@@ -2,16 +2,34 @@
set -e
default_sink=$(pactl info | grep "Default Sink:" | cut '-d ' -f3)
sinks=$(pactl list short sinks | cut -f2 | grep -v "^easyeffects_sink$")
# Only sinks that are available (not "not available")
sinks=$(pactl list sinks | awk '
$1=="Name:" {name=$2}
$1=="State:" {state=$2}
$1=="Availability:" {avail=$2}
$1=="" {
if (avail != "not") print name
name=state=avail=""
}
' | grep -Ev '(^easyeffects_sink$|HDMI)')
sinks=$(pactl list short sinks | cut -f2 | grep -Ev '(^easyeffects_sink$|HDMI|skl_hda_dsp_generic)')
# for wrap-around
sinks="$sinks
$sinks"
next_sink=$(echo "$sinks" | awk "/$default_sink/{getline x;print x;exit;}")
next_sink=$(echo "$sinks" | awk -v ds="$default_sink" '$0==ds {getline x; print x; exit}')
if [ -z "$next_sink" ]; then
next_sink=$(echo "$sinks" | head -n 1)
fi
echo "Setting output to $next_sink"
pactl set-default-sink "$next_sink"
easyeffects_id=$(pactl list short sinks | awk '$2=="easyeffects_sink" {print $1; exit}')
pactl list short sink-inputs | \
cut -f1 | \
xargs -I{} pactl move-sink-input {} "$next_sink"
xargs -I{} pactl move-sink-input {} "$next_sink"

View File

@@ -22,6 +22,7 @@ if [ "$external_on_count" -eq 0 ]; then
#debounce hyprlock
pgrep -x hyprlock >/dev/null || hyprlock
systemctl suspend-then-hibernatehyprctl
else
# docked, we turn off internal screen
hyprctl keyword monitor "$INTERNAL, disable"