1e8b0d4ab0
Earlier ClaudeCode sessions had wired a `~/.zshrc.d/*.zsh` snippet loop plus a `~/.zshrc.local` fallback into defaults/shell/zshrc and made post-install.sh create the directory unconditionally — neither is a zsh convention nor documented anywhere. Remove both, simplify post-install to write only `source /etc/zsh/zshrc.moonarch`, drop stale rustup next-step hint, drop dead `confirm()` in lib.sh (orphan since transform.sh deletion 2026-04-21). moonarch-doctor: replace useless existence checks (zshrc.moonarch, /usr/share/moonarch/) with real signal. User-service and helper-script lists now derive from `pacman -Qql moonarch-git` (drift-proof) plus an explicit list of post-install-enabled externals (currently `stasis`). New udev-effectiveness check for charge_control_end_threshold — verifies group=wheel + group-writable, surfaces broken rules instead of staying silent. Translate two German ABOUTME comments (moonarch-waybar-cpugov, moonarch-waybar-gpustat) to English for consistency.
42 lines
834 B
Bash
Executable File
42 lines
834 B
Bash
Executable File
#!/usr/bin/bash
|
|
# ABOUTME: Waybar module that outputs the CPU governor as JSON.
|
|
# ABOUTME: Referenced by the Waybar custom/cpugov config.
|
|
|
|
CPU_GOV=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor 2>/dev/null)
|
|
|
|
case $CPU_GOV in
|
|
performance)
|
|
CPU_GOV_SHORT=
|
|
;;
|
|
balanced)
|
|
CPU_GOV_SHORT=
|
|
;;
|
|
powersave)
|
|
CPU_GOV_SHORT=
|
|
;;
|
|
userspace)
|
|
CPU_GOV_SHORT=uspace
|
|
;;
|
|
ondemand)
|
|
CPU_GOV_SHORT=ondmnd
|
|
;;
|
|
conservative)
|
|
CPU_GOV_SHORT=cons
|
|
;;
|
|
schedutil)
|
|
CPU_GOV_SHORT=sutil
|
|
;;
|
|
*)
|
|
CPU_GOV_SHORT="?"
|
|
;;
|
|
esac
|
|
|
|
CPU_GOV_FULL="${CPU_GOV^}"
|
|
|
|
jq --compact-output -n \
|
|
--arg text "$CPU_GOV_SHORT" \
|
|
--arg alt "$CPU_GOV_FULL" \
|
|
--arg tooltip "CPU Mode: $CPU_GOV_FULL" \
|
|
--arg class "cpugov" \
|
|
'{text: $text, alt: $alt, tooltip: $tooltip, class: $class}'
|