Read active tab command-line args from file when reappearing#172
Read active tab command-line args from file when reappearing#172colorfulfool wants to merge 7 commits into
Conversation
Replace duplicated if-elif chain with tab_name_from_arguments() call to centralize tab name resolution logic and reduce code duplication.
|
you can open specfic tabs with the cmdline |
Yes, but then I have to relaunch better-control every time, which takes about a second on my laptop. Maybe everyone else uses only top-of-the-line computers where PyGTK loads instantly, but I don't, and I'm contributing in case it's useful. This PR reuses your command-line params logic, by the way. |
|
im a bit short on time with some other stuff so this might take few days as i cant test it out or review for bugs |
|
@colorfulfool so as i run the script the window just crashes without any error messages...even tho the terminal session doesnt crash the window just disappears..any idea why this might be happening? |
|
@quantumvoid0 You mean just the window disappears? Well, it's supposed to disappear. And reappear on the next run of the script, and so on: output.mp4If you mean that the program exits -- you're running the script against this version, right? Because the last released version exits upon receiving SIGUSR1. |
|
oh well i'll test it out today (been a bit busy this month , so sorry for the late replies) |
|
@quantumvoid0 have you tested it? |
|
sadly i still havent , i havent gotten around to finding the time to work on BC for a while |
Hi,
This one's a bit esoteric, so I understand if you don't want to merge it.
I have multiple icons that trigger better-control and, in continuation of my first PR, would be cool if it would reappear with the corresponding tab open rather than whichever was open last time:
There's no way to pass an argument with SIGUSR1, so instead I'm writing to a file in /tmp and have better-control read it when reappearing:
The script then accepts the same arguments as better-control itself:
I had to extract the tab argument logic because it's used in two places now, hope
src/utils/tab_name.pyis the right place for it.