This repository has been archived on 2022-12-11. You can view files and clone it, but cannot push or open issues or pull requests.
dot-files/.bin/xmonadClose.sh

74 lines
3.4 KiB
Bash
Raw Normal View History

#!/bin/sh
# (C) Copyright Collin Doering 2011
#
# 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 3 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, see <http://www.gnu.org/licenses/>.
# File: xmonadClose.sh
# Author: Collin J. Doering <rekahsoft@gmail.com>
# Date: May 13, 2011
Some major revisions as i have recently replaced my desktop. Namely: * switched to systemd for user level daemons and startup programs originally run from .xinitrc * beefed up the logout menu implemented by .bin/xmonadClose.sh to support pretty well all windows-managers (with some minor modification) and now with support for suspend and hibernate .Xdefaults: * did a little rearrangement to make things pretty * added the clipboard extension .authinfo.gpg: .authinfo-cd.gpg: * encrypted authinfo files for gnus (emacs) .bash_profile: * now checks if ~/.bashrc is a file and then executes it instead of just assuming .bashrc: * added a few new aliases * modified path to include ~/.bin .bin/xmonadClose.sh: * now supports pretty well any window manager with minor modification (just edit the actionNames and actionExecs arrays respective elements) * now brings up a dmenu options menu to select one of cancel, logout, suspend, hybrid-sleep, hibernate, or shutdown * uses xdotool to send a hidden 'kill switch' to xmonad upon 'logout' * uses systemctl to suspend, hybrid-sleep and hibernate * uses the classic shutdown command for shutdown .config/mc/: * moved the config files from .mc .config/systemd/user/: * all user instance systemd service files go here default.target.wants/: * contains a symbolic link to all the currently enabled service files emacs.service: * starts the emacs daemon mpd.service: * starts a user level instance of mpd using the config ~/.mpdconf udiskie.service: * starts udiskie (a user level daemon for automounted media using udisk) urxvtd.service: * starts the urxvt daemon unclutter.service: * starts the uncluttered program trayer.service: * starts trayer using the options: --monitor 1 --edge top --align right --expand true --width 4 --height 2 --transparent true --tint 0x000000 xbindkeys.service: * starts xbindkeys xcompmgr.service: * starts xcompmgr xscreensaver.service: * starts xscreensaver .emacs: * added support for magit * added support for ipython * dropped in ELPA version of swank-clojure in place of the AUR version * preparing to use babel (part of org more for use with code) * upgraded yas to the most recent version from ELPA; need to smooth out some minor issues * python-mode is currently commented out in config but working; dropped in ELPA version in place of the AUR version i had previous * disabled gieser (in the process of dropping in the ELPA version..just ran into some hitch) * add a template for ruby to .emacs.d/templates .mpdconf: * user instance mpd config .screenrc: * re-enabled ncmpcpp in place of cmus as i'm using mpd now * disable mc in screen because it doesn't start correctly; mc is available through my xmonad scratchpad "mc" .vimrc: * enabled syntax highlighting .xbindkeysrc: * switched music keybindings from cmus-remote commands to there respective mpc commands * switched www key to conkeror in place of firefox .xinitrc: * use systemd --user to run a user instance of systemd to run startup programs generally run from this script. The programs i have written unit files are specified above and left as comments in this file. .xmobarrc: * my ethernet interface is now called 'eno1' not 'eth0' * TODO: need to setup wireless status xmobar widget for 'wlp7s0' .xmonad/xmonad.hs: * added keybinding for auto-umounting any disk auto-mounted by udiskie (Mod+shift+control u) * now using new .bin/xmonadClose.sh to kill session in a few different ways (Mod+shift q) * added a keybinding to toggle the status bar (xmobar) using (Mod b) * added better support for some full screen games: supertux2, doom3, steam and hl2 * set opacity on all emacs and gvim windows to 13/16 (btw this is done for urxvt using a property in .Xdefaults .xscreensaver: * an auto-generated file by xscreensaver-demo; may consider removing in the future as it can always be auto-generated but its nice to have all my screensavers saved and ready .xsession: * not currently using since i use slim but here for compatibility with gdm,kdm and other de's .zshrc: * some auto-generated changes thanks to compinstall * added a few new aliases * modified path to include ~/.bin Signed-off-by: Collin Doering <rekahsoft@gmail.com>
2013-03-11 03:26:58 +00:00
# Description: A simple script to allow a nice dmenu gui when logging out,
# shutting down, or rebooting
# TODO: * Support sleep and hibernate
# * Needs to check whether a reboot/shutdown is allowed (user must be in the group
# 'power' and must be the only user logged in or they will be prompted for sudo's
# password to override)
2013-11-03 03:18:16 +00:00
# * Add support for the user to specify a timer *needs some work yet*
Did a variety of changes documented by file below; Key changes include: * finally have multiple smtp accounts working with gnu/emacs! * using dunst (a notification-daemon) * fixes to mpd's service files mpd.{service,socket} to allow for socket activation via dbus/systemd .authinfo.gpg: * now holds the information for all my email accounts .bashrc: * set LANG and LC_MESSAGE variables .bin/xmonadClose.sh: * added support for restart which was missed but trivial to implement .config/dunst/dunstrc: * slightly modified version of skeletal dunstrc provided by the dunst package .config/mc/ini: * automatic changes made by mc .config/mc/panels.ini: * deleted; no need to keep this in the git repo since it is modified automatically by mc to save the panel's state/s .config/systemd/user/dunst.service: * a service file to manage dunst - a customizable and lightweight notification-daemon .config/systemd/user/mpd.service: * now uses socket activation to allow mpd to be used over the network (via mpd.socket) .config/systemd/user/mpd.socket: * a socket file denoting what port/s to open when mpd.service is run .emacs: * disable pastebin extension because pastebin is a insane and the api has changed * set the mail function to smtpmain-send-it .emacs.d/themes/manoj-transparent-theme.el: * fixed minor error caused by using "nill" in place of nil * change the marked text background color from blue to gray19 .gitconfig: * set default name * set some fancy colors .gnus: * finally now supports multiple smtp accounts! * some minor cleanup * disabled gnus daemon until i spend some time looking into its uses .local/share/mc/skins/gotar-mod.ini: * set the background of the currently selected file to gray in place of default (transparent) so that in transparent terminals the currently selected file is noticeably highlighted .mpdconf: * no real changes; comments .ncmpcpp/config: * added support for notification using notify-send (libnotify and dunst) .screenrc: * set 256 bit color for urxvt .xinitrc: * set GENERAL_SCREEN instead of exporting it * shrink the case expression responsible for determining which wm to launch .xmonad/xmonad.hs: * doMaxFloat pavucontrol instead of doFullFloat .zshrc: * set LANG and LC_MESSAGE variables * added support to temporarily disable unclutter when running a command * now the alias 'qemu' disables unclutter before running qemu with kvm enabled * TODO: find commonalities between .bashrc and .zshrc and create a second shell script that does the common tasks; then the new shell script can be sourced from either .bashrc or .zshrc Signed-off-by: Collin J. Doering <rekahsoft@gmail.com>
2013-03-19 22:36:19 +00:00
# - Needs to provide a way to cancel the time
# - Would be nice if there was some notification when there's n min left in the timer
Some major revisions as i have recently replaced my desktop. Namely: * switched to systemd for user level daemons and startup programs originally run from .xinitrc * beefed up the logout menu implemented by .bin/xmonadClose.sh to support pretty well all windows-managers (with some minor modification) and now with support for suspend and hibernate .Xdefaults: * did a little rearrangement to make things pretty * added the clipboard extension .authinfo.gpg: .authinfo-cd.gpg: * encrypted authinfo files for gnus (emacs) .bash_profile: * now checks if ~/.bashrc is a file and then executes it instead of just assuming .bashrc: * added a few new aliases * modified path to include ~/.bin .bin/xmonadClose.sh: * now supports pretty well any window manager with minor modification (just edit the actionNames and actionExecs arrays respective elements) * now brings up a dmenu options menu to select one of cancel, logout, suspend, hybrid-sleep, hibernate, or shutdown * uses xdotool to send a hidden 'kill switch' to xmonad upon 'logout' * uses systemctl to suspend, hybrid-sleep and hibernate * uses the classic shutdown command for shutdown .config/mc/: * moved the config files from .mc .config/systemd/user/: * all user instance systemd service files go here default.target.wants/: * contains a symbolic link to all the currently enabled service files emacs.service: * starts the emacs daemon mpd.service: * starts a user level instance of mpd using the config ~/.mpdconf udiskie.service: * starts udiskie (a user level daemon for automounted media using udisk) urxvtd.service: * starts the urxvt daemon unclutter.service: * starts the uncluttered program trayer.service: * starts trayer using the options: --monitor 1 --edge top --align right --expand true --width 4 --height 2 --transparent true --tint 0x000000 xbindkeys.service: * starts xbindkeys xcompmgr.service: * starts xcompmgr xscreensaver.service: * starts xscreensaver .emacs: * added support for magit * added support for ipython * dropped in ELPA version of swank-clojure in place of the AUR version * preparing to use babel (part of org more for use with code) * upgraded yas to the most recent version from ELPA; need to smooth out some minor issues * python-mode is currently commented out in config but working; dropped in ELPA version in place of the AUR version i had previous * disabled gieser (in the process of dropping in the ELPA version..just ran into some hitch) * add a template for ruby to .emacs.d/templates .mpdconf: * user instance mpd config .screenrc: * re-enabled ncmpcpp in place of cmus as i'm using mpd now * disable mc in screen because it doesn't start correctly; mc is available through my xmonad scratchpad "mc" .vimrc: * enabled syntax highlighting .xbindkeysrc: * switched music keybindings from cmus-remote commands to there respective mpc commands * switched www key to conkeror in place of firefox .xinitrc: * use systemd --user to run a user instance of systemd to run startup programs generally run from this script. The programs i have written unit files are specified above and left as comments in this file. .xmobarrc: * my ethernet interface is now called 'eno1' not 'eth0' * TODO: need to setup wireless status xmobar widget for 'wlp7s0' .xmonad/xmonad.hs: * added keybinding for auto-umounting any disk auto-mounted by udiskie (Mod+shift+control u) * now using new .bin/xmonadClose.sh to kill session in a few different ways (Mod+shift q) * added a keybinding to toggle the status bar (xmobar) using (Mod b) * added better support for some full screen games: supertux2, doom3, steam and hl2 * set opacity on all emacs and gvim windows to 13/16 (btw this is done for urxvt using a property in .Xdefaults .xscreensaver: * an auto-generated file by xscreensaver-demo; may consider removing in the future as it can always be auto-generated but its nice to have all my screensavers saved and ready .xsession: * not currently using since i use slim but here for compatibility with gdm,kdm and other de's .zshrc: * some auto-generated changes thanks to compinstall * added a few new aliases * modified path to include ~/.bin Signed-off-by: Collin Doering <rekahsoft@gmail.com>
2013-03-11 03:26:58 +00:00
# * re-write in haskell direct into ~/.xmonad/xmonad.hs using the dmenu extension(?)
# - issue with that is then the script could only be used within xmonad
# - perhaps consider taking a second argument when logout is passed as the first
# so that the second argument could be used as a 'logout command' and thus
# this script could be used with any wm
2013-11-03 03:18:16 +00:00
actionNames=(logout suspend hibernate hybrid-sleep shutdown restart)
actionExecs=("xdotool key super+control+shift+End"
Some major revisions as i have recently replaced my desktop. Namely: * switched to systemd for user level daemons and startup programs originally run from .xinitrc * beefed up the logout menu implemented by .bin/xmonadClose.sh to support pretty well all windows-managers (with some minor modification) and now with support for suspend and hibernate .Xdefaults: * did a little rearrangement to make things pretty * added the clipboard extension .authinfo.gpg: .authinfo-cd.gpg: * encrypted authinfo files for gnus (emacs) .bash_profile: * now checks if ~/.bashrc is a file and then executes it instead of just assuming .bashrc: * added a few new aliases * modified path to include ~/.bin .bin/xmonadClose.sh: * now supports pretty well any window manager with minor modification (just edit the actionNames and actionExecs arrays respective elements) * now brings up a dmenu options menu to select one of cancel, logout, suspend, hybrid-sleep, hibernate, or shutdown * uses xdotool to send a hidden 'kill switch' to xmonad upon 'logout' * uses systemctl to suspend, hybrid-sleep and hibernate * uses the classic shutdown command for shutdown .config/mc/: * moved the config files from .mc .config/systemd/user/: * all user instance systemd service files go here default.target.wants/: * contains a symbolic link to all the currently enabled service files emacs.service: * starts the emacs daemon mpd.service: * starts a user level instance of mpd using the config ~/.mpdconf udiskie.service: * starts udiskie (a user level daemon for automounted media using udisk) urxvtd.service: * starts the urxvt daemon unclutter.service: * starts the uncluttered program trayer.service: * starts trayer using the options: --monitor 1 --edge top --align right --expand true --width 4 --height 2 --transparent true --tint 0x000000 xbindkeys.service: * starts xbindkeys xcompmgr.service: * starts xcompmgr xscreensaver.service: * starts xscreensaver .emacs: * added support for magit * added support for ipython * dropped in ELPA version of swank-clojure in place of the AUR version * preparing to use babel (part of org more for use with code) * upgraded yas to the most recent version from ELPA; need to smooth out some minor issues * python-mode is currently commented out in config but working; dropped in ELPA version in place of the AUR version i had previous * disabled gieser (in the process of dropping in the ELPA version..just ran into some hitch) * add a template for ruby to .emacs.d/templates .mpdconf: * user instance mpd config .screenrc: * re-enabled ncmpcpp in place of cmus as i'm using mpd now * disable mc in screen because it doesn't start correctly; mc is available through my xmonad scratchpad "mc" .vimrc: * enabled syntax highlighting .xbindkeysrc: * switched music keybindings from cmus-remote commands to there respective mpc commands * switched www key to conkeror in place of firefox .xinitrc: * use systemd --user to run a user instance of systemd to run startup programs generally run from this script. The programs i have written unit files are specified above and left as comments in this file. .xmobarrc: * my ethernet interface is now called 'eno1' not 'eth0' * TODO: need to setup wireless status xmobar widget for 'wlp7s0' .xmonad/xmonad.hs: * added keybinding for auto-umounting any disk auto-mounted by udiskie (Mod+shift+control u) * now using new .bin/xmonadClose.sh to kill session in a few different ways (Mod+shift q) * added a keybinding to toggle the status bar (xmobar) using (Mod b) * added better support for some full screen games: supertux2, doom3, steam and hl2 * set opacity on all emacs and gvim windows to 13/16 (btw this is done for urxvt using a property in .Xdefaults .xscreensaver: * an auto-generated file by xscreensaver-demo; may consider removing in the future as it can always be auto-generated but its nice to have all my screensavers saved and ready .xsession: * not currently using since i use slim but here for compatibility with gdm,kdm and other de's .zshrc: * some auto-generated changes thanks to compinstall * added a few new aliases * modified path to include ~/.bin Signed-off-by: Collin Doering <rekahsoft@gmail.com>
2013-03-11 03:26:58 +00:00
"xscreensaver-command -lock && systemctl suspend"
"xscreensaver-command -lock && systemctl hibernate"
"xscreensaver-command -lock && systemctl hybrid-sleep"
Did a variety of changes documented by file below; Key changes include: * finally have multiple smtp accounts working with gnu/emacs! * using dunst (a notification-daemon) * fixes to mpd's service files mpd.{service,socket} to allow for socket activation via dbus/systemd .authinfo.gpg: * now holds the information for all my email accounts .bashrc: * set LANG and LC_MESSAGE variables .bin/xmonadClose.sh: * added support for restart which was missed but trivial to implement .config/dunst/dunstrc: * slightly modified version of skeletal dunstrc provided by the dunst package .config/mc/ini: * automatic changes made by mc .config/mc/panels.ini: * deleted; no need to keep this in the git repo since it is modified automatically by mc to save the panel's state/s .config/systemd/user/dunst.service: * a service file to manage dunst - a customizable and lightweight notification-daemon .config/systemd/user/mpd.service: * now uses socket activation to allow mpd to be used over the network (via mpd.socket) .config/systemd/user/mpd.socket: * a socket file denoting what port/s to open when mpd.service is run .emacs: * disable pastebin extension because pastebin is a insane and the api has changed * set the mail function to smtpmain-send-it .emacs.d/themes/manoj-transparent-theme.el: * fixed minor error caused by using "nill" in place of nil * change the marked text background color from blue to gray19 .gitconfig: * set default name * set some fancy colors .gnus: * finally now supports multiple smtp accounts! * some minor cleanup * disabled gnus daemon until i spend some time looking into its uses .local/share/mc/skins/gotar-mod.ini: * set the background of the currently selected file to gray in place of default (transparent) so that in transparent terminals the currently selected file is noticeably highlighted .mpdconf: * no real changes; comments .ncmpcpp/config: * added support for notification using notify-send (libnotify and dunst) .screenrc: * set 256 bit color for urxvt .xinitrc: * set GENERAL_SCREEN instead of exporting it * shrink the case expression responsible for determining which wm to launch .xmonad/xmonad.hs: * doMaxFloat pavucontrol instead of doFullFloat .zshrc: * set LANG and LC_MESSAGE variables * added support to temporarily disable unclutter when running a command * now the alias 'qemu' disables unclutter before running qemu with kvm enabled * TODO: find commonalities between .bashrc and .zshrc and create a second shell script that does the common tasks; then the new shell script can be sourced from either .bashrc or .zshrc Signed-off-by: Collin J. Doering <rekahsoft@gmail.com>
2013-03-19 22:36:19 +00:00
"shutdown -h now"
"reboot")
Some major revisions as i have recently replaced my desktop. Namely: * switched to systemd for user level daemons and startup programs originally run from .xinitrc * beefed up the logout menu implemented by .bin/xmonadClose.sh to support pretty well all windows-managers (with some minor modification) and now with support for suspend and hibernate .Xdefaults: * did a little rearrangement to make things pretty * added the clipboard extension .authinfo.gpg: .authinfo-cd.gpg: * encrypted authinfo files for gnus (emacs) .bash_profile: * now checks if ~/.bashrc is a file and then executes it instead of just assuming .bashrc: * added a few new aliases * modified path to include ~/.bin .bin/xmonadClose.sh: * now supports pretty well any window manager with minor modification (just edit the actionNames and actionExecs arrays respective elements) * now brings up a dmenu options menu to select one of cancel, logout, suspend, hybrid-sleep, hibernate, or shutdown * uses xdotool to send a hidden 'kill switch' to xmonad upon 'logout' * uses systemctl to suspend, hybrid-sleep and hibernate * uses the classic shutdown command for shutdown .config/mc/: * moved the config files from .mc .config/systemd/user/: * all user instance systemd service files go here default.target.wants/: * contains a symbolic link to all the currently enabled service files emacs.service: * starts the emacs daemon mpd.service: * starts a user level instance of mpd using the config ~/.mpdconf udiskie.service: * starts udiskie (a user level daemon for automounted media using udisk) urxvtd.service: * starts the urxvt daemon unclutter.service: * starts the uncluttered program trayer.service: * starts trayer using the options: --monitor 1 --edge top --align right --expand true --width 4 --height 2 --transparent true --tint 0x000000 xbindkeys.service: * starts xbindkeys xcompmgr.service: * starts xcompmgr xscreensaver.service: * starts xscreensaver .emacs: * added support for magit * added support for ipython * dropped in ELPA version of swank-clojure in place of the AUR version * preparing to use babel (part of org more for use with code) * upgraded yas to the most recent version from ELPA; need to smooth out some minor issues * python-mode is currently commented out in config but working; dropped in ELPA version in place of the AUR version i had previous * disabled gieser (in the process of dropping in the ELPA version..just ran into some hitch) * add a template for ruby to .emacs.d/templates .mpdconf: * user instance mpd config .screenrc: * re-enabled ncmpcpp in place of cmus as i'm using mpd now * disable mc in screen because it doesn't start correctly; mc is available through my xmonad scratchpad "mc" .vimrc: * enabled syntax highlighting .xbindkeysrc: * switched music keybindings from cmus-remote commands to there respective mpc commands * switched www key to conkeror in place of firefox .xinitrc: * use systemd --user to run a user instance of systemd to run startup programs generally run from this script. The programs i have written unit files are specified above and left as comments in this file. .xmobarrc: * my ethernet interface is now called 'eno1' not 'eth0' * TODO: need to setup wireless status xmobar widget for 'wlp7s0' .xmonad/xmonad.hs: * added keybinding for auto-umounting any disk auto-mounted by udiskie (Mod+shift+control u) * now using new .bin/xmonadClose.sh to kill session in a few different ways (Mod+shift q) * added a keybinding to toggle the status bar (xmobar) using (Mod b) * added better support for some full screen games: supertux2, doom3, steam and hl2 * set opacity on all emacs and gvim windows to 13/16 (btw this is done for urxvt using a property in .Xdefaults .xscreensaver: * an auto-generated file by xscreensaver-demo; may consider removing in the future as it can always be auto-generated but its nice to have all my screensavers saved and ready .xsession: * not currently using since i use slim but here for compatibility with gdm,kdm and other de's .zshrc: * some auto-generated changes thanks to compinstall * added a few new aliases * modified path to include ~/.bin Signed-off-by: Collin Doering <rekahsoft@gmail.com>
2013-03-11 03:26:58 +00:00
# Ask the user whether they want to logout, cancel, suspend, hibernate, hybrid-sleep, shutdown
2013-11-03 03:18:16 +00:00
ask=`echo "cancel ${actionNames[*]} timed-action" | tr ' ' '\n' | dmenu -b -i -nb '#040404' -nf '#525252' -sf '#ffa0ff' -sb '#000000'`
Some major revisions as i have recently replaced my desktop. Namely: * switched to systemd for user level daemons and startup programs originally run from .xinitrc * beefed up the logout menu implemented by .bin/xmonadClose.sh to support pretty well all windows-managers (with some minor modification) and now with support for suspend and hibernate .Xdefaults: * did a little rearrangement to make things pretty * added the clipboard extension .authinfo.gpg: .authinfo-cd.gpg: * encrypted authinfo files for gnus (emacs) .bash_profile: * now checks if ~/.bashrc is a file and then executes it instead of just assuming .bashrc: * added a few new aliases * modified path to include ~/.bin .bin/xmonadClose.sh: * now supports pretty well any window manager with minor modification (just edit the actionNames and actionExecs arrays respective elements) * now brings up a dmenu options menu to select one of cancel, logout, suspend, hybrid-sleep, hibernate, or shutdown * uses xdotool to send a hidden 'kill switch' to xmonad upon 'logout' * uses systemctl to suspend, hybrid-sleep and hibernate * uses the classic shutdown command for shutdown .config/mc/: * moved the config files from .mc .config/systemd/user/: * all user instance systemd service files go here default.target.wants/: * contains a symbolic link to all the currently enabled service files emacs.service: * starts the emacs daemon mpd.service: * starts a user level instance of mpd using the config ~/.mpdconf udiskie.service: * starts udiskie (a user level daemon for automounted media using udisk) urxvtd.service: * starts the urxvt daemon unclutter.service: * starts the uncluttered program trayer.service: * starts trayer using the options: --monitor 1 --edge top --align right --expand true --width 4 --height 2 --transparent true --tint 0x000000 xbindkeys.service: * starts xbindkeys xcompmgr.service: * starts xcompmgr xscreensaver.service: * starts xscreensaver .emacs: * added support for magit * added support for ipython * dropped in ELPA version of swank-clojure in place of the AUR version * preparing to use babel (part of org more for use with code) * upgraded yas to the most recent version from ELPA; need to smooth out some minor issues * python-mode is currently commented out in config but working; dropped in ELPA version in place of the AUR version i had previous * disabled gieser (in the process of dropping in the ELPA version..just ran into some hitch) * add a template for ruby to .emacs.d/templates .mpdconf: * user instance mpd config .screenrc: * re-enabled ncmpcpp in place of cmus as i'm using mpd now * disable mc in screen because it doesn't start correctly; mc is available through my xmonad scratchpad "mc" .vimrc: * enabled syntax highlighting .xbindkeysrc: * switched music keybindings from cmus-remote commands to there respective mpc commands * switched www key to conkeror in place of firefox .xinitrc: * use systemd --user to run a user instance of systemd to run startup programs generally run from this script. The programs i have written unit files are specified above and left as comments in this file. .xmobarrc: * my ethernet interface is now called 'eno1' not 'eth0' * TODO: need to setup wireless status xmobar widget for 'wlp7s0' .xmonad/xmonad.hs: * added keybinding for auto-umounting any disk auto-mounted by udiskie (Mod+shift+control u) * now using new .bin/xmonadClose.sh to kill session in a few different ways (Mod+shift q) * added a keybinding to toggle the status bar (xmobar) using (Mod b) * added better support for some full screen games: supertux2, doom3, steam and hl2 * set opacity on all emacs and gvim windows to 13/16 (btw this is done for urxvt using a property in .Xdefaults .xscreensaver: * an auto-generated file by xscreensaver-demo; may consider removing in the future as it can always be auto-generated but its nice to have all my screensavers saved and ready .xsession: * not currently using since i use slim but here for compatibility with gdm,kdm and other de's .zshrc: * some auto-generated changes thanks to compinstall * added a few new aliases * modified path to include ~/.bin Signed-off-by: Collin Doering <rekahsoft@gmail.com>
2013-03-11 03:26:58 +00:00
case "$ask" in
2013-11-03 03:18:16 +00:00
logout|suspend|hibernate|hybrid-sleep|shutdown|restart|timed-action)
if [[ "$ask" == "timed-action" ]]; then
time=`echo "1m 3m 5m 10m 15m 20m 30m 45m 1h 1.5h 2h 3h" | tr ' ' '\n' | dmenu -b -i -nb '#040404' -nf '#525252' -sf '#ffa0ff' -sb '#000000' -p "How long?"`
# TODO: validate input to ensure form: <digit>+(s|m|h|d)?
for ((i=0; i < ${#actionNames[*]}; i++)); do
actionExecs[$i]="sleep $time && notify-send 'WARNING! Computer set to ${actionNames[$i]} in 15 seconds!' -u critical && sleep 15s && ${actionExecs[$i]}"
done
ask=`echo "cancel ${actionNames[*]}" | tr ' ' '\n' | dmenu -b -i -nb '#040404' -nf '#525252' -sf '#ffa0ff' -sb '#000000'`
fi
if [[ "$ask" != "cancel" && `echo "" | dmenu -b -i -nb '#040404' -nf '#525252' -sf '#ffa0ff' -sb '#000000' -p "Are you sure you want to $ask? [yes/no] "` == 'yes' ]]; then
Some major revisions as i have recently replaced my desktop. Namely: * switched to systemd for user level daemons and startup programs originally run from .xinitrc * beefed up the logout menu implemented by .bin/xmonadClose.sh to support pretty well all windows-managers (with some minor modification) and now with support for suspend and hibernate .Xdefaults: * did a little rearrangement to make things pretty * added the clipboard extension .authinfo.gpg: .authinfo-cd.gpg: * encrypted authinfo files for gnus (emacs) .bash_profile: * now checks if ~/.bashrc is a file and then executes it instead of just assuming .bashrc: * added a few new aliases * modified path to include ~/.bin .bin/xmonadClose.sh: * now supports pretty well any window manager with minor modification (just edit the actionNames and actionExecs arrays respective elements) * now brings up a dmenu options menu to select one of cancel, logout, suspend, hybrid-sleep, hibernate, or shutdown * uses xdotool to send a hidden 'kill switch' to xmonad upon 'logout' * uses systemctl to suspend, hybrid-sleep and hibernate * uses the classic shutdown command for shutdown .config/mc/: * moved the config files from .mc .config/systemd/user/: * all user instance systemd service files go here default.target.wants/: * contains a symbolic link to all the currently enabled service files emacs.service: * starts the emacs daemon mpd.service: * starts a user level instance of mpd using the config ~/.mpdconf udiskie.service: * starts udiskie (a user level daemon for automounted media using udisk) urxvtd.service: * starts the urxvt daemon unclutter.service: * starts the uncluttered program trayer.service: * starts trayer using the options: --monitor 1 --edge top --align right --expand true --width 4 --height 2 --transparent true --tint 0x000000 xbindkeys.service: * starts xbindkeys xcompmgr.service: * starts xcompmgr xscreensaver.service: * starts xscreensaver .emacs: * added support for magit * added support for ipython * dropped in ELPA version of swank-clojure in place of the AUR version * preparing to use babel (part of org more for use with code) * upgraded yas to the most recent version from ELPA; need to smooth out some minor issues * python-mode is currently commented out in config but working; dropped in ELPA version in place of the AUR version i had previous * disabled gieser (in the process of dropping in the ELPA version..just ran into some hitch) * add a template for ruby to .emacs.d/templates .mpdconf: * user instance mpd config .screenrc: * re-enabled ncmpcpp in place of cmus as i'm using mpd now * disable mc in screen because it doesn't start correctly; mc is available through my xmonad scratchpad "mc" .vimrc: * enabled syntax highlighting .xbindkeysrc: * switched music keybindings from cmus-remote commands to there respective mpc commands * switched www key to conkeror in place of firefox .xinitrc: * use systemd --user to run a user instance of systemd to run startup programs generally run from this script. The programs i have written unit files are specified above and left as comments in this file. .xmobarrc: * my ethernet interface is now called 'eno1' not 'eth0' * TODO: need to setup wireless status xmobar widget for 'wlp7s0' .xmonad/xmonad.hs: * added keybinding for auto-umounting any disk auto-mounted by udiskie (Mod+shift+control u) * now using new .bin/xmonadClose.sh to kill session in a few different ways (Mod+shift q) * added a keybinding to toggle the status bar (xmobar) using (Mod b) * added better support for some full screen games: supertux2, doom3, steam and hl2 * set opacity on all emacs and gvim windows to 13/16 (btw this is done for urxvt using a property in .Xdefaults .xscreensaver: * an auto-generated file by xscreensaver-demo; may consider removing in the future as it can always be auto-generated but its nice to have all my screensavers saved and ready .xsession: * not currently using since i use slim but here for compatibility with gdm,kdm and other de's .zshrc: * some auto-generated changes thanks to compinstall * added a few new aliases * modified path to include ~/.bin Signed-off-by: Collin Doering <rekahsoft@gmail.com>
2013-03-11 03:26:58 +00:00
for ((i=0; i < ${#actionNames[*]}; i++)); do
if [[ "$ask" == "${actionNames[$i]}" ]]; then
sh -c "${actionExecs[$i]}"
break
fi
done
fi
;;
cancel|*)
# Do nothing; the user entered cancel or a invalid input
;;
esac
2013-11-03 03:18:16 +00:00
# Exit successfully
exit 0