From 33f10999b9b89fd7764ae5b7b0c9f55d470a6ea7 Mon Sep 17 00:00:00 2001 From: sudacode Date: Mon, 5 May 2025 09:34:18 -0700 Subject: [PATCH 1/8] update change-wallpaper with config --- .config/change-wallpaper/config.json | 11 +++++++++++ projects/go/change-wallpaper/change-wallpaper.go | 6 ------ 2 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 .config/change-wallpaper/config.json diff --git a/.config/change-wallpaper/config.json b/.config/change-wallpaper/config.json new file mode 100644 index 0000000..a10a713 --- /dev/null +++ b/.config/change-wallpaper/config.json @@ -0,0 +1,11 @@ +{ +"topics": [ + "132262 - Mobuseka", + "konosuba", + "79222 - bunny girl senpai", + "oshi no ko", + "kill la kill", + "lofi", + "139520 - eminence in shadow" + ] +} diff --git a/projects/go/change-wallpaper/change-wallpaper.go b/projects/go/change-wallpaper/change-wallpaper.go index 11cc6b1..249ec09 100644 --- a/projects/go/change-wallpaper/change-wallpaper.go +++ b/projects/go/change-wallpaper/change-wallpaper.go @@ -25,13 +25,7 @@ type Config struct { } var defaultTopics = []string{ - "132262 - Mobuseka", - "konosuba", - "bunny girl senpai", - "oshi no ko", - "kill la kill", "lofi", - "eminence in shadow", } func loadConfig() []string { From fd2195d924092b13e45458e22a454fb72259790c Mon Sep 17 00:00:00 2001 From: sudacode Date: Mon, 5 May 2025 09:40:05 -0700 Subject: [PATCH 2/8] update config for rofi-open.go --- .config/rofi-open/config.json | 54 +++++++++++++++++++++++++++ projects/go/rofi-open/rofi-open.go | 60 ++++++------------------------ 2 files changed, 65 insertions(+), 49 deletions(-) create mode 100644 .config/rofi-open/config.json diff --git a/.config/rofi-open/config.json b/.config/rofi-open/config.json new file mode 100644 index 0000000..389ad47 --- /dev/null +++ b/.config/rofi-open/config.json @@ -0,0 +1,54 @@ +{ + "browser": "zen-browser", + "default_open_type": "tab", + "options": [ + "Anilist - https://anilist.co/home", + "Authentik - https://auth.suda.codes", + "Capital One - https://myaccounts.capitalone.com/accountSummary", + "Chase Bank - https://secure03ea.chase.com/", + "ChatGPT - https://chat.openai.com/chat", + "Cloudflare - https://dash.cloudflare.com/", + "CoinMarketCap - https://coinmarketcap.com/", + "Deemix - http://pve-main:3358", + "F1TV - https://f1tv.suda.codes", + "Fidelity - https://login.fidelity.com/", + "Gitea - https://gitea.suda.codes", + "Github - https://github.com", + "Ghostfolio - http://pve-main:3334", + "Grafana - http://pve-main:3000", + "Immich - https://immich.suda.codes", + "Jellyseerr - https://jellyseerr.suda.codes", + "Jellyfin - https://jellyfin.suda.codes", + "Jellyfin (YouTube) - http://pve-main:8097", + "Jellyfin (Vue) - http://pve-main:8098", + "Karakeep - https://karakeep.suda.codes", + "Komga - http://oracle-vm:3332", + "Lidarr - http://pve-main:3357", + "MeTube - https://metube.suda.codes", + "Navidrome - https://navidrome.suda.codes", + "Nzbhydra - https://nzbhydra.suda.codes", + "OpenBooks - https://openbooks.suda.codes", + "Pihole - https://pihole.suda.codes/admin", + "Pihole2 - https://pihole2.suda.codes/admin", + "Proxmox - https://thebox.unicorn-ilish.ts.net", + "qBittorrent - https://qbit.suda.codes", + "Paperless - https://paperless.suda.codes", + "Prometheus - http://prometheus:9090", + "Radarr - https://radarr.suda.codes", + "Reddit (Anime) - https://www.reddit.com/r/anime/", + "Reddit (Selfhosted) - https://www.reddit.com/r/selfhosted/", + "Sabnzbd - https://sabnzbd.suda.codes", + "Sonarr - https://sonarr.suda.codes", + "Sonarr Anime - http://pve-main:6969", + "Sudacode - https://sudacode.com", + "Tailscale - https://login.tailscale.com/admin/machines", + "Tranga - http://pve-main:9555", + "Truenas - https://truenas.unicorn-ilish.ts.net", + "Tdarr - https://tdarr.suda.codes", + "Umami - https://umami.sudacode.com", + "Vaultwarden - https://vault.suda.codes", + "Wallabag - https://wallabag.suda.codes", + "Youtube - https://youtube.com", + "Homepage - https://suda.codes" + ] +} diff --git a/projects/go/rofi-open/rofi-open.go b/projects/go/rofi-open/rofi-open.go index d2a4eef..02bf931 100755 --- a/projects/go/rofi-open/rofi-open.go +++ b/projects/go/rofi-open/rofi-open.go @@ -3,7 +3,6 @@ package main import ( "encoding/json" "fmt" - "io/ioutil" "os" "os/exec" "path/filepath" @@ -22,7 +21,7 @@ func loadConfig() (*Config, error) { return nil, err } path := filepath.Join(home, ".config", "rofi-open", "config.json") - data, err := ioutil.ReadFile(path) + data, err := os.ReadFile(path) if err != nil { return nil, err } @@ -37,53 +36,6 @@ var ( BROWSER = "zen-browser" OPEN_TYPES = []string{"window", "tab"} OPTIONS = []string{ - "Anilist - https://anilist.co/home", - "Authentik - https://auth.suda.codes", - "Capital One - https://myaccounts.capitalone.com/accountSummary", - "Chase Bank - https://secure03ea.chase.com/", - "ChatGPT - https://chat.openai.com/chat", - "Cloudflare - https://dash.cloudflare.com/", - "CoinMarketCap - https://coinmarketcap.com/", - "Deemix - http://pve-main:3358", - "F1TV - https://f1tv.suda.codes", - "Fidelity - https://login.fidelity.com/", - "Gitea - https://gitea.suda.codes", - "Github - https://github.com", - "Ghostfolio - http://pve-main:3334", - "Grafana - http://pve-main:3000", - "Homepage - https://suda.codes", - "Immich - https://immich.suda.codes", - "Jellyseerr - https://jellyseerr.suda.codes", - "Jellyfin - https://jellyfin.suda.codes", - "Jellyfin (YouTube) - http://pve-main:8097", - "Jellyfin (Vue) - http://pve-main:8098", - "Karakeep - https://karakeep.suda.codes", - "Komga - http://oracle-vm:3332", - "Lidarr - http://pve-main:3357", - "MeTube - https://metube.suda.codes", - "Navidrome - https://navidrome.suda.codes", - "Nzbhydra - https://nzbhydra.suda.codes", - "OpenBooks - https://openbooks.suda.codes", - "Pihole - https://pihole.suda.codes/admin", - "Pihole2 - https://pihole2.suda.codes/admin", - "Proxmox - https://thebox.unicorn-ilish.ts.net", - "qBittorrent - https://qbit.suda.codes", - "Paperless - https://paperless.suda.codes", - "Prometheus - http://prometheus:9090", - "Radarr - https://radarr.suda.codes", - "Reddit (Anime) - https://www.reddit.com/r/anime/", - "Reddit (Selfhosted) - https://www.reddit.com/r/selfhosted/", - "Sabnzbd - https://sabnzbd.suda.codes", - "Sonarr - https://sonarr.suda.codes", - "Sonarr Anime - http://pve-main:6969", - "Sudacode - https://sudacode.com", - "Tailscale - https://login.tailscale.com/admin/machines", - "Tranga - http://pve-main:9555", - "Truenas - https://truenas.unicorn-ilish.ts.net", - "Tdarr - https://tdarr.suda.codes", - "Umami - https://umami.sudacode.com", - "Vaultwarden - https://vault.suda.codes", - "Wallabag - https://wallabag.suda.codes", "Youtube - https://youtube.com", } ) @@ -96,6 +48,16 @@ func main() { os.Exit(1) } + // Override BROWSER if set in config + if cfg.Browser != "" { + BROWSER = cfg.Browser + } + + // Override OPTIONS if set in config + if len(cfg.Options) > 0 { + OPTIONS = cfg.Options + } + var openType string cliArgProvided := len(os.Args) >= 2 From 6777e8661447fe92fbf634eaf157b1ee9597b3a9 Mon Sep 17 00:00:00 2001 From: sudacode Date: Mon, 5 May 2025 13:56:21 -0700 Subject: [PATCH 3/8] update --- .config/change-wallpaper/config.json | 19 ++++++++++--------- .config/hypr/hyprland.conf | 10 ++++++---- .config/rofi/scripts/rofi-wallpaper.sh | 9 +++++---- .../go/change-wallpaper/change-wallpaper.go | 4 +++- 4 files changed, 24 insertions(+), 18 deletions(-) diff --git a/.config/change-wallpaper/config.json b/.config/change-wallpaper/config.json index a10a713..2beffe9 100644 --- a/.config/change-wallpaper/config.json +++ b/.config/change-wallpaper/config.json @@ -1,11 +1,12 @@ { -"topics": [ - "132262 - Mobuseka", - "konosuba", - "79222 - bunny girl senpai", - "oshi no ko", - "kill la kill", - "lofi", - "139520 - eminence in shadow" - ] + "topics": [ + "132262 - Mobuseka", + "konosuba", + "79222 - bunny girl senpai", + "oshi no ko", + "kill la kill", + "lofi", + "139520 - eminence in shadow", + "132 - Monogatari Series" + ] } diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 0f68748..0d4a642 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -105,8 +105,10 @@ decoration { rounding_power = 2 # Change transparency of focused and unfocused windows - active_opacity = 0.9 - inactive_opacity = 0.9 + # active_opacity = 0.88 + active_opacity = 1.0 + # inactive_opacity = 0.88 + inactive_opacity = 1.0 shadow { enabled = true @@ -256,13 +258,13 @@ windowrule = float, class:discord windowrule = float, class:mpv windowrule = workspace 10 silent, class:discord # windowruv2 = opacity 0.88, class:.* fullscreen:0 -windowrule = opacity 0.77, class:.* fullscreen:0 +windowrule = opacity 0.88, class:.* fullscreen:0 # windowruv2 = opacity 1, class:.* fullscreen:0 windowrule = opacity 1, class:mpv fullscreen:0 windowrule = opacity 1, class:anki fullscreen:0 windowrule = opacity 1, class:Thorium-browser title:(.*)asbplayer windowrule = tile, class:Thorium-browser title:(.*)asbplayer -windowrule = opacity 1, class:remote-viewer +windowrule = opacity 1, class:^(remote-viewer)$ windowrule = opacity 1, class:com.obsproject.Studio windowrule = opacity 1, title:(.*)(- YouTube(.*)) windowrule = opacity 1, class:zen, title:(.*)YouTube TV(.*) diff --git a/.config/rofi/scripts/rofi-wallpaper.sh b/.config/rofi/scripts/rofi-wallpaper.sh index 7b20c66..af33a79 100755 --- a/.config/rofi/scripts/rofi-wallpaper.sh +++ b/.config/rofi/scripts/rofi-wallpaper.sh @@ -3,8 +3,9 @@ set -Eeuo pipefail THEME="$HOME/.config/rofi/launchers/type-3/style-4.rasi" -DIR="$HOME/Pictures/wallpapers/wallhaven" -SELECTED_WALL=$(cd "$DIR" && for a in *.jpg *.png; do echo -en "$a\0icon\x1f$a\n"; done | rofi -dmenu -theme "$THEME" -p "Select a wallpaper" -theme-str 'configuration {icon-size: 128; dpi: 96;} window {width: 45%; height: 45%;}') - -notify-send -a "rofi-wallpaper" "Wallpaper set to" -i "$DIR/$SELECTED_WALL" "$DIR/$SELECTED_WALL" +DIR="$HOME/Pictures/wallpapers/favorites" +SELECTED_WALL=$(cd "$DIR" && for a in *.jpg *.png; do echo -en "$a\0icon\x1f$a\n"; done | rofi -dmenu -i -no-custom -theme "$THEME" -p "Select a wallpaper" -theme-str 'configuration {icon-size: 128; dpi: 96;} window {width: 45%; height: 45%;}') +PTH="$(printf "%s" "$DIR/$SELECTED_WALL" | tr -s '/')" +notify-send -a "rofi-wallpaper" "Wallpaper set to" -i "$PTH" "$PTH" hyprctl hyprpaper reload , "$DIR/$SELECTED_WALL" +echo "$PTH" > "$HOME/.wallpaper" diff --git a/projects/go/change-wallpaper/change-wallpaper.go b/projects/go/change-wallpaper/change-wallpaper.go index 249ec09..9663ce9 100644 --- a/projects/go/change-wallpaper/change-wallpaper.go +++ b/projects/go/change-wallpaper/change-wallpaper.go @@ -132,7 +132,9 @@ func downloadRandomWallpaper(wallpaperPath string, r *rand.Rand, topics []string // Select a random image from the results randomIndex := r.Intn(len(wallhavenResp.Data)) wallpaperURL := wallhavenResp.Data[randomIndex].Path - filename := filepath.Base(wallpaperURL) + orig := filepath.Base(wallpaperURL) + sanitizedTopic := strings.ReplaceAll(strings.ToLower(displayName), " ", "-") + filename := fmt.Sprintf("%s-%s", sanitizedTopic, orig) filepath := filepath.Join(wallpaperPath, filename) fmt.Fprintf(os.Stderr, "Downloading: %s\n", filename) From 3b26b76fd23d1c5c5833eb03f117a67d03134df4 Mon Sep 17 00:00:00 2001 From: sudacode Date: Mon, 5 May 2025 15:39:38 -0700 Subject: [PATCH 4/8] update --- .config/pipewire/client-rt.conf | 93 +++++ .config/pipewire/client.conf | 148 +++++++ .config/pipewire/client.conf.bak | 83 ++++ .config/pipewire/filter-chain/demonic.conf | 100 +++++ .../pipewire/filter-chain/duplicate-FL.conf | 49 +++ .../filter-chain/sink-dolby-surround.conf | 66 ++++ .config/pipewire/filter-chain/sink-eq6.conf | 90 +++++ .../filter-chain/sink-matrix-spatialiser.conf | 59 +++ .../sink-virtual-surround-5.1-kemar.conf | 197 ++++++++++ .../sink-virtual-surround-7.1-hesuvi.conf | 121 ++++++ .../pipewire/filter-chain/source-rnnoise.conf | 55 +++ .config/pipewire/pipewire-pulse.conf | 187 +++++++++ .config/pipewire/pipewire-pulse.conf.bak | 146 +++++++ .config/pipewire/pipewire.conf | 371 ++++++++++++++++++ .config/pipewire/pipewire.conf.bak | 288 ++++++++++++++ .../pipewire.conf.d/50-samplerate.conf | 4 + .../pipewire.conf.d/99-input-denoising.conf | 33 ++ .zsh/.zshrc##default | 8 + 18 files changed, 2098 insertions(+) create mode 100644 .config/pipewire/client-rt.conf create mode 100644 .config/pipewire/client.conf create mode 100644 .config/pipewire/client.conf.bak create mode 100644 .config/pipewire/filter-chain/demonic.conf create mode 100644 .config/pipewire/filter-chain/duplicate-FL.conf create mode 100644 .config/pipewire/filter-chain/sink-dolby-surround.conf create mode 100644 .config/pipewire/filter-chain/sink-eq6.conf create mode 100644 .config/pipewire/filter-chain/sink-matrix-spatialiser.conf create mode 100644 .config/pipewire/filter-chain/sink-virtual-surround-5.1-kemar.conf create mode 100644 .config/pipewire/filter-chain/sink-virtual-surround-7.1-hesuvi.conf create mode 100644 .config/pipewire/filter-chain/source-rnnoise.conf create mode 100644 .config/pipewire/pipewire-pulse.conf create mode 100644 .config/pipewire/pipewire-pulse.conf.bak create mode 100644 .config/pipewire/pipewire.conf create mode 100644 .config/pipewire/pipewire.conf.bak create mode 100644 .config/pipewire/pipewire.conf.d/50-samplerate.conf create mode 100644 .config/pipewire/pipewire.conf.d/99-input-denoising.conf diff --git a/.config/pipewire/client-rt.conf b/.config/pipewire/client-rt.conf new file mode 100644 index 0000000..20e107d --- /dev/null +++ b/.config/pipewire/client-rt.conf @@ -0,0 +1,93 @@ +# Real-time Client config file for PipeWire version "0.3.51" # +# +# Copy and edit this file in /etc/pipewire for system-wide changes +# or in ~/.config/pipewire for local changes. +# +# It is also possible to place a file with an updated section in +# /etc/pipewire/client-rt.conf.d/ for system-wide changes or in +# ~/.config/pipewire/client-rt.conf.d/ for local changes. +# + +context.properties = { + ## Configure properties in the system. + #mem.warn-mlock = false + #mem.allow-mlock = true + #mem.mlock-all = false + log.level = 0 + + #default.clock.quantum-limit = 8192 +} + +context.spa-libs = { + # = + # + # Used to find spa factory names. It maps an spa factory name + # regular expression to a library name that should contain + # that factory. + # + audio.convert.* = audioconvert/libspa-audioconvert + support.* = support/libspa-support +} + +context.modules = [ + #{ name = + # [ args = { = ... } ] + # [ flags = [ [ ifexists ] [ nofail ] ] + #} + # + # Loads a module with the given parameters. + # If ifexists is given, the module is ignored when it is not found. + # If nofail is given, module initialization failures are ignored. + # + # Uses realtime scheduling to boost the audio thread priorities + { name = libpipewire-module-rt + args = { + #rt.prio = 88 + #rt.time.soft = -1 + #rt.time.hard = -1 + } + flags = [ ifexists nofail ] + } + + # The native communication protocol. + { name = libpipewire-module-protocol-native } + + # Allows creating nodes that run in the context of the + # client. Is used by all clients that want to provide + # data to PipeWire. + { name = libpipewire-module-client-node } + + # Allows creating devices that run in the context of the + # client. Is used by the session manager. + { name = libpipewire-module-client-device } + + # Makes a factory for wrapping nodes in an adapter with a + # converter and resampler. + { name = libpipewire-module-adapter } + + # Allows applications to create metadata objects. It creates + # a factory for Metadata objects. + { name = libpipewire-module-metadata } + + # Provides factories to make session manager objects. + { name = libpipewire-module-session-manager } +] + +filter.properties = { + #node.latency = 1024/48000 +} + +stream.properties = { + #node.latency = 1024/48000 + #node.autoconnect = true + #resample.quality = 4 + #channelmix.normalize = false + #channelmix.mix-lfe = true + #channelmix.upmix = true + #channelmix.upmix-method = psd # none, simple + #channelmix.lfe-cutoff = 150 + #channelmix.fc-cutoff = 12000 + #channelmix.rear-delay = 12.0 + #channelmix.stereo-widen = 0.0 + #channelmix.hilbert-taps = 0 +} diff --git a/.config/pipewire/client.conf b/.config/pipewire/client.conf new file mode 100644 index 0000000..2cfad6a --- /dev/null +++ b/.config/pipewire/client.conf @@ -0,0 +1,148 @@ +# Client config file for PipeWire version "1.4.2" # +# +# Copy and edit this file in /etc/pipewire for system-wide changes +# or in ~/.config/pipewire for local changes. +# +# It is also possible to place a file with an updated section in +# /etc/pipewire/client.conf.d/ for system-wide changes or in +# ~/.config/pipewire/client.conf.d/ for local changes. +# + +context.properties = { + ## Configure properties in the system. + #mem.warn-mlock = false + #mem.allow-mlock = true + #mem.mlock-all = false + log.level = 0 + + #default.clock.quantum-limit = 8192 +} + +context.spa-libs = { + # = + # + # Used to find spa factory names. It maps an spa factory name + # regular expression to a library name that should contain + # that factory. + # + audio.convert.* = audioconvert/libspa-audioconvert + support.* = support/libspa-support + video.convert.* = videoconvert/libspa-videoconvert +} + +context.modules = [ + #{ name = + # ( args = { = ... } ) + # ( flags = [ ( ifexists ) ( nofail ) ] ) + # ( condition = [ { = ... } ... ] ) + #} + # + # Loads a module with the given parameters. + # If ifexists is given, the module is ignored when it is not found. + # If nofail is given, module initialization failures are ignored. + # + # Uses realtime scheduling to boost the audio thread priorities + { name = libpipewire-module-rt + args = { + #rt.prio = 83 + #rt.time.soft = -1 + #rt.time.hard = -1 + } + flags = [ ifexists nofail ] + condition = [ { module.rt = !false } ] + } + + # The native communication protocol. + { name = libpipewire-module-protocol-native } + + # Allows creating nodes that run in the context of the + # client. Is used by all clients that want to provide + # data to PipeWire. + { name = libpipewire-module-client-node + condition = [ { module.client-node = !false } ] + } + + # Allows creating devices that run in the context of the + # client. Is used by the session manager. + { name = libpipewire-module-client-device + condition = [ { module.client-device = !false } ] + } + + # Makes a factory for wrapping nodes in an adapter with a + # converter and resampler. + { name = libpipewire-module-adapter + condition = [ { module.adapter = !false } ] + } + + # Allows applications to create metadata objects. It creates + # a factory for Metadata objects. + { name = libpipewire-module-metadata + condition = [ { module.metadata = !false } ] + } + + # Provides factories to make session manager objects. + { name = libpipewire-module-session-manager + condition = [ { module.session-manager = !false } ] + } +] + +filter.properties = { + #node.latency = 1024/48000 +} + +stream.properties = { + #node.latency = 1024/48000 + #node.autoconnect = true + #resample.quality = 4 + #channelmix.normalize = false + #channelmix.mix-lfe = true + #channelmix.upmix = true + #channelmix.upmix-method = psd # none, simple + #channelmix.lfe-cutoff = 150 + #channelmix.fc-cutoff = 12000 + #channelmix.rear-delay = 12.0 + #channelmix.stereo-widen = 0.0 + #channelmix.hilbert-taps = 0 + #dither.noise = 0 +} + +stream.rules = [ + { matches = [ + { + # all keys must match the value. ! negates. ~ starts regex. + #application.name = "pw-cat" + #node.name = "~Google Chrome$" + } + ] + actions = { + update-props = { + #node.latency = 512/48000 + } + } + } +] + +alsa.properties = { + #alsa.deny = false + # ALSA params take a single value, an array [] of values + # or a range { min=.. max=... } + #alsa.access = [ MMAP_INTERLEAVED MMAP_NONINTERLEAVED RW_INTERLEAVED RW_NONINTERLEAVED ] + #alsa.format = [ FLOAT S32 S24 S24_3 S16 U8 ] + #alsa.rate = { min=1 max=384000 } # or [ 44100 48000 .. ] + #alsa.channels = { min=1 max=64 } # or [ 2 4 6 .. ] + #alsa.period-bytes = { min=128 max=2097152 } # or [ 128 256 1024 .. ] + #alsa.buffer-bytes = { min=256 max=4194304 } # or [ 256 512 4096 .. ] + + #alsa.volume-method = cubic # linear, cubic +} + +# client specific properties +alsa.rules = [ + { matches = [ { application.process.binary = "resolve" } ] + actions = { + update-props = { + alsa.buffer-bytes = 131072 + } + } + } +] diff --git a/.config/pipewire/client.conf.bak b/.config/pipewire/client.conf.bak new file mode 100644 index 0000000..7205dd7 --- /dev/null +++ b/.config/pipewire/client.conf.bak @@ -0,0 +1,83 @@ +# Client config file for PipeWire version "0.3.51" # +# +# Copy and edit this file in /etc/pipewire for system-wide changes +# or in ~/.config/pipewire for local changes. +# +# It is also possible to place a file with an updated section in +# /etc/pipewire/client.conf.d/ for system-wide changes or in +# ~/.config/pipewire/client.conf.d/ for local changes. +# +context.properties = { + ## Configure properties in the system. + #mem.warn-mlock = false + #mem.allow-mlock = true + #mem.mlock-all = false + log.level = 0 + + #default.clock.quantum-limit = 8192 +} + +context.spa-libs = { + # = + # + # Used to find spa factory names. It maps an spa factory name + # regular expression to a library name that should contain + # that factory. + # + audio.convert.* = audioconvert/libspa-audioconvert + support.* = support/libspa-support +} + +context.modules = [ + #{ name = + # [ args = { = ... } ] + # [ flags = [ [ ifexists ] [ nofail ] ] + #} + # + # Loads a module with the given parameters. + # If ifexists is given, the module is ignored when it is not found. + # If nofail is given, module initialization failures are ignored. + # + + # The native communication protocol. + { name = libpipewire-module-protocol-native } + + # Allows creating nodes that run in the context of the + # client. Is used by all clients that want to provide + # data to PipeWire. + { name = libpipewire-module-client-node } + + # Allows creating devices that run in the context of the + # client. Is used by the session manager. + { name = libpipewire-module-client-device } + + # Makes a factory for wrapping nodes in an adapter with a + # converter and resampler. + { name = libpipewire-module-adapter } + + # Allows applications to create metadata objects. It creates + # a factory for Metadata objects. + { name = libpipewire-module-metadata } + + # Provides factories to make session manager objects. + { name = libpipewire-module-session-manager } +] + +filter.properties = { + #node.latency = 1024/48000 +} + +stream.properties = { + #node.latency = 1024/48000 + #node.autoconnect = true + #resample.quality = 4 + #channelmix.normalize = false + #channelmix.mix-lfe = false + #channelmix.upmix = true + #channelmix.upmix-method = psd # none, simple + #channelmix.lfe-cutoff = 150 + #channelmix.fc-cutoff = 12000 + #channelmix.rear-delay = 12.0 + #channelmix.stereo-widen = 0.0 + #channelmix.hilbert-taps = 0 +} diff --git a/.config/pipewire/filter-chain/demonic.conf b/.config/pipewire/filter-chain/demonic.conf new file mode 100644 index 0000000..0d12f8d --- /dev/null +++ b/.config/pipewire/filter-chain/demonic.conf @@ -0,0 +1,100 @@ +# filter-chain example config file for PipeWire version "0.3.51" # +context.properties = { + ## Configure properties in the system. + #mem.warn-mlock = false + #mem.allow-mlock = true + #mem.mlock-all = false + log.level = 0 +} + +context.spa-libs = { + # = + # + # Used to find spa factory names. It maps an spa factory name + # regular expression to a library name that should contain + # that factory. + # + audio.convert.* = audioconvert/libspa-audioconvert + support.* = support/libspa-support +} + +context.modules = [ + # Uses realtime scheduling to boost the audio thread priorities + { name = libpipewire-module-rt + args = { + #rt.prio = 88 + #rt.time.soft = -1 + #rt.time.hard = -1 + } + flags = [ ifexists nofail ] + } + + # The native communication protocol. + { name = libpipewire-module-protocol-native } + + # Allows creating nodes that run in the context of the + # client. Is used by all clients that want to provide + # data to PipeWire. + { name = libpipewire-module-client-node } + + # Makes a factory for wrapping nodes in an adapter with a + # converter and resampler. + { name = libpipewire-module-adapter } + + { name = libpipewire-module-filter-chain + args = { + #audio.format = F32 + #audio.rate = 48000 + audio.channels = 2 + audio.position = [ FL FR ] + node.description = "Demonic example" + media.name = "Demonic example" + filter.graph = { + nodes = [ + { + name = rev + type = ladspa + plugin = revdelay_1605 + label = revdelay + control = { + "Delay Time (s)" = 2.0 + } + } + { + name = pitch + type = ladspa + plugin = am_pitchshift_1433 + label = amPitchshift + control = { + "Pitch shift" = 0.6 + } + } + { + name = rev2 + type = ladspa + plugin = g2reverb + label = G2reverb + control = { + "Reverb tail" = 0.5 + "Damping" = 0.9 + } + } + ] + links = [ + { output = "rev:Output" input = "pitch:Input" } + { output = "pitch:Output" input = "rev2:In L" } + ] + inputs = [ "rev:Input" ] + outputs = [ "rev2:Out L" ] + } + capture.props = { + node.name = "effect_input.filter-chain-demonic" + #media.class = Audio/Sink + } + playback.props = { + node.name = "effect_output.filter-chain-demonic" + #media.class = Audio/Source + } + } + } +] diff --git a/.config/pipewire/filter-chain/duplicate-FL.conf b/.config/pipewire/filter-chain/duplicate-FL.conf new file mode 100644 index 0000000..077f3bf --- /dev/null +++ b/.config/pipewire/filter-chain/duplicate-FL.conf @@ -0,0 +1,49 @@ +# An example filter chain for duplicating the FL channel +# to FL and FR. +# +# Copy this file into a conf.d/ directory +# +context.modules = [ + { name = libpipewire-module-filter-chain + args = { + node.description = "Remap example" + media.name = "Remap example" + filter.graph = { + nodes = [ + { + name = copyIL + type = builtin + label = copy + } + { + name = copyOL + type = builtin + label = copy + } + { + name = copyOR + type = builtin + label = copy + } + ] + links = [ + # we can only tee from nodes, not inputs so we need + # to copy the inputs and then tee. + { output = "copyIL:Out" input = "copyOL:In" } + { output = "copyIL:Out" input = "copyOR:In" } + ] + inputs = [ "copyIL:In" ] + outputs = [ "copyOL:Out" "copyOR:Out" ] + } + capture.props = { + node.name = "remap_input.remap-FL-to-FL-FR" + audio.position = [ FL ] + stream.dont-remix = true + } + playback.props = { + node.name = "remap_output.remap-FL-to-FL-FR" + audio.position = [ FL FR ] + } + } + } +] diff --git a/.config/pipewire/filter-chain/sink-dolby-surround.conf b/.config/pipewire/filter-chain/sink-dolby-surround.conf new file mode 100644 index 0000000..78dd157 --- /dev/null +++ b/.config/pipewire/filter-chain/sink-dolby-surround.conf @@ -0,0 +1,66 @@ +# Dolby Surround encoder sink +# +# start with pipewire -c filter-chain/sink-dolby-surround.conf +# +context.properties = { + log.level = 0 +} + +context.spa-libs = { + audio.convert.* = audioconvert/libspa-audioconvert + support.* = support/libspa-support +} + +context.modules = [ + { name = libpipewire-module-rt + args = { + #rt.prio = 88 + #rt.time.soft = -1 + #rt.time.hard = -1 + } + flags = [ ifexists nofail ] + } + { name = libpipewire-module-protocol-native } + { name = libpipewire-module-client-node } + { name = libpipewire-module-adapter } + + { name = libpipewire-module-filter-chain + args = { + node.description = "Dolby Surround Sink" + media.name = "Dolby Surround Sink" + filter.graph = { + nodes = [ + { + type = builtin + name = mixer + label = mixer + control = { "Gain 1" = 0.5 "Gain 2" = 0.5 } + } + { + type = ladspa + name = enc + plugin = surround_encoder_1401 + label = surroundEncoder + } + ] + links = [ + { output = "mixer:Out" input = "enc:S" } + ] + inputs = [ "enc:L" "enc:R" "enc:C" null "mixer:In 1" "mixer:In 2" ] + outputs = [ "enc:Lt" "enc:Rt" ] + } + capture.props = { + node.name = "effect_input.dolby_surround" + media.class = Audio/Sink + audio.channels = 6 + audio.position = [ FL FR FC LFE SL SR ] + } + playback.props = { + node.name = "effect_output.dolby_surround" + node.passive = true + audio.channels = 2 + audio.position = [ FL FR ] + } + } + } +] diff --git a/.config/pipewire/filter-chain/sink-eq6.conf b/.config/pipewire/filter-chain/sink-eq6.conf new file mode 100644 index 0000000..cd67188 --- /dev/null +++ b/.config/pipewire/filter-chain/sink-eq6.conf @@ -0,0 +1,90 @@ +# 6 band sink equalizer +# +# start with pipewire -c filter-chain/sink-eq6.conf +# +context.properties = { + log.level = 0 +} + +context.spa-libs = { + audio.convert.* = audioconvert/libspa-audioconvert + support.* = support/libspa-support +} + +context.modules = [ + { name = libpipewire-module-rt + args = { + #rt.prio = 88 + #rt.time.soft = -1 + #rt.time.hard = -1 + } + flags = [ ifexists nofail ] + } + { name = libpipewire-module-protocol-native } + { name = libpipewire-module-client-node } + { name = libpipewire-module-adapter } + + { name = libpipewire-module-filter-chain + args = { + node.description = "Equalizer Sink" + media.name = "Equalizer Sink" + filter.graph = { + nodes = [ + { + type = builtin + name = eq_band_1 + label = bq_lowshelf + control = { "Freq" = 100.0 "Q" = 1.0 "Gain" = 0.0 } + } + { + type = builtin + name = eq_band_2 + label = bq_peaking + control = { "Freq" = 100.0 "Q" = 1.0 "Gain" = 0.0 } + } + { + type = builtin + name = eq_band_3 + label = bq_peaking + control = { "Freq" = 500.0 "Q" = 1.0 "Gain" = 0.0 } + } + { + type = builtin + name = eq_band_4 + label = bq_peaking + control = { "Freq" = 2000.0 "Q" = 1.0 "Gain" = 0.0 } + } + { + type = builtin + name = eq_band_5 + label = bq_peaking + control = { "Freq" = 5000.0 "Q" = 1.0 "Gain" = 0.0 } + } + { + type = builtin + name = eq_band_6 + label = bq_highshelf + control = { "Freq" = 5000.0 "Q" = 1.0 "Gain" = 0.0 } + } + ] + links = [ + { output = "eq_band_1:Out" input = "eq_band_2:In" } + { output = "eq_band_2:Out" input = "eq_band_3:In" } + { output = "eq_band_3:Out" input = "eq_band_4:In" } + { output = "eq_band_4:Out" input = "eq_band_5:In" } + { output = "eq_band_5:Out" input = "eq_band_6:In" } + ] + } + audio.channels = 2 + audio.position = [ FL FR ] + capture.props = { + node.name = "effect_input.eq6" + media.class = Audio/Sink + } + playback.props = { + node.name = "effect_output.eq6" + node.passive = true + } + } + } +] diff --git a/.config/pipewire/filter-chain/sink-matrix-spatialiser.conf b/.config/pipewire/filter-chain/sink-matrix-spatialiser.conf new file mode 100644 index 0000000..5519d3a --- /dev/null +++ b/.config/pipewire/filter-chain/sink-matrix-spatialiser.conf @@ -0,0 +1,59 @@ +# Matrix Spatialiser sink +# +# start with pipewire -c filter-chain/sink-matrix-spatialiser.conf +# ( Jean-Philippe Guillemin ) + +context.properties = { + log.level = 0 +} + +context.spa-libs = { + audio.convert.* = audioconvert/libspa-audioconvert + support.* = support/libspa-support +} + +context.modules = [ + { name = libpipewire-module-rt + args = { + #rt.prio = 88 + #rt.time.soft = -1 + #rt.time.hard = -1 + } + flags = [ ifexists nofail ] + } + { name = libpipewire-module-protocol-native } + { name = libpipewire-module-client-node } + { name = libpipewire-module-adapter } + + { name = libpipewire-module-filter-chain + args = { + node.description = "Matrix Spatialiser" + media.name = "Matrix Spatialiser" + filter.graph = { + nodes = [ + { + type = ladspa + name = matrix + plugin = matrix_spatialiser_1422 + label = matrixSpatialiser + control = { + "Width" = 80 + } + } + ] + inputs = [ "matrix:Input L" "matrix:Input R" ] + outputs = [ "matrix:Output L" "matrix:Output R" ] + } + audio.channels = 2 + audio.position = [ FL FR ] + capture.props = { + node.name = "effect_input.matrix_spatialiser" + media.class = Audio/Sink + } + playback.props = { + node.name = "effect_output.matrix_spatialiser" + node.passive = true + } + } + } +] diff --git a/.config/pipewire/filter-chain/sink-virtual-surround-5.1-kemar.conf b/.config/pipewire/filter-chain/sink-virtual-surround-5.1-kemar.conf new file mode 100644 index 0000000..fa12ca4 --- /dev/null +++ b/.config/pipewire/filter-chain/sink-virtual-surround-5.1-kemar.conf @@ -0,0 +1,197 @@ +# Convolver sink +# +# start with pipewire -c filter-chain/sink-virtual-surround-5.1-kemar.conf +# +context.properties = { + log.level = 0 +} + +context.spa-libs = { + audio.convert.* = audioconvert/libspa-audioconvert + support.* = support/libspa-support +} + +context.modules = [ + { name = libpipewire-module-rt + args = { + #rt.prio = 88 + #rt.time.soft = -1 + #rt.time.hard = -1 + } + flags = [ ifexists nofail ] + } + { name = libpipewire-module-protocol-native } + { name = libpipewire-module-client-node } + { name = libpipewire-module-adapter } + + { name = libpipewire-module-filter-chain + args = { + node.description = "Virtual Surround Sink" + media.name = "Virtual Surround Sink" + filter.graph = { + nodes = [ + { + type = builtin + label = convolver + name = convFL_L + config = { + filename = "hrir_kemar/hrir-kemar.wav" + channel = 0 + } + } + { + type = builtin + label = convolver + name = convFL_R + config = { + filename = "hrir_kemar/hrir-kemar.wav" + channel = 1 + } + } + { + type = builtin + label = convolver + name = convFR_L + config = { + filename = "hrir_kemar/hrir-kemar.wav" + channel = 1 + } + } + { + type = builtin + label = convolver + name = convFR_R + config = { + filename = "hrir_kemar/hrir-kemar.wav" + channel = 0 + } + } + { + type = builtin + label = convolver + name = convFC + config = { + filename = "hrir_kemar/hrir-kemar.wav" + channel = 2 + } + } + { + type = builtin + label = convolver + name = convLFE + config = { + filename = "hrir_kemar/hrir-kemar.wav" + channel = 3 + } + } + { + type = builtin + label = convolver + name = convSL_L + config = { + filename = "hrir_kemar/hrir-kemar.wav" + channel = 4 + } + } + { + type = builtin + label = convolver + name = convSL_R + config = { + filename = "hrir_kemar/hrir-kemar.wav" + channel = 5 + } + } + { + type = builtin + label = convolver + name = convSR_L + config = { + filename = "hrir_kemar/hrir-kemar.wav" + channel = 5 + } + } + { + type = builtin + label = convolver + name = convSR_R + config = { + filename = "hrir_kemar/hrir-kemar.wav" + channel = 4 + } + } + { + type = builtin + label = mixer + name = mixL + } + { + type = builtin + label = mixer + name = mixR + } + { + type = builtin + label = copy + name = copyFL + } + { + type = builtin + label = copy + name = copyFR + } + { + type = builtin + label = copy + name = copySL + } + { + type = builtin + label = copy + name = copySR + } + ] + links = [ + { output = "copyFL:Out" input = "convFL_L:In" } + { output = "copyFL:Out" input = "convFL_R:In" } + { output = "copyFR:Out" input = "convFR_R:In" } + { output = "copyFR:Out" input = "convFR_L:In" } + + { output = "copySL:Out" input = "convSL_L:In" } + { output = "copySL:Out" input = "convSL_R:In" } + { output = "copySR:Out" input = "convSR_R:In" } + { output = "copySR:Out" input = "convSR_L:In" } + + { output = "convFL_L:Out" input = "mixL:In 1" } + { output = "convFR_L:Out" input = "mixL:In 2" } + { output = "convFC:Out" input = "mixL:In 3" } + { output = "convLFE:Out" input = "mixL:In 4" } + { output = "convSL_L:Out" input = "mixL:In 5" } + { output = "convSR_L:Out" input = "mixL:In 6" } + + { output = "convFL_R:Out" input = "mixR:In 1" } + { output = "convFR_R:Out" input = "mixR:In 2" } + { output = "convFC:Out" input = "mixR:In 3" } + { output = "convLFE:Out" input = "mixR:In 4" } + { output = "convSL_R:Out" input = "mixR:In 5" } + { output = "convSR_R:Out" input = "mixR:In 6" } + ] + inputs = [ "copyFL:In" "copyFR:In" "convFC:In" "convLFE:In" "copySL:In" "copySR:In" ] + outputs = [ "mixL:Out" "mixR:Out" ] + + } + capture.props = { + node.name = "effect_input.virtual-surround-5.1-kemar" + media.class = Audio/Sink + audio.channels = 6 + audio.position = [ FL FR FC LFE SL SR] + } + playback.props = { + node.name = "effect_output.virtual-surround-5.1-kemar" + node.passive = true + audio.channels = 2 + audio.position = [ FL FR ] + } + } + } +] diff --git a/.config/pipewire/filter-chain/sink-virtual-surround-7.1-hesuvi.conf b/.config/pipewire/filter-chain/sink-virtual-surround-7.1-hesuvi.conf new file mode 100644 index 0000000..ee596a5 --- /dev/null +++ b/.config/pipewire/filter-chain/sink-virtual-surround-7.1-hesuvi.conf @@ -0,0 +1,121 @@ +# Convolver sink +# +# start with pipewire -c filter-chain/sink-virtual-surround-7.1-hesuvi.conf +# +context.properties = { + log.level = 0 +} + +context.spa-libs = { + audio.convert.* = audioconvert/libspa-audioconvert + support.* = support/libspa-support +} + +context.modules = [ + { name = libpipewire-module-rt + args = { + #rt.prio = 88 + #rt.time.soft = -1 + #rt.time.hard = -1 + } + flags = [ ifexists nofail ] + } + { name = libpipewire-module-protocol-native } + { name = libpipewire-module-client-node } + { name = libpipewire-module-adapter } + + { name = libpipewire-module-filter-chain + args = { + node.description = "Virtual Surround Sink" + media.name = "Virtual Surround Sink" + filter.graph = { + nodes = [ + # duplicate inputs + { type = builtin label = copy name = copyFL } + { type = builtin label = copy name = copyFR } + { type = builtin label = copy name = copyFC } + { type = builtin label = copy name = copyRL } + { type = builtin label = copy name = copyRR } + { type = builtin label = copy name = copySL } + { type = builtin label = copy name = copySR } + { type = builtin label = copy name = copyLFE } + + # apply hrir - HeSuVi 14-channel WAV (not the *-.wav variants) (note: */44/* in HeSuVi are the same, but resampled to 44100) + { type = builtin label = convolver name = convFL_L config = { filename = "hrir_hesuvi/hrir.wav" channel = 0 } } + { type = builtin label = convolver name = convFL_R config = { filename = "hrir_hesuvi/hrir.wav" channel = 1 } } + { type = builtin label = convolver name = convSL_L config = { filename = "hrir_hesuvi/hrir.wav" channel = 2 } } + { type = builtin label = convolver name = convSL_R config = { filename = "hrir_hesuvi/hrir.wav" channel = 3 } } + { type = builtin label = convolver name = convRL_L config = { filename = "hrir_hesuvi/hrir.wav" channel = 4 } } + { type = builtin label = convolver name = convRL_R config = { filename = "hrir_hesuvi/hrir.wav" channel = 5 } } + { type = builtin label = convolver name = convFC_L config = { filename = "hrir_hesuvi/hrir.wav" channel = 6 } } + { type = builtin label = convolver name = convFR_R config = { filename = "hrir_hesuvi/hrir.wav" channel = 7 } } + { type = builtin label = convolver name = convFR_L config = { filename = "hrir_hesuvi/hrir.wav" channel = 8 } } + { type = builtin label = convolver name = convSR_R config = { filename = "hrir_hesuvi/hrir.wav" channel = 9 } } + { type = builtin label = convolver name = convSR_L config = { filename = "hrir_hesuvi/hrir.wav" channel = 10 } } + { type = builtin label = convolver name = convRR_R config = { filename = "hrir_hesuvi/hrir.wav" channel = 11 } } + { type = builtin label = convolver name = convRR_L config = { filename = "hrir_hesuvi/hrir.wav" channel = 12 } } + { type = builtin label = convolver name = convFC_R config = { filename = "hrir_hesuvi/hrir.wav" channel = 13 } } + + # treat LFE as FC + { type = builtin label = convolver name = convLFE_L config = { filename = "hrir_hesuvi/hrir.wav" channel = 6 } } + { type = builtin label = convolver name = convLFE_R config = { filename = "hrir_hesuvi/hrir.wav" channel = 13 } } + + # stereo output + { type = builtin label = mixer name = mixL } + { type = builtin label = mixer name = mixR } + ] + links = [ + # input + { output = "copyFL:Out" input="convFL_L:In" } + { output = "copyFL:Out" input="convFL_R:In" } + { output = "copySL:Out" input="convSL_L:In" } + { output = "copySL:Out" input="convSL_R:In" } + { output = "copyRL:Out" input="convRL_L:In" } + { output = "copyRL:Out" input="convRL_R:In" } + { output = "copyFC:Out" input="convFC_L:In" } + { output = "copyFR:Out" input="convFR_R:In" } + { output = "copyFR:Out" input="convFR_L:In" } + { output = "copySR:Out" input="convSR_R:In" } + { output = "copySR:Out" input="convSR_L:In" } + { output = "copyRR:Out" input="convRR_R:In" } + { output = "copyRR:Out" input="convRR_L:In" } + { output = "copyFC:Out" input="convFC_R:In" } + { output = "copyLFE:Out" input="convLFE_L:In" } + { output = "copyLFE:Out" input="convLFE_R:In" } + + # output + { output = "convFL_L:Out" input="mixL:In 1" } + { output = "convFL_R:Out" input="mixR:In 1" } + { output = "convSL_L:Out" input="mixL:In 2" } + { output = "convSL_R:Out" input="mixR:In 2" } + { output = "convRL_L:Out" input="mixL:In 3" } + { output = "convRL_R:Out" input="mixR:In 3" } + { output = "convFC_L:Out" input="mixL:In 4" } + { output = "convFC_R:Out" input="mixR:In 4" } + { output = "convFR_R:Out" input="mixR:In 5" } + { output = "convFR_L:Out" input="mixL:In 5" } + { output = "convSR_R:Out" input="mixR:In 6" } + { output = "convSR_L:Out" input="mixL:In 6" } + { output = "convRR_R:Out" input="mixR:In 7" } + { output = "convRR_L:Out" input="mixL:In 7" } + { output = "convLFE_R:Out" input="mixR:In 8" } + { output = "convLFE_L:Out" input="mixL:In 8" } + ] + inputs = [ "copyFL:In" "copyFR:In" "copyFC:In" "copyLFE:In" "copyRL:In" "copyRR:In", "copySL:In", "copySR:In" ] + outputs = [ "mixL:Out" "mixR:Out" ] + } + capture.props = { + node.name = "effect_input.virtual-surround-7.1-hesuvi" + media.class = Audio/Sink + audio.channels = 8 + audio.position = [ FL FR FC LFE RL RR SL SR ] + } + playback.props = { + node.name = "effect_output.virtual-surround-7.1-hesuvi" + node.passive = true + audio.channels = 2 + audio.position = [ FL FR ] + } + } + } +] diff --git a/.config/pipewire/filter-chain/source-rnnoise.conf b/.config/pipewire/filter-chain/source-rnnoise.conf new file mode 100644 index 0000000..fba5e29 --- /dev/null +++ b/.config/pipewire/filter-chain/source-rnnoise.conf @@ -0,0 +1,55 @@ +# Noise canceling source +# +# start with pipewire -c filter-chain/source-rnnoise.conf +# +context.properties = { + log.level = 0 +} + +context.spa-libs = { + audio.convert.* = audioconvert/libspa-audioconvert + support.* = support/libspa-support +} + +context.modules = [ + { name = libpipewire-module-rt + args = { + #rt.prio = 88 + #rt.time.soft = -1 + #rt.time.hard = -1 + } + flags = [ ifexists nofail ] + } + { name = libpipewire-module-protocol-native } + { name = libpipewire-module-client-node } + { name = libpipewire-module-adapter } + + { name = libpipewire-module-filter-chain + args = { + node.description = "Noise Canceling source" + media.name = "Noise Canceling source" + filter.graph = { + nodes = [ + { + type = ladspa + name = rnnoise + plugin = librnnoise_ladspa + label = noise_suppressor_stereo + control = { + "VAD Threshold (%)" 50.0 + } + } + ] + } + audio.position = [ FL FR ] + capture.props = { + node.name = "effect_input.rnnoise" + node.passive = true + } + playback.props = { + node.name = "effect_output.rnnoise" + media.class = Audio/Source + } + } + } +] diff --git a/.config/pipewire/pipewire-pulse.conf b/.config/pipewire/pipewire-pulse.conf new file mode 100644 index 0000000..3816ff2 --- /dev/null +++ b/.config/pipewire/pipewire-pulse.conf @@ -0,0 +1,187 @@ +# PulseAudio config file for PipeWire version "1.4.2" # +# +# Copy and edit this file in /etc/pipewire for system-wide changes +# or in ~/.config/pipewire for local changes. +# +# It is also possible to place a file with an updated section in +# /etc/pipewire/pipewire-pulse.conf.d/ for system-wide changes or in +# ~/.config/pipewire/pipewire-pulse.conf.d/ for local changes. +# + +context.properties = { + ## Configure properties in the system. + #mem.warn-mlock = false + #mem.allow-mlock = true + #mem.mlock-all = false + #log.level = 2 + + #default.clock.quantum-limit = 8192 +} + +context.spa-libs = { + audio.convert.* = audioconvert/libspa-audioconvert + support.* = support/libspa-support +} + +context.modules = [ + { name = libpipewire-module-rt + args = { + nice.level = -11 + #rt.prio = 83 + #rt.time.soft = -1 + #rt.time.hard = -1 + #uclamp.min = 0 + #uclamp.max = 1024 + } + flags = [ ifexists nofail ] + } + { name = libpipewire-module-protocol-native } + { name = libpipewire-module-client-node } + { name = libpipewire-module-adapter } + { name = libpipewire-module-metadata } + + { name = libpipewire-module-protocol-pulse + args = { + # contents of pulse.properties can also be placed here + # to have config per server. + } + } +] + +# Extra scripts can be started here. Setup in default.pa can be moved in +# a script or in pulse.cmd below +context.exec = [ + #{ path = "pactl" args = "load-module module-always-sink" } + #{ path = "pactl" args = "upload-sample my-sample.wav my-sample" } + #{ path = "/usr/bin/sh" args = "~/.config/pipewire/default.pw" } +] + +# Extra commands can be executed here. +# load-module : loads a module with args and flags +# args = " " +# ( flags = [ nofail ] ) +# ( condition = [ { = , ... } ... ] ) +# conditions will check the pulse.properties key/values. +pulse.cmd = [ + { cmd = "load-module" args = "module-always-sink" flags = [ ] + condition = [ { pulse.cmd.always-sink = !false } ] } + { cmd = "load-module" args = "module-device-manager" flags = [ ] + condition = [ { pulse.cmd.device-manager = !false } ] } + { cmd = "load-module" args = "module-device-restore" flags = [ ] + condition = [ { pulse.cmd.device-restore = !false } ] } + { cmd = "load-module" args = "module-stream-restore" flags = [ ] + condition = [ { pulse.cmd.stream-restore = !false } ] } + #{ cmd = "load-module" args = "module-switch-on-connect" } + #{ cmd = "load-module" args = "module-gsettings" flags = [ nofail ] } +] + +stream.properties = { + #node.latency = 1024/48000 + #node.autoconnect = true + #resample.quality = 4 + #channelmix.normalize = false + #channelmix.mix-lfe = true + #channelmix.upmix = true + #channelmix.upmix-method = psd # none, simple + #channelmix.lfe-cutoff = 150 + #channelmix.fc-cutoff = 12000 + #channelmix.rear-delay = 12.0 + #channelmix.stereo-widen = 0.0 + #channelmix.hilbert-taps = 0 + #dither.noise = 0 +} + +pulse.properties = { + # the addresses this server listens on + server.address = [ + "unix:native" + #"unix:/tmp/something" # absolute paths may be used + #"tcp:4713" # IPv4 and IPv6 on all addresses + #"tcp:[::]:9999" # IPv6 on all addresses + #"tcp:127.0.0.1:8888" # IPv4 on a single address + # + #{ address = "tcp:4713" # address + # max-clients = 64 # maximum number of clients + # listen-backlog = 32 # backlog in the server listen queue + # client.access = "restricted" # permissions for clients + #} + ] + #server.dbus-name = "org.pulseaudio.Server" + #pulse.allow-module-loading = true + #pulse.min.req = 128/48000 # 2.7ms + #pulse.default.req = 960/48000 # 20 milliseconds + #pulse.min.frag = 128/48000 # 2.7ms + #pulse.default.frag = 96000/48000 # 2 seconds + #pulse.default.tlength = 96000/48000 # 2 seconds + #pulse.min.quantum = 128/48000 # 2.7ms + #pulse.idle.timeout = 0 # don't pause after underruns + #pulse.default.format = F32 + #pulse.default.position = [ FL FR ] +} + +pulse.properties.rules = [ + { matches = [ { cpu.vm.name = !null } ] + actions = { + update-props = { + # These overrides are only applied when running in a vm. + pulse.min.quantum = 1024/48000 # 22ms + } + } + } +] + +# client/stream specific properties +pulse.rules = [ + { + matches = [ + { + # all keys must match the value. ! negates. ~ starts regex. + #client.name = "Firefox" + #application.process.binary = "teams" + #application.name = "~speech-dispatcher.*" + } + ] + actions = { + update-props = { + #node.latency = 512/48000 + } + # Possible quirks:" + # force-s16-info forces sink and source info as S16 format + # remove-capture-dont-move removes the capture DONT_MOVE flag + # block-source-volume blocks updates to source volume + # block-sink-volume blocks updates to sink volume + #quirks = [ ] + } + } + { + # skype does not want to use devices that don't have an S16 sample format. + matches = [ + { application.process.binary = "teams" } + { application.process.binary = "teams-insiders" } + { application.process.binary = "teams-for-linux" } + { application.process.binary = "skypeforlinux" } + ] + actions = { quirks = [ force-s16-info ] } + } + { + # firefox marks the capture streams as don't move and then they + # can't be moved with pavucontrol or other tools. + matches = [ { application.process.binary = "firefox" } ] + actions = { quirks = [ remove-capture-dont-move ] } + } + { + # speech dispatcher asks for too small latency and then underruns. + matches = [ { application.name = "~speech-dispatcher.*" } ] + actions = { + update-props = { + pulse.min.req = 512/48000 # 10.6ms + pulse.min.quantum = 512/48000 # 10.6ms + pulse.idle.timeout = 5 # pause after 5 seconds of underrun + } + } + } + #{ + # matches = [ { application.process.binary = "Discord" } ] + # actions = { quirks = [ block-source-volume ] } + #} +] diff --git a/.config/pipewire/pipewire-pulse.conf.bak b/.config/pipewire/pipewire-pulse.conf.bak new file mode 100644 index 0000000..e5092f9 --- /dev/null +++ b/.config/pipewire/pipewire-pulse.conf.bak @@ -0,0 +1,146 @@ +# PulseAudio config file for PipeWire version "0.3.51" # +# +# Copy and edit this file in /etc/pipewire for system-wide changes +# or in ~/.config/pipewire for local changes. +# +# It is also possible to place a file with an updated section in +# /etc/pipewire/pipewire-pulse.conf.d/ for system-wide changes or in +# ~/.config/pipewire/pipewire-pulse.conf.d/ for local changes. +# + +context.properties = { + ## Configure properties in the system. + #mem.warn-mlock = false + #mem.allow-mlock = true + #mem.mlock-all = false + #log.level = 2 + + #default.clock.quantum-limit = 8192 +} + +context.spa-libs = { + audio.convert.* = audioconvert/libspa-audioconvert + support.* = support/libspa-support +} + +context.modules = [ + { name = libpipewire-module-rt + args = { + nice.level = -11 + #rt.prio = 88 + #rt.time.soft = -1 + #rt.time.hard = -1 + } + flags = [ ifexists nofail ] + } + { name = libpipewire-module-protocol-native } + { name = libpipewire-module-client-node } + { name = libpipewire-module-adapter } + { name = libpipewire-module-metadata } + + { name = libpipewire-module-protocol-pulse + args = { + # contents of pulse.properties can also be placed here + # to have config per server. + } + } +] + +# Extra modules can be loaded here. Setup in default.pa can be moved here +context.exec = [ + { path = "pactl" args = "load-module module-always-sink" } + #{ path = "pactl" args = "load-module module-switch-on-connect" } + #{ path = "/usr/bin/sh" args = "~/.config/pipewire/default.pw" } +] + +stream.properties = { + #node.latency = 1024/48000 + #node.autoconnect = true + #resample.quality = 4 + #channelmix.normalize = false + #channelmix.mix-lfe = false + #channelmix.upmix = true + #channelmix.upmix-method = psd # none, simple + #channelmix.lfe-cutoff = 150 + #channelmix.fc-cutoff = 12000 + #channelmix.rear-delay = 12.0 + #channelmix.stereo-widen = 0.0 + #channelmix.hilbert-taps = 0 +} + +pulse.properties = { + # the addresses this server listens on + server.address = [ + "unix:native" + #"unix:/tmp/something" # absolute paths may be used + #"tcp:4713" # IPv4 and IPv6 on all addresses + #"tcp:[::]:9999" # IPv6 on all addresses + #"tcp:127.0.0.1:8888" # IPv4 on a single address + # + #{ address = "tcp:4713" # address + # max-clients = 64 # maximum number of clients + # listen-backlog = 32 # backlog in the server listen queue + # client.access = "restricted" # permissions for clients + #} + ] + #pulse.min.req = 256/48000 # 5ms + #pulse.default.req = 960/48000 # 20 milliseconds + #pulse.min.frag = 256/48000 # 5ms + #pulse.default.frag = 96000/48000 # 2 seconds + #pulse.default.tlength = 96000/48000 # 2 seconds + #pulse.min.quantum = 256/48000 # 5ms + #pulse.default.format = F32 + #pulse.default.position = [ FL FR ] + # These overrides are only applied when running in a vm. + vm.overrides = { + pulse.min.quantum = 1024/48000 # 22ms + } +} + +# client/stream specific properties +pulse.rules = [ + { + matches = [ + { + # all keys must match the value. ~ starts regex. + #client.name = "Firefox" + #application.process.binary = "teams" + #application.name = "~speech-dispatcher.*" + } + ] + actions = { + update-props = { + #node.latency = 512/48000 + } + # Possible quirks:" + # force-s16-info forces sink and source info as S16 format + # remove-capture-dont-move removes the capture DONT_MOVE flag + #quirks = [ ] + } + } + { + # skype does not want to use devices that don't have an S16 sample format. + matches = [ + { application.process.binary = "teams" } + { application.process.binary = "teams-insiders" } + { application.process.binary = "skypeforlinux" } + ] + actions = { quirks = [ force-s16-info ] } + } + { + # firefox marks the capture streams as don't move and then they + # can't be moved with pavucontrol or other tools. + matches = [ { application.process.binary = "firefox" } ] + actions = { quirks = [ remove-capture-dont-move ] } + } + { + # speech dispatcher asks for too small latency and then underruns. + matches = [ { application.name = "~speech-dispatcher*" } ] + actions = { + update-props = { + pulse.min.req = 1024/48000 # 21ms + pulse.min.quantum = 1024/48000 # 21ms + } + } + } +] diff --git a/.config/pipewire/pipewire.conf b/.config/pipewire/pipewire.conf new file mode 100644 index 0000000..58df95a --- /dev/null +++ b/.config/pipewire/pipewire.conf @@ -0,0 +1,371 @@ +# Daemon config file for PipeWire version "1.4.2" # +# +# Copy and edit this file in /etc/pipewire for system-wide changes +# or in ~/.config/pipewire for local changes. +# +# It is also possible to place a file with an updated section in +# /etc/pipewire/pipewire.conf.d/ for system-wide changes or in +# ~/.config/pipewire/pipewire.conf.d/ for local changes. +# + +context.properties = { + ## Configure properties in the system. + #library.name.system = support/libspa-support + #context.data-loop.library.name.system = support/libspa-support + #support.dbus = true + #link.max-buffers = 64 + link.max-buffers = 16 # version < 3 clients can't handle more + #mem.warn-mlock = false + #mem.allow-mlock = true + #mem.mlock-all = false + #clock.power-of-two-quantum = true + #log.level = 2 + #cpu.zero.denormals = false + + #loop.rt-prio = -1 # -1 = use module-rt prio, 0 disable rt + #loop.class = data.rt + #thread.affinity = [ 0 1 ] # optional array of CPUs + #context.num-data-loops = 1 # -1 = num-cpus, 0 = no data loops + # + #context.data-loops = [ + # { loop.rt-prio = -1 + # loop.class = [ data.rt audio.rt ] + # #library.name.system = support/libspa-support + # thread.name = data-loop.0 + # #thread.affinity = [ 0 1 ] # optional array of CPUs + # } + #] + + core.daemon = true # listening for socket connections + core.name = pipewire-0 # core name and socket name + + ## Properties for the DSP configuration. + #default.clock.rate = 48000 + #default.clock.allowed-rates = [ 48000 ] + #default.clock.quantum = 1024 + #default.clock.min-quantum = 32 + #default.clock.max-quantum = 2048 + #default.clock.quantum-limit = 8192 + #default.clock.quantum-floor = 4 + #default.video.width = 640 + #default.video.height = 480 + #default.video.rate.num = 25 + #default.video.rate.denom = 1 + # + #settings.check-quantum = false + #settings.check-rate = false +} + +context.properties.rules = [ + { matches = [ { cpu.vm.name = !null } ] + actions = { + update-props = { + # These overrides are only applied when running in a vm. + default.clock.min-quantum = 1024 + } + } + } +] + +context.spa-libs = { + # = + # + # Used to find spa factory names. It maps an spa factory name + # regular expression to a library name that should contain + # that factory. + # + audio.convert.* = audioconvert/libspa-audioconvert + avb.* = avb/libspa-avb + api.alsa.* = alsa/libspa-alsa + api.v4l2.* = v4l2/libspa-v4l2 + api.libcamera.* = libcamera/libspa-libcamera + api.bluez5.* = bluez5/libspa-bluez5 + api.vulkan.* = vulkan/libspa-vulkan + api.jack.* = jack/libspa-jack + support.* = support/libspa-support + video.convert.* = videoconvert/libspa-videoconvert + #filter.graph = filter-graph/libspa-filter-graph + #videotestsrc = videotestsrc/libspa-videotestsrc + #audiotestsrc = audiotestsrc/libspa-audiotestsrc +} + +context.modules = [ + #{ name = + # ( args = { = ... } ) + # ( flags = [ ( ifexists ) ( nofail ) ] ) + # ( condition = [ { = ... } ... ] ) + #} + # + # Loads a module with the given parameters. + # If ifexists is given, the module is ignored when it is not found. + # If nofail is given, module initialization failures are ignored. + # If condition is given, the module is loaded only when the context + # properties all match the match rules. + # + + # Uses realtime scheduling to boost the audio thread priorities. This uses + # RTKit if the user doesn't have permission to use regular realtime + # scheduling. You can also clamp utilisation values to improve scheduling + # on embedded and heterogeneous systems, e.g. Arm big.LITTLE devices. + # use module.rt.args = { ... } to override the arguments. + { name = libpipewire-module-rt + args = { + nice.level = -11 + rt.prio = 88 + #rt.time.soft = -1 + #rt.time.hard = -1 + #uclamp.min = 0 + #uclamp.max = 1024 + } + flags = [ ifexists nofail ] + condition = [ { module.rt = !false } ] + } + + # The native communication protocol. + { name = libpipewire-module-protocol-native + args = { + # List of server Unix sockets, and optionally permissions + #sockets = [ { name = "pipewire-0" }, { name = "pipewire-0-manager" } ] + } + } + + # The profile module. Allows application to access profiler + # and performance data. It provides an interface that is used + # by pw-top and pw-profiler. + # use module.profiler.args = { ... } to override the arguments. + { name = libpipewire-module-profiler + args = { + #profile.interval.ms = 0 + } + condition = [ { module.profiler = !false } ] + } + + # Allows applications to create metadata objects. It creates + # a factory for Metadata objects. + { name = libpipewire-module-metadata + condition = [ { module.metadata = !false } ] + } + + # Creates a factory for making devices that run in the + # context of the PipeWire server. + { name = libpipewire-module-spa-device-factory + condition = [ { module.spa-device-factory = !false } ] + } + + # Creates a factory for making nodes that run in the + # context of the PipeWire server. + { name = libpipewire-module-spa-node-factory + condition = [ { module.spa-node-factory = !false } ] + } + + # Allows creating nodes that run in the context of the + # client. Is used by all clients that want to provide + # data to PipeWire. + { name = libpipewire-module-client-node + condition = [ { module.client-node = !false } ] + } + + # Allows creating devices that run in the context of the + # client. Is used by the session manager. + { name = libpipewire-module-client-device + condition = [ { module.client-device = !false } ] + } + + # The portal module monitors the PID of the portal process + # and tags connections with the same PID as portal + # connections. + { name = libpipewire-module-portal + flags = [ ifexists nofail ] + condition = [ { module.portal = !false } ] + } + + # The access module can perform access checks and block + # new clients. + { name = libpipewire-module-access + args = { + # Socket-specific access permissions + #access.socket = { pipewire-0 = "default", pipewire-0-manager = "unrestricted" } + + # Deprecated legacy mode (not socket-based), + # for now enabled by default if access.socket is not specified + #access.legacy = true + } + condition = [ { module.access = !false } ] + } + + # Makes a factory for wrapping nodes in an adapter with a + # converter and resampler. + { name = libpipewire-module-adapter + condition = [ { module.adapter = !false } ] + } + + # Makes a factory for creating links between ports. + # use module.link-factory.args = { ... } to override the arguments. + { name = libpipewire-module-link-factory + args = { + #allow.link.passive = false + } + condition = [ { module.link-factory = !false } ] + } + + # Provides factories to make session manager objects. + { name = libpipewire-module-session-manager + condition = [ { module.session-manager = !false } ] + } + + # Use libcanberra to play X11 Bell + { name = libpipewire-module-x11-bell + args = { + #sink.name = "@DEFAULT_SINK@" + #sample.name = "bell-window-system" + #x11.display = null + #x11.xauthority = null + } + flags = [ ifexists nofail ] + condition = [ { module.x11.bell = !false } ] + } + # The JACK DBus detection module. When jackdbus is started, this + # will automatically make PipeWire become a JACK client. + # use module.jackdbus-detect.args = { ... } to override the arguments. + { name = libpipewire-module-jackdbus-detect + args = { + #jack.library = libjack.so.0 + #jack.server = null + #jack.client-name = PipeWire + #jack.connect = true + #tunnel.mode = duplex # source|sink|duplex + source.props = { + #audio.channels = 2 + #midi.ports = 1 + #audio.position = [ FL FR ] + # extra sink properties + } + sink.props = { + #audio.channels = 2 + #midi.ports = 1 + #audio.position = [ FL FR ] + # extra sink properties + } + } + flags = [ ifexists nofail ] + condition = [ { module.jackdbus-detect = !false } ] + } +] + +context.objects = [ + #{ factory = + # ( args = { = ... } ) + # ( flags = [ ( nofail ) ] ) + # ( condition = [ { = ... } ... ] ) + #} + # + # Creates an object from a PipeWire factory with the given parameters. + # If nofail is given, errors are ignored (and no object is created). + # If condition is given, the object is created only when the context properties + # all match the match rules. + # + #{ factory = spa-node-factory args = { factory.name = videotestsrc node.name = videotestsrc node.description = videotestsrc node.param.Props = { patternType = 1 } } } + #{ factory = spa-device-factory args = { factory.name = api.jack.device foo=bar } flags = [ nofail ] } + #{ factory = spa-device-factory args = { factory.name = api.alsa.enum.udev } } + #{ factory = spa-node-factory args = { factory.name = api.alsa.seq.bridge node.name = Internal-MIDI-Bridge } } + #{ factory = adapter args = { factory.name = audiotestsrc node.name = my-test node.description = audiotestsrc node.param.Props = { live = false }} } + #{ factory = spa-node-factory args = { factory.name = api.vulkan.compute.source node.name = my-compute-source } } + + # A default dummy driver. This handles nodes marked with the "node.always-process" + # property when no other driver is currently active. JACK clients need this. + { factory = spa-node-factory + args = { + factory.name = support.node.driver + node.name = Dummy-Driver + node.group = pipewire.dummy + node.sync-group = sync.dummy + priority.driver = 200000 + #clock.id = monotonic # realtime | tai | monotonic-raw | boottime + #clock.name = "clock.system.monotonic" + } + condition = [ { factory.dummy-driver = !false } ] + } + { factory = spa-node-factory + args = { + factory.name = support.node.driver + node.name = Freewheel-Driver + priority.driver = 190000 + node.group = pipewire.freewheel + node.sync-group = sync.dummy + node.freewheel = true + #freewheel.wait = 10 + } + condition = [ { factory.freewheel-driver = !false } ] + } + + # This creates a new Source node. It will have input ports + # that you can link, to provide audio for this source. + #{ factory = adapter + # args = { + # factory.name = support.null-audio-sink + # node.name = "my-mic" + # node.description = "Microphone" + # media.class = "Audio/Source/Virtual" + # audio.position = "FL,FR" + # monitor.passthrough = true + # } + #} + + # This creates a single PCM source device for the given + # alsa device path hw:0. You can change source to sink + # to make a sink in the same way. + #{ factory = adapter + # args = { + # factory.name = api.alsa.pcm.source + # node.name = "alsa-source" + # node.description = "PCM Source" + # media.class = "Audio/Source" + # api.alsa.path = "hw:0" + # api.alsa.period-size = 1024 + # api.alsa.headroom = 0 + # api.alsa.disable-mmap = false + # api.alsa.disable-batch = false + # audio.format = "S16LE" + # audio.rate = 48000 + # audio.channels = 2 + # audio.position = "FL,FR" + # } + #} + + # Use the metadata factory to create metadata and some default values. + #{ factory = metadata + # args = { + # metadata.name = my-metadata + # metadata.values = [ + # { key = default.audio.sink value = { name = somesink } } + # { key = default.audio.source value = { name = somesource } } + # ] + # } + #} +] + +context.exec = [ + #{ path = + # ( args = "" | [ ... ] ) + # ( condition = [ { = ... } ... ] ) + #} + # + # Execute the given program with arguments. + # If condition is given, the program is executed only when the context + # properties all match the match rules. + # + # You can optionally start the session manager here, + # but it is better to start it as a systemd service. + # Run the session manager with -h for options. + # + #{ path = "/usr/bin/pipewire-media-session" args = "" + # condition = [ { exec.session-manager = !false } ] } + # + # You can optionally start the pulseaudio-server here as well + # but it is better to start it as a systemd service. + # It can be interesting to start another daemon here that listens + # on another address with the -a option (eg. -a tcp:4713). + # + #{ path = "/usr/bin/pipewire" args = [ "-c" "pipewire-pulse.conf" ] + # condition = [ { exec.pipewire-pulse = !false } ] } +] diff --git a/.config/pipewire/pipewire.conf.bak b/.config/pipewire/pipewire.conf.bak new file mode 100644 index 0000000..85339d8 --- /dev/null +++ b/.config/pipewire/pipewire.conf.bak @@ -0,0 +1,288 @@ +# Daemon config file for PipeWire version "0.3.51" # +# +# Copy and edit this file in /etc/pipewire for system-wide changes +# or in ~/.config/pipewire for local changes. +# +# It is also possible to place a file with an updated section in +# /etc/pipewire/pipewire.conf.d/ for system-wide changes or in +# ~/.config/pipewire/pipewire.conf.d/ for local changes. +# + +context.properties = { + ## Configure properties in the system. + #library.name.system = support/libspa-support + #context.data-loop.library.name.system = support/libspa-support + #support.dbus = true + #link.max-buffers = 64 + link.max-buffers = 16 # version < 3 clients can't handle more + #mem.warn-mlock = false + #mem.allow-mlock = true + #mem.mlock-all = false + #clock.power-of-two-quantum = true + #log.level = 2 + #cpu.zero.denormals = false + + core.daemon = true # listening for socket connections + core.name = pipewire-0 # core name and socket name + + ## Properties for the DSP configuration. + default.clock.rate = 48000 + #default.clock.allowed-rates = [ 48000 ] + default.clock.quantum = 1024 + default.clock.min-quantum = 16 + #default.clock.max-quantum = 2048 + #default.clock.quantum-limit = 8192 + #default.video.width = 640 + #default.video.height = 480 + #default.video.rate.num = 25 + #default.video.rate.denom = 1 + # + #settings.check-quantum = false + #settings.check-rate = false + # + # These overrides are only applied when running in a vm. + vm.overrides = { + default.clock.min-quantum = 1024 + } +} + +context.spa-libs = { + # = + # + # Used to find spa factory names. It maps an spa factory name + # regular expression to a library name that should contain + # that factory. + # + audio.convert.* = audioconvert/libspa-audioconvert + api.alsa.* = alsa/libspa-alsa + api.v4l2.* = v4l2/libspa-v4l2 + api.libcamera.* = libcamera/libspa-libcamera + api.bluez5.* = bluez5/libspa-bluez5 + api.vulkan.* = vulkan/libspa-vulkan + api.jack.* = jack/libspa-jack + support.* = support/libspa-support + #videotestsrc = videotestsrc/libspa-videotestsrc + #audiotestsrc = audiotestsrc/libspa-audiotestsrc +} + +context.modules = [ + #{ name = + # [ args = { = ... } ] + # [ flags = [ [ ifexists ] [ nofail ] ] + #} + # + # Loads a module with the given parameters. + # If ifexists is given, the module is ignored when it is not found. + # If nofail is given, module initialization failures are ignored. + # + + # Uses realtime scheduling to boost the audio thread priorities. This uses + # RTKit if the user doesn't have permission to use regular realtime + # scheduling. + { name = libpipewire-module-rt + args = { + nice.level = -11 + #rt.prio = 88 + #rt.time.soft = -1 + #rt.time.hard = -1 + } + flags = [ ifexists nofail ] + } + + # The native communication protocol. + { name = libpipewire-module-protocol-native } + + # The profile module. Allows application to access profiler + # and performance data. It provides an interface that is used + # by pw-top and pw-profiler. + { name = libpipewire-module-profiler } + + # Allows applications to create metadata objects. It creates + # a factory for Metadata objects. + { name = libpipewire-module-metadata } + + # Creates a factory for making devices that run in the + # context of the PipeWire server. + { name = libpipewire-module-spa-device-factory } + + # Creates a factory for making nodes that run in the + # context of the PipeWire server. + { name = libpipewire-module-spa-node-factory } + + # Allows creating nodes that run in the context of the + # client. Is used by all clients that want to provide + # data to PipeWire. + { name = libpipewire-module-client-node } + + # Allows creating devices that run in the context of the + # client. Is used by the session manager. + { name = libpipewire-module-client-device } + + # The portal module monitors the PID of the portal process + # and tags connections with the same PID as portal + # connections. + { name = libpipewire-module-portal + flags = [ ifexists nofail ] + } + + # The access module can perform access checks and block + # new clients. + { name = libpipewire-module-access + args = { + # access.allowed to list an array of paths of allowed + # apps. + #access.allowed = [ + # /usr/bin/pipewire-media-session + #] + + # An array of rejected paths. + #access.rejected = [ ] + + # An array of paths with restricted access. + #access.restricted = [ ] + + # Anything not in the above lists gets assigned the + # access.force permission. + #access.force = flatpak + } + } + + # Makes a factory for wrapping nodes in an adapter with a + # converter and resampler. + { name = libpipewire-module-adapter } + + # Makes a factory for creating links between ports. + { name = libpipewire-module-link-factory } + + # Provides factories to make session manager objects. + { name = libpipewire-module-session-manager } + + # { name = libpipewire-module-filter-chain + # args = { + # node.description = "Noise Canceling source" + # media.name = "Noise Canceling source" + # filter.graph = { + # nodes = [ + # { + # type = ladspa + # name = rnnoise + # # plugin = ladspa/librnnoise_ladspa + # plugin = /usr/lib/ladspa/librnnoise_ladspa.so + # label = noise_suppressor_stereo + # control = { + # "VAD Threshold (%)" 50.0 + # } + # } + # ] + # } + # capture.props = { + # node.name = "capture.rnnoise_source" + # node.passive = true + # } + # playback.props = { + # node.name = "rnnoise_source" + # media.class = Audio/Source + # } + # } + # } + + # Use libcanberra to play X11 Bell + #{ name = libpipewire-module-x11-bell + # args = { + # #sink.name = "" + # #sample.name = "bell-window-system" + # #x11.display = null + # #x11.xauthority = null + # } + #} +] + +context.objects = [ + #{ factory = + # [ args = { = ... } ] + # [ flags = [ [ nofail ] ] + #} + # + # Creates an object from a PipeWire factory with the given parameters. + # If nofail is given, errors are ignored (and no object is created). + # + #{ factory = spa-node-factory args = { factory.name = videotestsrc node.name = videotestsrc Spa:Pod:Object:Param:Props:patternType = 1 } } + #{ factory = spa-device-factory args = { factory.name = api.jack.device foo=bar } flags = [ nofail ] } + #{ factory = spa-device-factory args = { factory.name = api.alsa.enum.udev } } + #{ factory = spa-node-factory args = { factory.name = api.alsa.seq.bridge node.name = Internal-MIDI-Bridge } } + #{ factory = adapter args = { factory.name = audiotestsrc node.name = my-test } } + #{ factory = spa-node-factory args = { factory.name = api.vulkan.compute.source node.name = my-compute-source } } + + # A default dummy driver. This handles nodes marked with the "node.always-driver" + # property when no other driver is currently active. JACK clients need this. + { factory = spa-node-factory + args = { + factory.name = support.node.driver + node.name = Dummy-Driver + node.group = pipewire.dummy + priority.driver = 20000 + } + } + { factory = spa-node-factory + args = { + factory.name = support.node.driver + node.name = Freewheel-Driver + priority.driver = 19000 + node.group = pipewire.freewheel + node.freewheel = true + } + } + # This creates a new Source node. It will have input ports + # that you can link, to provide audio for this source. + #{ factory = adapter + # args = { + # factory.name = support.null-audio-sink + # node.name = "my-mic" + # node.description = "Microphone" + # media.class = "Audio/Source/Virtual" + # audio.position = "FL,FR" + # } + #} + + # This creates a single PCM source device for the given + # alsa device path hw:0. You can change source to sink + # to make a sink in the same way. + #{ factory = adapter + # args = { + # factory.name = api.alsa.pcm.source + # node.name = "alsa-source" + # node.description = "PCM Source" + # media.class = "Audio/Source" + # api.alsa.path = "hw:0" + # api.alsa.period-size = 1024 + # api.alsa.headroom = 0 + # api.alsa.disable-mmap = false + # api.alsa.disable-batch = false + # audio.format = "S16LE" + # audio.rate = 48000 + # audio.channels = 2 + # audio.position = "FL,FR" + # } + #} +] + +context.exec = [ + #{ path = [ args = "" ] } + # + # Execute the given program with arguments. + # + # You can optionally start the session manager here, + # but it is better to start it as a systemd service. + # Run the session manager with -h for options. + # + #{ path = "/usr/bin/pipewire-media-session" args = "" } + # + # You can optionally start the pulseaudio-server here as well + # but it is better to start it as a systemd service. + # It can be interesting to start another daemon here that listens + # on another address with the -a option (eg. -a tcp:4713). + # + #{ path = "/usr/bin/pipewire" args = "-c pipewire-pulse.conf" } + # { path = "/usr/bin/pipewire" args = "-c /usr/share/pipewire/filter-chain/source-rnnoise.conf" } + { path = "pactl" args = "load-module module-switch-on-connect" } +] diff --git a/.config/pipewire/pipewire.conf.d/50-samplerate.conf b/.config/pipewire/pipewire.conf.d/50-samplerate.conf new file mode 100644 index 0000000..6dceb7d --- /dev/null +++ b/.config/pipewire/pipewire.conf.d/50-samplerate.conf @@ -0,0 +1,4 @@ +context.properties = { + default.clock.rate = 48000 + default.clock.allowed-rates = [ 48000 ] +} diff --git a/.config/pipewire/pipewire.conf.d/99-input-denoising.conf b/.config/pipewire/pipewire.conf.d/99-input-denoising.conf new file mode 100644 index 0000000..3ba4400 --- /dev/null +++ b/.config/pipewire/pipewire.conf.d/99-input-denoising.conf @@ -0,0 +1,33 @@ +context.modules = [ +{ name = libpipewire-module-filter-chain + args = { + node.description = "Noise Canceling source" + media.name = "Noise Canceling source" + filter.graph = { + nodes = [ + { + type = ladspa + name = rnnoise + plugin = /usr/lib/ladspa/librnnoise_ladspa.so + label = noise_suppressor_mono + control = { + "VAD Threshold (%)" = 69.0 + "VAD Grace Period (ms)" = 200 + "Retroactive VAD Grace (ms)" = 0 + } + } + ] + } + capture.props = { + node.name = "capture.rnnoise_source" + node.passive = true + audio.rate = 48000 + } + playback.props = { + node.name = "rnnoise_source" + media.class = Audio/Source + audio.rate = 48000 + } + } +} +] diff --git a/.zsh/.zshrc##default b/.zsh/.zshrc##default index ffef524..f7f86ec 100644 --- a/.zsh/.zshrc##default +++ b/.zsh/.zshrc##default @@ -15,6 +15,14 @@ HISTFILE=~/.zsh_history HISTSIZE=10000 HISTFILESIZE=2000 HISTCONTROL=ignoreboth +# as soon as you hit enter, append to $HISTFILE +setopt INC_APPEND_HISTORY +# merge history from all running shells +setopt SHARE_HISTORY +# ignore duplicates and trivial commands +setopt HIST_IGNORE_DUPS +setopt HIST_IGNORE_SPACE + # fpath=(/Users/sudacode/.docker/completions $fpath) FPATH="$HOME/.docker/completions:$FPATH" From 4b32fb704a830c85a60e89b3faaac62c3fa9951d Mon Sep 17 00:00:00 2001 From: sudacode Date: Mon, 5 May 2025 16:03:12 -0700 Subject: [PATCH 5/8] update tmux config --- .config/tmux/tmux.conf | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index 26b1256..adac217 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -152,14 +152,6 @@ set -gq @catppuccin_window_flags_icon_bell " 󰂞" # ! # Matches icon order when using `#F` (`#!~[*-]MZ`) set -gq @catppuccin_window_flags_icon_format "##{?window_activity_flag,#{E:@catppuccin_window_flags_icon_activity},}##{?window_bell_flag,#{E:@catppuccin_window_flags_icon_bell},}##{?window_silence_flag,#{E:@catppuccin_window_flags_icon_silent},}##{?window_active,#{E:@catppuccin_window_flags_icon_current},}##{?window_last_flag,#{E:@catppuccin_window_flags_icon_last},}##{?window_marked_flag,#{E:@catppuccin_window_flags_icon_mark},}##{?window_zoomed_flag,#{E:@catppuccin_window_flags_icon_zoom},} " -# Status line options -set -gq @catppuccin_status_left_separator "" -set -gq @catppuccin_status_middle_separator "" -set -gq @catppuccin_status_right_separator "█" -set -gq @catppuccin_status_connect_separator "yes" # yes, no -set -gq @catppuccin_status_fill "icon" -set -gq @catppuccin_status_module_bg_color "#{@thm_surface_0}" - # allow nvim images set -gq allow-passthrough on set -g visual-activity off From 0ffeef12aac1ea3a2d6024dd77a9d692246151ab Mon Sep 17 00:00:00 2001 From: sudacode Date: Tue, 6 May 2025 02:01:13 -0700 Subject: [PATCH 6/8] fix history --- .zsh/.zshrc##default | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.zsh/.zshrc##default b/.zsh/.zshrc##default index f7f86ec..af48827 100644 --- a/.zsh/.zshrc##default +++ b/.zsh/.zshrc##default @@ -11,18 +11,18 @@ source ~/.environment source <(fzf --zsh) eval $(thefuck --alias) -HISTFILE=~/.zsh_history -HISTSIZE=10000 -HISTFILESIZE=2000 -HISTCONTROL=ignoreboth -# as soon as you hit enter, append to $HISTFILE -setopt INC_APPEND_HISTORY -# merge history from all running shells -setopt SHARE_HISTORY -# ignore duplicates and trivial commands -setopt HIST_IGNORE_DUPS -setopt HIST_IGNORE_SPACE +HISTFILE=~/.zsh_history +HISTCONTROL=ignoreboth +HISTSIZE=10000 # max lines kept in memory +SAVEHIST=10000 # max lines saved to $HISTFILE + +# 2. Behavior flags +setopt APPEND_HISTORY # append, don’t rewrite the entire file on exit +setopt INC_APPEND_HISTORY # write each command as it’s entered +setopt SHARE_HISTORY # merge history across all running zsh’s +setopt HIST_IGNORE_ALL_DUPS # don’t record a command if it’s already in history +setopt HIST_IGNORE_SPACE # don’t record commands that start with a space # fpath=(/Users/sudacode/.docker/completions $fpath) FPATH="$HOME/.docker/completions:$FPATH" From 11338e64c61b919cf97e8d9f1e9389f2a4d61e97 Mon Sep 17 00:00:00 2001 From: sudacode Date: Tue, 6 May 2025 02:09:09 -0700 Subject: [PATCH 7/8] update style --- .config/swaync/config.json | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.config/swaync/config.json b/.config/swaync/config.json index 9c0d862..21827b3 100644 --- a/.config/swaync/config.json +++ b/.config/swaync/config.json @@ -12,10 +12,10 @@ "control-center-margin-left": 0, "notification-2fa-action": true, - "notification-inline-replies": false, + "notification-inline-replies": true, "notification-window-width": 500, - "notification-icon-size": 64, - "notification-body-image-height": 400, + "notification-icon-size": 128, + "notification-body-image-height": 300, "notification-body-image-width": 225, "timeout": 4, @@ -63,6 +63,18 @@ "image-size": 96, "image-radius": 12 }, + "volume": { + "label": "", + "show-per-app": true, + "show-per-app-icon": true, + "show-per-app-label": true, + "empty-list-label": "No applications using audio", + "expand-button-label": "", + "collapse-button-label": "ﬔ", + "icon-size": 24, + "animation-type": "slide_down", + "animation-duration": 250 + }, "label": { "max-lines": 1, "text": "󰒋" From b3a468c129b2ac459cd18219de4e561b690835c2 Mon Sep 17 00:00:00 2001 From: sudacode Date: Tue, 6 May 2025 04:29:34 -0700 Subject: [PATCH 8/8] revert icon size change --- .config/swaync/config.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/swaync/config.json b/.config/swaync/config.json index 21827b3..b41c4cb 100644 --- a/.config/swaync/config.json +++ b/.config/swaync/config.json @@ -14,8 +14,8 @@ "notification-2fa-action": true, "notification-inline-replies": true, "notification-window-width": 500, - "notification-icon-size": 128, - "notification-body-image-height": 300, + "notification-icon-size": 64, + "notification-body-image-height": 400, "notification-body-image-width": 225, "timeout": 4,