summaryrefslogtreecommitdiffstats
path: root/.displayinit.d/misc
blob: 60ca04d7f10fe39e177aafafc27831d3e8df425e (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
#!/bin/sh

exports()
{
	. ~/.exports
}

agent()
{
	eval "$(gpg-agent --daemon --enable-ssh-support)"
}

xinput()
{
	xmodmap "${HOME}/.Xmodmap"
	export GTK_IM_MODULE='xim'
	export QT_IM_MODULE='xim'
	xinput set-prop 'TPPS/2 IBM TrackPoint' 'Evdev Wheel Emulation' 1
	xinput set-prop 'TPPS/2 IBM TrackPoint' 'Evdev Wheel Emulation Button' 2
	xinput set-prop 'TPPS/2 IBM TrackPoint' 'Evdev Wheel Emulation Timeout'\
		200
	xinput set-prop 'TPPS/2 IBM TrackPoint' 'Evdev Wheel Emulation Axes' \
		6 7 4 5
}

start()
{
	exports
	agent
	xinput

	startfluxbox
}

run()
{
	rm -f ~/.xsessionmanage
	mkfifo -m 0600 ~/.xsessionmanage
	while read action; do
		case "${action}" in
			'reload')
				reload
				;;
			'quit')
				break
				;;
		esac
	done <~/.xsessionmanage
	rm -f ~/.xsessionmanage
}

main()
{
	start

	run
}