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; 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 connects the workspace and taskbar together :3
*/ */

View file

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

View file

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