gmusicbrowser Forum

Main board => Customization => Topic started by: jandry on March 23, 2014, 04:56:51

Title: [Shimmer Layout] Help with Keybind for Search Box...
Post by: jandry on March 23, 2014, 04:56:51
Hey guys,

First time poster, long time user. I am using a lightly modified version of the Shimmer layout, and am trying to figure out the keybind to open the search box in the upper right hand corner. To make it clear, heres a screenshot of what im talking about:
http://imgur.com/Zq9puNv

Id like a keybind that brings the focus to that search box, and if possible the keybind to escape that search. Talking to VastOne in #gmusicbrowser on freenode, he said that he believes there is a native keybind for this determined by the layout. If anyone knows anything, id appreciate you letting me know :)

Im currently working on a script to make this possible by dirty hack with xdotool :P
Title: Re: [Shimmer Layout] Help with Keybind for Search Box...
Post by: Quentin Sculo on March 25, 2014, 21:25:59
For people interested, what I replied on IRC :
To set the focus on a widget, there is a gmb command : SetFocusOn(name_of_widget)
I guess the widget you want is SimpleSearch, so simply SetFocusOn(SimpleSearch) should work
As a bonus SimpleSearch has an option to run a command when you press enter, like this : SimpleSearch(activate=SetFocusOn(SongTree)) though it could a widget other than SongTree, it depends on your layout
Title: Re: [Shimmer Layout] Help with Keybind for Search Box...
Post by: staubi on April 18, 2014, 20:52:37
offtopic:

@jandry:
What kind of theme do You use on gmb? I like that dark theme, but even though I use a general dark theme my gmb remains light...


:edit: fixed it! Had some errors in my gtk-2.0/gtkrc files.
Title: Re: [Shimmer Layout] Help with Keybind for Search Box...
Post by: aboettger on April 19, 2014, 15:34:51
Nice hint. I added it to my layout ("Arkanoid Vertical" -> https://github.com/aboettger/gmusicbrowser-layouts).