From fa4f55fae629bca4f6b2fc0010aa249af32cdd3d Mon Sep 17 00:00:00 2001 From: gotmor Date: Sun, 3 Jun 2007 13:49:44 +0000 Subject: fixed scrolling git-svn-id: http://dzen.googlecode.com/svn/trunk@54 f2baff5b-bf2c-0410-a398-912abdc3d8b2 --- README | 7 ++++--- action.c | 11 ++++------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/README b/README index 3d45f93..cfcc470 100644 --- a/README +++ b/README @@ -58,7 +58,7 @@ dzen accepts a couple of options: -l lines, see (1) -e events and actions, see (2) -m menu, see (3) - -p persistent, never time out + -p persist EOF (optional timeout) -x x position -y y position -w width @@ -157,10 +157,11 @@ Supported actions: togglestick toggle sticky state hide hide title window unhide unhide title window - scrollup scroll slave window one line up - scrolldown scroll slave window one line down raise raise window to view (above all others) lower lower window (behind all others) + scrollhome show head of input + scrollup:n scroll slave window n lines up (default n=1) + scrolldown:n scroll slave window n lines down (default n=1) Note: If no events/actions are specified dzen defaults to: diff --git a/action.c b/action.c index e1220f2..27ed3cd 100644 --- a/action.c +++ b/action.c @@ -201,7 +201,6 @@ a_uncollapse(char * opt[]){ XMapRaised(dzen.dpy, dzen.slave_win.win); for(i=0; i < dzen.slave_win.max_lines; i++) XMapRaised(dzen.dpy, dzen.slave_win.line[i]); - //x_draw_body(); } return 0; } @@ -234,11 +233,10 @@ a_togglestick(char * opt[]) { int a_scrollup(char * opt[]) { - int n; + int n=1; + if(opt[0]) n = atoi(opt[0]); - if(!n) - n = 1; if(dzen.slave_win.max_lines && dzen.slave_win.first_line_vis @@ -257,11 +255,10 @@ a_scrollup(char * opt[]) { int a_scrolldown(char * opt[]) { - int n; + int n=1; + if(opt[0]) n = atoi(opt[0]); - if(!n) - n = 1; if(dzen.slave_win.max_lines && dzen.slave_win.last_line_vis >= dzen.slave_win.max_lines -- cgit v1.2.3-54-g00ecf