Author Topic: [Shimmer Layout] Help with Keybind for Search Box...  (Read 2261 times)

jandry

  • Newbie
  • *
  • Posts: 1
    • View Profile
[Shimmer Layout] Help with Keybind for Search Box...
« 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

Quentin Sculo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1082
    • View Profile
Re: [Shimmer Layout] Help with Keybind for Search Box...
« Reply #1 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

staubi

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: [Shimmer Layout] Help with Keybind for Search Box...
« Reply #2 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.
« Last Edit: May 10, 2014, 21:42:10 by staubi »

aboettger

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Re: [Shimmer Layout] Help with Keybind for Search Box...
« Reply #3 on: April 19, 2014, 15:34:51 »
Nice hint. I added it to my layout ("Arkanoid Vertical" -> https://github.com/aboettger/gmusicbrowser-layouts).