dvtm

dynamic virtual terminal manager - with my changes
git clone https://pi.duncano.de/git/dvtm.git
Log | Files | Refs | README | LICENSE

commit ee63fd7d2874d1b97693e0176fb94ddeed153ed8
parent b51805d65619c496f1bcbf92997b73705f70692d
Author: Marc Andre Tanner <mat@brain-dump.org>
Date:   Mon, 11 Feb 2013 09:12:32 +0100

Add -M command line flag to disable mouse support upon startup

Signed-off-by: Marc Andre Tanner <mat@brain-dump.org>

Diffstat:
dvtm.1 | 12+++++++++---
dvtm.c | 7+++++--
2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/dvtm.1 b/dvtm.1 @@ -5,6 +5,7 @@ dvtm \- dynamic virtual terminal manager .SH SYNOPSIS .B dvtm .RB [ \-v ] +.RB [ \-M ] .RB [ \-m .IR modifier ] .RB [ \-d @@ -25,6 +26,10 @@ console based applications. .B \-v Print version information to standard output and exit. .TP +.B \-M +Toggle default mouse grabbing upon startup. Use this to allow normal mouse operation +under X. +.TP .BI \-m \ modifier Set command modifier at runtime. .TP @@ -169,9 +174,10 @@ Unfortunately this interferes with the standard X copy and paste mechanism. To work around this you need to hold down .B Shift while selecting or pasting text. -Alternatively you can disable mouse support at compile time, or use -.B Mod\-M -to toggle mouse support dynamically. +Alternatively you can disable mouse support at compile time, start dvtm with the +.B -M +flag or toggle mouse support during runtime with +.BR Mod\-M . .TP .B Button1 click Select window. diff --git a/dvtm.c b/dvtm.c @@ -1230,7 +1230,7 @@ open_or_create_fifo(const char *name, const char **name_created) { static void usage() { cleanup(); - eprint("usage: dvtm [-v] [-m mod] [-d escdelay] [-h n] " + eprint("usage: dvtm [-v] [-M] [-m mod] [-d delay] [-h lines] " "[-s status-fifo] " "[-c cmd-fifo] " "[cmd...]\n"); @@ -1254,12 +1254,15 @@ parse_args(int argc, char *argv[]) { create(args); continue; } - if (argv[arg][1] != 'v' && (arg + 1) >= argc) + if (argv[arg][1] != 'v' && argv[arg][1] != 'M' && (arg + 1) >= argc) usage(); switch (argv[arg][1]) { case 'v': puts("dvtm-"VERSION" (c) 2007-2012 Marc Andre Tanner"); exit(EXIT_SUCCESS); + case 'M': + mouse_events_enabled = !mouse_events_enabled; + break; case 'm': { char *mod = argv[++arg]; if (mod[0] == '^' && mod[1])