1
1
Fork 0

waybar: add equalizer indicator

Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
Myned 2024-10-14 18:33:23 -05:00
parent ae00cbe12e
commit 7212ea634f
Signed by: myned
GPG key ID: C7224454F7881A34
2 changed files with 20 additions and 3 deletions

View file

@ -5,11 +5,14 @@
... ...
}: }:
with lib; let with lib; let
audio = config.home-manager.users.${config.custom.username}.home.file.".local/bin/audio".source;
bash = "${pkgs.bash}/bin/bash"; bash = "${pkgs.bash}/bin/bash";
blueberry = "${pkgs.blueberry}/bin/blueberry"; blueberry = "${pkgs.blueberry}/bin/blueberry";
bluetoothctl = "${pkgs.bluez}/bin/bluetoothctl"; bluetoothctl = "${pkgs.bluez}/bin/bluetoothctl";
cat = "${pkgs.coreutils}/bin/cat";
easyeffects = "${pkgs.easyeffects}/bin/easyeffects"; easyeffects = "${pkgs.easyeffects}/bin/easyeffects";
echo = "${pkgs.coreutils}/bin/echo"; echo = "${pkgs.coreutils}/bin/echo";
grep = "${pkgs.gnugrep}/bin/grep";
hyprctl = "${config.programs.hyprland.package}/bin/hyprctl"; hyprctl = "${config.programs.hyprland.package}/bin/hyprctl";
inhibit = config.home-manager.users.${config.custom.username}.home.file.".local/bin/inhibit".source; inhibit = config.home-manager.users.${config.custom.username}.home.file.".local/bin/inhibit".source;
jq = "${pkgs.jq}/bin/jq"; jq = "${pkgs.jq}/bin/jq";
@ -23,13 +26,12 @@ with lib; let
power = config.home-manager.users.${config.custom.username}.home.file.".local/bin/power".source; power = config.home-manager.users.${config.custom.username}.home.file.".local/bin/power".source;
rfkill = "${pkgs.util-linux}/bin/rfkill"; rfkill = "${pkgs.util-linux}/bin/rfkill";
sleep = "${pkgs.coreutils}/bin/sleep"; sleep = "${pkgs.coreutils}/bin/sleep";
swaync-client = "${ swaync-client = "${config.home-manager.users.${config.custom.username}.services.swaync.package}/bin/swaync-client";
config.home-manager.users.${config.custom.username}.services.swaync.package
}/bin/swaync-client";
swayosd-client = "${pkgs.swayosd}/bin/swayosd-client"; swayosd-client = "${pkgs.swayosd}/bin/swayosd-client";
systemctl = "${pkgs.systemd}/bin/systemctl"; systemctl = "${pkgs.systemd}/bin/systemctl";
systemd-inhibit = "${pkgs.systemd}/bin/systemd-inhibit"; systemd-inhibit = "${pkgs.systemd}/bin/systemd-inhibit";
tailscale = "${pkgs.tailscale}/bin/tailscale"; tailscale = "${pkgs.tailscale}/bin/tailscale";
tr = "${pkgs.coreutils}/bin/tr";
vm = config.home-manager.users.${config.custom.username}.home.file.".local/bin/vm".source; vm = config.home-manager.users.${config.custom.username}.home.file.".local/bin/vm".source;
vpn = config.home-manager.users.${config.custom.username}.home.file.".local/bin/vpn".source; vpn = config.home-manager.users.${config.custom.username}.home.file.".local/bin/vpn".source;
wttrbar = "${pkgs.wttrbar}/bin/wttrbar"; wttrbar = "${pkgs.wttrbar}/bin/wttrbar";
@ -119,6 +121,7 @@ in {
modules-right = [ modules-right = [
"mpris" "mpris"
"tray" "tray"
"custom/equalizer"
"wireplumber" "wireplumber"
"bluetooth" "bluetooth"
"network" "network"
@ -232,6 +235,16 @@ in {
reverse = true; reverse = true;
}; };
"custom/equalizer" = {
interval = 5;
on-click = audio;
exec = pkgs.writeShellScript "equalizer.sh" ''
${echo} 󰺢
${echo} "$(${cat} ~/.audio)"
${echo} "$(${cat} ~/.audio | ${tr} '[:upper:]' '[:lower:]')"
'';
};
# https://github.com/Alexays/Waybar/wiki/Module:-MPRIS # https://github.com/Alexays/Waybar/wiki/Module:-MPRIS
mpris = { mpris = {
format = "{player_icon} {dynamic}"; format = "{player_icon} {dynamic}";

View file

@ -64,6 +64,10 @@ tooltip {
color: #dc322f; color: #dc322f;
} }
#custom-equalizer.normalizer {
color: #2aa198;
}
#custom-inhibitor.enabled { #custom-inhibitor.enabled {
color: #cb4b16; color: #cb4b16;
} }