summary refs log tree commit diff
path: root/rc.pounce
blob: 599c58507aa2fd0abda532af4c73738021ccc402 (plain) (blame)
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
#!/bin/sh

# PROVIDE: pounce
# REQUIRE: LOGIN
# KEYWORD: shutdown

. /etc/rc.subr

name='pounce'
rcvar='pounce_enable'
extra_commands='reload'
sig_reload='USR1'

load_rc_config "${name}"

: ${pounce_enable:="NO"}

command='/usr/sbin/daemon'
pidprefix="/var/run/${name}"
pidfile="${pidprefix}.pid"

child_command='/usr/local/bin/pounce'
child_pidfile="${pidprefix}.child.pid"

if [ -n "$2" ]; then
	profile=$2
	if [ -n "${pounce_profiles}" ]; then
		pidfile="${pidprefix}.${profile}.pid"
		child_pidfile="${pidprefix}.${profile}.child.pid"
		eval pounce_enable="\${pounce_${profile}_enable:-${pounce_enable}}"
		eval pounce_flags="\${pounce_${profile}_flags:-${pounce_flags}}"
		eval pounce_user="\${pounce_${profile}_user:-${pounce_user}}"
	else
		echo "$0: extra argument ignored"
	fi
else
	if [ -n "${pounce_profiles}" -a -n "$1" ]; then
		for profile in ${pounce_profiles}; do
			echo "===> ${name} profile: ${profile}"
			/usr/local/etc/rc.d/${name} "$1" "${profile}" || exit "$?"
		done
		exit
	fi
fi

child_flags=$pounce_flags
child_user=$pounce_user
unset pounce_flags pounce_user
command_args="\
	-r -P ${pidfile} -p ${child_pidfile} -T ${name}${profile:+/${profile}} \
	${child_user:+-u ${child_user}} \
	-- ${child_command} ${child_flags}"

pounce_reload() {
	rc_pid=$(check_pidfile "$child_pidfile" "$child_command")
	kill "-$sig_reload" "$rc_pid"
}
reload_cmd='pounce_reload'

run_rc_command "$1"
> 2021-02-08Use 4M- for window resizing in cwmJune McEnroe 2021-02-08Tweak trackpad scaling, mouse accelerationJune McEnroe This feels more comfortable. 2021-02-08Use xsel in up and add it do install.shJune McEnroe 2021-02-07Swap root window coloursJune McEnroe 2021-02-07Add -X flag to install X stuff on OpenBSDJune McEnroe 2021-02-07Adjust brightness by smaller incrementsJune McEnroe 2021-02-07Fix cwm window cycling, move big by defaultJune McEnroe 2021-02-07Use class names for Foreground, Background, BorderColorJune McEnroe I'm not really sure what difference this makes, but it seems like the right thing to do to be generic? 2021-02-07Add simple battery status and clock to xsessionJune McEnroe I love how simple this is. 2021-02-07Set cursor theme and sizeJune McEnroe 2021-02-07Use scrot for up -s if no screencaptureJune McEnroe Still missing putting the URL in an X selection. 2021-02-07Enable mouse acceleration in XJune McEnroe 2021-02-07Set colours for Xt and cwmJune McEnroe And increase XTerm internalBorder. 2021-02-07Set urgency on bell in xtermJune McEnroe 2021-02-07Add bindings for brightness controlJune McEnroe Weirdly the Fn key doesn't change how the F row registers... I wonder if I can do something about that. 2021-02-07Set X key repeat rateJune McEnroe 2021-02-07Bump font size to 12June McEnroe 11 is what I use on macOS, but I feel like my eyes are working harder here. 2021-02-07Fully configure and rebind cwmJune McEnroe This is sort of a mix of trying to emulate macOS somewhat for my muscle memory and just rebinding some of the cwm defaults to use 4- rather than M-. 2021-02-07Add BintiJune McEnroe 2021-02-07Finish configuring xtermJune McEnroe 2021-02-06Enable tapping, reverse scroll, set scaling in wsconsctlJune McEnroe 2021-02-06Set root window to black on purple snowJune McEnroe 2021-02-06Add xmodmap configurationJune McEnroe 2021-02-06Add initial OpenBSD X configurationJune McEnroe cwm still needs a lot more rebinding, and I need to actually look at its other options. xterm definitely still needs some configuration, but I at least managed to get it to use a decent looking font. Very happy that OpenBSD includes Luxi Mono, which is what my usual font, Go Mono, is based on anyway. Still missing is xmodmap and such. 2021-02-06Add xterm output to schemeJune McEnroe