-
Notifications
You must be signed in to change notification settings - Fork 56
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
CLI switches for opening a specific tab #308
Comments
Hi, thanks for the issue.
Tabs already have internal IDs for remembering tabs from the last session, I'd just use these for a single flag.
The "already running" feature is a GTK thing, I didn't do anyhting for that. :) |
I added commandline arguments (including an argument for directly opening a tab) in the |
Thanks for adding this so quickly! I tried to test it out, but the easy way for me to override the source I'm using (from Nix) doesn't work. I think it's because Resources now needs Rust 1.80 to build due to unrelated changes (based on a comment from you here), and Nixpkgs has only just updated to 1.79. Setting up a proper Rust toolchain (instead of just using Nix's builder) is a bit more than I have time for right now, so I'll have to wait a while and see if I get to that before Nixpkgs updates. |
No worries, we got time. :) |
Is there an existing issue for this?
Is your feature request related to a problem? Please describe.
I've set up my desktop status bar with a few widgets for monitoring CPU, RAM, etc. They support running a command when I click them, so I've set them to open up Resources to have easy access to more details.
Resources of course opens showing whatever tab it remembers from last time, rather than the tab relevant to the status bar widget I clicked on, and then I have to manually select the tab I was interested in.
It's only a minor point of friction, but it would be wonderful if clicking my CPU usage widget could be made to directly open the Processor tab, etc.
Describe the solution you'd like
I don't expect Resources to integrate with my particular status bar or widgets, but it would be great if I could tell it more context about what I want to look at.
Simply adding a command line switch letting me tell it what tab I want to see would hopefully be a small easy change that would enhance similar use cases.
I'm not sure whether it would be better to have a single flag with an argument taking the name of the tab (e.g.
resources --focus=Processor
), or several flags for some or all of the specific tabs (or perhaps just the type of tab?).Given that Resources detects when it's already running and doesn't start another instance, it would also be handy if running with one of these options could change the tab in the existing instance, but even if that isn't as easy a change simply opening on a desired tab if Resources isn't already open would address most of the problem.
Describe alternatives you've considered
Some other sort of mechanism (than CLI arguments) to send signals to the running application telling it to change tabs would also be usable. But for the particular use-case of setting up shortcuts, it seems like it would be the simplest approach (for the user and to implement) to simply embed extra information in the command that starts Resources.
Additional context
No response
The text was updated successfully, but these errors were encountered: