surf browser hints

August 24, 2009

surf is a simple webbrowser based on webkit/gtk+, the same web engine that powers Google Chrome.

used with dwm and dmenu, it’s a very powerfull, yet simple tool.

here is a patch to apply X geometry hints to surf, so that surf windows behave in dwm.


*** surf.c.orig 2009-08-24 16:41:31.000000000 +0100
--- surf.c 2009-08-24 16:35:02.000000000 +0100
***************
*** 372,377 ****
--- 372,381 ----
gtk_container_add(GTK_CONTAINER(c->vbox), c->searchbar);
gtk_container_add(GTK_CONTAINER(c->vbox), c->urlbar);

+ /* Hints */
+ GdkGeometry hints = { 1, 1 };
+ gtk_window_set_geometry_hints(GTK_WINDOW(c->win), NULL, &hints, GDK_HINT_MIN_SIZE);
+
/* Setup */
gtk_box_set_child_packing(GTK_BOX(c->vbox), c->urlbar, FALSE, FALSE, 0, GTK_PACK_START);
gtk_box_set_child_packing(GTK_BOX(c->vbox), c->searchbar, FALSE, FALSE, 0, GTK_PACK_START);

another hint is to create a script to feed surf with your favorite bookmarks. here it is:

#!/bin/sh
exe="surf -u `cat ~/.bookmarks | dmenu ${1+"$@"}`" && exec $exe

enjoy!

Advertisements

3 Responses to “surf browser hints”


  1. […] under: programming — Tags: browser, dmenu, surf, webkit — lbolla @ 12:45 pm following yesterday’s post, here is another useful hint about surf’s […]

  2. Emanuelez Says:

    You might want to give uzbl a try 🙂
    http://www.uzbl.org/


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: