Open an applet from cli
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Topics in this forum are automatically closed 6 months after creation.
Open an applet from cli
Is it possible to open an applet (like you usually do with clicking it) from cli? Does there is any command or script to do it? I'm running Linux Mint 18.3 64 bit with Cinnamon 3.6.7 (Gtk 3.18.9-1ubuntu3.3)
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Open an applet from cli
Not that I know. The Cinnamon panel doesn't have a command line interface. There's a tool called xdotool with which you can fake keyboard or mouse input which you could use to open the applet by programming what you'd do normally.
Re: Open an applet from cli
That's not really what i'm looking for, but rather a smart trick (or workaround). I'll give it a shot anyway. A real command command would be nice though. Could this possible through extension?
Re: Open an applet from cli
I don't think, that any of the spices (applets, desklets, extensions) have an API for that.
Re: Open an applet from cli
Well, that leave me with that workaround then. Anyway, i was going to make a script that will open sound applet when user press volume up/down on their keyboard and there is any audio/video playing, then close the applet after a few second. Pretty much like in windows 10.
Re: Open an applet from cli
Depending on how comfortable you're with Javascript programming, it may be easier to just take the existing sound applet and edit its code to work as you want.
Re: Open an applet from cli
Well, i code in javascript mostly. Does it possible to make an applet that able to react with keyboard? Could you give me a link to a wiki or tutorial?
Re: Open an applet from cli
New developer documentation is being worked on I think. For now you can check the extension system links here: http://projects.linuxmint.com/referenc ... index.html. All the applets are open source and hosted in Linux Mint's GitHub repositories. The official applets are on Cinnamon https://github.com/linuxmint/Cinnamon/t ... on/applets. Applets developed by others are on https://github.com/linuxmint/cinnamon-spices-applets. You could look for another applet that does something like you want to do and study the code. (Mind that the links go to development versions, you can of course just install any applets you want to study and then access the code on your own system that way.)
Re: Open an applet from cli
Why so complicated in this case? If the user changes the volume via keyboard the sound notification window automatically opens for a few seconds. So I wonder, why you need the applet opened in this case at all?
Re: Open an applet from cli
Neat. Thanks for all your help, i'll begin researching.xenopeek wrote: ⤴Fri Apr 06, 2018 4:27 am New developer documentation is being worked on I think. For now you can check the extension system links here: http://projects.linuxmint.com/referenc ... index.html. All the applets are open source and hosted in Linux Mint's GitHub repositories. The official applets are on Cinnamon https://github.com/linuxmint/Cinnamon/t ... on/applets. Applets developed by others are on https://github.com/linuxmint/cinnamon-spices-applets. You could look for another applet that does something like you want to do and study the code. (Mind that the links go to development versions, you can of course just install any applets you want to study and then access the code on your own system that way.)
Re: Open an applet from cli
Idk, this crazy idea suddenly came up in my mind. And i think it would be cool if you could control applets using keyboard. Btw, sound notification just displaying the volume level, user can't do anything with it. However, if i show the sound applet, user would be able to change the volume through slider and control playing music or video. Like windows 10 do when you change volume through keyboard.