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.

94 lines
2.4 KiB

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