Add desktop saving on exit, set up windows
This commit is contained in:
parent
52d60d1297
commit
1228134db5
10 changed files with 126 additions and 22 deletions
43
.emacs.desktop
Normal file
43
.emacs.desktop
Normal file
|
|
@ -0,0 +1,43 @@
|
||||||
|
;; -*- mode: emacs-lisp; coding: emacs-mule; -*-
|
||||||
|
;; --------------------------------------------------------------------------
|
||||||
|
;; Desktop File for Emacs
|
||||||
|
;; --------------------------------------------------------------------------
|
||||||
|
;; Created Fri Aug 25 23:09:02 2017
|
||||||
|
;; Desktop file format version 208
|
||||||
|
;; Emacs version 25.2.1
|
||||||
|
|
||||||
|
;; Global section:
|
||||||
|
(setq desktop-saved-frameset [frameset 1 (22944 33758 121905 0) (desktop . "208") "maciej@INBNOT022.local" nil nil ((((font-backend mac-ct) (fontsize . 0) (font . "-*-Hasklig-normal-normal-normal-*-15-*-*-*-m-0-iso10646-1") (border-width . 0) (internal-border-width . 2) (vertical-scroll-bars) (horizontal-scroll-bars) (foreground-color . "#383838") (background-color . "#f8f8f8") (line-spacing) (left-fringe . 8) (right-fringe . 8) (menu-bar-lines . 0) (tool-bar-lines . 0) (title) (icon-type) (auto-raise) (auto-lower) (cursor-type . box) (scroll-bar-width . 0) (scroll-bar-height . 0) (alpha) (fullscreen . fullboth) (display-type . color) (background-mode . light) (cursor-color . "#ab4642") (environment) (border-color . "#b8b8b8") (frameset--id . "832B-AC8B-938A-1FAC") (frameset--mini t . t) (modeline . t) (minibuffer . t) (unsplittable) (right-divider-width . 0) (bottom-divider-width . 0) (icon-name) (display . "INBNOT022.local") (explicit-name) (tool-bar-position . top) (visibility . t) (height . 75) (width . 282) (left . 1) (top . 6)) ((min-height . 8) (min-width . 20) (min-height-ignore . 4) (min-width-ignore . 11) (min-height-safe . 2) (min-width-safe . 4) (min-pixel-height . 152) (min-pixel-width . 180) (min-pixel-height-ignore . 76) (min-pixel-width-ignore . 99) (min-pixel-height-safe . 38) (min-pixel-width-safe . 36)) vc (pixel-width . 2554) (pixel-height . 1406) (total-width . 284) (total-height . 74) (normal-height . 1.0) (normal-width . 1.0) (combination-limit) (hc (pixel-width . 2554) (pixel-height . 1159) (total-width . 284) (total-height . 61) (normal-height . 0.8285714285714285) (normal-width . 1.0) (combination-limit) (leaf (pixel-width . 1683) (pixel-height . 1159) (total-width . 187) (total-height . 61) (normal-height . 1.0) (normal-width . 0.6603260869565217) (parameters (purpose-dedicated . t)) (buffer "functions.el" (selected) (hscroll . 0) (fringes 8 8 nil) (margins 2 . 1) (scroll-bars nil 0 t nil 0 nil) (vscroll . 0) (dedicated) (point . 1453) (start . 1))) (leaf (last . t) (pixel-width . 871) (pixel-height . 1159) (total-width . 97) (total-height . 61) (normal-height . 1.0) (normal-width . 0.33967391304347827) (parameters (purpose-dedicated . t)) (buffer "*pu-dummy-test*" (selected) (hscroll . 0) (fringes 8 8 nil) (margins nil) (scroll-bars nil 0 t nil 0 nil) (vscroll . 0) (dedicated) (point . 1) (start . 1)))) (leaf (last . t) (pixel-width . 2554) (pixel-height . 247) (total-width . 284) (total-height . 13) (normal-height . 0.17142857142857143) (normal-width . 1.0) (parameters (purpose-dedicated . t)) (buffer "*magit: .emacs.d" (selected . t) (hscroll . 0) (fringes 8 8 nil) (margins nil) (scroll-bars nil 0 t nil 0 nil) (vscroll . 0) (dedicated) (point . 188) (start . 1)))))])
|
||||||
|
(setq desktop-missing-file-warning nil)
|
||||||
|
(setq tags-file-name nil)
|
||||||
|
(setq tags-table-list nil)
|
||||||
|
(setq search-ring nil)
|
||||||
|
(setq regexp-search-ring nil)
|
||||||
|
(setq register-alist nil)
|
||||||
|
(setq file-name-history nil)
|
||||||
|
|
||||||
|
;; Buffer section -- buffers listed in same order as in buffer list:
|
||||||
|
(desktop-create-buffer 208
|
||||||
|
"/Users/maciej/.emacs.d/windows.el"
|
||||||
|
"windows.el"
|
||||||
|
'emacs-lisp-mode
|
||||||
|
'(diff-hl-mode diff-hl-flydiff-mode diff-hl-margin-mode diff-hl-margin-minor-mode linum-mode column-enforce-mode whitespace-mode yas-minor-mode rainbow-delimiters-mode rainbow-mode company-mode projectile-mode undo-tree-mode auto-revert-mode purpose-mode flycheck-mode)
|
||||||
|
307
|
||||||
|
'(301 nil)
|
||||||
|
nil
|
||||||
|
nil
|
||||||
|
'((tab-width . 2) (buffer-file-coding-system . prefer-utf-8-unix) (overwrite-mode))
|
||||||
|
'((mark-ring (242 165))))
|
||||||
|
|
||||||
|
(desktop-create-buffer 208
|
||||||
|
"/Users/maciej/.emacs.d/functions.el"
|
||||||
|
"functions.el"
|
||||||
|
'emacs-lisp-mode
|
||||||
|
'(diff-hl-mode diff-hl-flydiff-mode diff-hl-margin-mode diff-hl-margin-minor-mode linum-mode column-enforce-mode whitespace-mode yas-minor-mode rainbow-delimiters-mode rainbow-mode company-mode projectile-mode undo-tree-mode auto-revert-mode purpose-mode flycheck-mode)
|
||||||
|
1453
|
||||||
|
'(1453 nil)
|
||||||
|
nil
|
||||||
|
nil
|
||||||
|
'((tab-width . 2) (buffer-file-coding-system . prefer-utf-8-unix) (overwrite-mode))
|
||||||
|
'((mark-ring nil)))
|
||||||
|
|
||||||
1
.emacs.desktop.lock
Normal file
1
.emacs.desktop.lock
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
98515
|
||||||
|
|
@ -26,6 +26,8 @@
|
||||||
(setq ns-pop-up-frames nil)
|
(setq ns-pop-up-frames nil)
|
||||||
|
|
||||||
; Enable diff highlights (useful for git)
|
; Enable diff highlights (useful for git)
|
||||||
|
(require 'diff-hl)
|
||||||
|
|
||||||
(global-diff-hl-mode)
|
(global-diff-hl-mode)
|
||||||
(diff-hl-flydiff-mode)
|
(diff-hl-flydiff-mode)
|
||||||
(diff-hl-margin-mode)
|
(diff-hl-margin-mode)
|
||||||
|
|
@ -48,6 +50,9 @@
|
||||||
|
|
||||||
;; Trim trailing whitespace on save
|
;; Trim trailing whitespace on save
|
||||||
(add-hook 'before-save-hook 'delete-trailing-whitespace)
|
(add-hook 'before-save-hook 'delete-trailing-whitespace)
|
||||||
|
|
||||||
|
;; Save desktop session on exit
|
||||||
|
(desktop-save-mode 1)
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;; code behaviour ;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;; code behaviour ;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
; Add ruler at 80, do not wrap lines (can be overwritten later)
|
; Add ruler at 80, do not wrap lines (can be overwritten later)
|
||||||
|
|
|
||||||
55
desktops/.emacs.desktop
Normal file
55
desktops/.emacs.desktop
Normal file
|
|
@ -0,0 +1,55 @@
|
||||||
|
;; -*- mode: emacs-lisp; coding: emacs-mule; -*-
|
||||||
|
;; --------------------------------------------------------------------------
|
||||||
|
;; Desktop File for Emacs
|
||||||
|
;; --------------------------------------------------------------------------
|
||||||
|
;; Created Fri Aug 25 23:06:00 2017
|
||||||
|
;; Desktop file format version 208
|
||||||
|
;; Emacs version 25.2.1
|
||||||
|
|
||||||
|
;; Global section:
|
||||||
|
(setq desktop-saved-frameset [frameset 1 (22944 33576 846692 0) (desktop . "208") "maciej@INBNOT022.local" nil nil ((((font-backend mac-ct) (fontsize . 0) (font . "-*-Hasklig-normal-normal-normal-*-15-*-*-*-m-0-iso10646-1") (border-width . 0) (internal-border-width . 2) (vertical-scroll-bars) (horizontal-scroll-bars) (foreground-color . "#383838") (background-color . "#f8f8f8") (line-spacing) (left-fringe . 8) (right-fringe . 8) (menu-bar-lines . 0) (tool-bar-lines . 0) (title) (icon-type) (auto-raise) (auto-lower) (cursor-type . box) (scroll-bar-width . 0) (scroll-bar-height . 0) (alpha) (fullscreen . fullboth) (display-type . color) (background-mode . light) (cursor-color . "#ab4642") (environment) (border-color . "#b8b8b8") (frameset--id . "89A7-C3ED-3B20-205D") (frameset--mini t . t) (height . 75) (width . 282) (modeline . t) (minibuffer . t) (unsplittable) (left . 1) (top . 6) (right-divider-width . 0) (bottom-divider-width . 0) (icon-name) (visibility . t) (display . "INBNOT022.local") (explicit-name) (tool-bar-position . top)) ((min-height . 8) (min-width . 20) (min-height-ignore . 4) (min-width-ignore . 11) (min-height-safe . 2) (min-width-safe . 4) (min-pixel-height . 152) (min-pixel-width . 180) (min-pixel-height-ignore . 76) (min-pixel-width-ignore . 99) (min-pixel-height-safe . 38) (min-pixel-width-safe . 36)) vc (pixel-width . 2554) (pixel-height . 1406) (total-width . 284) (total-height . 74) (normal-height . 1.0) (normal-width . 1.0) (combination-limit) (hc (pixel-width . 2554) (pixel-height . 1159) (total-width . 284) (total-height . 61) (normal-height . 0.8285714285714286) (normal-width . 1.0) (combination-limit) (leaf (pixel-width . 1681) (pixel-height . 1159) (total-width . 187) (total-height . 61) (normal-height . 1.0) (normal-width . 0.6576086956521738) (parameters (purpose-dedicated . t)) (buffer "functions.el" (selected . t) (hscroll . 0) (fringes 8 8 nil) (margins 2 . 1) (scroll-bars nil 0 t nil 0 nil) (vscroll . 0) (dedicated) (point . 1451) (start . 1))) (leaf (last . t) (pixel-width . 873) (pixel-height . 1159) (total-width . 97) (total-height . 61) (normal-height . 1.0) (normal-width . 0.3423913043478261) (parameters (purpose-dedicated . t)) (buffer "*pu-dummy-test*" (selected) (hscroll . 0) (fringes 8 8 nil) (margins nil) (scroll-bars nil 0 t nil 0 nil) (vscroll . 0) (dedicated) (point . 1) (start . 1)))) (leaf (last . t) (pixel-width . 2554) (pixel-height . 247) (total-width . 284) (total-height . 13) (normal-height . 0.17142857142857143) (normal-width . 1.0) (parameters (purpose-dedicated . t)) (buffer "*Compile-Log*" (selected) (hscroll . 0) (fringes 8 8 nil) (margins 3) (scroll-bars nil 0 t nil 0 nil) (vscroll . 0) (dedicated) (point . 11070) (start . 10855)))))])
|
||||||
|
(setq desktop-missing-file-warning nil)
|
||||||
|
(setq tags-file-name nil)
|
||||||
|
(setq tags-table-list nil)
|
||||||
|
(setq search-ring nil)
|
||||||
|
(setq regexp-search-ring nil)
|
||||||
|
(setq register-alist nil)
|
||||||
|
(setq file-name-history '("~/.emacs.d/desktops"))
|
||||||
|
|
||||||
|
;; Buffer section -- buffers listed in same order as in buffer list:
|
||||||
|
(desktop-create-buffer 208
|
||||||
|
"/Users/maciej/.emacs.d/functions.el"
|
||||||
|
"functions.el"
|
||||||
|
'emacs-lisp-mode
|
||||||
|
'(diff-hl-mode diff-hl-flydiff-mode diff-hl-margin-mode diff-hl-margin-minor-mode linum-mode column-enforce-mode whitespace-mode yas-minor-mode rainbow-delimiters-mode rainbow-mode company-mode projectile-mode undo-tree-mode auto-revert-mode purpose-mode flycheck-mode)
|
||||||
|
1451
|
||||||
|
'(1400 nil)
|
||||||
|
nil
|
||||||
|
nil
|
||||||
|
'((tab-width . 2) (buffer-file-coding-system . prefer-utf-8-unix) (overwrite-mode))
|
||||||
|
'((mark-ring (1400 1400 1400 1400 1400 1400 1400 1400 1400 1400 1505 1506 1529 1400 1533 1400))))
|
||||||
|
|
||||||
|
(desktop-create-buffer 208
|
||||||
|
"/Users/maciej/.emacs.d/behaviour.el"
|
||||||
|
"behaviour.el"
|
||||||
|
'emacs-lisp-mode
|
||||||
|
'(diff-hl-mode diff-hl-flydiff-mode diff-hl-margin-mode diff-hl-margin-minor-mode linum-mode column-enforce-mode whitespace-mode yas-minor-mode rainbow-delimiters-mode rainbow-mode company-mode projectile-mode undo-tree-mode auto-revert-mode purpose-mode flycheck-mode)
|
||||||
|
3641
|
||||||
|
'(3641 nil)
|
||||||
|
nil
|
||||||
|
nil
|
||||||
|
'((tab-width . 2) (buffer-file-coding-system . prefer-utf-8-unix) (overwrite-mode) (truncate-lines . t))
|
||||||
|
'((mark-ring (1346 1289 1234 1234 1234))))
|
||||||
|
|
||||||
|
(desktop-create-buffer 208
|
||||||
|
"/Users/maciej/.emacs.d/windows.el"
|
||||||
|
"windows.el"
|
||||||
|
'emacs-lisp-mode
|
||||||
|
'(diff-hl-mode diff-hl-flydiff-mode diff-hl-margin-mode diff-hl-margin-minor-mode linum-mode column-enforce-mode whitespace-mode yas-minor-mode rainbow-delimiters-mode rainbow-mode company-mode projectile-mode undo-tree-mode auto-revert-mode purpose-mode flycheck-mode)
|
||||||
|
1
|
||||||
|
'(nil nil)
|
||||||
|
nil
|
||||||
|
nil
|
||||||
|
'((tab-width . 2) (buffer-file-coding-system . prefer-utf-8-unix) (overwrite-mode))
|
||||||
|
'((mark-ring nil)))
|
||||||
|
|
||||||
2
emacs
2
emacs
|
|
@ -22,7 +22,7 @@
|
||||||
'(hl-paren-colors (quote ("#ecf0f1" "#ecf0f1" "#c0392b")))
|
'(hl-paren-colors (quote ("#ecf0f1" "#ecf0f1" "#c0392b")))
|
||||||
'(package-selected-packages
|
'(package-selected-packages
|
||||||
(quote
|
(quote
|
||||||
(window-purpose rspec-mode robe elm-yasnippets elm-mode company-jedi pyenv pyenv-mode toml-mode color-theme-approximate smex yaml-mode web-mode ujelly-theme smart-mode-line scala-mode rvm ruby-end rainbow-mode rainbow-delimiters racer noctilux-theme monokai-theme markdown-mode less-css-mode json-reformat jade-mode indent-guide helm-themes helm-projectile helm-ag haskell-mode haml-mode groovy-mode flycheck flatui-theme exec-path-from-shell evil-nerd-commenter evil-magit evil-leader elpy dumb-jump dockerfile-mode diff-hl column-enforce-mode base16-theme avk-emacs-themes atom-one-dark-theme all-the-icons alchemist aggressive-indent ag)))
|
(window-purpose)))
|
||||||
'(safe-local-variable-values (quote ((encoding . utf-8))))
|
'(safe-local-variable-values (quote ((encoding . utf-8))))
|
||||||
'(sml/active-background-color "#34495e")
|
'(sml/active-background-color "#34495e")
|
||||||
'(sml/active-foreground-color "#ecf0f1")
|
'(sml/active-foreground-color "#ecf0f1")
|
||||||
|
|
|
||||||
|
|
@ -40,5 +40,6 @@
|
||||||
nil
|
nil
|
||||||
t))
|
t))
|
||||||
|
|
||||||
|
(add-hook 'kill-emacs-hook 'byte-compile-init-dir)
|
||||||
(add-hook 'emacs-lisp-mode-hook 'remove-elc-on-save)
|
(add-hook 'emacs-lisp-mode-hook 'remove-elc-on-save)
|
||||||
;;; functions.el ends here
|
;;; functions.el ends here
|
||||||
|
|
|
||||||
1
layouts/coding_with_magit.window-layout
Normal file
1
layouts/coding_with_magit.window-layout
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
(t (0 0 284 74) (nil (0 0 284 62) (:purpose code :purpose-dedicated t :width 0.6631205673758865 :height 0.8266666666666667 :edges (0.0 0.0 0.6631205673758865 0.8266666666666667)) (:purpose test :purpose-dedicated t :width 0.34397163120567376 :height 0.8266666666666667 :edges (0.6631205673758865 0.0 1.0070921985815602 0.8266666666666667))) (:purpose tools :purpose-dedicated t :width 1.0070921985815602 :height 0.16 :edges (0.0 0.8266666666666667 1.0070921985815602 0.9866666666666667)))
|
||||||
1
layouts/small_screen.window-layout
Normal file
1
layouts/small_screen.window-layout
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
(t (0 0 186 54) (:purpose code :purpose-dedicated t :width 1.0108695652173914 :height 0.8 :edges (0.0 0.0 1.0108695652173914 0.8)) (:purpose tools :purpose-dedicated t :width 1.0108695652173914 :height 0.18181818181818182 :edges (0.0 0.8 1.0108695652173914 0.9818181818181818)))
|
||||||
|
|
@ -127,18 +127,10 @@
|
||||||
(package-refresh-contents)
|
(package-refresh-contents)
|
||||||
(package-install 'ujelly-theme))
|
(package-install 'ujelly-theme))
|
||||||
|
|
||||||
(unless (package-installed-p 'avk-emacs-themes)
|
|
||||||
(package-refresh-contents)
|
|
||||||
(package-install 'avk-emacs-themes))
|
|
||||||
|
|
||||||
(unless (package-installed-p 'flatui-theme)
|
(unless (package-installed-p 'flatui-theme)
|
||||||
(package-refresh-contents)
|
(package-refresh-contents)
|
||||||
(package-install 'flatui-theme))
|
(package-install 'flatui-theme))
|
||||||
|
|
||||||
(unless (package-installed-p 'all-the-icons)
|
|
||||||
(package-refresh-contents)
|
|
||||||
(package-install 'all-the-icons))
|
|
||||||
|
|
||||||
(unless (package-installed-p 'atom-one-dark-theme)
|
(unless (package-installed-p 'atom-one-dark-theme)
|
||||||
(package-refresh-contents)
|
(package-refresh-contents)
|
||||||
(package-install 'atom-one-dark-theme))
|
(package-install 'atom-one-dark-theme))
|
||||||
|
|
|
||||||
31
windows.el
31
windows.el
|
|
@ -2,25 +2,30 @@
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;;; Windows management things, mostly with purpose
|
;;; Windows management things, mostly with purpose
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
(require 'window-purpose)
|
||||||
(purpose-mode t)
|
(purpose-mode t)
|
||||||
|
|
||||||
|
;; Ruby specific
|
||||||
(add-to-list 'purpose-user-regexp-purposes '("_spec.rb\\(<.*>\\)?$" . test))
|
(add-to-list 'purpose-user-regexp-purposes '("_spec.rb\\(<.*>\\)?$" . test))
|
||||||
(add-to-list 'purpose-user-mode-purposes '(ruby-mode . edit))
|
(add-to-list 'purpose-user-regexp-purposes
|
||||||
(add-to-list 'purpose-user-mode-purposes '(yaml-mode . edit))
|
'("COMMIT_EDITMSG\\(<.*>\\)?$" . code))
|
||||||
(add-to-list 'purpose-user-mode-purposes '(emacs-lisp-mode . edit))
|
(add-to-list 'purpose-user-mode-purposes '(ruby-mode . code))
|
||||||
(add-to-list 'purpose-user-mode-purposes '(web-mode . edit))
|
(add-to-list 'purpose-user-mode-purposes '(yaml-mode . code))
|
||||||
(add-to-list 'purpose-user-mode-purposes '(html-mode . edit))
|
|
||||||
(add-to-list 'purpose-user-mode-purposes '(scss-mode . test))
|
|
||||||
(add-to-list 'purpose-user-mode-purposes '(css-mode . test))
|
|
||||||
(add-to-list 'purpose-user-mode-purposes '(javascript-mode . edit))
|
|
||||||
(add-to-list 'purpose-user-mode-purposes '(magit-mode . tr))
|
|
||||||
(add-to-list 'purpose-user-mode-purposes '(dired-mode . tr))
|
|
||||||
(add-to-list 'purpose-user-mode-purposes '(compilation-mode . tr))
|
|
||||||
(add-to-list 'purpose-user-mode-purposes '(help-mode . br))
|
|
||||||
(add-to-list 'purpose-user-mode-purposes '(special-mode . br))
|
|
||||||
|
|
||||||
|
;; Tools
|
||||||
|
(add-to-list 'purpose-user-mode-purposes '(magit-mode . tools))
|
||||||
|
(add-to-list 'purpose-user-mode-purposes '(help-mode . tools))
|
||||||
|
(add-to-list 'purpose-user-mode-purposes '(helm-mode . tools))
|
||||||
|
(add-to-list 'purpose-user-mode-purposes '(compilation-mode . tools))
|
||||||
|
|
||||||
|
;; Markdown
|
||||||
|
(add-to-list 'purpose-user-mode-purposes '(markdown-mode . code))
|
||||||
|
|
||||||
|
;; Elisp
|
||||||
|
(add-to-list 'purpose-user-mode-purposes '(emacs-lisp-mode . code))
|
||||||
|
|
||||||
(setq purpose-use-default-configuration nil)
|
(setq purpose-use-default-configuration nil)
|
||||||
(purpose-compile-user-configuration)
|
(purpose-compile-user-configuration)
|
||||||
|
(purpose-load-window-layout 'coding_with_magit)
|
||||||
|
|
||||||
;;; windows.el ends here
|
;;; windows.el ends here
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue