Developing a Window Buttons Applet for Mate

So I did not know in wich section to post it .
I know that I have past atempt to make a applet but this time I won't quit .
I am developing a applet that adds window buttons , window title and window menu to the panel .
Wath have I done so far :

Make the buttons close , maximize , minimize active window .
Make the titlebar show on panel .

ToDo :
1.Make a option to control maximized windows not just active ones.
2.Make the title update when window is changed.
3.Make the whole window menu applet.
4.Hide buttons from applet witch are not avalible for window.
5.Get marco buttons order and apply them to applet (10 % done )
6.Redisign the Buttons applet to use Gtk.Image and not Gtk.Button . (90 % done / need to find a way to get window icons)
7.Make the applet orrient from panel orientation

Github repos for those who wan't to help :

# Window buttons applet
https://github.com/IKRadulov/mate-window-buttons-applet

Here is a quick screenshot and a video demonstration :

EDIT 1 :
Added a github repository.

EDIT 2:
Implemented some stuff.

5 Likes

Very positive. There is very much screen space to be saved in old school desktop environments like Gnome2.

Iā€™ve found out that all things I need to have accessable in one click can be housed in one single bar. One bar away from full screen. Displaying open programs with broad non-stacked buttons as in Windows 95 - XP is a complete waste of space, yet itā€™s still Gnome default rather than icons. Icons seems to be the most economic solution, but panel docks are rare. Macintosh style docks were never an alternative of mine. They may look good but they do not save screen space.

Title bar and buttons displayed in the panel is one of my favorites. Already back in Windows, I noticed the waste of space having all those more or less empty bars. Moving title and buttons to panel seems more practical than displaying menus there like Macintosh. Also easier to get to working wih all sorts of programs. But since that feature was integrated in that strange smartphone style Unity project, itā€™s like it suddenly became unnecessesary to the rest of us.

1 Like

I really look forward to this. When I saw it done on other DE, I was surprised that such an option is so obvious after seeing it but seldom seem to have though about it.

I hoped you can have better and better implementation and some guide on how to use for newbies like me.

1 Like

Like any other applet :smiley: . Right click , options , configure , use . ( I will trie to make it as close as possible to the old gnome-window-buttons-applet )

1 Like

How difficult would it be connecting it to a global menu? Similar to Unity but optional. Normally displaying window title, but showing buttons and menus when the cursor touches. I know very little about making things like this one, but perhaps they could be two separate applications - one of them auto-hiding? I tried fiddling with panels but I didnā€™t really manage to make it work. The idea was having a panel with window title and all applications that I want to see. Then Iā€™d have an other top panel, by default hidden, only containing buttons and menus - maybe also the starter icons. So when cursor comes, this panel would appear above the first one. But I couldnā€™t work it outā€¦

1 Like

Well basicly the applet that I am making may be put besides the topmenu applet . But to have them as one big thing will be drasticly hard . Since they are too seperate apps they need to be Embeded inside a other applet like topmenu uses Xembeded to render the menubar by the client and show it in the panel . To seperate and when hoverd the title to hide the tittle applet and show the menubar is imposible (possible but terrible idea).You can contact the developer of Topmenu to implement your Idea . But not in the way you mentioned . The proper way to do it is to make the applet display the Title . The next step would be to load the titlebar on the panel wich can be done by Gtk enter event . The last step when you are living the applet zone to show aggain the text with Gtk leave event .

Thanks for your response. Any guide on how to ā€œinstallā€ the applet? Like where/which folders should the files on GitHub be placed in respectively?

Well you do have to have mate-panel GTK3 since mate is migrating to gtk3 , Ubuntu Mate is migrating to gtk3 version of mate . It is a complete waist of time to port it to gtk2 version of mate. Now I have commited a Setup.py file wich will install it for you . It can be installed via cd to srcdir sudo ./Setup.py install or python3 Setup.py install
Here are the things needed to be installed to run :
#libwnck3
#python3
#mate-panel (Gtk3)


to use setup
#python-pip

@IvCHo If you finish this project (which is ace by the way) I will see it is packaged for Debian and Ubuntu and included in a future Ubuntu MATE :slight_smile: Keep me posted!

3 Likes

Right now I am porting old gnome-window-buttons applet functions to python couse the original developer found a way to do it . That is why no progress is commited to github !

EDIT 1:
Also playing MMOs :smile:

1 Like

I know very little about these things, so my ideas may sound stupidā€¦ But wouldnā€™t it be possible modifying window title to ā€˜negative autohideā€™ - disappearing when cursor approaches? Buttons show, title disappearing. Then if the menu bar is set to show when cursor touches, in practice theyā€™d replace eachother.

Iā€™ve also thought about if it could some way be done with panels autohiding and replacing eachother. I know they donā€™t have that function by default and I have no idea if it would be possible modifying them like that. One panel only displaying see-but-not-touch stuff like title, watch, etc; the other one containing menus, starters and such. One always hiding when the other one appears.

Alsoā€¦ Itā€™s GTK and itā€™s Metacity, I know that much, but are they able of any communication with eachother? Is it possible placing the Metacity window buttons in the GTK menubar?

Basicly the Panels use a method called Xembeded . In this method the application is drawn by the app itself but then it is shown in the panel . TopMenu and my thing (canā€™t realy call it applet now) are two seperate things . I can use the Gtk Enter event to hide the title and Xembed his applet into mine. But in order to do that topmenu developer has to include a plug wich i may access . Your feature can be implemented but contanct (Topmenu Developer) so he may accept this , and make a option to show the title .

So the thing with the panels . you can set 2 panels to top , bot , right , left . But you canā€™t set the 2 panels to hide at the same time since they both will be reisen . One needs to be visible the other to autohide .

Now that my friends is wath Iā€™m doing . Didnā€™t you saw the video ?
Metacity is not Mate DE native call it marco . Well marco does not have python bindings so itā€™s hard for me to get the theme . And I think there is no way to Xembedded the buttons in the panel. Well definitly not . The other way arrond is possible to embeded the menubar in the Window Decoration like in unity :
http://www.howtogeek.com/wp-content/uploads/2014/04/650x241x05_local_menu_in_program.png.pagespeed.gp+jp+jw+pj+js+rj+rp+rw+ri+cp+md.ic.-1Yr3Qb7ES.png

Interesting. Buttons in the menubar, okayā€¦ Maybe that would be easier? Making title disappear when menus show? Not in the panel but in the actual program window. Sounds like an attractive idea.

My idea about the panels wasnā€™t really two panels hiding at the same time, but rather the opposite. One visible top panel for things not needing to be touched - like window title and watch. This one would be set to hide when cursor comes. The other one would contain clickable stuff like buttons, starters and menus and normally be hidden and become visible by cursor - normal autohide. So when one appears, the other hides. I really have no idea if this would be possibleā€¦

I have a little progress . I saw that today is a good day so i began working on the ActionMenu . This is almost complete .
3 things need to do :
Make it update on window change.
Scale the icon with panel size .
Close the popup window on focus lost .
Here is wath I have so far :

@Wimpy
Hello after one year I have decided to finish this and it wenā€™t pretty well . I canā€™t seem to update the topic so I will post everything here .

The buttons have support for icon themes so users could make better icon themes

Here is the link to the repository.
https://github.com/IKRadulov/mate-window-applets

and a little preview of wath the applets can do

2 Likes

That is brilliant progress. Iā€™ll be sure to take a proper look when Iā€™m back home and will work on packaging this for Debian and Ubuntu :grinning:

1 Like

Thanks a lot. It is very useful. Are there plans for use marco-style buttons?

Would be great to see it in default ubuntu-mate installation.

By to use marco-style buttons , do you mean Marco theme ? If so , I already made icon themes support . Just no good with GIMP and canā€™t recreate some of the cool themes like Arc,Ambiance and etc. {Should document how to create icon themes - Note to me }. I did it with icon themes 'couse its more easy to implement , I mean the theme parser is around 4000 lines in C . Not worth it for a applet.

How can i use custom icons in that way? Are there some theme ready to use except Black and White ones? It would be also great to have an FAQ or how-to file that will explain the features and how to use them. Thanks for quick answer.