From f9947a0f421c1ae2acfb5f3b730d7118f6ad38eb Mon Sep 17 00:00:00 2001 From: coolneng Date: Sat, 20 Feb 2021 01:19:31 +0100 Subject: [PATCH] Replace Pulseaudio with PipeWire --- fish/.config/fish/config.fish | 2 - pulsemixer/.config/pulsemixer.cfg | 62 +++++++++++++++++++++++++++++++ sway/.config/sway/config | 10 ++--- 3 files changed, 66 insertions(+), 8 deletions(-) create mode 100644 pulsemixer/.config/pulsemixer.cfg diff --git a/fish/.config/fish/config.fish b/fish/.config/fish/config.fish index cff4b96..e196c59 100644 --- a/fish/.config/fish/config.fish +++ b/fish/.config/fish/config.fish @@ -10,8 +10,6 @@ alias f "fff" alias bc "bc -l" alias vim "nvim" alias docker-compose "podman-compose" -alias hdmi-audio "pactl set-card-profile 0 output:hdmi-stereo-extra1" -alias laptop-audio "pacmd set-card-profile 0 output:analog-stereo+input:analog-stereo" alias sc "systemctl" alias jc "journalctl -eu" diff --git a/pulsemixer/.config/pulsemixer.cfg b/pulsemixer/.config/pulsemixer.cfg new file mode 100644 index 0000000..b4ccd1b --- /dev/null +++ b/pulsemixer/.config/pulsemixer.cfg @@ -0,0 +1,62 @@ +;; Goes into ~/.config/pulsemixer.cfg, $XDG_CONFIG_HOME respected +;; Everything that starts with "#" or ";" is a comment +;; For the option to take effect simply uncomment it + +[general] +step = 1 +step-big = 10 +; server = + +[keys] +;; To bind "special keys" such as arrows see "Key constant" table in +;; https://docs.python.org/3/library/curses.html#constants +; up = k, KEY_UP, KEY_PPAGE +; down = j, KEY_DOWN, KEY_NPAGE +; left = h, KEY_LEFT +; right = l, KEY_RIGHT +; left-big = H, KEY_SLEFT +; right-big = L, KEY_SRIGHT +; top = g, KEY_HOME +; bottom = G, KEY_END +; mode1 = KEY_F1 +; mode2 = KEY_F2 +; mode3 = KEY_F3 +; next-mode = KEY_TAB +; prev-mode = KEY_BTAB +; mute = m +; lock = ' ' ; 'space', quotes are stripped +; quit = q, KEY_ESC + +[ui] +hide-unavailable-profiles = yes +; hide-unavailable-ports = no +; color = 2 ; same as --color, 0 no color, 1 color currently selected, 2 full-color +; mouse = yes + +[style] +;; Pulsemixer will use these characters to draw interface +;; Single characters only +; bar-top-left = ┌ +; bar-left-mono = ╶ +; bar-top-right = ┐ +; bar-right-mono = ╴ +; bar-bottom-left = └ +; bar-bottom-right = ┘ +; bar-on = ▮ +; bar-on-muted = ▯ +; bar-off = - +; arrow = ' ' +; arrow-focused = ─ +; arrow-locked = ─ +; default-stream = * +; info-locked = L +; info-unlocked = U +; info-muted = M ; 🔇 +; info-unmuted = M ; 🔉 + +[renames] +;; Changes stream names in interactive mode, regular expression are supported +;; https://docs.python.org/3/library/re.html#regular-expression-syntax +; 'default name example' = 'new name' +; '(?i)built-in .* audio' = 'Audio Controller' +; 'AudioIPC Server' = 'Firefox' diff --git a/sway/.config/sway/config b/sway/.config/sway/config index df700fa..ca4cedc 100644 --- a/sway/.config/sway/config +++ b/sway/.config/sway/config @@ -256,10 +256,10 @@ exec swaymsg split vertical # Special keys # # Volume -bindsym XF86AudioRaiseVolume exec pactl set-sink-volume alsa_output.pci-0000_00_1f.3.analog-stereo +5% -bindsym XF86AudioLowerVolume exec pactl set-sink-volume alsa_output.pci-0000_00_1f.3.analog-stereo -5% -bindsym XF86AudioMute exec pactl set-sink-mute alsa_output.pci-0000_00_1f.3.analog-stereo toggle -bindsym XF86AudioMicMute exec pactl set-source-mute alsa_input.pci-0000_00_1f.3.analog-stereo toggle +bindsym XF86AudioRaiseVolume exec pulsemixer --change-volume +5 +bindsym XF86AudioLowerVolume exec pulsemixer --change-volume -5 +bindsym XF86AudioMute exec pulsemixer --toggle-mute +bindsym XF86AudioMicMute exec pulsemixer --id source-45 --toggle-mute # Brightness bindsym XF86MonBrightnessUp exec light -A 10 bindsym XF86MonBrightnessDown exec light -U 10 @@ -337,8 +337,6 @@ assign [app_id=".*[Ee]macs.*"] $workspace3 exec emacs # mpv assign [app_id="mpv"] $workspace6 -# pipewire -exec systemctl --user import-environment # # Program behaviour