Simple Terminal from SuckLess
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.

74 lines
2.0 KiB

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