Re: [dev] [surf] Shortcuts for horizontal scrolling

From: Alex Puterbaugh <puterbaugh0_AT_gmail.com>
Date: Sun, 22 Aug 2010 12:22:05 -0400

Nice stuff. You should submit that to the wiki :D

>On Sun, Aug 22, 2010 at 11:17:20AM +0200, stanio_AT_cs.tu-berlin.de wrote:
> * Alex Puterbaugh <puterbaugh0_AT_gmail.com> [2010-08-21 20:32]:
> > I think that horizontal scrolling via the keyboard is far from an
> > "edge" use case for a web browser that already depends so heavily on
> > the keyboard,
>
> Yep. I've patched surf for horiz scrolling several months ago and shared
> the patch here I guess. There are so many pages which use fixed width wider
> than my netbook's screen. Horizontal scrolling is a must.
>
> Also, the following proved to be useful for me, especially for sites with
> mainly text and not sane css:
>
> # cat .surf/text_style.css
> body,textarea,p,input,td,tr,div,h1,h2,h3,h4 {
> background-color:#AFD7AF !important;
> text-color:#121212 !important;
> max-width:100%;
> }
> body{width:100%;}
>
> with following in config.h
>
> { MODKEY, GDK_t, setstyle, { .v = "/home/stanio/.surf/text_style.css" } },
> { MODKEY, GDK_T, setstyle, { .v = (const char *)NULL} },
>
> and in surf.c
>
> void
> 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);
> }
>
>
> cheers,
> --
> stanio_
>
Received on Sun Aug 22 2010 - 18:22:05 CEST

This archive was generated by hypermail 2.2.0 : Sun Aug 22 2010 - 18:24:02 CEST