summaryrefslogtreecommitdiffstats
path: root/screen-locker.sh
blob: f8ccad58b9fbf605ac22372c534837468642ac17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh
#----------------------------------------------------
# Version:      0.1.1
# Author:       Florian "Bluewind" Pritz <f-p@gmx.at>
#
# Licensed under WTFPL v2
#   (see COPYING for full license text)
#    
#----------------------------------------------------
# mange script for locking the screen
#----------------------------------------------------

lock () {
  gajim-remote change_status away &
  ssh mistral 'python ~/bin/irssi_socket_control.py 1'
  (sleep 0.5 && swarp 0 0) &
  slock 
}

unlock () {
  gajim-remote change_status online &
  ssh mistral 'python ~/bin/irssi_socket_control.py 0'
}

if pidof slock &> /dev/null; then exit 1; fi

(lock && unlock) &