My build of suckless st terminal
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

97 lines
2.4 KiB

  1. /*
  2. * Do not include the »pixelsize« parameter in your font definition. It is
  3. * used to calculate zooming.
  4. */
  5. #define FONT "Liberation Mono:pixelsize=12:antialias=false:autohint=false"
  6. /* Space in pixels around the terminal buffer */
  7. #define BORDER 2
  8. /* Default shell to use if SHELL is not set in the env */
  9. #define SHELL "/bin/sh"
  10. /* Terminal colors (16 first used in escape sequence) */
  11. static const char *colorname[] = {
  12. /* 8 normal colors */
  13. "black",
  14. "red3",
  15. "green3",
  16. "yellow3",
  17. "blue2",
  18. "magenta3",
  19. "cyan3",
  20. "gray90",
  21. /* 8 bright colors */
  22. "gray50",
  23. "red",
  24. "green",
  25. "yellow",
  26. "#5c5cff",
  27. "magenta",
  28. "cyan",
  29. "white",
  30. [255] = 0,
  31. /* more colors can be added after 255 to use with DefaultXX */
  32. "#cccccc",
  33. "#333333",
  34. };
  35. /* Default colors (colorname index)
  36. foreground, background, cursor, unfocused cursor */
  37. #define DefaultFG 7
  38. #define DefaultBG 0
  39. #define DefaultCS 256
  40. #define DefaultUCS 257
  41. /* Special keys (change & recompile st.info accordingly)
  42. Keep in mind that kpress() in st.c hardcodes some keys.
  43. Mask value:
  44. * Use XK_ANY_MOD to match the key no matter modifiers state
  45. * Use XK_NO_MOD to match the key alone (no modifiers)
  46. key, mask, output */
  47. static Key key[] = {
  48. { XK_BackSpace, XK_NO_MOD, "\177" },
  49. { XK_Insert, XK_NO_MOD, "\033[2~" },
  50. { XK_Delete, XK_NO_MOD, "\033[3~" },
  51. { XK_Home, XK_NO_MOD, "\033[1~" },
  52. { XK_End, XK_NO_MOD, "\033[4~" },
  53. { XK_Prior, XK_NO_MOD, "\033[5~" },
  54. { XK_Next, XK_NO_MOD, "\033[6~" },
  55. { XK_F1, XK_NO_MOD, "\033OP" },
  56. { XK_F2, XK_NO_MOD, "\033OQ" },
  57. { XK_F3, XK_NO_MOD, "\033OR" },
  58. { XK_F4, XK_NO_MOD, "\033OS" },
  59. { XK_F5, XK_NO_MOD, "\033[15~" },
  60. { XK_F6, XK_NO_MOD, "\033[17~" },
  61. { XK_F7, XK_NO_MOD, "\033[18~" },
  62. { XK_F8, XK_NO_MOD, "\033[19~" },
  63. { XK_F9, XK_NO_MOD, "\033[20~" },
  64. { XK_F10, XK_NO_MOD, "\033[21~" },
  65. { XK_F11, XK_NO_MOD, "\033[23~" },
  66. { XK_F12, XK_NO_MOD, "\033[24~" },
  67. };
  68. /* Internal shortcuts. */
  69. #define MODKEY Mod1Mask
  70. static Shortcut shortcuts[] = {
  71. /* modifier key function argument */
  72. { MODKEY|ShiftMask, XK_Prior, xzoom, {.i = +1} },
  73. { MODKEY|ShiftMask, XK_Next, xzoom, {.i = -1} },
  74. };
  75. /* Set TERM to this */
  76. #define TNAME "st-256color"
  77. /* double-click timeout (in milliseconds) between clicks for selection */
  78. #define DOUBLECLICK_TIMEOUT 300
  79. #define TRIPLECLICK_TIMEOUT (2*DOUBLECLICK_TIMEOUT)
  80. #define TAB 8