My build of nnn with minor changes
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 
 

69 wiersze
1.8 KiB

  1. #define CWD "cwd: "
  2. #define CURSR " > "
  3. #define EMPTY " "
  4. int mtimeorder = 0; /* Set to 1 to sort by time in the default case */
  5. int idletimeout = 0; /* Screensaver timeout in seconds, 0 to disable */
  6. char *idlecmd = "rain"; /* The screensaver program */
  7. struct assoc assocs[] = {
  8. { "\\.(avi|mp4|mkv|mp3|ogg|flac|mov)$", "mplayer" },
  9. { "\\.(png|jpg|gif)$", "feh" },
  10. { "\\.(html|svg)$", "firefox" },
  11. { "\\.pdf$", "mupdf" },
  12. { "\\.sh$", "sh" },
  13. { ".", "less" },
  14. };
  15. struct key bindings[] = {
  16. /* Quit */
  17. { 'q', SEL_QUIT },
  18. /* Back */
  19. { KEY_BACKSPACE, SEL_BACK },
  20. { KEY_LEFT, SEL_BACK },
  21. { 'h', SEL_BACK },
  22. { CONTROL('H'), SEL_BACK },
  23. /* Inside */
  24. { KEY_ENTER, SEL_GOIN },
  25. { '\r', SEL_GOIN },
  26. { KEY_RIGHT, SEL_GOIN },
  27. { 'l', SEL_GOIN },
  28. /* Filter */
  29. { '/', SEL_FLTR },
  30. { '&', SEL_FLTR },
  31. /* Filter as you type */
  32. { '?', SEL_TYPE },
  33. /* Next */
  34. { 'j', SEL_NEXT },
  35. { KEY_DOWN, SEL_NEXT },
  36. { CONTROL('N'), SEL_NEXT },
  37. /* Previous */
  38. { 'k', SEL_PREV },
  39. { KEY_UP, SEL_PREV },
  40. { CONTROL('P'), SEL_PREV },
  41. /* Page down */
  42. { KEY_NPAGE, SEL_PGDN },
  43. { CONTROL('D'), SEL_PGDN },
  44. /* Page up */
  45. { KEY_PPAGE, SEL_PGUP },
  46. { CONTROL('U'), SEL_PGUP },
  47. /* Home */
  48. { KEY_HOME, SEL_HOME },
  49. { CONTROL('A'), SEL_HOME },
  50. { '^', SEL_HOME },
  51. /* End */
  52. { KEY_END, SEL_END },
  53. { CONTROL('E'), SEL_END },
  54. { '$', SEL_END },
  55. /* Change dir */
  56. { 'c', SEL_CD },
  57. /* Toggle sort by time */
  58. { 't', SEL_MTIME },
  59. { CONTROL('L'), SEL_REDRAW },
  60. /* Run command */
  61. { '!', SEL_RUN, "sh" },
  62. { 'z', SEL_RUN, "top" },
  63. /* Run command with argument */
  64. { 'e', SEL_RUNARG, "vi" },
  65. };