Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add totem detection #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions lightsOn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Description: Bash script that prevents the screensaver and display power
# management (DPMS) to be activated when you are watching Flash Videos
# fullscreen on Firefox and Chromium.
# Can detect mplayer, minitube, and VLC when they are fullscreen too.
# Can detect mplayer, minitube, VLC and Totem when they are fullscreen too.
# Also, screensaver can be prevented when certain specified programs are running.
# lightsOn.sh needs xscreensaver or kscreensaver to work.

Expand All @@ -29,10 +29,11 @@


# Modify these variables if you want this script to detect if Mplayer,
# VLC, Minitube, or Firefox or Chromium Flash Video are Fullscreen and disable
# VLC, Minitube, Totem or Firefox or Chromium Flash Video are Fullscreen and disable
# xscreensaver/kscreensaver and PowerManagement.
mplayer_detection=1
vlc_detection=1
totem_detection=1
firefox_flash_detection=1
chromium_flash_detection=1
minitube_detection=1
Expand Down Expand Up @@ -172,6 +173,18 @@ isAppRunning()
fi
fi


# Check if user want to detect totem fullscreen, modify variable totem_detection
if [ $totem_detection == 1 ];then
if [[ "$activ_win_title" = *totem* ]];then
#check if totem is running.
totem_process=`pgrep -lc totem`
if [ $totem_process -ge 1 ]; then
return 1
fi
fi
fi

# Check if user want to detect minitube fullscreen, modify variable minitube_detection
if [ $minitube_detection == 1 ];then
if [[ "$activ_win_title" = *minitube* ]];then
Expand Down