mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-22 00:03:55 +01: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}_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}, 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}, 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)"''
|
||||
|
@ -7,6 +7,8 @@ let
|
||||
inherit (builtins) toJSON;
|
||||
|
||||
mullvadScript = "ironbar/mullvad.fish";
|
||||
volumeScript = "ironbar/volume.fish";
|
||||
volumeGet = "ironbar/volume-get.fish";
|
||||
in
|
||||
{
|
||||
home.packages = [ ironbar ];
|
||||
@ -46,8 +48,11 @@ in
|
||||
|
||||
end = [
|
||||
{
|
||||
type = "volume";
|
||||
format = "{icon} {percentage}%";
|
||||
type = "script";
|
||||
cmd = "~/.config/${volumeScript}";
|
||||
on_click_left = "swayosd-client --output-volume raise";
|
||||
on_click_right = "swayosd-client --output-volume lower";
|
||||
mode = "watch";
|
||||
}
|
||||
{
|
||||
type = "upower";
|
||||
@ -98,14 +103,6 @@ in
|
||||
padding-right: 0.7em;
|
||||
}
|
||||
|
||||
slider {
|
||||
background: #${base0D};
|
||||
}
|
||||
|
||||
trough {
|
||||
background: alpha(#${base04}, 0.4);
|
||||
}
|
||||
|
||||
.upower {
|
||||
padding-left: 0.2em;
|
||||
padding-right: 0.2em;
|
||||
@ -245,4 +242,30 @@ in
|
||||
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…
Reference in New Issue
Block a user