Execute and set Title #4556
Unanswered
Simon-Eklundh
asked this question in
Q&A
Replies: 2 comments 11 replies
-
Unless the application supports a command line flag to set the title, you can't (reliably). Executing a binary and a window being mapped are different things, the window manager only knows about the latter, and you don't know whether a process will create any windows, how many it will create, or when it will create them. If Discord sets _NET_WM_PID on its windows you could look up the process based on that and potentially differentiate them in some way. But that's very hypothetical and outside of i3. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Tl;Dr: how do I format a title in a program on startup without needing for_window.
Hi! I recently decided to create two discord accounts I want to have open at the same time. I decided to solve this using discord and discord-canary.
However, these two have the same class, so I wanted to change their class/title. To make automatic layouts possible.
I've tried a few different ways found in a GitHub post from two years ago, primarily, but in my case I've tried to make it an auto start with a Mark or setting title immediately:
exec discord , mark personal
I've also tried
exec discord , exec "sleep 3 && i3-msg Mark personal"
Neither of those marked my discord windows. I've also tried the equivalent with instant title;
exec discord, title_format "personal %title"
As I'm now stuck I'd like to see if someone if you can give me a hand.
Sincerely Simon
Edit: I solved it by making a bash script that starts the first program, focuses it, runs an action on it, then starts the second program.
Beta Was this translation helpful? Give feedback.
All reactions