config.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #define URL ""
  2. #define PORT
  3. #define USER ""
  4. #define PWD ""
  5. #define VERSION ""
  6. #define APP ""
  7. #define MAX(x, y) (((x) > (y)) ? (x) : (y))
  8. #define MIN(x, y) (((x) < (y)) ? (x) : (y))
  9. enum { INACTIVE, ACTIVE, NUM_COLORS };
  10. static const short colors[NUM_COLORS][2] = {
  11. /* fg, bg */
  12. [INACTIVE] = {COLOR_BLACK, COLOR_WHITE},
  13. [ACTIVE] = {COLOR_WHITE, COLOR_RED},
  14. };
  15. enum { ind_playing, ind_repeat, ind_shuffle, ind_played, ind_unplayed };
  16. static const char *const appearance[5] = {
  17. ">", /* Playing indicator in the playlist */
  18. "R", /* Playing indicator, Repeat mode */
  19. "X", /* Playing indicator, Shuffle mode */
  20. "#", /* Played time */
  21. "-" /* Unplayed time */
  22. };
  23. const unsigned int bottom_space = 4;
  24. /* Actions */
  25. enum { play_pause, stop, next, previous, repeat, shuffle, quit, add,
  26. add_and_play, remove_one, remove_all, main_view, playlist_view, up, down,
  27. left, right, resize, bottom, top, chord, search, search_next, search_previous
  28. };
  29. static const int keys[][2] = {
  30. /* Keybinding, Action */
  31. {'p', play_pause},
  32. {'s', stop},
  33. {'>', next},
  34. {'<', previous},
  35. {'r', repeat},
  36. {'x', shuffle},
  37. {'q', quit},
  38. {' ', add},
  39. {10 , add_and_play},
  40. {KEY_ENTER, add_and_play},
  41. {'d', remove_one},
  42. {'c', remove_all},
  43. {'1', main_view},
  44. {'2', playlist_view},
  45. {KEY_UP, up},
  46. {KEY_DOWN, down},
  47. {KEY_LEFT, left},
  48. {KEY_RIGHT, right},
  49. {KEY_RESIZE, resize},
  50. {'G', bottom},
  51. {'g', chord},
  52. {'/', search},
  53. {'n', search_next},
  54. {'N', search_previous},
  55. };
  56. enum { chord_top };
  57. static const int chords[][2] = {
  58. /* Chord, Action */
  59. {'g', top},
  60. };
  61. static const int len_keys = sizeof(keys)/sizeof(keys[0]);
  62. static const int len_chords = sizeof(chords)/sizeof(chords[0]);
  63. // Define the variable and flags to use for playback
  64. static char *const executable = "ffplay";
  65. static char *const flags = "-nodisp -autoexit";
  66. // Define the variable to use for notification
  67. // Use NULL if this is unwanted
  68. static char *const notify_cmd = NULL;
  69. // Location where AppState is dumped at every song change
  70. // Other programs can read that file and display the information
  71. // Use NULL if this is unwanted
  72. static char *const state_dump = NULL;