collinss / Spices-Notifier

Gets the number of comments from certain applets, desklets, themes, and extensions on cinnamon-spices.linuxmint.com
1 stars 1 forks source link

Excelent idea!!! #1

Open ghost opened 10 years ago

ghost commented 10 years ago

This should be an standard applet of Cinnamon...

collinss commented 10 years ago

I actually wrote this quite a while ago, since there is no way to know when someone has posted a comment without checking the site. I've made some improvements here and there, but I haven't gotten around to polishing it up enough to post it on the spices website. Feel free to use it, fork it, add features, etc.

ghost commented 10 years ago

Thanks @collinss it's really a good and necesary tools...

Let me ask you, i try to add to Configurable Menu a feature like mint menu to install, uninstall, and search for package. This for now only support debian, and i work to support Arch Linux and all distro base on Arch, like Manjaro. On Arch the cache for programs load more faster than apt.cache... You know a way to preload the apt.cache, without need to contruct a daemon?

collinss commented 10 years ago

Honestly, I haven't really done much with apt beyond the usual, and I have no experience whatsoever with Arch.

ghost commented 10 years ago

Yes, thanks... the problem of apt, it's that the cache need to fill, with the data first and then you can request a query for a package or like you want... So if you have a daemon running, the daemon can update the cache and when you request a query for a package this occurs very fast... because the cache it's ready...

But create a daemon on my case it's not possible, because required more characteristics of the distro, cinnamon can run on several distros. Thanks.

ghost commented 10 years ago

Hi @collinss do you notice a difference on the performance on Cinnamon 2.2 with ubuntu 14.04? Configurable Menu works several time worse than on Cinnamon 2.14 with ubuntu 13.10. This can be see when you change the categories faster... I thinking that can be some new feature like the hi-dpi support, that makes more thing and delayed clutter... But can be ubuntu or other things... for example my errors, but well there are the same errors on different conditions, so it's more probable that the differents conditions was the cause and not my errors.

collinss commented 10 years ago

I haven't really noticed, but I haven't really had much of a baseline, either. I only use 2.2 on my desktop, and don't use that much at all. I mostly use my laptop (which is older and MUCH slower), so when I do use 2.2, it seems quite a bit faster in comparison.

Even if I did notice a difference, I wouldn't be able to say what what was causing it as I'm currently using 2.2 on a system that is not really Ubuntu or Mint, but kind of a little of both, with a whole lot of extra weird stuff going on besides. I started with a Mint 16 system, then upgraded to Ubuntu 14.04 by manually changing the packages, and doing a dist-upgrade, then manually compiling and installing from git. In the process, I totally screwed up my system for a while, and couldn't even log in for several days. I finally fixed it by switching to TTY1, but in the process, I ended up with a system that is kind of a mess. Right now I have no idea which bugs are due to my unique system configuration, and which are actual bugs.

Long story short - I am probably one of the worst people to ask right now. That being said, if I get a chance, I'll download your menu applet and try it out, then let you know if I find it running too slow.

ghost commented 10 years ago

ohh!! and i thinking that i like to test every thing... Not way, i'm a babe if i compare with you... How? You try to do your own distro? Just kidding that's wonderful, test the things and have your own experience. Not worried, configurable menu it's the less of the problems, but it's how i see that cinnamon it's delayed, and i don't like this. Thanks.

ghost commented 10 years ago

If you installed configurable menu you will see that it's working more faster than Cinnamon Menu if it's not the first time. When you open the menu, I remove the call to actor realize event, cinnamon menu do that to update the max value off app, to search for the width of the menu. I make the calculation of the max button(apps) on the start of cinnamon... Also i store this value and do not calculate this any more... Cinnamon menu do that on the menu start always and lost some miliseconds... Configurable menu do more things, but it's more faster on the start...

The problem it's only when you change the categories, because i have several columns, and the Cinnamon Menu only have one... In the Cinnamon menu only need to change the visibility of the app buttons and in Configurable menu i need to change the visibility and also the position on the box, this little difference can be notice on 2.2, but not on 2.14.

ghost commented 10 years ago

I tell you this, because is possible that if you notice the difference, you want to change this on Cinnamon Menu, for me this will be wonderful... That Cinnamon run faster is something I want and I think everyone.

collinss commented 10 years ago

Well, I was actually in way over my head when I started, but I wanted to be able to test things in 2.2, and I couldn't find a better way to get the required packages installed. I used a fresh install, so it wasn't a big deal if I screwed up my system in the process, but it worked (after a lot of fumbling around and trying different thing), so I didn't have to reinstall anything.

ghost commented 10 years ago

Edit: @collinss look at this: https://github.com/lestcape/Spices-Notifier I use your applet, because i not have right now a good internet connection. Inside your applet there are an API to handdle the applets/desklets/extentions and maybe themes. This allow to alert users for update/new/active/installed/default cinnamon/uknown... You can see the current result in the forlder:

~/.cinnamon/temp.cache/applet

See: 1- The update.json file, you can test things like removed an image form ~/.cinnamon/spices.cache/applet and see that this images will be create in ~/.cinnamon/temp.cache/applet

2- If you remove an applet definition from ~/.cinnamon/spices.cache/index.json this appear as "new" in ~/.cinnamon/temp.cache/applet/update.json

3- You can see the current active applet in "active" attribute of ~/.cinnamon/temp.cache/applet/update.json

4- if you have an applet like your Spices Notifier that it's not pressent on cinnamon-spices this appear in ~/.cinnamon/temp.cache/applet/update.json as "unknown".

5- You can see the current default cinnamon applet in "cinnamon" attribute of ~/.cinnamon/temp.cache/applet/update.json

6- This file contain the cinnamon definition of all applets and it's download from spices: cinnamon/temp.cache/applet/index.json

Could be added another steep from installed applet latter and this will be all that we needed to create an api from spices.

if you have time to help will be wonderfull....

collinss commented 10 years ago

Where does the update.json file come from? Does your applet create it? I don't have it on my system.

ghost commented 10 years ago

Yes my spices API create the file... ~/.cinnamon/temp.cache/applet/update.json

collinss commented 10 years ago

Ah, ok. Well, I'll download and take a look when I get a chance.

ghost commented 10 years ago

Yes, delete the folder ~/.cinnamon/temp.cache when you download a new version always, because API will be changed...

You are how create the panel launcher applet? When i don't want to have this applet enable and i want to use the windowsIconList if i add from cinnamon menu an app to panel the applet will be enabled... On my opinion this is an error...

ghost commented 10 years ago

I have this problem: How i can detected when python code remove an extentions/applet/desklet? Or worse because can be delete manually... The first can be resolved using cinnamonDbus an sending a message from python code. Than not occurs right now, but can be implemented...

collinss commented 10 years ago

Have you tried using a gio file monitor? If you place it on ~/.local/share/cinnamon/ and pass it the correct arguments, it should notify you if any files or folders are created or deleted within that directory.

ghost commented 10 years ago

Yes i try to do that... But only report me a change of the folder name, not the children inside. How could be that ?

ghost commented 10 years ago

The API was moved to: https://github.com/lestcape/Spices-Menu Bad things:

ghost commented 10 years ago

@collinss, apology for leaving the thread, forget if my attempt is good or not, I don't want speak bad thing to the job that was done. I got lost in explanations and I not said the important thing. The biggest problem I see, is that when all third Party applets, extensions and desklets start using, multiples hotkeys, will appear many conflict keys, and all keys will start to do a thing in my keyboard. I don't want this.

collinss commented 10 years ago

Ah, I see your concern. Perhaps a note should be made to spices developers that they should take care when setting keybindings. As for myself, I always try to set my default keybindings to something that is not used by Cinnamon by default, and likewise isn't used by any of my other applets or desklets. I imagine that the second keybinding should generally be reserved for the user, and not set by default (except in the odd case such as the menu applet). Also, IIRC mtwebster said that he plans to implement something to prevent conflicting keybindings in xlet settings, so hopefully that wont be an issue for long anyway.

ghost commented 10 years ago

Yes, except the "odd case such as the menu applet", i have configurable menu, and i making also the spices menu... Similar applets normally will have the same keybindings. Try to resolve conflict automatically only will afected the third party applets, and this will not resolve the problem of several keybindingns... Have multiples keybindings it's a thing that i don't see as a bad things. It's good for user if will be define as alternative, not by default. But define one applet with 2 keybindings, it's use this feature as default, and this is the thing that i don' t want and i try to remove it, with the solution, of change the keybindings if not appear the key, because user could use this feature to add manually another keybindings more if they have 2 Super keys and they want. The problem that i see it's used this feature by default, and this occurs also with this thread closed. Maybe you can try to not used the cinnamon keybindings, maybe i want to used in all my things. It's an open option now, why not...? I try to alert, not body lisent then...

ghost commented 10 years ago

The only way to prevent this is do not do, or external applets can not use this functionality, but the the last, unnecessarily limit to external applets, and if they try to prevent it, always you be able to do that, if you connect directly to cinnamon settings daemon, the daemon will not know which of their customers DBus is trying to add a hot key. Finally this only create a war...

If you can not beat them, join them....

ghost commented 10 years ago

This is like i said: https://github.com/lestcape/Configurable-Menu/issues/64