{MODKEY, GDK_t, setstyle, { .v = "/home/stanio/.surf/text_style.css" } }, {MODKEY|GDK_SHIFT_MASK,GDK_t, setstyle, { .v = "/home/stanio/.surf/text_style_day.css" } }, {MODKEY, GDK_w, setstyle, { .v = (const char *)NULL} }, setstyle(Client *c, const Arg *arg){ WebKitWebSettings *settings; char *uri, *customstylefile; customstylefile = arg->v==NULL?stylefile:(char *)arg->v; settings = webkit_web_view_get_settings(c->view); uri = g_strconcat("file://", customstylefile, NULL); g_object_set(G_OBJECT(settings), "user-stylesheet-uri", uri, NULL); }