New Feature request - custom menu option(s)
Opened this issue · 7 comments
I've been using a custom script to display output for many years and it works excellent.
Is it possible to add new feature where a custom menu option can be added to the existing menu?
- System Monitor
- "My new custom menu option"
- Preferences
- Help
- Quit
Then in Preferences you would create "My new custom menu option" - Exec: "my bash script.sh"
Sounds like a reasonable request. Not sure on the best approach. Maybe a file if located in say .config/indicator-sysmonitor that has a predefined format like
"Menu text","script name"
Then the existing menu could be built on startup with the values in the file.
Not sure if Script Runner will do the trick for you.
Full disclosure: I'm the author.
Although only initially supported on Ubuntu, I'm expanding the supported platforms to include Debian, Fedora, openSUSE and Manjaro (along with better support for Ubuntu derivations). Will eventually switch from a PPA/deb install to a PyPI/pip install (hopefully soon)...
Not sure if Script Runner will do the trick for you.
Full disclosure: I'm the author.
Although only initially supported on Ubuntu, I'm expanding the supported platforms to include Debian, Fedora, openSUSE and Manjaro (along with better support for Ubuntu derivations). Will eventually switch from a PPA/deb install to a PyPI/pip install (hopefully soon)...
Ubuntu is fine. BTW, muru asked for you to confirm you are the author in the link you posted: https://askubuntu.com/questions/30334/what-application-indicators-are-available/786708#786708
Are there usage instructions for Script Runner in GitHub or some other place?
Sounds like a reasonable request. Not sure on the best approach. Maybe a file if located in say .config/indicator-sysmonitor that has a predefined format like
"Menu text","script name"
Then the existing menu could be built on startup with the values in the file.
~/.config/indicator-systemmonitor sounds like a great place. Users can create the directory themselves. Perhaps you might want to make a rule that the file extension name must end in ".menu". Just in case someday you want to support other file types like ".language" where users can rename words in the GUI. Or perhaps you will want ".uom" for Units of Measure, etc. etc.
Are there usage instructions for Script Runner in GitHub or some other place?
When you run the indicator, open the Preferences and there are sample scripts. You should be able to base your custom script on those.
Are there usage instructions for Script Runner in GitHub or some other place?
When you run the indicator, open the Preferences and there are sample scripts. You should be able to base your custom script on those.
Unfortunately there is an error on the last (third) step:
E: Unable to locate package indicator-script-runner
I'm on Ubuntu 16.04 LTS Pro with Unity and Compiz. I develop in Python 2.7.12 and Python 3.5. It appears the package only works with Ubuntu 20.04 and 22.04? Eventually I'll upgrade to 24.04 or 26.04 when 16.04 ESM hits EOL.
I found a tutorial and it was less than an hour to create an app-indicator from scratch: http://candidtim.github.io/appindicator/2014/09/13/ubuntu-appindicator-step-by-step.html
I'm on Ubuntu 16.04 LTS Pro with Unity and Compiz. I develop in Python 2.7.12 and Python 3.5. It appears the package only works with Ubuntu 20.04 and 22.04? Eventually I'll upgrade to 24.04 or 26.04 when 16.04 ESM hits EOL.
As 16.04 is now end of life (standard support) I pulled the release for that version. As you mentioned, either install the 20.04 or 22.04 version (after upgrade) or wait until you install 24.04 (and I hopefully soon release to PyPI)...or write your own indicator which sounds like you've started...well done!