change audio so it supports audio over HDMI for TV's n shit

This commit is contained in:
KoenDR06 2026-03-13 00:05:12 +01:00
parent 20391c64fc
commit dc20d77889
6 changed files with 50 additions and 29 deletions

View file

@ -1,10 +1,8 @@
mapfile -t ids < <(wpctl status | sed -n '/Audio/,/Video/p' | sed -n '/├─ Sinks:/,/├─ Sources:/p' | tail -n +2 | head -n -2 | sed -r 's/^........//' | sed -r 's/\. .*//')
sinks=$(pactl --format json list sinks | jq '.[].description' | sed 's/"//g')
mapfile -t sinks < <(wpctl status | sed -n '/Audio/,/Video/p' | sed -n '/├─ Sinks:/,/├─ Sources:/p' | tail -n +2 | head -n -2 | sed -r 's/^........//' | sed -r 's/[0-9]+\. //')
ids=$(pactl --format json list sinks | jq '.[].index')
count=${#ids[@]}
a=$(printf '%s\n' "${sinks[@]}" | fuzzel --cache /dev/null --dmenu --index --minimal-lines -l $count --placeholder "Switch audio source: " -I)
a=$(printf '%s\n' "${sinks[@]}" | fuzzel --cache /dev/null --dmenu --index --minimal-lines --placeholder "Switch audio source: " -I)
if [ -n "$a" ]; then
wpctl set-default ${ids[a]}

View file

@ -54,6 +54,11 @@ in {
tree-sitter-grammars.tree-sitter-nix
nixd
cargo
rustc
rust-analyzer
tree-sitter-grammars.tree-sitter-rust
];
# QuickEMU USB Support

View file

@ -13,12 +13,10 @@ in {
};
config = mkIf cfg.enable {
services.pulseaudio.enable = false;
services.jack = {
jackd.enable = false;
alsa.enable = true;
loopback.enable = false;
services.pipewire.enable = false;
services.pulseaudio = {
enable = true;
support32Bit = true;
};
users.extraUsers.horseman.extraGroups = ["jackaudio"];
};
}

View file

@ -21,15 +21,33 @@ in {
"school" = {
movingAverageInterval = 10;
speedCurve = [
{ temp = 40; speed = 0; }
{ temp = 50; speed = 30; }
{ temp = 65; speed = 60; }
{ temp = 75; speed = 100; }
{
temp = 40;
speed = 0;
}
{
temp = 50;
speed = 30;
}
{
temp = 65;
speed = 60;
}
{
temp = 75;
speed = 100;
}
];
};
"full".speedCurve = [
{ temp = 0; speed = 100; }
{ temp = 100; speed = 100; }
{
temp = 0;
speed = 100;
}
{
temp = 100;
speed = 100;
}
];
};
};

View file

@ -21,6 +21,7 @@ in {
settings = {
main = {
capslock = "overload(control, esc)";
esc = "capslock";
};
};
};

View file

@ -64,6 +64,14 @@ in {
in "pkill fuzzel || ${a}/bin/sound-menu";
}
{
flags = [];
mods = ["SUPER"];
key = "SLASH";
dispatcher = "exec";
params = "pkill fuzzel || $(fuzzel --cache /dev/null --dmenu --placeholder \"Run shell command: \" -I --prompt-only \"> \")";
}
{
flags = [];
mods = ["SUPER"];
@ -460,42 +468,35 @@ in {
mods = [];
key = "XF86AudioRaiseVolume";
dispatcher = "exec";
params = "wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%+";
params = "pactl set-sink-volume @DEFAULT_SINK@ +5%";
}
{
flags = ["e" "l"];
mods = [];
key = "XF86AudioLowerVolume";
dispatcher = "exec";
params = "wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%-";
params = "pactl set-sink-volume @DEFAULT_SINK@ -5%";
}
{
flags = ["e" "l"];
mods = ["SHIFT"];
key = "XF86AudioRaiseVolume";
dispatcher = "exec";
params = "wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 1%+";
params = "pactl set-sink-volume @DEFAULT_SINK@ +1%";
}
{
flags = ["e" "l"];
mods = ["SHIFT"];
key = "XF86AudioLowerVolume";
dispatcher = "exec";
params = "wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 1%-";
params = "pactl set-sink-volume @DEFAULT_SINK@ -1%";
}
{
flags = ["e" "l"];
mods = [];
key = "XF86AudioMute";
dispatcher = "exec";
params = "wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 0%";
}
{
flags = ["e" "l"];
mods = [];
key = "XF86AudioMicMute";
dispatcher = "exec";
params = "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
params = "pactl set-sink-volume @DEFAULT_SINK@ 0%";
}
{
flags = ["e" "l"];