fix: audit LOW fixes — nmcli guards, sink cancel, cpugov stderr, gpu interval
All checks were successful
Update PKGBUILD version / update-pkgver (push) Successful in 2s
All checks were successful
Update PKGBUILD version / update-pkgver (push) Successful in 2s
- moonarch-vpn: add `--` argument-terminator to `nmcli connection up/down` so a profile name starting with `-` is never interpreted as a flag. - moonarch-sink-switcher: guard against empty `$sink` when walker is cancelled, since awk masks walker's non-zero exit. Prevents the error `pactl set-default-sink ""` on every dismissal. - moonarch-waybar-cpugov: redirect stderr so non-cpufreq systems (VMs, some desktops) do not spam the journal on every 60s poll. - waybar config: switch custom/gpu-usage from `restart-interval: 10` to `interval: 60`. The module lives in a closed drawer, a 10 s poll spawn was unnecessary background noise.
This commit is contained in:
parent
8aaf7cae5b
commit
d5c1b8a155
@ -5,7 +5,11 @@
|
||||
# choose audio sink via rofi
|
||||
# changes default sink and moves all streams to that sink
|
||||
|
||||
sink=$(pactl list sinks short | awk '{print $1, $2}' | walker -d -p " Sink Switcher" | awk '{print $1}') &&
|
||||
sink=$(pactl list sinks short | awk '{print $1, $2}' | walker -d -p " Sink Switcher" | awk '{print $1}')
|
||||
|
||||
# Walker cancel returns empty — awk masks its non-zero exit. Guard here so we
|
||||
# don't call `pactl set-default-sink ""` on dismissal.
|
||||
[[ -n "$sink" ]] || exit 0
|
||||
|
||||
pactl set-default-sink "$sink" &&
|
||||
for input in $(pactl list sink-inputs short | awk '{print $1}'); do
|
||||
|
||||
@ -39,13 +39,13 @@ function extract_connection_name() {
|
||||
# Requires nm-applet (or another NM secret agent) for interactive auth.
|
||||
function connect_vpn() {
|
||||
local connection="$1"
|
||||
nmcli connection up "$connection"
|
||||
nmcli connection up -- "$connection"
|
||||
}
|
||||
|
||||
# Disconnect a VPN.
|
||||
function disconnect_vpn() {
|
||||
local connection="$1"
|
||||
nmcli connection down "$connection"
|
||||
nmcli connection down -- "$connection"
|
||||
}
|
||||
|
||||
# Toggle the VPN connection based on its current state.
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# ABOUTME: Waybar-Modul das den CPU-Governor als JSON ausgibt.
|
||||
# ABOUTME: Wird von der Waybar custom/cpugov Config referenziert.
|
||||
|
||||
CPU_GOV=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)
|
||||
CPU_GOV=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor 2>/dev/null)
|
||||
|
||||
case $CPU_GOV in
|
||||
performance)
|
||||
|
||||
@ -319,7 +319,7 @@
|
||||
"custom/gpu-usage": {
|
||||
"exec": "moonarch-waybar-gpustat",
|
||||
"return-type": "json",
|
||||
"restart-interval": 10
|
||||
"interval": 60
|
||||
},
|
||||
"battery": {
|
||||
"bat": "BAT0",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user