conf-ibuffer.el 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. ;;; Code:
  2. (require 'ibuffer)
  3. (require 'ibuf-ext)
  4. (setq ibuffer-saved-filter-groups
  5. (quote (("default"
  6. ("Common"
  7. (or
  8. (name . "^\\*scratch\\*$")
  9. (name . "^\\*Help\\*$")))
  10. ("Dired"
  11. (or
  12. (mode . dired-mode)
  13. (mode . direx:direx-mode)))
  14. ("Web"
  15. (or
  16. (mode . nxhtml-mode)
  17. (mode . web-mode)
  18. (mode . json-mode)
  19. (mode . emmet-mode)
  20. (mode . less-css-mode)
  21. (mode . css-mode)
  22. (mode . restclient-mode)))
  23. ("Programming"
  24. (or
  25. (mode . python-mode)
  26. (mode . php-mode)
  27. (mode . emacs-lisp-mode)
  28. (mode . sh-mode)
  29. (mode . makefile-gmake-mode)
  30. (mode . perl-mode)
  31. (mode . c-mode)
  32. (mode . c++-mode)
  33. (mode . python-mode)
  34. (mode . javascript-mode)
  35. (mode . js-mode)
  36. (mode . js2-mode)
  37. (mode . js3-mode)
  38. (mode . web-jsx-mode)
  39. (mode . js2-refactor)
  40. (mode . java-mode)))
  41. ("Magit"
  42. (or
  43. (name . "\.*magit.*\*")
  44. (name . "COMMIT_EDITMSG")))
  45. ("Terminal"
  46. (mode . term-mode))
  47. ("Email"
  48. (or
  49. (mode . mu4e-view-mode)
  50. (mode . mu4e-main-mode)
  51. (mode . mu4e-headers-mode)
  52. (mode . mu4e-view-raw-mode)
  53. (mode . mu4e-compose-mode)
  54. (mode . message-mode)
  55. (mode . mail-mode)))
  56. ("Erc"
  57. (or
  58. (mode . erc-mode)
  59. (name . "\\*irc.*\\*")
  60. (name . "\\irc.*\\*")
  61. (name . "^\\irc.*\\*")))
  62. ("Social"
  63. (or
  64. (mode . gnu-social-mode)
  65. (name . "\\*gnu-social.*\\*")))
  66. ("Im"
  67. (or
  68. (mode . jabber-chat-mode)
  69. (mode . jabber-roster-mode)))
  70. ("News"
  71. (or
  72. (mode . elfeed-search-mode)
  73. (mode . elfeed-show-mode)))
  74. ("OrgMode"
  75. (or
  76. (mode . org-mode)
  77. (mode . org-agenda-mode)))
  78. ("Planner"
  79. (or
  80. (name . "^\\*Calendar\\*$")
  81. (name . "^diary$")
  82. (mode . muse-mode)))
  83. ("Debugger"
  84. (or
  85. (name . "*Backtrace*")
  86. (name . "*Compile-Log*")
  87. (name . "*Messages*")
  88. (name . "*Warnings*")
  89. (name . "*Flycheck error messages*")
  90. (name . "*fsm-debug*")
  91. (name . "*Shell Command Output*")
  92. (name . "\\*.*log.*\\*")))
  93. ))))
  94. ;; Functions
  95. (defun distopico:ibuffer-mode-hook ()
  96. "Setup ibuffer groups."
  97. (ibuffer-switch-to-saved-filter-groups "default"))
  98. ;; Hooks
  99. (add-hook 'ibuffer-mode-hook #'distopico:ibuffer-mode-hook)
  100. (provide 'conf-ibuffer)
  101. ;;; conf-ibuffer.el ends here