Skip to content

Instantly share code, notes, and snippets.

@asl97
Created April 25, 2017 21:38
Show Gist options
  • Save asl97/157de0648467177d4a1b4c09c6ca82dc to your computer and use it in GitHub Desktop.
Save asl97/157de0648467177d4a1b4c09c6ca82dc to your computer and use it in GitHub Desktop.
i3 config.d base config
# stupid version hint thingy
# i3 config file (v4)
# basic stuff so we can exit in case config fail
set $mod Mod4
font pango:monospace 8
bindsym $mod+Shift+e exec "i3-msg exit"
# multiline since we need to execute the command synchronous
# 1. copy this config over for restoring after loading config.d
# 2. concat the config.d for starting (overwriting)
# 3. concat cleanup/restoring into the config
# 4. restart i3 with the config and it will run the cleanup/restoring
exec_always \
cp ~/.config/i3/config ~/.config/i3/_config && \
cat ~/.config/i3/config.d/*.i3 > ~/.config/i3/config && \
echo "exec_always cp ~/.config/i3/_config ~/.config/i3/config && rm ~/.config/i3/_config" >> ~/.config/i3/config && \
i3-msg restart
@asl97
Copy link
Author

asl97 commented Apr 25, 2017

seem like revision 1 doesn't run exec in config.d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment