1
0
Fork 0
forked from foxora/nix

added audio source controls :3

This commit is contained in:
foxora 2026-03-22 13:15:50 +00:00
parent ab94f48294
commit ae6f3d7438
3 changed files with 55 additions and 5 deletions

View file

@ -102,6 +102,16 @@ right-side modules
color: @colorfg;
}
#pulseaudio.sink {
margin: 4px 0 4px 4px;
border-radius: 32px 0px 0px 32px;
}
#pulseaudio.source {
margin: 4px 0 4px 0;
border-radius: 0px 32px 32px 0px;
border-width: 1px 1px 1px 0px;
}
/*
connects the workspace and taskbar together :3
*/

View file

@ -6,24 +6,45 @@
layer = "top";
position = "top";
height = 20;
modules-left = ["hyprland/workspaces" "wlr/taskbar" "custom/media"];
modules-center = ["clock"];
modules-right = ["hyprland/submap" "cpu" "memory" "network" "pulseaudio" "privacy" "tray"];
modules-left = [
"hyprland/workspaces"
"wlr/taskbar"
"custom/media"
];
modules-center = [
"clock"
];
modules-right = [
"hyprland/submap"
"cpu"
"memory"
"network"
"pulseaudio#sink"
"pulseaudio#source"
"privacy"
"tray"
];
# left
"hyprland/workspaces" = {
format = "{id}";
};
# not enabled yet, hyprland and mango need two different configs ;-;
"ext/workspaces" = {
# not enabled yet, hyprland and mango need two different configs ;-;
format = "{id}";
ignore-hidden = true;
on-click = "activate";
};
"wlr/taskbar" = {
format = "{icon}";
icon-size = 12;
};
"custom/media" = {
exec = "auroramedia";
return-type = "json";
@ -46,14 +67,17 @@
max-length = 12;
tooltip = false;
};
"cpu" = {
format = " {usage}%";
interval = 1;
};
"memory" = {
format = " {used:0.1f} / {total:0.1f} GiB";
interval = 1;
};
"network" = {
format = "{bandwidthUpBytes} {bandwidthDownBytes} {ifname}";
format-wifi = " {bandwidthUpBytes} {bandwidthDownBytes} ";
@ -62,7 +86,8 @@
interval = 1;
max-length = 32;
};
"pulseaudio" = {
"pulseaudio#sink" = {
format = "{icon} {volume}%";
format-muted = " {volume}%";
format-icons = {
@ -73,7 +98,18 @@
];
};
"scroll-step" = 5;
tooltip = true;
};
"pulseaudio#source" = {
format = "{format_source}";
format-source = " {volume}%";
format-source-muted = " {volume}%";
on-scroll-up = "wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SOURCE@ 5%+";
on-scroll-down = "wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SOURCE@ 5%-";
tooltip = true;
};
"privacy" = {
icon-size = 12;
icon-spacing = 5;
@ -91,6 +127,7 @@
}
];
};
"tray" = {
icon-size = 12;
spacing = 10;

View file

@ -148,6 +148,7 @@
# media binds (more in binde below)
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
"Ctrl_R, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
", XF86AudioPlay, exec, playerctl play-pause"
", XF86AudioNext, exec, playerctl next"
", XF86AudioPrev, exec, playerctl previous"
@ -258,6 +259,8 @@
binde = [
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%+"
", XF86AudioLowerVolume, exec, wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%-"
"Ctrl_R, XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SOURCE@ 5%+"
"Ctrl_R, XF86AudioLowerVolume, exec, wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SOURCE@ 5%-"
"Shift_R, XF86AudioRaiseVolume, exec, playerctl volume 0.05+"
"Shift_R, XF86AudioLowerVolume, exec, playerctl volume 0.05-"