Repository navigation
Expand file tree
/
Copy pathstart-reaper
More file actions
executable file
·103 lines (92 loc) · 2.32 KB
/
Copy pathstart-reaper
File metadata and controls
executable file
·103 lines (92 loc) · 2.32 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#!/usr/bin/env bash
set -x
# Create a random file for the Openbox config to live in
file=$(mktemp)
# Choose a random port number for the X11 display to open on
display=$RANDOM
# Dump some Openbox config so that the Reaper application is maximized and doesn't have a window border when it is opened.
cat <<EOT >>$file
<openbox_config>
<applications>
<application name="REAPER" title="REAPER v* - Registered to *">
<decor>no</decor>
<fullscreen>yes</fullscreen>
<maximized>yes</maximized>
</application>
</applications>
<theme>
<titleLayout>MC</titleLayout>
<keepBorder>no</keepBorder>
</theme>
<keyboard>
<keybind key="W-1">
<action name="Execute">
<command>workspace 1</command>
</action>
</keybind>
<keybind key="W-2">
<action name="Execute">
<command>workspace 2</command>
</action>
</keybind>
<keybind key="W-3">
<action name="Execute">
<command>workspace 3</command>
</action>
</keybind>
<keybind key="W-4">
<action name="Execute">
<command>workspace 4</command>
</action>
</keybind>
<keybind key="W-5">
<action name="Execute">
<command>workspace 5</command>
</action>
</keybind>
<keybind key="W-6">
<action name="Execute">
<command>workspace 6</command>
</action>
</keybind>
<keybind key="W-7">
<action name="Execute">
<command>workspace 7</command>
</action>
</keybind>
<keybind key="W-8">
<action name="Execute">
<command>workspace 8</command>
</action>
</keybind>
<keybind key="W-9">
<action name="Execute">
<command>workspace 9</command>
</action>
</keybind>
<keybind key="W-10">
<action name="Execute">
<command>workspace 10</command>
</action>
</keybind>
<keybind key="W-0">
<action name="Execute">
<command>workspace 0</command>
</action>
</keybind>
</keyboard>
</openbox_config>
EOT
resolution="1920x1080"
if [ "$(uname -n)" = "bennett-desktop" ]; then
resolution="2560x1440"
fi
# Start the Xwayland process on the random display port
Xwayland -geometry "$resolution" -host-grab -fullscreen -hidpi :$display &
export XWAYLAND_PID=$!
# Start the Jack audio server for better mic input
start-jack
# Start Reaper in Openbox under Xwayland with the provided config
export DISPLAY=:$display
openbox --config-file $file --startup reaper-then-kill-xwayland
kill $XWAYLAND_PID