-
Notifications
You must be signed in to change notification settings - Fork 14
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
Support launching commands #30
Comments
Hi and thanks for sharing your idea, I like it! I think the click action would currently overlap with our latest feature (click on the output opens the respective tab in the prefs window). I can imagine different options here to solve this:
|
Can anything be done with a right click in gnome shell? |
I'll check. Edit: Yes it is possible. Left click returns 1, middle click 2 and right click 3.
|
@raujonas You can use doubleclick, left, right, middle mouse buttons, scroll wheel. Or menu. |
I would say left click would be the more intuitive button for launching a script /app and right for opening the prefs. A user is going to be launching an app more often than editing the prefs IMO |
I would use menu as it's self-explanatory, and possibly add direct actions as an option. Otherwise user needs some instructions before use and it's prone to accidental executions. |
Then
Should the commands have a name there (eg "turn office heater on") or just display the plain command?
Is this correct and what do you think about it? |
I'm not sure I agree, the user will will know exactly what will run when they click on some text - they need to set it up beforehand. If they haven't setup a click script then it should do nothing. If the click script is bound to the left button then it doesn't need a description. I'd also add that each output script should be able to have its own click script. In my example if I wanted to control multiple devices then clicking on the state for each one is the quickest way to achieve it. Maybe have a small settings icon (even an appropriate unicode character) as a click script would solve both issues. I hope this makes sense, if there's already a branch with the original settings work on then I'd be interested in taking a look. I'm not a java script guy but I might be able to hack something together |
I also agree with both things here. Plus you can start your click action with only one click. With the other option you have to open the menu first and search for the correct command then and click it. So I can see the advantages here. Edit: I mean we could even implement both options here. Right click to execute a specific command which can be specified for each command like @potchin suggested and also a menu which holds commands than can be executed manually. |
Theres even a perfect unicode character so you wouldnt need to add an icon for settings.. ⚙ (U+2699). No need for a custom icon and it will automatically change with the users theme and font sizing. You could just add that in as a default item so that when the user first installs the extension they have a way to know its working and easy access to configure it (and a way to remove it, if desired) |
Okay now that I've thought about it for a while a still think that both solutions would be nice to have. I suggest to implement the feature as mentioned by @potchin. This will not hurt anyone because nothing happens if you right-click on the label and no command is specified in the settings. Additionally I think it would be nice if there's a menu when you left-click on the output like @G-dH suggested. This menu could hold a settings icon at the top which opens the respective tab in the prefs window. Plus it could hold the global commands, which could be specified in a fourth tab in the prefs window and which would be the same for each location. Then you could select a command in the menu which is executed once then. The menu could look like this maybe:
I would prefer not to have an additional icon in the output in the top bar, and to have the settings icon in the new menu then. I think this would look better imo. |
It would be really useful to be able to be able to run a custom command when clicking on one of the command outputs in the toolbar. For example, I have a script which shows if my office heater is on or off, if I could click the 'heater is on' text to launch a custom command then I could toggle it on/off straight from the shell.
From what I see it should be fairly easy to implement - another column in the extension prefs to declare the command to run and an
onclick
action (or whatever gnome-shell uses) for the item in the toolbarThe text was updated successfully, but these errors were encountered: