dvtm

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

commit a0090ce51da71ac76e1e1a57a49ed7c450f7f0a0
parent fccaea247f2147de0aede0af5fb04066d78e69c8
Author: Marc Andre Tanner <mat@brain-dump.org>
Date:   Thu, 26 May 2011 20:20:40 +0200

Remove CONFIG_STATUSBAR enable it by default

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

Diffstat:
config.h | 2--
config.mk | 1-
dvtm.c | 19+------------------
3 files changed, 1 insertion(+), 21 deletions(-)

diff --git a/config.h b/config.h @@ -71,9 +71,7 @@ Key keys[] = { { MOD, 'h', { setmwfact, { "-0.05" } } }, { MOD, 'l', { setmwfact, { "+0.05" } } }, { MOD, '.', { toggleminimize, { NULL } } }, -#ifdef CONFIG_STATUSBAR { MOD, 's', { togglebar, { NULL } } }, -#endif #ifdef CONFIG_MOUSE { MOD, 'M', { mouse_toggle, { NULL } } }, #endif diff --git a/config.mk b/config.mk @@ -16,7 +16,6 @@ LDFLAGS += -L/usr/lib -L/usr/local/lib ${LIBS} # Mouse handling CFLAGS += -DCONFIG_MOUSE #CFLAGS += -DCONFIG_CMDFIFO -CFLAGS += -DCONFIG_STATUSBAR DEBUG_CFLAGS = ${CFLAGS} -UNDEBUG -O0 -g -ggdb -Wall diff --git a/dvtm.c b/dvtm.c @@ -103,9 +103,7 @@ typedef struct { } Cmd; #endif -#ifdef CONFIG_STATUSBAR enum { BarTop, BarBot, BarOff }; -#endif #define countof(arr) (sizeof(arr) / sizeof((arr)[0])) #define sstrlen(str) (sizeof(str) - 1) @@ -138,10 +136,8 @@ static void zoom(const char *args[]); static void lock(const char *key[]); static void togglerunall(const char *args[]); -#ifdef CONFIG_STATUSBAR enum { ALIGN_LEFT, ALIGN_RIGHT }; static void togglebar(const char *args[]); -#endif #ifdef CONFIG_MOUSE static void mouse_focus(const char *args[]); @@ -186,9 +182,7 @@ static bool runinall = false; # include "cmdfifo.c" #endif -#ifdef CONFIG_STATUSBAR # include "statusbar.c" -#endif static void eprint(const char *errstr, ...) { @@ -846,10 +840,8 @@ resize_screen() { waw = width; wah = height; -#ifdef CONFIG_STATUSBAR updatebarpos(); drawbar(); -#endif arrange(); } @@ -883,10 +875,8 @@ setup() { static void cleanup() { endwin(); -#ifdef CONFIG_STATUSBAR if (statusfd > 0) close(statusfd); -#endif #ifdef CONFIG_CMDFIFO if (cmdfd > 0) close(cmdfd); @@ -905,9 +895,7 @@ static void usage() { cleanup(); eprint("usage: dvtm [-v] [-m mod] [-d escdelay] [-h n] " -#ifdef CONFIG_STATUSBAR "[-s status-fifo] " -#endif #ifdef CONFIG_CMDFIFO "[-c cmd-fifo] " #endif @@ -973,12 +961,10 @@ parse_args(int argc, char *argv[]) { case 'h': scroll_buf_size = atoi(argv[++arg]); break; -#ifdef CONFIG_STATUSBAR case 's': statusfd = open_or_create_fifo(argv[++arg]); updatebarpos(); break; -#endif #ifdef CONFIG_CMDFIFO case 'c': cmdfd = open_or_create_fifo(argv[++arg]); @@ -1046,12 +1032,11 @@ main(int argc, char *argv[]) { nfds = cmdfd; } #endif -#ifdef CONFIG_STATUSBAR if (statusfd != -1) { FD_SET(statusfd, &rd); nfds = max(nfds, statusfd); } -#endif + for (c = clients; c; ) { if (c->died) { t = c->next; @@ -1105,10 +1090,8 @@ main(int argc, char *argv[]) { if (cmdfd != -1 && FD_ISSET(cmdfd, &rd)) handle_cmdfifo(); #endif -#ifdef CONFIG_STATUSBAR if (statusfd != -1 && FD_ISSET(statusfd, &rd)) handle_statusbar(); -#endif for (c = clients; c; ) { if (FD_ISSET(c->pty, &rd)) {