️ (home) replace pamixer by wpctl

This commit is contained in:
Laureηt 2024-07-04 18:35:36 +02:00
parent c34216eb52
commit bd2029db7d
Signed by: Laurent
SSH key fingerprint: SHA256:pb5NrYg80So5z9hmqQFPmp//sgr+DFeJkKhmGyU2NLk
3 changed files with 7 additions and 14 deletions

View file

@ -37,27 +37,22 @@
(metric
:label "󰕾"
:value volume
:onchange "pamixer --set-volume {}"
)
(metric
:label "󱐋"
:value {EWW_BATTERY.total_avg}
:onchange ""
)
(metric
:label "󰋊"
:value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)}
:onchange ""
)
(metric
:label ""
:value {EWW_RAM.used_mem_perc}
:onchange ""
)
(metric
:label "󰍛"
:value {EWW_CPU.avg}
:onchange ""
)
time
)
@ -103,7 +98,7 @@
)
)
(defwidget metric [label value onchange]
(defwidget metric [label value]
(box
:orientation "h"
:class "metric"
@ -115,16 +110,14 @@
(scale
:min 0
:max 100
:active {onchange != ""}
:value value
:onchange onchange
)
)
)
(defpoll volume
:interval "1s"
"pamixer --get-volume"
"wpctl get-volume @DEFAULT_AUDIO_SINK@ | tr -dc '0-9' | sed 's/^0*//'"
)
(defpoll time

View file

@ -117,10 +117,10 @@ in {
", XF86MonBrightnessDown, exec, ${lib.getExe pkgs.light} -U 5"
# Audio
", XF86AudioMute, exec, ${lib.getExe pkgs.pamixer} --sink 0 -t"
", XF86AudioRaiseVolume, exec, ${lib.getExe pkgs.pamixer} -i 5"
", XF86AudioLowerVolume, exec, ${lib.getExe pkgs.pamixer} -d 5"
", XF86AudioMicMute, exec, ${lib.getExe pkgs.pamixer} --source 0 -t"
", XF86AudioMute, exec, ${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
", XF86AudioRaiseVolume, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05+"
", XF86AudioLowerVolume, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05-"
", XF86AudioMicMute, exec, ${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
", XF86AudioPlay, exec, ${lib.getExe pkgs.playerctl} play-pause"
", XF86AudioStop, exec, ${lib.getExe pkgs.playerctl} stop"
", XF86AudioNext, exec, ${lib.getExe pkgs.playerctl} next"

View file

@ -18,7 +18,7 @@
pwgen # password generator
rsync # better scp
socat # socket cat
sysz # better systemctl
sysz # tui for systemctl
xdg-utils
];
}