11 lines
423 B
Bash
11 lines
423 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
# If screen is locked (GNOME Screensaver true), enable GPU computing. Otherwise disable GPU computing.
|
||
|
dbus-monitor --session "type='signal',interface='org.gnome.ScreenSaver'" |
|
||
|
while read x; do
|
||
|
case "$x" in
|
||
|
*"boolean true"*) boinccmd --set_gpu_mode always && echo "GPU Computing Enabled";;
|
||
|
*"boolean false"*) boinccmd --set_gpu_mode never && echo "GPU Computing Disabled";;
|
||
|
esac
|
||
|
done
|