dotfiles/dot_local/bin/executable_mirror-outputs.tmpl

11 lines
364 B
Cheetah
Raw Permalink Normal View History

2022-12-22 04:07:12 -05:00
#!/bin/bash
## Simple script to mirror all connected displays for presentations
2023-01-10 16:25:06 -05:00
{{- if eq .chezmoi.hostname "helix" }}
2022-12-22 04:07:12 -05:00
RESOLUTION=3840x2160
2023-01-10 16:25:06 -05:00
{{ else }}
RESOLUTION=1920x1080
{{- end }}
2022-12-22 04:07:12 -05:00
xrandr --listmonitors | sed -n '1!p' | sed -e 's/\s[0-9].*\s\([a-zA-Z0-9\-]*\)$/\1/g' | xargs -n 1 -- bash -xc 'xrandr --output $0 --mode '$RESOLUTION' --pos 0x0 --rotate normal'