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 --placeholder "Switch audio source: " -I)
a=$(printf '%s\n' "${sinks[@]}" | fuzzel --cache /dev/null --dmenu --index --minimal-lines -l $count --placeholder "Switch audio source: " -I)
if [ -n "$a" ]; then if [ -n "$a" ]; then
wpctl set-default ${ids[a]} wpctl set-default ${ids[a]}

View file

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

View file

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

View file

@ -21,15 +21,33 @@ in {
"school" = { "school" = {
movingAverageInterval = 10; movingAverageInterval = 10;
speedCurve = [ speedCurve = [
{ temp = 40; speed = 0; } {
{ temp = 50; speed = 30; } temp = 40;
{ temp = 65; speed = 60; } speed = 0;
{ temp = 75; speed = 100; } }
{
temp = 50;
speed = 30;
}
{
temp = 65;
speed = 60;
}
{
temp = 75;
speed = 100;
}
]; ];
}; };
"full".speedCurve = [ "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 = { settings = {
main = { main = {
capslock = "overload(control, esc)"; capslock = "overload(control, esc)";
esc = "capslock";
}; };
}; };
}; };

View file

@ -64,6 +64,14 @@ in {
in "pkill fuzzel || ${a}/bin/sound-menu"; 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 = []; flags = [];
mods = ["SUPER"]; mods = ["SUPER"];
@ -460,42 +468,35 @@ in {
mods = []; mods = [];
key = "XF86AudioRaiseVolume"; key = "XF86AudioRaiseVolume";
dispatcher = "exec"; dispatcher = "exec";
params = "wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%+"; params = "pactl set-sink-volume @DEFAULT_SINK@ +5%";
} }
{ {
flags = ["e" "l"]; flags = ["e" "l"];
mods = []; mods = [];
key = "XF86AudioLowerVolume"; key = "XF86AudioLowerVolume";
dispatcher = "exec"; dispatcher = "exec";
params = "wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%-"; params = "pactl set-sink-volume @DEFAULT_SINK@ -5%";
} }
{ {
flags = ["e" "l"]; flags = ["e" "l"];
mods = ["SHIFT"]; mods = ["SHIFT"];
key = "XF86AudioRaiseVolume"; key = "XF86AudioRaiseVolume";
dispatcher = "exec"; dispatcher = "exec";
params = "wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 1%+"; params = "pactl set-sink-volume @DEFAULT_SINK@ +1%";
} }
{ {
flags = ["e" "l"]; flags = ["e" "l"];
mods = ["SHIFT"]; mods = ["SHIFT"];
key = "XF86AudioLowerVolume"; key = "XF86AudioLowerVolume";
dispatcher = "exec"; dispatcher = "exec";
params = "wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 1%-"; params = "pactl set-sink-volume @DEFAULT_SINK@ -1%";
} }
{ {
flags = ["e" "l"]; flags = ["e" "l"];
mods = []; mods = [];
key = "XF86AudioMute"; key = "XF86AudioMute";
dispatcher = "exec"; dispatcher = "exec";
params = "wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 0%"; params = "pactl set-sink-volume @DEFAULT_SINK@ 0%";
}
{
flags = ["e" "l"];
mods = [];
key = "XF86AudioMicMute";
dispatcher = "exec";
params = "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
} }
{ {
flags = ["e" "l"]; flags = ["e" "l"];