All pastes #1837300 Raw Edit

gnu_d

public shellscript v1 · immutable
#1837300 ·published 2010-03-13 16:01 UTC
rendered paste body
#!/bin/bash#      Copyright (C) 2010 Damjan Dimitrioski <damjandimitrioski at gmail dot com>##      This program is free software; you can redistribute it and/or modify#      it under the terms of the GNU General Public License as published by#      the Free Software Foundation; either version 2 of the License, or#      (at your option) any later version.#      #      This program is distributed in the hope that it will be useful,#      but WITHOUT ANY WARRANTY; without even the implied warranty of#      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the#      GNU General Public License for more details.#      #      You should have received a copy of the GNU General Public License#      along with this program; if not, write to the Free Software#      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,#      MA 02110-1301, USA.## Motion screensaver killer## Depends on:# - motion (Replace motion with any other program which detects motion and has activate command setting.)# - xscreensaver (Replace it with your favourite)# - kmotion (my script which deactivates the screensaver and stops motion's daemon)# - motion.conf sample conf at http://pastebin.ca/1837297#   Should be found at http://pastebin.ca/1837244# Program that makes the program motion to turn the screensaver off, on some motion.# Usage, make a new Desktop Entry, and when you go to the toilet, just press it.# or make a global hotkey.# Tested on KDE4.4if [[ -e "`pgrep 'xscreensaver'`" ]]; then xscreensaver; else echo "on"; fi#qdbus org.kde.screensaver /ScreenSaver org.freedesktop.ScreenSaver.SetActive truexscreensaver-command -activate&motion