add some keybinds, change some options

This commit is contained in:
frosty 2024-08-25 02:59:02 -04:00
parent 80e46f0cf0
commit bece4c95ef

View file

@ -5,7 +5,7 @@
* *
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/ */
static char *font = "Liberation Mono:pixelsize=12:antialias=true:autohint=true"; static char *font = "monospace:pixelsize=12:antialias=true:autohint=true";
/* Spare fonts */ /* Spare fonts */
static char *font2[] = { static char *font2[] = {
"Terminus:pixelsize=12", "Terminus:pixelsize=12",
@ -79,8 +79,8 @@ static unsigned int cursorthickness = 2;
* Bold affects lines thickness if boxdraw_bold is not 0. Italic is ignored. * Bold affects lines thickness if boxdraw_bold is not 0. Italic is ignored.
* 0: disable (render all U25XX glyphs normally from the font). * 0: disable (render all U25XX glyphs normally from the font).
*/ */
const int boxdraw = 0; const int boxdraw = 1;
const int boxdraw_bold = 0; const int boxdraw_bold = 1;
/* braille (U28XX): 1: render as adjacent "pixels", 0: use font */ /* braille (U28XX): 1: render as adjacent "pixels", 0: use font */
const int boxdraw_braille = 0; const int boxdraw_braille = 0;
@ -112,7 +112,7 @@ char *termname = "st-256color";
unsigned int tabspaces = 8; unsigned int tabspaces = 8;
/* bg opacity */ /* bg opacity */
float alpha = 0.8; float alpha = 1.0;
/* Terminal colors (16 first used in escape sequence) */ /* Terminal colors (16 first used in escape sequence) */
static const char *colorname[] = { static const char *colorname[] = {
@ -225,6 +225,7 @@ ResourcePref resources[] = {
{ "borderpx", INTEGER, &borderpx }, { "borderpx", INTEGER, &borderpx },
{ "cwscale", FLOAT, &cwscale }, { "cwscale", FLOAT, &cwscale },
{ "chscale", FLOAT, &chscale }, { "chscale", FLOAT, &chscale },
{ "alpha", FLOAT, &alpha },
}; };
/* /*
@ -234,10 +235,8 @@ ResourcePref resources[] = {
static MouseShortcut mshortcuts[] = { static MouseShortcut mshortcuts[] = {
/* mask button function argument release */ /* mask button function argument release */
{ XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 }, { XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 },
{ ShiftMask, Button4, ttysend, {.s = "\033[5;2~"} }, { XK_NO_MOD, Button4, kscrollup, {.i = 3} },
{ XK_ANY_MOD, Button4, ttysend, {.s = "\031"} }, { XK_NO_MOD, Button5, kscrolldown, {.i = 3} },
{ ShiftMask, Button5, ttysend, {.s = "\033[6;2~"} },
{ XK_ANY_MOD, Button5, ttysend, {.s = "\005"} },
}; };
/* Internal keyboard shortcuts. */ /* Internal keyboard shortcuts. */
@ -246,20 +245,19 @@ static MouseShortcut mshortcuts[] = {
static Shortcut shortcuts[] = { static Shortcut shortcuts[] = {
/* mask keysym function argument */ /* mask keysym function argument */
{ XK_ANY_MOD, XK_Break, sendbreak, {.i = 0} }, { ControlMask, XK_equal, zoom, {.f = +1} },
{ ControlMask, XK_Print, toggleprinter, {.i = 0} }, { ControlMask, XK_minus, zoom, {.f = -1} },
{ ShiftMask, XK_Print, printscreen, {.i = 0} }, { ControlMask, XK_0, zoomreset, {.f = 0} },
{ XK_ANY_MOD, XK_Print, printsel, {.i = 0} },
{ TERMMOD, XK_Prior, zoom, {.f = +1} },
{ TERMMOD, XK_Next, zoom, {.f = -1} },
{ TERMMOD, XK_Home, zoomreset, {.f = 0} },
{ TERMMOD, XK_C, clipcopy, {.i = 0} }, { TERMMOD, XK_C, clipcopy, {.i = 0} },
{ TERMMOD, XK_V, clippaste, {.i = 0} }, { TERMMOD, XK_V, clippaste, {.i = 0} },
{ TERMMOD, XK_Y, selpaste, {.i = 0} }, { TERMMOD, XK_Y, selpaste, {.i = 0} },
{ ShiftMask, XK_Insert, selpaste, {.i = 0} }, { ShiftMask, XK_Insert, selpaste, {.i = 0} },
{ TERMMOD, XK_Num_Lock, numlock, {.i = 0} },
{ ShiftMask, XK_Page_Up, kscrollup, {.i = -1} }, { ShiftMask, XK_Page_Up, kscrollup, {.i = -1} },
{ ShiftMask, XK_Page_Down, kscrolldown, {.i = -1} }, { ShiftMask, XK_Page_Down, kscrolldown, {.i = -1} },
{ MODKEY, XK_u, kscrollup, {.i = -1} },
{ MODKEY, XK_d, kscrolldown, {.i = -1} },
{ MODKEY, XK_k, kscrollup, {.i = 3} },
{ MODKEY, XK_j, kscrolldown, {.i = 3} },
{ XK_NO_MOD, XK_F11, fullscreen, {.i = 0} }, { XK_NO_MOD, XK_F11, fullscreen, {.i = 0} },
{ MODKEY, XK_Return, fullscreen, {.i = 0} }, { MODKEY, XK_Return, fullscreen, {.i = 0} },
{ TERMMOD, XK_Return, newterm, {.i = 0} }, { TERMMOD, XK_Return, newterm, {.i = 0} },