This commit is contained in:
Tobias Manske 2021-11-18 14:43:07 +01:00
parent f06b98d723
commit d2d57b609b
Signed by: tobias
GPG Key ID: D5914DC71F2F9352
2 changed files with 153 additions and 1 deletions

View File

@ -4,6 +4,10 @@ tmux:
ln -s ~/.dotfiles/tmux ~/.tmux
ln -s ~/.dotfiles/tmux/.tmux.conf ~/.tmux.conf
grobi:
rm ~/.config/grobi.conf || true
ln -s ~/.dotfiles/grobi/grobi.conf ~/.config/grobi.conf
vim:
ln -s ~/.dotfiles/vim ~/.vim
ln -s ~/.dotfiles/vim/.vimrc ~/.vimrc
@ -48,7 +52,7 @@ i3: dep
ln -s ~/.dotfiles/i3 ~/.config/i3
cd i3/conf/ && ./build.sh
.PHONY: clean zsh git vim tmux i3 albert gnupg
.PHONY: clean zsh git vim tmux i3 albert gnupg grobi
clean:
rm -rf ~/.vim ~/.vimrc ~/.tmux ~/.tmux.conf ~/.gitconfig ~/.config/i3
rm -rf ~/.zshrc ~/.zimrc ~/.zim ~/.zlogin ~/.compton.conf

148
grobi/grobi.conf Normal file
View File

@ -0,0 +1,148 @@
# vim:ft=yaml
# The commands listed in execute_after will be run after an output
# configuration was changed.
# pentablet uses 200% cpu after displays changed. So we kill it.
execute_after:
- i3-msg exec setxkbmap de
- polybar-msg cmd restart
- "pkill -9 pentablet || true"
# 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:
- DP1-1-BNQ-30887-21573-BenQ GL2450H-ACB00126019
- DP1-2-BNQ-30887-21573-BenQ GL2450H-X4F00171019
# 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:
- DP1-1
- DP1-2
# atomic instructs grobi to only call xrandr once and configure all the
# outputs. This does not always work with all graphic cards.
atomic: false
# 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: DP1-1
# 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
- nmcli c up Kabelgebundene\ Verbindung\ 2
- rfkill block wifi
- bluetoothctl power on
- xrandr --output DP1-1 --set "Broadcast RGB" "Full"
- xrandr --output DP1-2 --set "Broadcast RGB" "Full"
- xcalib -o 0 ~/Nextcloud/Ablage/benq.icc
- xcalib -o 1 ~/Nextcloud/Ablage/benq.icc
- systemctl --user start redshift-gtk.service
- name: "KIT 50.34 -118"
# 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:
- eDP1
- HDMI2-SNY-33283-16843009-SONY PJ-
configure_row:
- eDP1
- HDMI2@1920x1200
primary: eDP1
atomic: false
execute_after:
- xautolock -disable
- chromium "https://s.kit.edu/50.34-118"
- systemctl --user stop redshift-gtk.service
- name: "KIT 50.34 -108"
# 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:
- eDP1
- HDMI2-SNY-33795-16843009-SONY PJ-
configure_row:
- eDP1
- HDMI2@1280x720
primary: eDP1
atomic: false
execute_after:
- xautolock -disable
- chromium "https://s.kit.edu/50.34-108"
- systemctl --user stop redshift-gtk.service
# - 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:
- DP1-1
- DP1-2
# Here, only the internal LCD panel is activated.
configure_single: eDP1
execute_after:
- xautolock -enable
- rfkill unblock wifi
- xcalib -o 0 ~/Nextcloud/Ablage/x380.icm
- systemctl --user start redshift-gtk.service
# 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