Refresh patches
Dmitry Bogatov
5 years ago
0 | 0 | dvtm (0.15+40.g311a8c0-1) UNRELEASED; urgency=medium |
1 | 1 | |
2 | 2 | * New snapshot of upstream repository (Closes: #917568) |
3 | * Refresh patches | |
4 | + Drop `dvtm-editor.patch', since upstream now includes | |
5 | code to use any text editor for copy mode. | |
3 | 6 | |
4 | 7 | -- Dmitry Bogatov <KAction@debian.org> Thu, 03 Jan 2019 07:46:31 +0000 |
5 | 8 |
0 | Description: provide dvtm-editor out of box | |
1 | Since dvtm-0.14 copymode is not built-in, but is implemented via | |
2 | piping text into some program and saving into copy-paste buffer | |
3 | it's output. | |
4 | . | |
5 | Unfortunately, most text editors do not work correctly with | |
6 | redirected stdin and stdout, so this patch and script in | |
7 | 'debian/contrib/dvtm-editor' are provided to make the | |
8 | best possible user experience out-of-box: user's EDITOR | |
9 | is used if it is set, or /usr/bin/editor otherwise. | |
10 | . | |
11 | It should work most of the time, but if EDITOR does not | |
12 | support +%d line specification, user should setup | |
13 | DVTM_EDITOR variable. | |
14 | Author: Dmitry Bogatov <KAction@gnu.org> | |
15 | Forwarded: no | |
16 | Last-Update: 2016-04-28 | |
17 | --- | |
18 | This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ | |
19 | --- a/config.def.h | |
20 | +++ b/config.def.h | |
21 | @@ -200,7 +200,7 @@ static Cmd commands[] = { | |
22 | FIFO_EXPORT(quit), | |
23 | FIFO_EXPORT(redraw), | |
24 | FIFO_EXPORT(setlayout), | |
25 | - FIFO_EXPORT(incmaster), | |
26 | + FIFO_EXPORT(incnmaster), | |
27 | FIFO_EXPORT(setmfact), | |
28 | FIFO_EXPORT(startup), | |
29 | FIFO_EXPORT(tag), | |
30 | @@ -232,7 +232,9 @@ static char const * const keytable[] = { | |
31 | * redirected (i.e. not a terminal). If color is true then color escape sequences | |
32 | * are generated in the output. | |
33 | */ | |
34 | +#define DVTM_ED "/usr/lib/dvtm/dvtm-editor" | |
35 | static Editor editors[] = { | |
36 | + { .name = DVTM_ED, .argv = { DVTM_ED, "+%d", NULL }, .filter = true, .color = false }, | |
37 | { .name = "vis", .argv = { "vis", "+%d", "-", NULL }, .filter = true, .color = false }, | |
38 | { .name = "sandy", .argv = { "sandy", "-d", "-", NULL }, .filter = true, .color = false }, | |
39 | { .name = "dvtm-editor", .argv = { "dvtm-editor", "-", NULL }, .filter = true, .color = false }, | |
40 | --- a/dvtm.c | |
41 | +++ b/dvtm.c | |
42 | @@ -1053,10 +1053,6 @@ copymode(const char *args[]) { | |
43 | sel->editor_fds[0] = sel->editor_fds[1] = -1; | |
44 | ||
45 | if (!ed) | |
46 | - ed = getenv("EDITOR"); | |
47 | - if (!ed) | |
48 | - ed = getenv("PAGER"); | |
49 | - if (!ed) | |
50 | ed = editors[0].name; | |
51 | ||
52 | const char **argv = (const char*[]){ ed, "-", NULL, NULL }; |
10 | 10 | Last-Update: 2016-04-28 |
11 | 11 | --- |
12 | 12 | This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ |
13 | --- a/config.def.h | |
14 | +++ b/config.def.h | |
15 | @@ -187,8 +187,33 @@ static Button buttons[] = { | |
13 | Index: dvtm/config.def.h | |
14 | =================================================================== | |
15 | --- dvtm.orig/config.def.h | |
16 | +++ dvtm/config.def.h | |
17 | @@ -190,6 +190,7 @@ static Button buttons[] = { | |
16 | 18 | }; |
17 | 19 | #endif /* CONFIG_MOUSE */ |
18 | 20 | |
19 | 21 | +#define FIFO_EXPORT(fn) { #fn, { fn, { NULL } } } |
20 | 22 | static Cmd commands[] = { |
21 | - { "create", { create, { NULL } } }, | |
23 | /* create [cmd]: create a new window, run `cmd` in the shell if specified */ | |
24 | { "create", { create, { NULL } } }, | |
25 | @@ -197,6 +198,30 @@ static Cmd commands[] = { | |
26 | { "focus", { focusid, { NULL } } }, | |
27 | /* tag <win_id> <tag> [tag ...]: add +tag, remove -tag or set tag of the window with the given identifier */ | |
28 | { "tag", { tagid, { NULL } } }, | |
22 | 29 | + FIFO_EXPORT(create), |
23 | 30 | + FIFO_EXPORT(copymode), |
24 | 31 | + FIFO_EXPORT(focusn), |
30 | 37 | + FIFO_EXPORT(quit), |
31 | 38 | + FIFO_EXPORT(redraw), |
32 | 39 | + FIFO_EXPORT(setlayout), |
33 | + FIFO_EXPORT(incmaster), | |
40 | + FIFO_EXPORT(incnmaster), | |
34 | 41 | + FIFO_EXPORT(setmfact), |
35 | 42 | + FIFO_EXPORT(startup), |
36 | + FIFO_EXPORT(tag), | |
37 | 43 | + FIFO_EXPORT(togglebar), |
38 | 44 | + FIFO_EXPORT(togglebarpos), |
39 | 45 | + FIFO_EXPORT(toggleminimize), |
5 | 5 | |
6 | 6 | --- |
7 | 7 | |
8 | --- dvtm-0.15.orig/config.def.h | |
9 | +++ dvtm-0.15/config.def.h | |
8 | Index: dvtm/config.def.h | |
9 | =================================================================== | |
10 | --- dvtm.orig/config.def.h | |
11 | +++ dvtm/config.def.h | |
10 | 12 | @@ -56,7 +56,7 @@ static Color colors[] = { |
11 | 13 | /* curses attributes for not selected tags which with urgent windows */ |
12 | 14 | #define TAG_URGENT (COLOR(BLUE) | A_NORMAL | A_BLINK) |
16 | 18 | |
17 | 19 | #include "tile.c" |
18 | 20 | #include "grid.c" |
19 | @@ -139,6 +139,10 @@ static KeyBinding bindings[] = { | |
21 | @@ -142,6 +142,10 @@ static KeyBinding bindings[] = { | |
20 | 22 | TAGKEYS( '3', 2) |
21 | 23 | TAGKEYS( '4', 3) |
22 | 24 | TAGKEYS( '5', 4) |
6 | 6 | |
7 | 7 | --- |
8 | 8 | |
9 | --- dvtm-0.15.orig/Makefile | |
10 | +++ dvtm-0.15/Makefile | |
11 | @@ -55,8 +55,6 @@ install: dvtm | |
12 | @mkdir -p ${DESTDIR}${MANPREFIX}/man1 | |
13 | @sed "s/VERSION/${VERSION}/g" < dvtm.1 > ${DESTDIR}${MANPREFIX}/man1/dvtm.1 | |
14 | @chmod 644 ${DESTDIR}${MANPREFIX}/man1/dvtm.1 | |
9 | Index: dvtm/Makefile | |
10 | =================================================================== | |
11 | --- dvtm.orig/Makefile | |
12 | +++ dvtm/Makefile | |
13 | @@ -50,8 +50,6 @@ install: all | |
14 | sed -e "s/VERSION/${VERSION}/" < "$$m" > "${DESTDIR}${MANPREFIX}/man1/$$m" && \ | |
15 | chmod 644 "${DESTDIR}${MANPREFIX}/man1/$$m"; \ | |
16 | done | |
15 | 17 | - @echo installing terminfo description |
16 | 18 | - @TERMINFO=${TERMINFO} tic -s dvtm.info |
17 | 19 | |
18 | 20 | uninstall: |
19 | @echo removing executable file from ${DESTDIR}${PREFIX}/bin | |
21 | @for b in ${BIN}; do \ |