From 30c6ba475004a6fa567d0ae1690c5825d44c808b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20Kalvoda?= <jirikalvoda@kam.mff.cuni.cz>
Date: Tue, 27 Oct 2020 19:14:37 +0100
Subject: [PATCH] I3 Add merging files.

---
 i3/config  | 2 +-
 i3/init.sh | 6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/i3/config b/i3/config
index 6d9d3fa..a328ef8 100644
--- a/i3/config
+++ b/i3/config
@@ -149,7 +149,7 @@ bindsym $mod+Ctrl+0 move container to workspace 10; workspace 10
 # reload the configuration file
 bindsym $mod+Shift+c reload
 # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
-bindsym $mod+Shift+r restart
+bindsym $mod+Shift+r exec "cat ~/.config/i3/config.* > ~/.config/i3/config "; restart
 # exit i3 (logs you out of your X session)
 bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
 bindsym $mod+Shift+s exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to shutdown i3?' -b 'Yes, exit i3' 'shutdown 0'"
diff --git a/i3/init.sh b/i3/init.sh
index 9ab41e5..7ddf280 100755
--- a/i3/init.sh
+++ b/i3/init.sh
@@ -2,11 +2,15 @@
 cd "$(dirname "$0")"
 
 mkdir -p ~/.config/i3
-ln -sr config ~/.config/i3/config 
+ln -sr config.global ~/.config/i3/config
 ln -sr toggle-border ~/.config/i3/i3-toggle-border
 ln -sr kill ~/.config/i3/i3-kill
 ln -sr i3status.conf ~/.config/i3/
 chmod o+x ~/.config/i3/i3-*
+cat >~/.xinitrc <<EOF
+cat ~/.config/i3/config.* > ~/.config/i3/config
+exec i3
+EOF
 g++ status.cpp -o ~/.config/i3/status.out
 
 if [ "$1" == "mint" ];
-- 
GitLab