Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >>>notifiers/perf/_xfce4-genmon-plugin.txt :
- /* If the command starts with ~ expand it */
- /* If the command fails, display XXX */
- /* Test if the result is an Image or a Text */
- <img>path to image</img>
- /* Test if the result has a clickable Image (button) */
- <click>path to command</click>
- /* Test if the result is a Text */
- <txt> text </txt>
- /* Test if the result is a Bar */
- <bar>0-100</bar>
- /* Test if a ToolTip is given */
- <tool>tooltip</tool>
- >>>notifiers/perf/check :
- #!/bin/bash
- xpath=/home/user/notifiers/perf
- #ipath=/home/user/.icons/AwOken/extra/cpufreq-applet
- ipath=${xpath}
- ko=${ipath}/cpufreq-100.png
- ok=${ipath}/cpufreq-50.png
- # get current governor
- # old cpufreq
- #g_cur="$(cpufreq-info -p | awk '{print $3}' | xargs echo -n)"
- g_cur="$(cpupower -c 0 frequency-info -p | tail -n1 | awk '{print $3}' | xargs echo -n)"
- if [ "conservative" == "${g_cur}" ]; then
- echo "<tool>"${g_cur}"</tool><img>"${ok}"</img><click>"${xpath}"/set-performance</click>"
- else
- echo "<tool>"${g_cur}"</tool><img>"${ko}"</img><click>"${xpath}"/set-conservative</click>"
- fi
- >>>notifiers/perf/set-conservative :
- #!/bin/bash
- sudo cpupower -c all frequency-set -g conservative
- # old cpufreq
- #for c in {0..2};do
- # sudo cpufreq-set -c$c -g conservative
- #done
- >>>notifiers/perf/set-performance :
- #!/bin/bash
- sudo cpupower -c all frequency-set -g performance
- # old cpufreq
- #for c in {0..2};do
- # sudo cpufreq-set -c$c -g performance
- #done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement