dvtm

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

commit cff1daf092bafac36af868f7767b3a4ce9fc59b2
parent 1b6c47ddaec48e052e8687fb4ac51c9d3ab02106
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Tue, 25 Feb 2014 23:38:25 +0100

Remove screen lock functionality

Diffstat:
config.def.h | 1-
dvtm.1 | 3---
dvtm.c | 32--------------------------------
3 files changed, 0 insertions(+), 36 deletions(-)

diff --git a/config.def.h b/config.def.h @@ -80,7 +80,6 @@ static Key keys[] = { { MOD, 'q', { quit, { NULL } } }, { MOD, 'a', { togglerunall, { NULL } } }, { MOD, 'r', { redraw, { NULL } } }, - { MOD, 'X', { lock, { NULL } } }, { MOD, 'B', { togglebell, { NULL } } }, { MOD, 'v', { copymode, { NULL } } }, { MOD, '/', { copymode, { "/" } } }, diff --git a/dvtm.1 b/dvtm.1 @@ -147,9 +147,6 @@ Redraw whole screen. Toggle keyboard multiplexing mode, if activated keypresses are sent to all visible windows. .TP -.B Mod\-X -Lock screen. -.TP .B Mod\-B Toggle bell (off by default). .TP diff --git a/dvtm.c b/dvtm.c @@ -152,7 +152,6 @@ static void focusprev(const char *args[]); static void focusprevnm(const char *args[]); static void focuslast(const char *args[]); static void killclient(const char *args[]); -static void lock(const char *key[]); static void paste(const char *args[]); static void quit(const char *args[]); static void redraw(const char *args[]); @@ -853,37 +852,6 @@ killclient(const char *args[]) { } static void -lock(const char *args[]) { - size_t len = 0, i = 0; - char buf[16], *pass = buf; - int c; - - erase(); - curs_set(0); - - if (args && args[0]) { - len = strlen(args[0]); - pass = (char *)args[0]; - } else { - mvprintw(LINES / 2, COLS / 2 - 7, "Enter password"); - while (len < sizeof buf && (c = getch()) != '\n') - if (c != ERR) - buf[len++] = c; - } - - mvprintw(LINES / 2, COLS / 2 - 7, "Screen locked!"); - - while (i != len) { - for(i = 0; i < len; i++) { - if (getch() != pass[i]) - break; - } - } - - arrange(); -} - -static void paste(const char *args[]) { if (sel && copybuf) vt_write(sel->term, copybuf, strlen(copybuf));