summaryrefslogtreecommitdiff
path: root/startup-hook
blob: c4d78eaa6fcd3e46691b8ecf11858fb41b4be0ae (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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