mirror of git://git.suckless.org/svkbd
Various indentation fixes for a more consistent style
This commit is contained in:
parent
02f13a74c3
commit
b80819aa3f
|
@ -70,15 +70,14 @@ Buttonmod buttonmods[] = {
|
|||
|
||||
#define OVERLAYS 1
|
||||
static Key overlay[OVERLAYS] = {
|
||||
{ 0, XK_Cancel },
|
||||
{ 0, XK_Cancel },
|
||||
};
|
||||
|
||||
#define LAYERS 1
|
||||
static char* layer_names[LAYERS] = {
|
||||
"en",
|
||||
"en",
|
||||
};
|
||||
|
||||
static Key* available_layers[LAYERS] = {
|
||||
keys_en,
|
||||
keys_en,
|
||||
};
|
||||
|
||||
|
|
1021
layout.mobile-intl.h
1021
layout.mobile-intl.h
File diff suppressed because it is too large
Load Diff
|
@ -1,55 +1,55 @@
|
|||
#define KEYS 44
|
||||
static Key keys_en[KEYS] = {
|
||||
{ 0, 0, XK_q, 1 },
|
||||
{ 0, 0, XK_w, 1 },
|
||||
{ 0, 0, XK_e, 1 },
|
||||
{ 0, 0, XK_r, 1 },
|
||||
{ 0, 0, XK_t, 1 },
|
||||
{ 0, 0, XK_y, 1 },
|
||||
{ 0, 0, XK_u, 1 },
|
||||
{ 0, 0, XK_i, 1 },
|
||||
{ 0, 0, XK_o, 1 },
|
||||
{ 0, 0, XK_p, 1 },
|
||||
{ 0, 0, XK_q, 1 },
|
||||
{ 0, 0, XK_w, 1 },
|
||||
{ 0, 0, XK_e, 1 },
|
||||
{ 0, 0, XK_r, 1 },
|
||||
{ 0, 0, XK_t, 1 },
|
||||
{ 0, 0, XK_y, 1 },
|
||||
{ 0, 0, XK_u, 1 },
|
||||
{ 0, 0, XK_i, 1 },
|
||||
{ 0, 0, XK_o, 1 },
|
||||
{ 0, 0, XK_p, 1 },
|
||||
|
||||
{ 0 }, /* New row */
|
||||
{ 0 }, /* New row */
|
||||
|
||||
{ 0, 0, XK_a, 1 },
|
||||
{ 0, 0, XK_s, 1 },
|
||||
{ 0, 0, XK_d, 1 },
|
||||
{ 0, 0, XK_f, 1 },
|
||||
{ 0, 0, XK_g, 1 },
|
||||
{ 0, 0, XK_h, 1 },
|
||||
{ 0, 0, XK_j, 1 },
|
||||
{ 0, 0, XK_k, 1 },
|
||||
{ 0, 0, XK_l, 1 },
|
||||
{ ";",":", XK_colon, 1 },
|
||||
/*{ "'", XK_apostrophe, 2 },*/
|
||||
{ 0, 0, XK_a, 1 },
|
||||
{ 0, 0, XK_s, 1 },
|
||||
{ 0, 0, XK_d, 1 },
|
||||
{ 0, 0, XK_f, 1 },
|
||||
{ 0, 0, XK_g, 1 },
|
||||
{ 0, 0, XK_h, 1 },
|
||||
{ 0, 0, XK_j, 1 },
|
||||
{ 0, 0, XK_k, 1 },
|
||||
{ 0, 0, XK_l, 1 },
|
||||
{ ";",":", XK_colon, 1 },
|
||||
/*{ "'", XK_apostrophe, 2 },*/
|
||||
|
||||
{ 0 }, /* New row */
|
||||
{ 0 }, /* New row */
|
||||
|
||||
{ 0, 0, XK_z, 1 },
|
||||
{ 0, 0, XK_x, 1 },
|
||||
{ 0, 0, XK_c, 1 },
|
||||
{ 0, 0, XK_v, 1 },
|
||||
{ 0, 0, XK_b, 1 },
|
||||
{ 0, 0, XK_n, 1 },
|
||||
{ 0, 0, XK_m, 1 },
|
||||
/*{ "/?", XK_slash, 1 },*/
|
||||
{ "Tab", 0, XK_Tab, 1 },
|
||||
{ "⇍ Bksp", 0, XK_BackSpace, 2 },
|
||||
{ 0, 0, XK_z, 1 },
|
||||
{ 0, 0, XK_x, 1 },
|
||||
{ 0, 0, XK_c, 1 },
|
||||
{ 0, 0, XK_v, 1 },
|
||||
{ 0, 0, XK_b, 1 },
|
||||
{ 0, 0, XK_n, 1 },
|
||||
{ 0, 0, XK_m, 1 },
|
||||
/*{ "/?", XK_slash, 1 },*/
|
||||
{ "Tab", 0, XK_Tab, 1 },
|
||||
{ "⇍ Bksp", 0, XK_BackSpace, 2 },
|
||||
|
||||
{ 0 }, /* New row */
|
||||
{ "↺", 0, XK_Cancel, 1},
|
||||
{ "Shft", 0, XK_Shift_L, 1 },
|
||||
/*{ "L", XK_Left, 1 },*/
|
||||
{ "↓", 0, XK_Down, 1 },
|
||||
{ "↑", 0, XK_Up, 1 },
|
||||
/*{ "R", XK_Right, 1 },*/
|
||||
{ "", 0, XK_space, 2 },
|
||||
{ "Esc", 0, XK_Escape, 1 },
|
||||
{ "Ctrl", 0, XK_Control_L, 1 },
|
||||
/*{ "Alt", XK_Alt_L, 1 },*/
|
||||
{ "↲ Enter", 0, XK_Return, 2 },
|
||||
{ 0 }, /* New row */
|
||||
{ "↺", 0, XK_Cancel, 1},
|
||||
{ "Shft", 0, XK_Shift_L, 1 },
|
||||
/*{ "L", XK_Left, 1 },*/
|
||||
{ "↓", 0, XK_Down, 1 },
|
||||
{ "↑", 0, XK_Up, 1 },
|
||||
/*{ "R", XK_Right, 1 },*/
|
||||
{ "", 0, XK_space, 2 },
|
||||
{ "Esc", 0, XK_Escape, 1 },
|
||||
{ "Ctrl", 0, XK_Control_L, 1 },
|
||||
/*{ "Alt", XK_Alt_L, 1 },*/
|
||||
{ "↲ Enter", 0, XK_Return, 2 },
|
||||
};
|
||||
|
||||
static Key keys_symbols[KEYS] = {
|
||||
|
@ -77,46 +77,46 @@ static Key keys_symbols[KEYS] = {
|
|||
{ "/", "?", XK_slash, 1 },
|
||||
{ "\\", "|", XK_backslash, 1 },
|
||||
|
||||
{ 0 }, /* New row */
|
||||
{ 0 }, /* New row */
|
||||
|
||||
{ "", 0, XK_Shift_L|XK_bar, 1 },
|
||||
{ "⇤", 0, XK_Home, 1 },
|
||||
{ "←", 0, XK_Left, 1 },
|
||||
{ "→", 0, XK_Right, 1 },
|
||||
{ "⇥", 0, XK_End, 1 },
|
||||
{ "⇊", 0, XK_Next, 1 },
|
||||
{ "⇈", 0, XK_Prior, 1 },
|
||||
{ "Tab", 0, XK_Tab, 1 },
|
||||
{ "⇍ Bksp", 0, XK_BackSpace, 2 },
|
||||
{ "", 0, XK_Shift_L|XK_bar, 1 },
|
||||
{ "⇤", 0, XK_Home, 1 },
|
||||
{ "←", 0, XK_Left, 1 },
|
||||
{ "→", 0, XK_Right, 1 },
|
||||
{ "⇥", 0, XK_End, 1 },
|
||||
{ "⇊", 0, XK_Next, 1 },
|
||||
{ "⇈", 0, XK_Prior, 1 },
|
||||
{ "Tab", 0, XK_Tab, 1 },
|
||||
{ "⇍ Bksp", 0, XK_BackSpace, 2 },
|
||||
|
||||
{ 0 }, /* New row */
|
||||
{ "↺", 0, XK_Cancel, 1},
|
||||
{ "Shft", 0, XK_Shift_L, 1 },
|
||||
{ "↓", 0, XK_Down, 1 },
|
||||
{ "↑", 0, XK_Up, 1 },
|
||||
{ "", 0, XK_space, 2 },
|
||||
{ "Esc", 0, XK_Escape, 1 },
|
||||
{ "Ctrl", 0, XK_Control_L, 1 },
|
||||
{ "↲ Enter", 0, XK_Return, 2 },
|
||||
{ 0 }, /* New row */
|
||||
{ "↺", 0, XK_Cancel, 1},
|
||||
{ "Shft", 0, XK_Shift_L, 1 },
|
||||
{ "↓", 0, XK_Down, 1 },
|
||||
{ "↑", 0, XK_Up, 1 },
|
||||
{ "", 0, XK_space, 2 },
|
||||
{ "Esc", 0, XK_Escape, 1 },
|
||||
{ "Ctrl", 0, XK_Control_L, 1 },
|
||||
{ "↲ Enter", 0, XK_Return, 2 },
|
||||
};
|
||||
|
||||
Buttonmod buttonmods[] = {
|
||||
{ XK_Shift_L, Button2 },
|
||||
{ XK_Alt_L, Button3 },
|
||||
{ XK_Shift_L, Button2 },
|
||||
{ XK_Alt_L, Button3 },
|
||||
};
|
||||
|
||||
#define OVERLAYS 1
|
||||
static Key overlay[OVERLAYS] = {
|
||||
{ 0, 0, XK_Cancel },
|
||||
{ 0, 0, XK_Cancel },
|
||||
};
|
||||
|
||||
#define LAYERS 2
|
||||
static char* layer_names[LAYERS] = {
|
||||
"en",
|
||||
"symbols",
|
||||
"en",
|
||||
"symbols",
|
||||
};
|
||||
|
||||
static Key* available_layers[LAYERS] = {
|
||||
keys_en,
|
||||
keys_symbols,
|
||||
keys_en,
|
||||
keys_symbols,
|
||||
};
|
||||
|
|
45
svkbd.c
45
svkbd.c
|
@ -712,57 +712,57 @@ readxresources(void) {
|
|||
XrmValue xval;
|
||||
|
||||
if (XrmGetResource(xdb, "svkbd.font", "*", &type, &xval) && !fonts[0])
|
||||
fonts[0] = estrdup(xval.addr);
|
||||
fonts[0] = estrdup(xval.addr);
|
||||
|
||||
if (XrmGetResource(xdb, "svkbd.background", "*", &type, &xval) && !colors[SchemeNorm][ColBg] )
|
||||
colors[SchemeNorm][ColBg] = estrdup(xval.addr);
|
||||
colors[SchemeNorm][ColBg] = estrdup(xval.addr);
|
||||
if (XrmGetResource(xdb, "svkbd.foreground", "*", &type, &xval) && !colors[SchemeNorm][ColFg] )
|
||||
colors[SchemeNorm][ColFg] = estrdup(xval.addr);
|
||||
colors[SchemeNorm][ColFg] = estrdup(xval.addr);
|
||||
|
||||
if (XrmGetResource(xdb, "svkbd.shiftforeground", "*", &type, &xval) && !colors[SchemeNormShift][ColFg] )
|
||||
colors[SchemeNormShift][ColFg] = estrdup(xval.addr);
|
||||
colors[SchemeNormShift][ColFg] = estrdup(xval.addr);
|
||||
if (XrmGetResource(xdb, "svkbd.shiftbackground", "*", &type, &xval) && !colors[SchemeNormShift][ColBg] )
|
||||
colors[SchemeNormShift][ColBg] = estrdup(xval.addr);
|
||||
colors[SchemeNormShift][ColBg] = estrdup(xval.addr);
|
||||
|
||||
if (XrmGetResource(xdb, "svkbd.ABCforeground", "*", &type, &xval) && !colors[SchemeNormABC][ColFg] )
|
||||
colors[SchemeNormABC][ColFg] = estrdup(xval.addr);
|
||||
colors[SchemeNormABC][ColFg] = estrdup(xval.addr);
|
||||
if (XrmGetResource(xdb, "svkbd.ABCbackground", "*", &type, &xval) && !colors[SchemeNormABC][ColBg] )
|
||||
colors[SchemeNormABC][ColBg] = estrdup(xval.addr);
|
||||
colors[SchemeNormABC][ColBg] = estrdup(xval.addr);
|
||||
|
||||
if (XrmGetResource(xdb, "svkbd.ABCshiftforeground", "*", &type, &xval) && !colors[SchemeNormShift][ColFg] )
|
||||
colors[SchemeNormShift][ColFg] = estrdup(xval.addr);
|
||||
colors[SchemeNormShift][ColFg] = estrdup(xval.addr);
|
||||
if (XrmGetResource(xdb, "svkbd.ABCshiftbackground", "*", &type, &xval) && !colors[SchemeNormShift][ColBg] )
|
||||
colors[SchemeNormShift][ColBg] = estrdup(xval.addr);
|
||||
colors[SchemeNormShift][ColBg] = estrdup(xval.addr);
|
||||
|
||||
if (XrmGetResource(xdb, "svkbd.pressbackground", "*", &type, &xval) && !colors[SchemePress][ColBg] )
|
||||
colors[SchemePress][ColBg] = estrdup(xval.addr);
|
||||
colors[SchemePress][ColBg] = estrdup(xval.addr);
|
||||
if (XrmGetResource(xdb, "svkbd.pressforeground", "*", &type, &xval) && !colors[SchemePress][ColFg] )
|
||||
colors[SchemePress][ColFg] = estrdup(xval.addr);
|
||||
colors[SchemePress][ColFg] = estrdup(xval.addr);
|
||||
|
||||
if (XrmGetResource(xdb, "svkbd.pressshiftbackground", "*", &type, &xval) && !colors[SchemePressShift][ColBg] )
|
||||
colors[SchemePressShift][ColBg] = estrdup(xval.addr);
|
||||
colors[SchemePressShift][ColBg] = estrdup(xval.addr);
|
||||
if (XrmGetResource(xdb, "svkbd.pressshiftforeground", "*", &type, &xval) && !colors[SchemePressShift][ColFg] )
|
||||
colors[SchemePressShift][ColFg] = estrdup(xval.addr);
|
||||
colors[SchemePressShift][ColFg] = estrdup(xval.addr);
|
||||
|
||||
if (XrmGetResource(xdb, "svkbd.highlightbackground", "*", &type, &xval) && !colors[SchemeHighlight][ColBg] )
|
||||
colors[SchemeHighlight][ColBg] = estrdup(xval.addr);
|
||||
colors[SchemeHighlight][ColBg] = estrdup(xval.addr);
|
||||
if (XrmGetResource(xdb, "svkbd.highlightforeground", "*", &type, &xval) && !colors[SchemeHighlight][ColFg] )
|
||||
colors[SchemeHighlight][ColFg] = estrdup(xval.addr);
|
||||
colors[SchemeHighlight][ColFg] = estrdup(xval.addr);
|
||||
|
||||
if (XrmGetResource(xdb, "svkbd.highlightshiftbackground", "*", &type, &xval) && !colors[SchemeHighlightShift][ColBg] )
|
||||
colors[SchemeHighlightShift][ColBg] = estrdup(xval.addr);
|
||||
colors[SchemeHighlightShift][ColBg] = estrdup(xval.addr);
|
||||
if (XrmGetResource(xdb, "svkbd.highlightshiftforeground", "*", &type, &xval) && !colors[SchemeHighlightShift][ColFg] )
|
||||
colors[SchemeHighlightShift][ColFg] = estrdup(xval.addr);
|
||||
colors[SchemeHighlightShift][ColFg] = estrdup(xval.addr);
|
||||
|
||||
if (XrmGetResource(xdb, "svkbd.overlaybackground", "*", &type, &xval) && !colors[SchemeOverlay][ColBg] )
|
||||
colors[SchemeOverlay][ColBg] = estrdup(xval.addr);
|
||||
colors[SchemeOverlay][ColBg] = estrdup(xval.addr);
|
||||
if (XrmGetResource(xdb, "svkbd.overlayforeground", "*", &type, &xval) && !colors[SchemeOverlay][ColFg] )
|
||||
colors[SchemeOverlay][ColFg] = estrdup(xval.addr);
|
||||
colors[SchemeOverlay][ColFg] = estrdup(xval.addr);
|
||||
|
||||
if (XrmGetResource(xdb, "svkbd.overlayshiftbackground", "*", &type, &xval) && !colors[SchemeOverlayShift][ColBg] )
|
||||
colors[SchemeOverlayShift][ColBg] = estrdup(xval.addr);
|
||||
colors[SchemeOverlayShift][ColBg] = estrdup(xval.addr);
|
||||
if (XrmGetResource(xdb, "svkbd.overlayshiftforeground", "*", &type, &xval) && !colors[SchemeOverlayShift][ColFg] )
|
||||
colors[SchemeOverlayShift][ColFg] = estrdup(xval.addr);
|
||||
colors[SchemeOverlayShift][ColFg] = estrdup(xval.addr);
|
||||
|
||||
|
||||
XrmDestroyDatabase(xdb);
|
||||
|
@ -906,8 +906,7 @@ setup(void)
|
|||
ch->res_class = name;
|
||||
ch->res_name = name;
|
||||
|
||||
XSetWMProperties(dpy, win, &str, &str, NULL, 0, sizeh, wmh,
|
||||
ch);
|
||||
XSetWMProperties(dpy, win, &str, &str, NULL, 0, sizeh, wmh, ch);
|
||||
|
||||
XFree(keysyms);
|
||||
XFree(ch);
|
||||
|
|
Loading…
Reference in New Issue