diff options
-rw-r--r-- | config.h | 27 | ||||
-rw-r--r-- | st.1 | 20 |
2 files changed, 31 insertions, 16 deletions
@@ -98,7 +98,7 @@ char *termname = "st-256color"; * * stty tabs */ -unsigned int tabspaces = 8; +unsigned int tabspaces = 4; /* bg opacity */ float alpha = 0.8; @@ -140,8 +140,8 @@ static const char *colorname[] = { * foreground, background, cursor, reverse cursor */ unsigned int defaultfg = 257; -unsigned int defaultbg = 256; -static unsigned int defaultcs = 258; +unsigned int defaultbg = 258; +static unsigned int defaultcs = 256; static unsigned int defaultrcs = 259; /* @@ -194,9 +194,9 @@ ResourcePref resources[] = { { "color13", STRING, &colorname[13] }, { "color14", STRING, &colorname[14] }, { "color15", STRING, &colorname[15] }, - { "background", STRING, &colorname[256] }, + { "cursorColor", STRING, &colorname[256] }, { "foreground", STRING, &colorname[257] }, - { "cursorColor", STRING, &colorname[258] }, + { "background", STRING, &colorname[258] }, { "reverseCursor",STRING, &colorname[259] }, { "termname", STRING, &termname }, { "shell", STRING, &shell }, @@ -220,7 +220,8 @@ static uint forcemousemod = ShiftMask; /* * Command used to query unicode glyphs. */ -char *iso14755_cmd = "dmenu -w \"$WINDOWID\" -p codepoint: </dev/null"; +/* char *iso14755_cmd = "dmenu -w \"$WINDOWID\" -p codepoint: </dev/null"; */ +char *iso14755_cmd = "dmenu -p codepoint: </dev/null"; /* * Internal mouse shortcuts. @@ -241,6 +242,9 @@ static MouseShortcut mshortcuts[] = { /* Internal keyboard shortcuts. */ #define MODKEY Mod1Mask #define TERMMOD (ControlMask|ShiftMask) +static char *clipboardcmd[] = { "/bin/sh", "-c", "filter_scr | xclip -selection clipboard", "externalpipe", NULL }; +static char *nmuttlongurlcmd[] = { "/bin/sh", "-c", "filter_scr | longurl", "externalpipe", NULL }; +static char *openurlcmd[] = { "/bin/sh", "-c", "xurls | dmenu -l 10 | xargs -r open", "externalpipe", NULL }; static Shortcut shortcuts[] = { /* mask keysym function argument */ @@ -248,17 +252,20 @@ static Shortcut shortcuts[] = { { ControlMask, XK_Print, toggleprinter, {.i = 0} }, { ShiftMask, XK_Print, printscreen, {.i = 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} }, + { ControlMask, XK_equal, zoom, {.f = +1} }, + { ControlMask, XK_minus, zoom, {.f = -1} }, + { TERMMOD, XK_plus, zoomreset, {.f = 0} }, { TERMMOD, XK_C, clipcopy, {.i = 0} }, { TERMMOD, XK_V, clippaste, {.i = 0} }, - { TERMMOD, XK_Y, selpaste, {.i = 0} }, + { TERMMOD, XK_P, 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_Down, kscrolldown, {.i = -1} }, { TERMMOD, XK_I, iso14755, {.i = 0} }, + { TERMMOD, XK_Y, externalpipe, {.v = clipboardcmd } }, + { TERMMOD, XK_U, externalpipe, {.v = openurlcmd } }, + { TERMMOD, XK_L, externalpipe, {.v = nmuttlongurlcmd } }, }; /* @@ -18,8 +18,6 @@ st \- simple terminal .IR title ] .RB [ \-t .IR title ] -.RB [ \-l -.IR line ] .RB [ \-w .IR windowid ] .RB [[ \-e ] @@ -142,16 +140,16 @@ Print the full screen to the Print the selection to the .I iofile. .TP -.B Ctrl-Shift-Page Up +.B Ctrl-Equals Increase font size. .TP -.B Ctrl-Shift-Page Down +.B Ctrl-Minus Decrease font size. .TP -.B Ctrl-Shift-Home +.B Ctrl-Shift-Plus Reset to default font size. .TP -.B Ctrl-Shift-y +.B Ctrl-Shift-p Paste from primary selection (middle mouse button). .TP .B Ctrl-Shift-c @@ -163,6 +161,16 @@ Paste from the clipboard selection. .B Ctrl-Shift-i Launch dmenu to enter a unicode codepoint and send the corresponding glyph to st. +.TP +.B Ctrl-Shift-y +Launch dmenu to copy line(s) of output to clipboard. +.TP +.B Ctrl-Shift-u +Launch dmenu to open URL from terminal in script. +.TP +.B Ctrl-Shift-l +Launch dmenu to copy line(s) of text from neomutt to open a single URL (split +over multiple lines by neomutt, using mw). .SH CUSTOMIZATION .B st can be customized by creating a custom config.h and (re)compiling the source |