aboutsummaryrefslogtreecommitdiffstats
path: root/bin/adjust_dpms
diff options
context:
space:
mode:
authorDavid Runge <david.runge@frqrec.com>2014-11-28 14:40:09 +0100
committerDavid Runge <david.runge@frqrec.com>2014-11-28 14:40:09 +0100
commit4041549aafb64057629e8f13d1876c44ae5fe9c8 (patch)
treed31c0d08b6ec25e0386ce26f6a677ce57f0d5518 /bin/adjust_dpms
parent8590cc9c6e9cdf5a460815cbf47a2b0b81c452a4 (diff)
downloaddotfiles-4041549aafb64057629e8f13d1876c44ae5fe9c8.tar.gz
dotfiles-4041549aafb64057629e8f13d1876c44ae5fe9c8.tar.bz2
dotfiles-4041549aafb64057629e8f13d1876c44ae5fe9c8.tar.xz
dotfiles-4041549aafb64057629e8f13d1876c44ae5fe9c8.zip
adjust_dpms: Merging script based programs into the same Array as the others. Adding -x to pidof check.
Diffstat (limited to 'bin/adjust_dpms')
-rwxr-xr-xbin/adjust_dpms15
1 files changed, 2 insertions, 13 deletions
diff --git a/bin/adjust_dpms b/bin/adjust_dpms
index 0391dba..c8e8a0f 100755
--- a/bin/adjust_dpms
+++ b/bin/adjust_dpms
@@ -18,10 +18,10 @@ else
exit 1
fi
-# loop all pre-compiled programs and check for running instances
+# loop all programs and check for running instances
for i in "${programs[@]}"
do
- pid=$(pidof $i)
+ pid=$(pidof -x $i)
re='^[0-9]+$'
if [[ $pid =~ $re ]]; then
echo "$i running ($pid)"
@@ -29,17 +29,6 @@ do
fi
done
-# loop all python2 run programs and check for running instances
-for i in "${python2[@]}"
-do
- pid=$(pidof python2 $i)
- re='^[0-9]+$'
- if [[ $pid =~ $re ]]; then
- echo "$i running ($pid)"
- blankoff=1
- fi
-done
-
# if valuable programs are running, don't use screen blanking
if [ $blankoff -gt 0 ]; then
echo "Some program requires screensaver to be off."