2015-06-15 09:05:52 +02:00
|
|
|
;;; core-workgroups.el
|
|
|
|
;; see lib/workgroup-defuns.el
|
|
|
|
|
|
|
|
(use-package workgroups2
|
2015-11-30 05:32:55 -05:00
|
|
|
:when (display-graphic-p)
|
2015-06-15 09:05:52 +02:00
|
|
|
:init
|
2015-11-30 05:32:55 -05:00
|
|
|
(setq-default
|
|
|
|
wg-session-file (expand-file-name "wg-default" narf-temp-dir)
|
|
|
|
wg-workgroup-directory (expand-file-name "workgroups" narf-temp-dir)
|
2015-12-10 20:43:33 -05:00
|
|
|
wg-first-wg-name "*untitled*"
|
2015-11-30 05:32:55 -05:00
|
|
|
wg-session-load-on-start t
|
|
|
|
wg-mode-line-display-on nil
|
2015-12-11 16:51:04 -05:00
|
|
|
wg-mess-with-buffer-list nil
|
2015-11-30 05:32:55 -05:00
|
|
|
wg-emacs-exit-save-behavior 'save ; Options: 'save 'ask nil
|
|
|
|
wg-workgroups-mode-exit-save-behavior 'save
|
|
|
|
wg-log-level 0
|
|
|
|
|
2015-12-10 20:43:33 -05:00
|
|
|
wg-list-display-decor-divider " "
|
|
|
|
wg-list-display-decor-left-brace ""
|
2015-12-11 16:51:04 -05:00
|
|
|
wg-list-display-decor-right-brace "| "
|
2015-12-10 20:43:33 -05:00
|
|
|
wg-list-display-decor-current-left ""
|
|
|
|
wg-list-display-decor-current-right ""
|
2015-11-30 05:32:55 -05:00
|
|
|
wg-list-display-decor-previous-left ""
|
|
|
|
wg-list-display-decor-previous-right "")
|
2015-06-15 09:05:52 +02:00
|
|
|
:config
|
2015-11-30 05:32:55 -05:00
|
|
|
;; Don't mess with the modeline!
|
|
|
|
(advice-add 'wg-change-modeline :override 'ignore)
|
|
|
|
|
2015-06-15 09:05:52 +02:00
|
|
|
(defvar narf/helm-source-wg
|
|
|
|
'((name . "Workgroups")
|
|
|
|
(candidates . wg-workgroup-names)
|
|
|
|
(action . narf/wg-helm-switch-to-workgroup)))
|
|
|
|
|
2015-12-11 16:51:04 -05:00
|
|
|
(add-to-list 'savehist-additional-variables 'narf-wg-names)
|
2015-11-08 17:57:41 -05:00
|
|
|
(defvar narf-wg-frames '())
|
2015-12-10 20:43:33 -05:00
|
|
|
(defvar narf-wg-names '())
|
2015-12-11 16:51:04 -05:00
|
|
|
|
|
|
|
(unless (file-exists-p wg-workgroup-directory)
|
|
|
|
(mkdir wg-workgroup-directory))
|
2015-11-08 17:57:41 -05:00
|
|
|
|
2015-06-15 09:05:52 +02:00
|
|
|
(after! projectile
|
2015-11-14 02:41:53 -05:00
|
|
|
;; Create a new workgroup on switch-project
|
2015-06-15 09:05:52 +02:00
|
|
|
(setq projectile-switch-project-action 'narf/wg-projectile-switch-project))
|
|
|
|
|
2015-11-30 05:32:55 -05:00
|
|
|
;; Don't remember popwin windows
|
2015-12-06 22:58:32 -05:00
|
|
|
(add-hook! (kill-emacs wg-before-switch-to-workgroup) 'popwin:close-popup-window)
|
2015-11-25 06:00:49 -05:00
|
|
|
|
2015-06-15 09:05:52 +02:00
|
|
|
;; Initialize!
|
2015-12-09 01:57:56 -05:00
|
|
|
(add-hook! after-init 'workgroups-mode))
|
2015-06-15 09:05:52 +02:00
|
|
|
|
|
|
|
(provide 'core-workgroups)
|
|
|
|
;;; core-workgroups.el ends here
|