config.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #define MODKEY GDK_CONTROL_MASK
  2. /* Terminal command */
  3. #define TERMINAL (char *[]){ "rxvt", NULL }
  4. /* Bookmarks */
  5. static const char *bookmarks[] = {
  6. "/",
  7. "/root"
  8. };
  9. /* Time format */
  10. static const char *timefmt = "%Y-%m-%d %H:%M:%S";
  11. /* Poll time for directory updating (in seconds) */
  12. static const int polltime = 1;
  13. /* Command to be executed when activating a file */
  14. static const char *filecmd[] = { "/bin/sh", "-c",
  15. "executor \"$DFM_PATH\"", NULL };
  16. /* Key bindings */
  17. static Key keys[] = {
  18. /* Movement */
  19. { MODKEY, GDK_j, move_cursor, { .i = DOWN } },
  20. { MODKEY, GDK_k, move_cursor, { .i = UP } },
  21. { MODKEY|GDK_SHIFT_MASK, GDK_j, move_cursor, { .i = PAGEDOWN } },
  22. { MODKEY|GDK_SHIFT_MASK, GDK_k, move_cursor, { .i = PAGEUP } },
  23. { MODKEY, GDK_g, move_cursor, { .i = HOME } },
  24. { MODKEY|GDK_SHIFT_MASK, GDK_g, move_cursor, { .i = END } },
  25. /* Spawn new window */
  26. { MODKEY, GDK_w, newwin, { 0 } },
  27. /* Go up one level */
  28. { MODKEY, GDK_h, set_path, { .v = ".." } },
  29. { 0, GDK_BackSpace, set_path, { .v = ".." } },
  30. /* Terminal launch */
  31. { MODKEY, GDK_x, dir_exec, { .v = TERMINAL } },
  32. /* Make directory */
  33. { MODKEY|GDK_SHIFT_MASK, GDK_m, make_dir, { .i = 0755 } },
  34. { MODKEY, GDK_m, mv, { 0 } },
  35. /* Set path */
  36. { MODKEY, GDK_l, set_path, { 0 } },
  37. /* Preferences */
  38. { MODKEY|GDK_SHIFT_MASK, GDK_h, toggle_pref, { .i = DOTFILES } },
  39. /* Bookmarks */
  40. { MODKEY, GDK_1, bookmark, { .i = 0 } },
  41. { MODKEY, GDK_2, bookmark, { .i = 1 } },
  42. { MODKEY, GDK_3, bookmark, { .i = 2 } },
  43. { MODKEY, GDK_4, bookmark, { .i = 3 } },
  44. { MODKEY, GDK_5, bookmark, { .i = 4 } },
  45. { MODKEY, GDK_6, bookmark, { .i = 5 } },
  46. { MODKEY, GDK_7, bookmark, { .i = 6 } },
  47. { MODKEY, GDK_8, bookmark, { .i = 7 } },
  48. { MODKEY, GDK_9, bookmark, { .i = 8 } },
  49. { MODKEY, GDK_0, bookmark, { .i = 9 } }
  50. };