From b24ea22672a06d8924b3afb9ef3753292eab27e4 Mon Sep 17 00:00:00 2001 From: Nikolaus Gotsche Date: Tue, 9 May 2017 01:17:19 +0200 Subject: Added Hookscript --- startup-hook | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100755 startup-hook (limited to 'startup-hook') diff --git a/startup-hook b/startup-hook new file mode 100755 index 0000000..c4d78ea --- /dev/null +++ b/startup-hook @@ -0,0 +1,79 @@ +#!/bin/bash +# +# xmonad "startup hook" script. This gets run after xmonad is initialized, +# via the startupHook facility provided by xmonad. It's useful for +# running any programs which you want to use within xmonad but +# which don't need to be initialized before xmonad is running. +# +# Author: David Brewer +# Repository: https://github.com/davidbrewer/xmonad-ubuntu-conf + +# +# TRAY ICON SOFTWARE +# + + +if [ -z "$(pgrep thunderbird)" ] ; then + thunderbird & +fi +if [ -z "$(pgrep nautilus)" ] ; then + nautilus --no-desktop & +fi + +# Pidgin chat client (-h: start hidden, -n: don't connect on launch) +if [ -z "$(pgrep pidgin)" ] ; then + pidgin & +fi + + # Remmina remote desktop connection client (-i: start hidden) +# if [ -z "$(pgrep remmina)" ] ; then +# remmina -i & +# fi + + # Network manager, so we don't have to configure wifi at the command line. +if [ -z "$(pgrep nm-applet)" ] ; then + nm-applet --sm-disable & +fi + +# Applet for managing print jobs from the tray. +if [ -z "$(pgrep system-config-printer-applet)" ] ; then + system-config-printer-applet & +fi + + # + # APPLICATION LAUNCHER + # + +# Use synapse as our app launcher. (-s: don't display until requested) +# if [ -z "$(pgrep dmenu)" ] ; then +# dmenu -s & +# fi + + # On login, we unlock the ssh keychain so we're not prompted for + # passphrases later. We pipe /dev/null to ssh-add to make it realize + # it's not running in a terminal. Otherwise, it won't launch the prompt. + # + # If you don't use the ssh keychain you may not want this. Commented + # by default as it is assumed many users will not want this feature. + + # export SSH_ASKPASS="/usr/bin/ssh-askpass" + # cat /dev/null | ssh-add & + +# I disable the middle mouse button because otherwise I constantly +# accidentally paste unwanted text in the middle of my code while scrolling. +# Note that the id of the mouse device may be different depending on +# which usb port it is plugged into! To find it, use: +# xinput list |grep 'id=' +# In the following command, the id is the first argument, the rest is +# the remapping. + +# Commented by default as it is assumed many users will not want this. +# xinput set-button-map 10 1 0 3 4 5 6 7 + +# I disabled my touchpad because I hate those things. You can find the id +# of a device you want to disable using "xinput list"; unfortunately it can +# change depending on what devices you have plugged into USB. We extract the +# id of the device from the output of xinput, then use it to disable the +# device +# TOUCHPAD_ID=`xinput | grep 'Synaptics TouchPad' | cut -f 2 | cut -f 2 -d =` +# xinput set-prop $TOUCHPAD_ID "Device Enabled" 0 -- cgit v1.2.3