My build of nnn with minor changes
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 
 

51 lignes
1.2 KiB

  1. #define CWD "cwd: "
  2. #define CURSR " > "
  3. #define EMPTY " "
  4. struct assoc assocs[] = {
  5. { "\\.(avi|mp4|mkv|mp3|ogg|flac)$", "mplayer" },
  6. { "\\.(png|jpg|gif)$", "feh" },
  7. { "\\.(html|svg)$", "firefox" },
  8. { "\\.pdf$", "mupdf" },
  9. { "\\.sh$", "sh" },
  10. { ".", "less" },
  11. };
  12. struct key bindings[] = {
  13. /* Quit */
  14. { 'q', SEL_QUIT },
  15. /* Back */
  16. { KEY_BACKSPACE, SEL_BACK },
  17. { KEY_LEFT, SEL_BACK },
  18. { 'h', SEL_BACK },
  19. { CONTROL('H'), SEL_BACK },
  20. /* Inside */
  21. { KEY_ENTER, SEL_GOIN },
  22. { '\r', SEL_GOIN },
  23. { KEY_RIGHT, SEL_GOIN },
  24. { 'l', SEL_GOIN },
  25. /* Filter */
  26. { '/', SEL_FLTR },
  27. { '&', SEL_FLTR },
  28. /* Type */
  29. { '?', SEL_TYPE },
  30. /* Next */
  31. { 'j', SEL_NEXT },
  32. { KEY_DOWN, SEL_NEXT },
  33. { CONTROL('N'), SEL_NEXT },
  34. /* Previous */
  35. { 'k', SEL_PREV },
  36. { KEY_UP, SEL_PREV },
  37. { CONTROL('P'), SEL_PREV },
  38. /* Page down */
  39. { KEY_NPAGE, SEL_PGDN },
  40. { CONTROL('D'), SEL_PGDN },
  41. /* Page up */
  42. { KEY_PPAGE, SEL_PGUP },
  43. { CONTROL('U'), SEL_PGUP },
  44. /* Shell */
  45. { '!', SEL_SH },
  46. /* Change dir */
  47. { 'c', SEL_CD },
  48. };