From 7d3fd572d171a4f0a1a6a77be19020cc62b121f1 Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 13 Jul 2026 17:55:49 -0500 Subject: Add PipeWire audio with pavucontrol, pamixer, xmobar volume, and media key bindings --- modules/common.nix | 6 ++++++ modules/home/christian.nix | 5 ++++- modules/xmonad.hs | 6 +++++- 3 files changed, 15 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/common.nix b/modules/common.nix index 8590d42..1e8fe95 100644 --- a/modules/common.nix +++ b/modules/common.nix @@ -92,6 +92,12 @@ config.common.default = "gtk"; }; + services.pipewire = { + enable = true; + alsa.enable = true; + pulse.enable = true; + }; + services.openssh.enable = true; programs.mosh.enable = true; diff --git a/modules/home/christian.nix b/modules/home/christian.nix index 56c8d94..342b2a4 100644 --- a/modules/home/christian.nix +++ b/modules/home/christian.nix @@ -26,6 +26,8 @@ maim hexyl calibre + pavucontrol + pamixer ]; programs.alacritty = { @@ -120,6 +122,7 @@ , Run Cpu ["-t", "cpu: %"] 10 , Run Network "wlan0" ["-S", "True", "-t", "wlan: /"] 10 , Run Memory ["-t","mem: %"] 10 + , Run Volume "default" "Master" ["-t", "vol: %"] 10 , Run Date "date: %a %d %b %Y %I:%M:%S %p " "date" 10 ${lib.optionalString config.custom.xmobarBattery '' , Run Battery @@ -137,7 +140,7 @@ ] , sepChar = "%" , alignSep = "}{" - , template = " %XMonadLog% | ${lib.optionalString config.custom.xmobarBattery "%battery% | "}${lib.optionalString config.custom.xmobarVpn "%vpn% | "}%cpu% | %memory% | %wlan0% }{%date% " + , template = " %XMonadLog% | ${lib.optionalString config.custom.xmobarBattery "%battery% | "}${lib.optionalString config.custom.xmobarVpn "%vpn% | "}%cpu% | %memory% | %wlan0% }{%default:Master% | %date% " } ''; }; diff --git a/modules/xmonad.hs b/modules/xmonad.hs index a55cd28..55f6b22 100644 --- a/modules/xmonad.hs +++ b/modules/xmonad.hs @@ -1,5 +1,6 @@ import XMonad import XMonad.Util.EZConfig (additionalKeys) +import Graphics.X11.ExtraTypes.XF86 import XMonad.Util.SpawnOnce (spawnOnce) import XMonad.Hooks.ManageDocks import XMonad.Hooks.StatusBar @@ -27,7 +28,10 @@ myConfig = defaultConfig `additionalKeys` [ ( (mod1Mask, xK_q), restart "xmonad" True ) , ( (mod1Mask, xK_f), sendMessage ToggleStruts ) - , ( (mod1Mask, xK_s), spawn "maim -s | xclip -selection clipboard -t image/png" ) ] + , ( (mod1Mask, xK_s), spawn "maim -s | xclip -selection clipboard -t image/png" ) + , ( (0, xF86XK_AudioRaiseVolume), spawn "pamixer --increase 5" ) + , ( (0, xF86XK_AudioLowerVolume), spawn "pamixer --decrease 5" ) + , ( (0, xF86XK_AudioMute), spawn "pamixer --toggle-mute" ) ] mySB = statusBarProp "xmobar" (pure xmobarPP { ppTitle = const "" }) -- main = xmonad $ withEasySB mySB defToggleStrutsKey def -- cgit v1.2.3