how How to close window and instantly open new on the same place? [closed]
... with size save.
... with size save.
Sorry for anonymous question, thought that checkbox let me ask without registration.
#!/usr/bin/python
# close window and open new at the same place
# uses i3-py, pip install i3-py
import os
import i3
import sys
def wait_for_new_window(windows):
return i3.get_tree() == windows
if __name__ == '__main__':
os.system(sys.argv[1])
os.system('i3 split h')
windows = i3.get_tree()
while wait_for_new_window(windows): pass
os.system('i3 focus left')
os.system('i3 kill')
Thank for answer, I made that script on python, bind $mod+Shift+D to him with param dmenu_run, bind $mod+Shift+Enter to him with param terminal and use. P.S. Thanks for cool WM!
You could try and hack this, with splitting the container, create the new window, focus the previous one, and kill it. You might need to put a sleep command between the make-new-window and the focus-previous phases (or possibly a nicer hack involving parsing the window name if you can predict it reliably).
Hope this helps, I did not try it myself :)
Not possible in i3.
Asked: 2012-07-19 14:21:14 +0000
Seen: 1,845 times
Last updated: Jul 22 '12