Cinnamon Window Buttons

by lippy

UUID: windowButtons@lippy
Score: 14
Last edited: 2 months ago
Last commit: 7e12a5d8b2bf5523034a28e3a2f41038da7a760e



Adds window buttons to the panel

A Cinnamon applet that adds window buttons to the panel. Based on the Window Buttons Gnome Shell extension by biox.

There are two main modes for the applet. The default behaviour is for the buttons to control the active window. The other 'onlymax' behaviour is for the buttons to control the uppermost maximized window.

There are a few other options. They can all be configured by running dconf-editor and navigating to /org/cinnamon/applets/windowButtons@lippy. Hopefully I'll be able to add a UI for this in a future release.

It's possible to use this with the titlebar disabled for maximized windows. This page gives a good explanation for how to do that.


Requirements:

You need to be able to run glib-compile-schemas. On Ubuntu / Debian / Linux Mint: sudo apt-get install libglib2.0-dev


Installation:

  1. Copy the windowButtons@lippy directory to ~/.local/cinnamon/applets or /usr/share/cinnamon/applets.
  2. As root, copy the org.cinnamon.applets.windowButtons@lippy.gschema.xml file to /usr/share/glib-2.0/schemas.
  3. As root, run glib-compile-schemas /usr/share/glib-2.0/schemas.
  4. Open Cinnamon Settings, navigate to Applets and enable the Window Buttons applet.
  5. Enjoy!

Uninstallation:

  1. Open Cinnamon Settings, navigate to Applets and disable the Window Buttons applet.
  2. Delete the windowButtons@lippy directory within ~/.local/cinnamon/applets or /usr/share/cinnamon/applets.
  3. As root, delete the org.cinnamon.applets.windowButtons@lippy.gschema.xml file within /usr/share/glib-2.0/schemas.
  4. As root, run glib-compile-schemas /usr/share/glib-2.0/schemas.

Known issues

  • If you click and hold on a button then move the cursor away before releasing, it will not cancel the button event. In fact, it doesn't matter where on the panel you click on after that. It will still trigger the button event as if you had clicked on the button. I'm not sure how to fix this, and the problem doesn't appear to be exclusive to this applet either.
  • The maximize button can be stuck in the highlighted state occasionally. This happens when the button changes to the restore button or vice versa shortly after the cursor has been over it. Mousing over the button will fix the problem if it crops up.

Cinnamon Window Buttons changelog:

Version 1.0 - 2012/05/10

  • Initial release.
  • Port to Cinnamon Shell and rewrite as an applet. This has advantages and disadvantages. The main advantage is that the buttons can now be moved anywhere; they can even be on the bottom panel. The disadvantage is that the buttons have to be together, so it's no longer possible to have buttons on both sides of the panel at the same time.
  • Make maximize button dynamic. It will now turn into a restore button when the active window is maximized if onlymax is disabled. If onlymax is enabled, it will be a restore button when any window in the workspace is maximized. Add icons for the restore button.
  • Add support for hotswapping of themes.
  • Improve hideonnomax functionality. It now hides the buttons when the active window is not maximized when onlymax is not set. Previously the option would have had no use in this configuration.
  • Ignore buttons to the left of the titlebar due to the buttons having to be together. I hope to restore this functionality as best as I can for a future version.
  • Remove functionality where the buttons can control windows that are not active. I felt this behaviour was inconsistent and didn't offer any real use so I don't see any negative impact on removing it. This also fixes a bug where windows from other workspaces can be controlled when onlymax is set and the current workspace has no active windows.
  • Add highlighted and pressed states for the default theme.
  • Update Ambiance and Radiance themes to match those of Ubuntu Precise.
  • Button events are triggered after the button is released, rather than clicked on.
  • Match button tooltips with those of Cinnamon.
  • Clean up code.

Unless otherwise indicated, these files are licensed under the GNU General Public License v3 or any later version.


27 Comments

-
10 months ago
Hi there,
I found a workaround for those like me in Cinnamon 2.8 for which the applet didn't work.
-Follow the installation instructions from the author, and read also how to access the options via dconf-editor.
-Check the other options via dconf ( apt-get install dconf-editor ) : "pinch" must be changed to "custom" or "metacity" ("cinnamon" does not work).
-Go where you have installed the applet ( probably home/.local/share/cinnamon/applets/windowButtons@lippy ) and edit applet.js with a text editor (gedit)
-Go to line 172 and uncomment it by putting "//" (without the '' '') at it's beginning. (it should be "//this.button[i].set_tooltip_text( buttonlist[orderRight[i]][0] );")

This line bugged when looking through the looking glass, maybe it then caused the code to stop. I don't understand it as I am barely starting to learn code, but just deactivating this line made the applet work as intended on my linux Mint 17.3.
-
1 year ago
Doesn't work out of the box and needs to be installed manually, but if you do that and follow maczko's instructions in the comments then it works beautifully
-
3 years ago
Sorry, the error message is:

An error occurred during installation or updating. You may wish to report this incident to the developer of windowButtons@lippy.

If this was an update, the previous installation is unchanged

Details: [Errno 2] No existe el archivo o el directorio: '/tmp/tmpmyRIdF/metadata.json'

Cheers
-
3 years ago
Same problem as Enkouyami with Ubuntu 13.04 and Cinnamon 1.8.8. Instalation tool from the Applet Manager shows this error:
<<An error occurred during installation or updating. You may wish to report this incident to the developer of windowButtons@lippy.
If this was an update, the previous installation is unchanged
Details: [Errno 2] No existe el archivo o el directorio: '/tmp/tmpbFVohb/metadata.json'>>

Manual instalation show the applet in the manager but it doesn't work.
-
3 years ago
I'm using Cinnamon 1.8.8 and can't install this using the Applets program in Cinnamon. After manually installing this, its not showing up when I add it to my panel.
-
3 years ago
drdavidk: thanks for that! every day something new to learn :-)
-
4 years ago
maczko: for what it's worth, install dconf-tools in LMDE and it gives you dconf-editor.
-
4 years ago
Great applet, I am using it with Maximus on LMDE 201303 32bit Cinnamon 1.6.7.
I followed the installation, but first didn't worked, no buttons on the panel.
On Ubuntu based Linux Mint the solution is to install dconf-editor and under org > gnome > shell > extensions > window-buttons modify the 'pinch' value (change it to Metacity or Custom) - more at: http://www.webupd8.org/2011/12/get-unity-like-window-buttons-on-top.html
But dconf-editor isn't available in LMDE repos, so I changed the coresponding values in the org.cinnamon.applets.windowButtons@lippy.gschema.xml file using gedit:
- on line 25 replaced 'Cinnamon' with 'Custom'
- on line 37 (onlymax - control only maximized windows) replaced false with true
- on line 43 (hideonnomax) replaced false with true
Then follow installation from step 3 (as root copy the new org.cinnamon.applets.windowButtons@lippy.gschema.xml file to /usr/share/glib-2.0/schemas; then as root run in terminal glib-compile-schemas /usr/share/glib-2.0/schemas ).
Hope it helps!
-
4 years ago
Unfortunately, not work in LMDE >;<
-
4 years ago
Hi, I followed the installation instruction, but nothing! I does not work!
My linux is fedora 18/cinnamon 1.6.7, with this packeges intalled:
glib2-2.34.2-2.fc18.x86_64
glib2-devel-2.34.2-2.fc18.x86_64

Any suggestions?
-
4 years ago
Thanks so much for the applet, and for the latest fix for Cinnamon 1.6.7. I haven't been able to change the theme, despite using dconf-editor, however. Any tips?
-
4 years ago
For use in Cinnamon 1.6.7, run dconf-editor and change key :
/org/cinnamon/applets/windowButtons@lippy//pinch
change to Custom and restart cinnamon.
When pinch=Cinnamon or pinch=Metacity call a key non-existent in applet.js :
"/desktop/cinnamon/windows/button_layout" or "/apps/metacity/general/button_layout"
-
4 years ago
it didnt work by default in latest Mint Nadya for me, but i opened dconf and changed setting "pinch" from Cinnamon to Metacity and buttons appeared. I am not good in js, but maybe smb could fix that?
-
4 years ago
Hi!

It's not working with Cinnamon 1.6.7. Can you please update it? It would be very handy!
-
4 years ago
Problems cause from ;
"if (!activeWindow || activeWindow.get_title() == "Desktop") {"
because i use Turkish Mint, so i change "Desktop"=>"Masaüstü" but still minimize problem go on.
i found temporary solution, change; (0->1)
168 :: for ( let i = 1; i < orderRight.length; ++i ) {
now minimize icon is hide :)
-
4 years ago
works for cinnamon 1.6 . But i have small problem, when no windows open, if i click close or minimize button, also desktop (file manager-icons, left clisk-) minimize and close. ?ts very usefull applet, in my opinion it comes default with cinnamon
-
4 years ago
Do anyone know what's going wrong? The applet does not show at all. I compiled the schemas and everything. This is just like the applet I need the most...
-
4 years ago
Not showing at all on LMDE 201204. I'd really like to use this applet...
-
4 years ago
Does not work for Cinnamon 1.6.1, no buttons appear on the panel. Thanks
-
4 years ago
Awesome applet! When I was on cinnamon 1.4 it did work perfectly for me, but now with cinnamon 1.6 that's not the case anymore. I installed it according to the install notes and it even loads ok (no errors in the glass view). But then I don't have any buttons... Anything I might be doing wrong? Or is it just an incompatibility with cinnamon 1.6?

Thanks!
-
4 years ago
yeah this does not work for me either. i installed correctly, added the applet but no buttons appear on the panel. help please. im running Mint 13
-
4 years ago
It's works perfectly
-
4 years ago
Perfect! 5 stars from me.
-
4 years ago
Does not work für me: Mint 13 Maya
-
4 years ago
Ma non sarebbe piu semplice per gli utenti novizi uno script per l'istallazione all interno del pacchetto com'è stato fatto per altre estensioni facilitandogli ancor'piu la cosa???
-
4 years ago
I like this applet.

Now just looking for an applet that puts the titlebar in the panel
seen here: http://www.webupd8.org/2012/02/window-applets-finally-available-for.html
-
4 years ago
You have a nice applet. I run Cinnamon maximized on my laptop with the maximus app so it is nice to be able to access the windows controls. It would be fantastic if there was another applet which allows you to access the menu, similar to Ubuntu's global menu, for people running maximized windows on netbooks. I think it would be better if you can find away to move away from libglib2.0-dev. You can use the Gnome shell gsettings to set/get schema within your applet.