Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

creating a new workspace with a new terminal in the background #3826

Closed
ymolists opened this issue Oct 13, 2019 · 4 comments
Closed

creating a new workspace with a new terminal in the background #3826

ymolists opened this issue Oct 13, 2019 · 4 comments

Comments

@ymolists
Copy link

ymolists commented Oct 13, 2019

I'm submitting a…

[x] Bug
[ ] Feature Request
[ ] Documentation Request
[ ] Other (Please describe in detail)

Current Behavior

No new workspace is being created after i send the command to i3-msg and a new terminal opens in the current workspace

Expected Behavior

I am trying to open a new terminal in a different workspace then comeback to my current work space and not switch to that new workspace

I am expecting while i am in the dev1 workspace and by sending this message below to i3-msg a new workspace will be created with a terminal in it. i dont want to switch to that workspace immediately. I want it to happen in the back ground and not become the new focused workspace

i3-msg "workspace dev2; exec terminator -b; workspace dev1;"

Reproduction Instructions

Environment

Output of i3 --moreversion 2>&-:

i3 version: 
i3 --moreversion 2>&- || i3 --version
Binary i3 version:  4.17.1-2-g225ebb0d (2019-08-30, branch "master") © 2009 Michael Stapelberg and contributors
Running i3 version: 4.17.1-2-g225ebb0d (2019-08-30, branch "master") (pid 10228)
Loaded i3 config: /home/ymo/.config/i3cmd/conf/config.dev (Last modified: Sun 13 Oct 2019 10:14:27 AM EDT, 609 seconds ago)

The i3 binary you just called: /opt/i3/i3-master-225ebb0d/bin/i3
The i3 binary you are running: i3



Logfile URL:
https://logs.i3wm.org/logs/5632254176919552.bz2
- Linux Distribution & Version:
$ lsb_release -a 
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.3 LTS
Release:	18.04
Codename:	bionic

- Are you using a compositor (e.g., xcompmgr or compton):
No compositor. The system is the default ubuntu system execept for the fact that i recompiled i3 from the latest master
@Airblader
Copy link
Member

As I already commented on the other issue:

It also only works if the application actually supports the startup notification protocol. Otherwise you need to use for_window assignments

exec is used to start a process, but if a process ever opens a window, at which point it does so or how many it opens is a completely separate topic. So switching to a workspace, starting a process and switching back doesn't do anything because the window opens at a later point in time. The startup notification protocol is what we use to associate a process with the windows it opens, but it requires support from the application.

Your other options here are to either use for_window assignments (see also these: https://www.reddit.com/r/i3wm/wiki/faq/bind_emulator and https://www.reddit.com/r/i3wm/wiki/faq/assign_emulator) or layout savingg & restoring (https://i3wm.org/docs/layout-saving.html), depending on your use-case.

@orestisfl
Copy link
Member

Given that this is one of the most common problems people encounter I think we can provide some script that works like a one-off for_window rule.

@Airblader
Copy link
Member

Another way would be to allow creating match rules at runtime and also with a "validity counter" (or something similar). I feel like we had an issue for this before, but it might be closed.

@ymolists
Copy link
Author

Thank you folks for your help. Much appreciated !

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

No branches or pull requests

4 participants