Skip to content

Commit 1601602

Browse files
committed
Add more documentation to the sample config
1 parent 3d9c7f3 commit 1601602

File tree

1 file changed

+62
-2
lines changed

1 file changed

+62
-2
lines changed

doc/grobi.conf

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,89 @@
11
# vim:ft=yaml
22

3+
# The commands listed in execute_after will be run after an output
4+
# configuration was changed.
35
execute_after:
46
- setxkbmap dvorak
57

8+
# These are the rules grobi tries to match to the current output configuration.
9+
# The rules are evaluated top to bottom, the first matching rule is applied and
10+
# processing stops.
11+
#
12+
# The rules belowe are written for a typical Laptop in mind, which hase several
13+
# external connectors (HDMI2, HDMI3) in addition to the internal display
14+
# (LVDS1). It may even be placed in a Docking Station, which adds more outputs
15+
# that aren't present outside it.
616
rules:
17+
18+
# This is a rule for a docking station.
719
- name: Docking Station
20+
# grobi takes the list of all the
21+
# outputs xrandr returns and verifies that HDMI2 and HDMI3 are connected, and
22+
# DP2-2 is present (but may be disconnected).
823
outputs_connected: [HDMI2, HDMI3]
924
outputs_present: [DP2-2]
25+
26+
# when this rule matches, HDMI2 and HDMI3 are activated in their default
27+
# resolution and set besides each other in a typical dual-monitor
28+
# configuration: left is HDMI2, right is HDMI3
1029
configure_row:
1130
- HDMI2
1231
- HDMI3
32+
33+
# atomic instructs grobi to only call xrandr once and configure all the
34+
# outputs. This does not always work with all graphic cards.
1335
atomic: true
36+
37+
# For the output HDMI3, the flag --primary will be added to the xrandr
38+
# call, so that e.g. the tray icons are displayed on this monitor (requires
39+
# the window manager to do this).
1440
primary: HDMI3
1541

42+
# Additional commands can be specified per rule, in this case we make sure
43+
# that xautolock is enabled and locks the screen after a while.
44+
execute_after:
45+
- xautolock -enable
46+
47+
48+
# This is a rule for mobile computing, i.e. outside of the docking station defined above.
1649
- name: Mobile
50+
51+
# In order to match, the outputs HDMI2 and HDMI3 may be present, but must be disconnected.
1752
outputs_disconnected:
1853
- HDMI2
1954
- HDMI3
55+
56+
# Here, only the internal LCD panel is activated.
2057
configure_single: LVDS1
2158

59+
execute_after:
60+
- xautolock -enable
61+
62+
63+
# This is a rule for giving a presentation.
2264
- name: VGA Projector
23-
outputs_connected: [LVDS1, VGA1]
65+
66+
# This rule requires that a display is connected to the VGA port.
67+
outputs_connected: [VGA1]
68+
69+
# And it also requires that none of the outputs called DP2-? are present,
70+
# this way we can test that the Laptop is not in the Docking Station.
2471
outputs_absent: [DP2-?]
72+
73+
# Two displays are enabled side by side: LVDS1 on the left with the default
74+
# resolution, and VGA1 at the resolution 1024x768 (which hopefully works
75+
# for all projectors).
2576
configure_row:
2677
- LVDS1
2778
- VGA1@1024x768
79+
80+
# The following command makes sure that xautolock won't lock the screen
81+
# during the presentation.
2882
execute_after:
29-
- pkill xautolock
83+
- xautolock -disable
84+
85+
# If none of the rules above match, it's a good idea to have a fallback rule
86+
# which enables an output device that is always present, so you can debug
87+
# what's going on.
88+
- name: Fallback
89+
configure_single: eDP1

0 commit comments

Comments
 (0)