-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathgrobi.conf
124 lines (98 loc) · 4.27 KB
/
grobi.conf
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# vim:ft=yaml
# The commands listed in execute_after will be run after an output
# configuration was changed.
execute_after:
- setxkbmap dvorak
# if anything goes wrong (connection the X server died or some other error),
# run these commands before exiting
on_failure:
- xrandr --auto
# These are the rules grobi tries to match to the current output configuration.
# The rules are evaluated top to bottom, the first matching rule is applied and
# processing stops.
#
# The rules belowe are written for a typical Laptop in mind, which hase several
# external connectors (HDMI2, HDMI3) in addition to the internal display
# (LVDS1). It may even be placed in a Docking Station, which adds more outputs
# that aren't present outside it.
rules:
# This is a rule for a docking station.
- name: Docking Station
# grobi takes the list of all the
# outputs xrandr returns and verifies that HDMI2 and HDMI3 are connected, and
# DP2-2 is present (but may be disconnected).
outputs_connected: [HDMI2, HDMI3]
outputs_present: [DP2-2]
# when this rule matches, HDMI2 and HDMI3 are activated in their default
# resolution and set besides each other in a typical dual-monitor
# configuration: left is HDMI2, right is HDMI3
configure_row:
- HDMI2
- HDMI3
# atomic instructs grobi to only call xrandr once and configure all the
# outputs. This does not always work with all graphic cards.
atomic: true
# For the output HDMI3, the flag --primary will be added to the xrandr
# call, so that e.g. the tray icons are displayed on this monitor (requires
# the window manager to do this).
primary: HDMI3
# Additional commands can be specified per rule, in this case we make sure
# that xautolock is enabled and locks the screen after a while.
execute_after:
- xautolock -enable
# This is a rule for another docking station.
- name: Docking Station at work
# grobi takes the list of all the
# outputs xrandr returns and verifies that DP2-2 and HDMI3 are present and
# connected.
outputs_connected: [DP2-2, HDMI3]
# when this rule matches, DP2-2 and HDMI3 are activated in their default
# resolution and set above one another.
# configuration: top is DP2-2, bottom is HDMI3
configure_column:
- DP2-2
- HDMI3
# This is a rule for connecting the TV in the living room
- name: TV
# We only want to match the TV, so we identify it with its monitor ID. In order to get the
# monitor ID, we connect the TV and run `grobi show`, which lists all connected monitors
# with their monitor ID (which consists of a three letter manufacturer code, a product and
# a serial number). We can now match the connected outputs with this monitor ID.
# We specify the monitor ID after the port with a dash in between those two values.
outputs_connected:
- HDMI1-SAM-2618-808661557
configure_single: HDMI1
execute_after:
- xautolock -disable
# This is a rule for mobile computing, i.e. outside of the docking station defined above.
- name: Mobile
# In order to match, the outputs HDMI2 and HDMI3 may be present, but must be disconnected.
outputs_disconnected:
- HDMI2
- HDMI3
# Here, only the internal LCD panel is activated.
configure_single: LVDS1
execute_after:
- xautolock -enable
# This is a rule for giving a presentation.
- name: VGA Projector
# This rule requires that a display is connected to the VGA port.
outputs_connected: [VGA1]
# And it also requires that none of the outputs called DP2-? are present,
# this way we can test that the Laptop is not in the Docking Station.
outputs_absent: [DP2-?]
# Two displays are enabled side by side: LVDS1 on the left with the default
# resolution, and VGA1 at the resolution 1024x768 (which hopefully works
# for all projectors).
configure_row:
- LVDS1
- VGA1@1024x768
# The following command makes sure that xautolock won't lock the screen
# during the presentation.
execute_after:
- xautolock -disable
# If none of the rules above match, it's a good idea to have a fallback rule
# which enables an output device that is always present, so you can debug
# what's going on.
- name: Fallback
configure_single: eDP1