General cleanup
This commit is contained in:
parent
9a5f3cad10
commit
53879f2528
11 changed files with 96 additions and 101 deletions
|
@ -5,6 +5,14 @@
|
|||
;; code to make a permanent frame header to display these some day)
|
||||
;; 2. Session persistence
|
||||
|
||||
(defvar narf-wg-frames '()
|
||||
"A list of all the frames opened as separate workgroups. See
|
||||
defuns/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.")
|
||||
|
||||
(use-package workgroups2
|
||||
:when (display-graphic-p)
|
||||
:init
|
||||
|
@ -36,18 +44,11 @@
|
|||
wg-list-display-decor-previous-left ""
|
||||
wg-list-display-decor-previous-right "")
|
||||
|
||||
(add-hook! emacs-startup (workgroups-mode +1))
|
||||
(add-hook 'emacs-startup-hook 'workgroups-mode)
|
||||
:config
|
||||
(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
|
||||
defuns/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)
|
||||
|
||||
|
@ -55,14 +56,11 @@ automatically renamed to the project name.")
|
|||
;; Create a new workgroup on switch-project
|
||||
(setq projectile-switch-project-action 'narf/wg-projectile-switch-project))
|
||||
|
||||
;; Seriously, don't mess with the modeline! `wg-mode-line-display-on' isn't enough
|
||||
;; `wg-mode-line-display-on' wasn't enough
|
||||
(advice-add 'wg-change-modeline :override 'ignore)
|
||||
|
||||
;; Don't remember popup and neotree windows
|
||||
(add-hook! kill-emacs
|
||||
(narf/popup-close-all)
|
||||
(when (and (featurep 'neotree) (neo-global--window-exists-p))
|
||||
(neotree-hide)))
|
||||
(add-hook 'kill-emacs-hook 'narf|wg-cleanup)
|
||||
|
||||
;; This helps abstract some of the underlying functions away, just in case I want to
|
||||
;; switch to a different package in the future, like persp-mode, eyebrowse or wconf.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue