diff options
author | Weitian LI <liweitianux@gmail.com> | 2014-06-13 21:12:21 +0800 |
---|---|---|
committer | Weitian LI <liweitianux@gmail.com> | 2014-06-13 21:12:21 +0800 |
commit | 78f7be4e4b6501b15b5fefc9f7824bbadf0daf2a (patch) | |
tree | b761e28709e4a6f45458c323b8870150827ef831 /.i3/scripts | |
parent | e1ce158f65c472b7c8d14c04fce94c85bc881a6c (diff) | |
download | dotfiles-78f7be4e4b6501b15b5fefc9f7824bbadf0daf2a.tar.bz2 |
Added various dotfiles.
* Xresources
* profile, xprofile, xinitrc
* bash (aliases, logout, profile, rc, completion)
* gitconfig
* gtkrc and gtk-bookmarks
* i3 configs (with py3status configs)
* i3status.conf
* lftp/rc
* tmux.conf
* xbindkeysrc
* mpdconf
* ncmpcpp (config and keys)
* sbclrc
* vifm (vifmrc, colors)
* urxvt (perl extensions)
* conkyrc (and conky/cronograph configs)
Diffstat (limited to '.i3/scripts')
-rwxr-xr-x | .i3/scripts/i3exit.sh | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/.i3/scripts/i3exit.sh b/.i3/scripts/i3exit.sh new file mode 100755 index 0000000..3616139 --- /dev/null +++ b/.i3/scripts/i3exit.sh @@ -0,0 +1,43 @@ +#!/bin/sh +# +# exit script used in i3 wm +# + +PNG_IMAGE="~/.i3/images/wallpaper.png" + +lock() { + if [ -f ${PNG_IMAGE} ]; then + i3lock -d -ti "${PNG_IMAGE}" + else + i3lock -d -c 000000 + fi +} + +case "$1" in + lock) + lock + ;; + logout) + i3-msg exit + ;; + suspend) + lock + dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Suspend + ;; + hibernate) + lock + dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Hibernate + ;; + reboot) + dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart + ;; + shutdown) + dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop + ;; + *) + echo "Usage: $0 {lock|logout|suspend|hibernate|reboot|shutdown}" + exit 2 +esac + +exit 0 + |