From b17c36e0547ca1f917aa5c6a7470723f0767b3ef Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Wed, 2 Aug 2023 23:23:13 +0200
Subject: [PATCH] Set up w530 multi-monitor configuration.

---
 bookworm/home_files/user/.config/i3/config    |  2 ++
 bookworm/home_files/user/.xinitrc             |  2 ++
 .../home_files/w530/.config/i3/config_bonus   | 12 ++++++++++++
 bookworm/home_files/w530/.xinitrc             | 19 +++++++++++++++++++
 bookworm/home_files/w530/.xinitrc_bonus       |  1 +
 5 files changed, 36 insertions(+)
 create mode 100644 bookworm/home_files/w530/.config/i3/config_bonus
 create mode 100644 bookworm/home_files/w530/.xinitrc
 create mode 100644 bookworm/home_files/w530/.xinitrc_bonus

diff --git a/bookworm/home_files/user/.config/i3/config b/bookworm/home_files/user/.config/i3/config
index 07332f3..7e4af34 100644
--- a/bookworm/home_files/user/.config/i3/config
+++ b/bookworm/home_files/user/.config/i3/config
@@ -82,3 +82,5 @@ bar {
   tray_output none
   status_command i3status
 }
+
+include ~/.config/i3/config_bonus
diff --git a/bookworm/home_files/user/.xinitrc b/bookworm/home_files/user/.xinitrc
index c7a0a66..e1cbd6a 100644
--- a/bookworm/home_files/user/.xinitrc
+++ b/bookworm/home_files/user/.xinitrc
@@ -13,5 +13,7 @@ xrdb -merge ~/.Xresources
 # Redshift to Berlin, Germany.
 redshift -rl 53:13 &
 
+sh .xinitrc_bonus
+
 # Launch window manager.
 i3
diff --git a/bookworm/home_files/w530/.config/i3/config_bonus b/bookworm/home_files/w530/.config/i3/config_bonus
new file mode 100644
index 0000000..a2a4b3b
--- /dev/null
+++ b/bookworm/home_files/w530/.config/i3/config_bonus
@@ -0,0 +1,12 @@
+workspace 1 output LVDS-1
+workspace 2 output LVDS-1
+workspace 3 output LVDS-1
+workspace 4 output LVDS-1
+workspace 5 output LVDS-1
+workspace 6 output LVDS-1 
+workspace 7 output HDMI-1-0 
+workspace 8 output HDMI-1-0 
+workspace 9 output HDMI-1-0 
+workspace 10 output HDMI-1-0 
+
+exec "i3-msg 'workspace 7'"
diff --git a/bookworm/home_files/w530/.xinitrc b/bookworm/home_files/w530/.xinitrc
new file mode 100644
index 0000000..b61d612
--- /dev/null
+++ b/bookworm/home_files/w530/.xinitrc
@@ -0,0 +1,19 @@
+# X init configuration
+
+# Set keymap.
+setxkbmap de
+
+# Map CapsLock to Compose key.
+xmodmap -e "clear Lock"
+xmodmap -e "keycode 66 = Multi_key"
+
+# Load xterm settings
+xrdb -merge ~/.Xresources
+
+# Redshift to Berlin, Germany.
+redshift -rl 53:13 &
+
+xrandr --output LVDS-1 --mode 1280x720 --output HDMI-1-0 --auto --right-of LVDS-1
+
+# Launch window manager.
+i3
diff --git a/bookworm/home_files/w530/.xinitrc_bonus b/bookworm/home_files/w530/.xinitrc_bonus
new file mode 100644
index 0000000..aa6e5f3
--- /dev/null
+++ b/bookworm/home_files/w530/.xinitrc_bonus
@@ -0,0 +1 @@
+xrandr --output LVDS-1 --mode 1280x720 --output HDMI-1-0 --auto --right-of LVDS-1
-- 
2.30.2