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.

92 lines
2.3 KiB

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