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.

90 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. /* more colors can be added to use with DefaultXX */
  28. "#cccccc",
  29. "#333333",
  30. };
  31. /* Default colors (colorname index)
  32. foreground, background, cursor, unfocused cursor */
  33. #define DefaultFG 7
  34. #define DefaultBG 0
  35. #define DefaultCS 16
  36. #define DefaultUCS 17
  37. /* Special keys (change & recompile st.info accordingly)
  38. Keep in mind that kpress() in st.c hardcodes some keys.
  39. Mask value:
  40. * Use XK_ANY_MOD to match the key no matter modifiers state
  41. * Use XK_NO_MOD to match the key alone (no modifiers)
  42. key, mask, output */
  43. static Key key[] = {
  44. { XK_BackSpace, XK_NO_MOD, "\177" },
  45. { XK_Insert, XK_NO_MOD, "\033[2~" },
  46. { XK_Delete, XK_NO_MOD, "\033[3~" },
  47. { XK_Home, XK_NO_MOD, "\033[1~" },
  48. { XK_End, XK_NO_MOD, "\033[4~" },
  49. { XK_Prior, XK_NO_MOD, "\033[5~" },
  50. { XK_Next, XK_NO_MOD, "\033[6~" },
  51. { XK_F1, XK_NO_MOD, "\033OP" },
  52. { XK_F2, XK_NO_MOD, "\033OQ" },
  53. { XK_F3, XK_NO_MOD, "\033OR" },
  54. { XK_F4, XK_NO_MOD, "\033OS" },
  55. { XK_F5, XK_NO_MOD, "\033[15~" },
  56. { XK_F6, XK_NO_MOD, "\033[17~" },
  57. { XK_F7, XK_NO_MOD, "\033[18~" },
  58. { XK_F8, XK_NO_MOD, "\033[19~" },
  59. { XK_F9, XK_NO_MOD, "\033[20~" },
  60. { XK_F10, XK_NO_MOD, "\033[21~" },
  61. { XK_F11, XK_NO_MOD, "\033[23~" },
  62. { XK_F12, XK_NO_MOD, "\033[24~" },
  63. };
  64. /* Set TERM to this */
  65. #define TNAME "st-256color"
  66. /* Line drawing characters (sometime specific to each font...) */
  67. static char gfx[] = {
  68. ['f'] = 'o',
  69. ['g'] = '+',
  70. ['i'] = '#',
  71. [255] = 0,
  72. };
  73. /* double-click timeout (in milliseconds) between clicks for selection */
  74. #define DOUBLECLICK_TIMEOUT 300
  75. #define TRIPLECLICK_TIMEOUT (2*DOUBLECLICK_TIMEOUT)
  76. #define TAB 8