The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
2

Is there a way to kill/reset a whole workspace?

asked Nov 11 '13

flylo gravatar image

Is there a way to kill the current workspace(like in tmux)? Essentially killing all the containers inside a certain workspace.

Is that function native to i3 or would I have to use a script?

1 answer

Sort by » oldest newest most voted
2

answered Nov 11 '13

Adaephon gravatar image

updated May 19 '14

You can use focus parent until all containers are selected (just press and hold the bound key(s) for a second or two) and then kill.

As you can bind multiple commands to a key, you could also do this:

bindsym $mod+Control+Shift+k focus parent, focus parent, focus parent, focus parent, focus parent, focus parent, focus parent, focus parent, focus parent, focus parent, kill

Add more focus parent,, if you are stacking more than ten levels deep.

Note: this may need version 4.7 to work, as previous versions threw error messages when trying to kill workspace containers.

Comments

Cool, thanks. I'm on 4.6 but look forward to the next release. Glad to hear it's been implemented

flylo gravatar imageflylo (Nov 11 '13)edit

Question Tools

Stats

Asked: Nov 11 '13

Seen: 1,491 times

Last updated: May 19 '14