From bf7e1fb22376be016757963e1c8f66e72d26dc00 Mon Sep 17 00:00:00 2001
From: Christian Colglazier <christian@cacolglazier.com>
Date: Wed, 19 Jun 2019 15:22:13 -0400
Subject: [PATCH] Monitor hack

---
 .gitignore            | 1 +
 i3/desktop.conf       | 6 +++++-
 i3/i3wm-config-gen.sh | 2 --
 screenlayout/main.sh  | 2 ++
 screenlayout/off.sh   | 2 ++
 5 files changed, 10 insertions(+), 3 deletions(-)
 create mode 100755 screenlayout/main.sh
 create mode 100755 screenlayout/off.sh

diff --git a/.gitignore b/.gitignore
index 2a82381..1f01bce 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 i3/config
+i3/settings.conf
diff --git a/i3/desktop.conf b/i3/desktop.conf
index 4d3f63d..b1add15 100644
--- a/i3/desktop.conf
+++ b/i3/desktop.conf
@@ -11,4 +11,8 @@ workspace $ws9 output DVI-D-0
 workspace $ws10 output DP-2
 
 # Set caps lock key to super
-exec setxkbmap -option 'caps:super'
\ No newline at end of file
+exec_always --no-startup-id setxkbmap -option 'caps:super'
+
+# Hack to make all three monitors start up on login
+exec_always --no-startup-id sleep 1 && sh ~/.config/screenlayout/off.sh
+exec_always --no-startup-id sleep 2 && sh ~/.config/screenlayout/main.sh && xrandr --dpi 110
diff --git a/i3/i3wm-config-gen.sh b/i3/i3wm-config-gen.sh
index 577b408..4dcb6a4 100755
--- a/i3/i3wm-config-gen.sh
+++ b/i3/i3wm-config-gen.sh
@@ -4,5 +4,3 @@
 . ~/.config/i3/settings.conf
 
 cat ~/.config/i3/shared.conf ~/.config/i3/${computer}.conf > ~/.config/i3/config
-
-i3-msg restart
diff --git a/screenlayout/main.sh b/screenlayout/main.sh
new file mode 100755
index 0000000..15b7be7
--- /dev/null
+++ b/screenlayout/main.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+xrandr --output DVI-D-0 --primary --mode 1920x1080 --pos 6000x1288 --rotate normal --output HDMI-0 --off --output DP-5 --off --output DP-4 --mode 3840x2160 --pos 2160x1288 --rotate normal --output DP-3 --off --output DP-2 --mode 3840x2160 --pos 0x0 --rotate left --output DP-1 --off --output DP-0 --off
diff --git a/screenlayout/off.sh b/screenlayout/off.sh
new file mode 100755
index 0000000..a8beb40
--- /dev/null
+++ b/screenlayout/off.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+xrandr --output DVI-D-0 --primary --mode 1920x1080 --pos 6000x1288 --rotate normal --output HDMI-0 --off --output DP-5 --off --output DP-4 --off --output DP-3 --off --output DP-2 --off --output DP-1 --off --output DP-0 --off