2016-07-02 00:17:56 UTC
I noticed that the i3 "restart" command is very quick and responsive.
However, if I change something in my .zprofile which causes an
exported environment variable to have a different value, then I'm
stuck with something like
$ zsh -l
$ killall i3; i3
to get i3 to see the new value. Usually it's not so important that i3
should see it, but commands which are started by i3 like 'xterm' (or
'urxvt') inherit from i3's environment. I usually want to change i3's
environment for their sake.
I was thinking of binding $mod+Ctrl+r to a command which does
something like "killall i3; i3". Is this the right way to proceed, and
if so, what exactly should the command look like? (I think it should
open a 'zsh -l', start i3 as a background process, disown it, and
exit, but I'm having some trouble getting this sequence to work)
Another option is to use some kind of IPC mechanism to tell i3 about
the new environment variables. I do this with 'screen' (script
attached) but I don't know how to do it with i3.
Of course, I could invoke each xterm as 'zsh -lc xterm', but I don't
like this option because of the extra latency it introduces.
Related is the problem of restarting Xorg, for instance if I give
myself a new group, then I need to start a new login shell in order
for processes to see the new group. This happens much more rarely.
I am interested to hear your thoughts.