Browse Source

Move TUI navigation keys to config.h

master
Quentin Rameau 5 years ago
parent
commit
59f8f128f4
  1. 15
      config.def.h
  2. 13
      ui_ti.c

15
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";

13
ui_ti.c

@ -6,6 +6,7 @@
#include <unistd.h>
#include <sys/types.h>
#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)

Loading…
Cancel
Save