mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-06-03 00:15:35 +02:00
Revert "ironbar: Add attempt at using volume module"
The volume module currently has a bug that causes audio output to stop working when plugging in new devices. Upstream issue: https://github.com/JakeStanger/ironbar/issues/673
This commit is contained in:
parent
eec082cb01
commit
a364b76da2
@ -212,7 +212,7 @@ in
|
|||||||
"${super}, S, swapactiveworkspaces, 0 1"
|
"${super}, S, swapactiveworkspaces, 0 1"
|
||||||
"${super}_SHIFT, S, movetoworkspace, special"
|
"${super}_SHIFT, S, movetoworkspace, special"
|
||||||
"${super}_SHIFT, A, exec, killall activate-linux || activate-linux -s 1.15 -x 412 -y 120 -c 1-1-1-0.05"
|
"${super}_SHIFT, A, exec, killall activate-linux || activate-linux -s 1.15 -x 412 -y 120 -c 1-1-1-0.05"
|
||||||
"${super}, O, exec, killall .ironbar-wrapper inotifywait || ironbar"
|
"${super}, O, exec, killall .ironbar-wrapper inotifywait pactl || ironbar"
|
||||||
"${super}_SHIFT, O, exec, eww close overlay || eww open overlay"
|
"${super}_SHIFT, O, exec, eww close overlay || eww open overlay"
|
||||||
''${super}, comma, exec, playerctl -p mpv position "5-" && ${notifySend} "Minus 5 seconds" "$(playerctl -p mpv position)"''
|
''${super}, comma, exec, playerctl -p mpv position "5-" && ${notifySend} "Minus 5 seconds" "$(playerctl -p mpv position)"''
|
||||||
''${super}, period, exec, playerctl -p mpv position "5+" && ${notifySend} "Plus 5 seconds" "$(playerctl -p mpv position)"''
|
''${super}, period, exec, playerctl -p mpv position "5+" && ${notifySend} "Plus 5 seconds" "$(playerctl -p mpv position)"''
|
||||||
|
@ -7,6 +7,8 @@ let
|
|||||||
inherit (builtins) toJSON;
|
inherit (builtins) toJSON;
|
||||||
|
|
||||||
mullvadScript = "ironbar/mullvad.fish";
|
mullvadScript = "ironbar/mullvad.fish";
|
||||||
|
volumeScript = "ironbar/volume.fish";
|
||||||
|
volumeGet = "ironbar/volume-get.fish";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
home.packages = [ ironbar ];
|
home.packages = [ ironbar ];
|
||||||
@ -46,8 +48,11 @@ in
|
|||||||
|
|
||||||
end = [
|
end = [
|
||||||
{
|
{
|
||||||
type = "volume";
|
type = "script";
|
||||||
format = "{icon} {percentage}%";
|
cmd = "~/.config/${volumeScript}";
|
||||||
|
on_click_left = "swayosd-client --output-volume raise";
|
||||||
|
on_click_right = "swayosd-client --output-volume lower";
|
||||||
|
mode = "watch";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
type = "upower";
|
type = "upower";
|
||||||
@ -98,14 +103,6 @@ in
|
|||||||
padding-right: 0.7em;
|
padding-right: 0.7em;
|
||||||
}
|
}
|
||||||
|
|
||||||
slider {
|
|
||||||
background: #${base0D};
|
|
||||||
}
|
|
||||||
|
|
||||||
trough {
|
|
||||||
background: alpha(#${base04}, 0.4);
|
|
||||||
}
|
|
||||||
|
|
||||||
.upower {
|
.upower {
|
||||||
padding-left: 0.2em;
|
padding-left: 0.2em;
|
||||||
padding-right: 0.2em;
|
padding-right: 0.2em;
|
||||||
@ -245,4 +242,30 @@ in
|
|||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
xdg.configFile.${volumeScript} = {
|
||||||
|
executable = true;
|
||||||
|
text = /* fish */ ''
|
||||||
|
#!/usr/bin/env fish
|
||||||
|
|
||||||
|
function get_volume
|
||||||
|
set VOLUME (wpctl get-volume @DEFAULT_AUDIO_SINK@ | choose 1)
|
||||||
|
echo "音量:$(math "$VOLUME * 100")%"
|
||||||
|
end
|
||||||
|
|
||||||
|
~/.config/${volumeGet}
|
||||||
|
|
||||||
|
pactl subscribe | grep --line-buffered -e "シンク" | xargs -L 1 ~/.config/${volumeGet}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.configFile.${volumeGet} = {
|
||||||
|
executable = true;
|
||||||
|
text = /* fish */ ''
|
||||||
|
#!/usr/bin/env fish
|
||||||
|
|
||||||
|
set VOLUME (wpctl get-volume @DEFAULT_AUDIO_SINK@ | choose 1)
|
||||||
|
echo "音量:$(math "$VOLUME * 100")%"
|
||||||
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user