forked from redguardtoo/emacs.d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init-workgroups.el
31 lines (27 loc) · 984 Bytes
/
init-workgroups.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
(require 'workgroups)
;; save/load windows configuration into this file
(setq wg-file (expand-file-name "~/.emacs.d/.wg-file.el"))
;; actually, I use evil-leader instead
(setq wg-prefix-key (kbd "C-c w"))
;; I've already customized my mode-line for other packages
(setq wg-mode-line-on nil)
;; There is a bug in modeline, @see https://github.com/tlh/workgroups.el/issues/32
(fset 'wg-mode-line-add-display (lambda () nil))
(fset 'wg-mode-line-remove-display (lambda () nil))
;; no morph, performance is my first priority, always
(setq wg-morph-on nil)
;; now start it
(workgroups-mode 1)
(defun wgext-save ()
(interactive)
(wg-update-workgroup (wg-arg))
(wg-save wg-file))
(defun wgext-load ()
(interactive)
(wg-load wg-file))
;; it's rarely used, not worth using evil-leader
(global-set-key (kbd "C-c w s") 'wgext-save)
(global-set-key (kbd "C-c w l") 'wgext-load)
;; workflow
;; <prefix> c => new; <prefix> C-s => save; <prefix> C-l =>load;
(provide 'init-workgroups)