doomemacs/core/core-workgroups.el

70 lines
2.3 KiB
EmacsLisp
Raw Normal View History

2015-06-15 15:05:52 +08:00
;;; core-workgroups.el
;; see lib/workgroup-defuns.el
(use-package workgroups2
2015-11-30 18:32:55 +08:00
:when (display-graphic-p)
2015-06-15 15:05:52 +08:00
:init
2015-12-23 16:42:47 +08:00
(add-hook! after-init 'workgroups-mode)
2015-11-30 18:32:55 +08:00
(setq-default
wg-session-file (expand-file-name "wg-default" narf-temp-dir)
wg-workgroup-directory (expand-file-name "workgroups" narf-temp-dir)
wg-first-wg-name "*untitled*"
2015-11-30 18:32:55 +08:00
wg-session-load-on-start t
wg-mode-line-display-on nil
NARF v0.7.0 vcs: + +git-gutter to conf-modes; -git-gutter from evil-insert-state-exit + switch github-browse-file for browse-at-remote + fix <leader>ob; add <leader>d[./sr] vc bindings + vc-annotate bindings and initial state Workgroups2 integration: + don't mess with buffers (speeds up emacs a lot!) + unicode numbers in display + single display function + remember workgroup uid instead (and smarter :tabrename) + clean up after wg update Org-mode + give highlight precedence to links in org-mode + enable encryption + config clean up + use different font for org + exclude attachments in recentf + redo latex and inline-image config + add narf/org-open-notes + update file templates for org CRM Mode-line + polish mode-line + decouple from spaceline-segments.el + refactor narf|spaceline-env-update + add macro-recording and buffer-size indicators to mode-line + python: '2>&1' in env-command + flycheck fringe indicator: change to arrow Aesthetics + update narf-dark-theme + add narf-minibuffer-active face + change writing indicator in writing-mode Misc + fix whitespace in display-startup-echo-area-message + reset fonts for more unicode characters + custom imenu entries + helm-imenu fontification + enable yascroll-bar in REPLs + reorganize my-commands.el + force quit iedit on ESC in normal mode + update snippets submodule + remove ido init (helm handles it all) [EXPERIMENTAL] + back to Terminus(TTF) font + popwin: update config for git-gutter and vc-diff windows + highlight :g[lobal] and :al[ign] matches + decouple narf/get-buffers+narf/get-all-buffers from wg-mess-with-buffer-list + fix narf/helm-buffers-dwim (add interactive form)
2015-12-12 05:51:04 +08:00
wg-mess-with-buffer-list nil
2015-11-30 18:32:55 +08:00
wg-emacs-exit-save-behavior 'save ; Options: 'save 'ask nil
wg-workgroups-mode-exit-save-behavior 'save
wg-log-level 0
;; Some of these make workgroup-restoration-on-init unstable. I'd rather trade some
;; convenience for stability.
wg-restore-fringes nil
wg-restore-margins nil
wg-restore-scroll-bars nil
wg-restore-frame-position nil
wg-restore-remote-buffers nil
;; wg-restore-mark nil
;; wg-restore-point-max nil
wg-list-display-decor-divider " "
wg-list-display-decor-left-brace ""
NARF v0.7.0 vcs: + +git-gutter to conf-modes; -git-gutter from evil-insert-state-exit + switch github-browse-file for browse-at-remote + fix <leader>ob; add <leader>d[./sr] vc bindings + vc-annotate bindings and initial state Workgroups2 integration: + don't mess with buffers (speeds up emacs a lot!) + unicode numbers in display + single display function + remember workgroup uid instead (and smarter :tabrename) + clean up after wg update Org-mode + give highlight precedence to links in org-mode + enable encryption + config clean up + use different font for org + exclude attachments in recentf + redo latex and inline-image config + add narf/org-open-notes + update file templates for org CRM Mode-line + polish mode-line + decouple from spaceline-segments.el + refactor narf|spaceline-env-update + add macro-recording and buffer-size indicators to mode-line + python: '2>&1' in env-command + flycheck fringe indicator: change to arrow Aesthetics + update narf-dark-theme + add narf-minibuffer-active face + change writing indicator in writing-mode Misc + fix whitespace in display-startup-echo-area-message + reset fonts for more unicode characters + custom imenu entries + helm-imenu fontification + enable yascroll-bar in REPLs + reorganize my-commands.el + force quit iedit on ESC in normal mode + update snippets submodule + remove ido init (helm handles it all) [EXPERIMENTAL] + back to Terminus(TTF) font + popwin: update config for git-gutter and vc-diff windows + highlight :g[lobal] and :al[ign] matches + decouple narf/get-buffers+narf/get-all-buffers from wg-mess-with-buffer-list + fix narf/helm-buffers-dwim (add interactive form)
2015-12-12 05:51:04 +08:00
wg-list-display-decor-right-brace "| "
wg-list-display-decor-current-left ""
wg-list-display-decor-current-right ""
2015-11-30 18:32:55 +08:00
wg-list-display-decor-previous-left ""
wg-list-display-decor-previous-right "")
2015-06-15 15:05:52 +08:00
:config
(defvar narf/helm-source-wg
'((name . "Workgroups")
(candidates . wg-workgroup-names)
(action . narf/wg-helm-switch-to-workgroup)))
NARF v0.7.0 vcs: + +git-gutter to conf-modes; -git-gutter from evil-insert-state-exit + switch github-browse-file for browse-at-remote + fix <leader>ob; add <leader>d[./sr] vc bindings + vc-annotate bindings and initial state Workgroups2 integration: + don't mess with buffers (speeds up emacs a lot!) + unicode numbers in display + single display function + remember workgroup uid instead (and smarter :tabrename) + clean up after wg update Org-mode + give highlight precedence to links in org-mode + enable encryption + config clean up + use different font for org + exclude attachments in recentf + redo latex and inline-image config + add narf/org-open-notes + update file templates for org CRM Mode-line + polish mode-line + decouple from spaceline-segments.el + refactor narf|spaceline-env-update + add macro-recording and buffer-size indicators to mode-line + python: '2>&1' in env-command + flycheck fringe indicator: change to arrow Aesthetics + update narf-dark-theme + add narf-minibuffer-active face + change writing indicator in writing-mode Misc + fix whitespace in display-startup-echo-area-message + reset fonts for more unicode characters + custom imenu entries + helm-imenu fontification + enable yascroll-bar in REPLs + reorganize my-commands.el + force quit iedit on ESC in normal mode + update snippets submodule + remove ido init (helm handles it all) [EXPERIMENTAL] + back to Terminus(TTF) font + popwin: update config for git-gutter and vc-diff windows + highlight :g[lobal] and :al[ign] matches + decouple narf/get-buffers+narf/get-all-buffers from wg-mess-with-buffer-list + fix narf/helm-buffers-dwim (add interactive form)
2015-12-12 05:51:04 +08:00
(unless (file-exists-p wg-workgroup-directory)
(mkdir wg-workgroup-directory))
(defvar narf-wg-frames '()
"A list of all the frames opened as separate workgroups. See
lib/defuns-workgroups.el.")
(defvar narf-wg-names '()
"A list of fixed names for workgroups. If a name is set, workgroup names aren't
automatically renamed to the project name.")
;; Remember the set names in between sessions
(add-to-list 'savehist-additional-variables 'narf-wg-names)
2015-06-15 15:05:52 +08:00
(after! projectile
2015-11-14 15:41:53 +08:00
;; Create a new workgroup on switch-project
2015-06-15 15:05:52 +08:00
(setq projectile-switch-project-action 'narf/wg-projectile-switch-project))
;; Save the session every 10 minutes
(run-with-timer 0 600 'narf/wg-autosave)
;; Don't mess with the modeline!
(advice-add 'wg-change-modeline :override 'ignore)
2015-11-25 19:00:49 +08:00
;; Don't remember popup windows
2015-12-23 16:42:47 +08:00
(add-hook! kill-emacs 'narf-popup-close-all))
2015-06-15 15:05:52 +08:00
(provide 'core-workgroups)
;;; core-workgroups.el ends here