| Move TUI navigation keys to config.h - sacc - sacc(omys), simple console gopher client |
| git clone git://bitreich.org/sacc/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/sacc/ |
| Log |
| Files |
| Refs |
| Tags |
| LICENSE |
| --- |
| commit 59f8f128f4fd5d7ec4efd6466da6c238cce9e2f9 |
| parent b3e4d9f82f0e3de4c8de054e419819960db1a0d2 |
| Author: Quentin Rameau |
| Date: Sun, 27 Aug 2017 13:08:30 +0200
Move TUI navigation keys to config.h
Diffstat:
M config.def.h | 15 ++++++++++++++-
M ui_ti.c | 13 +------------
2 files changed, 15 insertions(+), 13 deletions(-)
--- |
| diff --git a/config.def.h b/config.def.h |
| @@ -1,4 +1,17 @@
/* See LICENSE file for copyright and license details. */
-static char *plumber = "xdg-open";
+/* Screen UI navigation keys */
+#define _key_lndown 'j' /* move one line down */
+#define _key_lnup 'k' /* move one line up */
+#define _key_pgdown ' ' /* move one screen down */
+#define _key_pgup 'b' /* move one screen up */
+#define _key_home 'g' /* move to the top of page */
+#define _key_end 'G' /* move to the bottom of page */
+#define _key_pgnext 'l' /* view highlighted item */
+#define _key_pgprev 'h' /* view previous item */
+#define _key_fetch 'L' /* refetch current item */
+#define _key_help '?' /* display help */
+#define _key_quit 'q' /* exit sacc */
+/* default plumber */
+static char *plumber = "xdg-open"; |
| diff --git a/ui_ti.c b/ui_ti.c |
| @@ -6,6 +6,7 @@
#include
#include
+#include "config.h"
#include "common.h"
#define C(c) #c
@@ -13,18 +14,6 @@
static struct termios tsave;
static struct termios tsacc;
-/* navigation keys */
-#define _key_lndown 'j' /* move one line down */
-#define _key_lnup 'k' /* move one line up */
-#define _key_pgdown ' ' /* move one screen down */
-#define _key_pgup 'b' /* move one screen down */
-#define _key_home 'g' /* move to the top of page */
-#define _key_end 'G' /* move to the bottom of page */
-#define _key_pgnext 'l' /* view highlighted item */
-#define _key_pgprev 'h' /* view previous item */
-#define _key_fetch 'L' /* refetch current item */
-#define _key_help '?' /* display help */
-#define _key_quit 'q' /* exit sacc */
void
uisetup(void) |