{"action":"created","issue":{"url":"https://api.github.com/repos/travitch/taffybar/issues/108","labels_url":"https://api.github.com/repos/travitch/taffybar/issues/108/labels{/name}","comments_url":"https://api.github.com/repos/travitch/taffybar/issues/108/comments","events_url":"https://api.github.com/repos/travitch/taffybar/issues/108/events","html_url":"https://github.com/travitch/taffybar/issues/108","id":53490398,"number":108,"title":"Just want advice on programming a widget for this","user":{"login":"djvs","id":2954343,"avatar_url":"https://avatars.githubusercontent.com/u/2954343?v=3","gravatar_id":"","url":"https://api.github.com/users/djvs","html_url":"https://github.com/djvs","followers_url":"https://api.github.com/users/djvs/followers","following_url":"https://api.github.com/users/djvs/following{/other_user}","gists_url":"https://api.github.com/users/djvs/gists{/gist_id}","starred_url":"https://api.github.com/users/djvs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djvs/subscriptions","organizations_url":"https://api.github.com/users/djvs/orgs","repos_url":"https://api.github.com/users/djvs/repos","events_url":"https://api.github.com/users/djvs/events{/privacy}","received_events_url":"https://api.github.com/users/djvs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-06T07:55:54Z","updated_at":"2015-01-06T16:36:02Z","closed_at":null,"body":"I've been fiddling with taffybar here for a while, wrote a super small disk usage widget.  I have experience coding Qt in Ruby, but don't know GTK (besides the idea of 'widget' and some Pango), and am only C+-grade in Haskell so to speak.  I am wondering if you could share a few words on how I would go about writing a foobar-style/Start Menu-style widget.  \r\n\r\nFrom what I understand my best starting point would probably be the window chooser component of the XMonadLog code?  I think a couple tips on producing a IO Widget or IO Gtk.Widget would go a long way toward spurring users to make some more, maybe.\r\n\r\nWondering also if there's a clean way to introduce a new string for formatting in the weather widget.  As you may know, some people use a weather font in Conky to produce graphical icons for it, but I hit a huge roadblock trying to replicate the code (I think my issue was with replicating defaultWeatherFormatter)."},"comment":{"url":"https://api.github.com/repos/travitch/taffybar/issues/comments/68890274","html_url":"https://github.com/travitch/taffybar/issues/108#issuecomment-68890274","issue_url":"https://api.github.com/repos/travitch/taffybar/issues/108","id":68890274,"user":{"login":"travitch","id":354470,"avatar_url":"https://avatars.githubusercontent.com/u/354470?v=3","gravatar_id":"","url":"https://api.github.com/users/travitch","html_url":"https://github.com/travitch","followers_url":"https://api.github.com/users/travitch/followers","following_url":"https://api.github.com/users/travitch/following{/other_user}","gists_url":"https://api.github.com/users/travitch/gists{/gist_id}","starred_url":"https://api.github.com/users/travitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/travitch/subscriptions","organizations_url":"https://api.github.com/users/travitch/orgs","repos_url":"https://api.github.com/users/travitch/repos","events_url":"https://api.github.com/users/travitch/events{/privacy}","received_events_url":"https://api.github.com/users/travitch/received_events","type":"User","site_admin":false},"created_at":"2015-01-06T16:36:02Z","updated_at":"2015-01-06T16:36:02Z","body":"As you say, the best place to start looking would be the window chooser.  That uses a Menu widget and really uses it as just a menu.  You could *probably* do that, though you might not be able to embed all widget types within the menu.  If that ends up being problematic for you, I would just use a button press handler to show a VBox widget - you can pack arbitrary widgets into that.  Then you can set up a handler to hide the vbox however you like.  If you want even more control than a VBox provides, you could combine VBoxes and HBoxes (or a grid layout widget) for more complex things.\r\n\r\nAs for the weather formatting string - the weather \"widget\" is really just a gtk label, so you can use any [pango markup](http://www.gtk.org/api/2.6/pango/PangoMarkupFormat.html).  That would probably let you use the `font_family` attribute to set a specific font over a span of text.  That might be enough to handle inserting a few glyphs from an icon font."}}