mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-24 17:23:09 +01:00
ironbar: Add attempt at using volume module
This was my attempt at using the volume module, however I'd rather not have to deal with using the small sliders that are extremely difficult to see with the GTK theme I'm using. I tried changing the colors with color, background, and border-color, however I wasn't able to achieve the appearance I wanted, and disabling the built-in popup results in a buggy left-clicking experience.
This commit is contained in:
parent
b5fff96a91
commit
b3cfdaab9a
@ -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 pactl || ironbar"
|
||||
"${super}, O, exec, killall .ironbar-wrapper inotifywait || 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,8 +7,6 @@ let
|
||||
inherit (builtins) toJSON;
|
||||
|
||||
mullvadScript = "ironbar/mullvad.fish";
|
||||
volumeScript = "ironbar/volume.fish";
|
||||
volumeGet = "ironbar/volume-get.fish";
|
||||
in
|
||||
{
|
||||
home.packages = [ ironbar ];
|
||||
@ -51,11 +49,11 @@ in
|
||||
type = "tray";
|
||||
}
|
||||
{
|
||||
type = "script";
|
||||
cmd = "~/.config/${volumeScript}";
|
||||
type = "volume";
|
||||
format = "{icon} {percentage}%";
|
||||
on_click_left = "swayosd-client --output-volume raise";
|
||||
on_click_right = "swayosd-client --output-volume lower";
|
||||
mode = "watch";
|
||||
disable_popup = true;
|
||||
}
|
||||
{
|
||||
type = "upower";
|
||||
@ -98,6 +96,10 @@ in
|
||||
padding-right: 0.5em;
|
||||
}
|
||||
|
||||
.volume:hover {
|
||||
background: inherit;
|
||||
}
|
||||
|
||||
.upower {
|
||||
padding-left: 0.2em;
|
||||
padding-right: 0.2em;
|
||||
@ -233,30 +235,4 @@ 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