File nag-cpu.sh of Package branding-zeus

#!/bin/sh

GOV='
echo "$(cpupower frequency-info |grep governor |sed /available/d |sed s/.*governor// |sed s/may.*//)" \
 | labnag -f Mono -t 0 \
-l -L " Current Governor " \
-k on-demand -y top \
-m " Choose CPU Governor: " \
-Z " Performance " "run0 cpupower  frequency-set -g performance  && nag-cpu.sh" \
-Z " Powersave " "run0 cpupower  frequency-set -g powersave  && nag-cpu.sh" \
-Z " Schedutil " "run0 cpupower  frequency-set -g schedutil  && nag-cpu.sh" \
-Z " X " "nag-cpu.sh" \
--details-border-size 0 \
--message-padding 6 \
--button-padding 3 \
--button-gap 3 \
--button-border-size 1 \
--background-color 035b00 \
--button-background-color 012900 \
--button-border-color 06ac00 \
--border-bottom-color 011d00 \
--details-background-color 011d00'

AMDPSTATE='labnag -f Mono -t 0 \
-k on-demand \
-m " Choose Pstate Driver: " \
-Z " Active " "run0 cpupower set -m active" \
-Z " Guided " "run0 cpupower set -m guided" \
-Z " Passive " "run0 cpupower set -m passive" \
-Z " EPP Hint (Active) " "nag-epphint.sh " \
-Z " X "  \
--details-border-size 0 \
--message-padding 6 \
--button-padding 3 \
--button-gap 3 \
--button-border-size 1 \
--background-color 035b00 \
--button-background-color 012900 \
--button-border-color 06ac00 \
--border-bottom-color 011d00 \
--details-background-color 011d00'

TURBO='
echo "$(cpupower frequency-info |grep Active:)" \
 | labnag -f Mono -t 0 \
-l -L " Current Status " \
-k on-demand -y top \
-m " Turbo Boost: " \
-Z " On " "run0 cpupower set -t 1  && nag-cpu.sh" \
-Z " Off " "run0 cpupower set -t 0  && nag-cpu.sh" \
-Z " X " "nag-cpu.sh" \
--details-border-size 0 \
--message-padding 6 \
--button-padding 3 \
--button-gap 3 \
--button-border-size 1 \
--background-color 035b00 \
--button-background-color 012900 \
--button-border-color 06ac00 \
--border-bottom-color 011d00 \
--details-background-color 011d00'


echo "$(cpupower frequency-info)" \
| labnag -f Mono -t 0 \
-l -L " CPU Info " \
-k on-demand \
-m " Choose: " \
-B " AMD Pstate " "$AMDPSTATE" \
-Z " Governor " "$GOV" \
-Z " Turbo " "$TURBO" \
-Z " X "  \
--details-border-size 0 \
--message-padding 6 \
--button-padding 3 \
--button-gap 3 \
--button-border-size 1 \
--background-color 035b00 \
--button-background-color 012900 \
--button-border-color 06ac00 \
--border-bottom-color 011d00 \
--details-background-color 011d00
openSUSE Build Service is sponsored by