Skip to content

Commit

Permalink
+ pw-vol
Browse files Browse the repository at this point in the history
  • Loading branch information
oluceps committed Jul 27, 2024
1 parent 69ac40e commit d91c31b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
7 changes: 4 additions & 3 deletions home/sway/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
let
wl-copy = "${pkgs.wl-clipboard}/bin/wl-copy";
wl-paste = "${pkgs.wl-clipboard}/bin/wl-paste";
pw-volume = "${pkgs.pw-volume}/bin/pw-volume";
genDeps = n: lib.genAttrs n (name: lib.getExe pkgs.${name});
bg = "${
pkgs.fetchurl {
Expand Down Expand Up @@ -77,7 +78,7 @@ in
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
client.background a7c080
bindsym --no-repeat XF86AudioMute exec pamixer --toggle-mute
bindsym --no-repeat XF86AudioMute exec "${pw-volume} mute toggle; pkill -RTMIN+8 waybar"
bindsym Alt+Print exec ${deps.grim} - | ${wl-copy} -t image/png
bindsym Ctrl+Shift+l exec ${lib.getExe pkgs.swaylock}
bindsym Mod4+0 workspace number 10
Expand Down Expand Up @@ -152,8 +153,8 @@ in
bindsym Mod4+v splitv
bindsym Mod4+w layout tabbed
bindsym Print exec ${lib.getExe pkgs.sway-contrib.grimshot} copy area
bindsym XF86AudioLowerVolume exec pamixer -d 5
bindsym XF86AudioRaiseVolume exec pamixer -i 5
bindsym XF86AudioLowerVolume exec "${pw-volume} change -2.5%; pkill -RTMIN+8 waybar"
bindsym XF86AudioRaiseVolume exec "${pw-volume} change +2.5%; pkill -RTMIN+8 waybar"
bindsym XF86MonBrightnessUp exec brightnessctl set +3%
bindsym XF86MonBrightnessdown exec brightnessctl set 3%-
Expand Down
12 changes: 12 additions & 0 deletions home/waybar/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"cpu",
"memory",
"battery",
"custom/pipewire"
],
"network": {
"format": "{bandwidthDownOctets}",
Expand All @@ -87,6 +88,17 @@
"tooltip": false
},
"position": "top",
"custom/pipewire": {
"exec": "${lib.getExe pkgs.pw-volume} status",
"return-type": "json",
"interval": "once",
"signal": 8,
"format": "{icon} {percentage}",
"format-icons": {
"mute": "",
"default": ["󰕿", "󰖀", "󰕾"]
}
},
"pulseaudio": {
"format": "{volume}% {icon}",
"format-icons": {
Expand Down
4 changes: 2 additions & 2 deletions home/waybar/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ window#waybar.solo {
padding-left: 10px;
}

#pulseaudio {
#pulseaudio, #custom-pipewire {
color: rgba(217, 216, 216, 1);
padding: 3px 6px 3px 6px;
padding: 3px 8px 3px 6px;
margin: 2px 4px 2px 4px;
background: rgba(35, 31, 32, 0.5);
border-radius: 6px;
Expand Down
1 change: 1 addition & 0 deletions userPkgs.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ pkgs, ... }:
with pkgs;
[
paperback
gtkcord4
amberol
mako
Expand Down

0 comments on commit d91c31b

Please sign in to comment.