mirror of
https://codeberg.org/scip/dot-emacs.git
synced 2025-12-17 20:40:58 +01:00
+eyebrowse
This commit is contained in:
89
.emacs
89
.emacs
@@ -1,4 +1,4 @@
|
|||||||
;; Toms Emacs Config - portable - version (20181030.01) -*-emacs-lisp-*-
|
;; Toms Emacs Config - portable - version (20181105.01) -*-emacs-lisp-*-
|
||||||
;; * Introduction
|
;; * Introduction
|
||||||
|
|
||||||
;; This is my emacs config, it is more than twenty years old. It
|
;; This is my emacs config, it is more than twenty years old. It
|
||||||
@@ -674,6 +674,10 @@
|
|||||||
;; 20181030.01
|
;; 20181030.01
|
||||||
;; - fixed windows hydra flip window call
|
;; - fixed windows hydra flip window call
|
||||||
|
|
||||||
|
;; 20181105.01
|
||||||
|
;; - added eyebrowse with config and hydra, prefix: C-x C-x
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;; ** TODO
|
;; ** TODO
|
||||||
|
|
||||||
@@ -702,7 +706,7 @@
|
|||||||
;; My emacs config has a version (consisting of a timestamp with a
|
;; My emacs config has a version (consisting of a timestamp with a
|
||||||
;; serial), which I display in the mode line. So I can clearly see, if
|
;; serial), which I display in the mode line. So I can clearly see, if
|
||||||
;; I'm using an outdated config somewhere.
|
;; I'm using an outdated config somewhere.
|
||||||
(defvar tvd-emacs-version "20181030.01")
|
(defvar tvd-emacs-version "20181105.01")
|
||||||
|
|
||||||
;; --------------------------------------------------------------------------------
|
;; --------------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -5270,7 +5274,7 @@ _u_: Windows Undo <C-c left>
|
|||||||
_r_: Windows Redo <C-c right> ^^ _l_: Adjust Background brighter
|
_r_: Windows Redo <C-c right> ^^ _l_: Adjust Background brighter
|
||||||
_i_: Invert Colors <C-c C-i> ^^ _b_: Adjust Background darker
|
_i_: Invert Colors <C-c C-i> ^^ _b_: Adjust Background darker
|
||||||
|
|
||||||
_h_: Toggle Highlight Line Mode
|
_h_: Toggle Highlight Line Mode ^^ _e_: Eyebrowse Workspaces (C-x C-x)
|
||||||
_n_: Toogle Line Number Mode
|
_n_: Toogle Line Number Mode
|
||||||
|
|
||||||
^^------------------------------------------------------------------------
|
^^------------------------------------------------------------------------
|
||||||
@@ -5291,6 +5295,7 @@ Reach this hydra with <C-x w>
|
|||||||
("d" hydra-windows-resize/body nil)
|
("d" hydra-windows-resize/body nil)
|
||||||
("w" hydra-windows-resize/body nil)
|
("w" hydra-windows-resize/body nil)
|
||||||
("s" hydra-windows-resize/body nil)
|
("s" hydra-windows-resize/body nil)
|
||||||
|
("e" hydra-eyebrowse/body nil)
|
||||||
("h" hl-line-mode nil)
|
("h" hl-line-mode nil)
|
||||||
("n" linum-mode nil)
|
("n" linum-mode nil)
|
||||||
("q" nil nil :color red))
|
("q" nil nil :color red))
|
||||||
@@ -5298,6 +5303,71 @@ Reach this hydra with <C-x w>
|
|||||||
(global-set-key (kbd "C-x w") 'hydra-windows/body)
|
(global-set-key (kbd "C-x w") 'hydra-windows/body)
|
||||||
|
|
||||||
|
|
||||||
|
;; *** Eyebrowse Workspaces
|
||||||
|
;; workspace configuration, like desktops. Seems to be a good implementation, w/o save though
|
||||||
|
|
||||||
|
;; "prefix key" has to be set before loading, keep in mind, that
|
||||||
|
;; if you change it here, you need to change it below as well!
|
||||||
|
(setq eyebrowse-keymap-prefix (kbd "C-x C-x"))
|
||||||
|
(global-unset-key (kbd "C-x C-x"))
|
||||||
|
|
||||||
|
(require 'eyebrowse)
|
||||||
|
|
||||||
|
(defun tvd-new-eyebrowse-workspace ()
|
||||||
|
"Create new scratch buffer and ask for a name"
|
||||||
|
(interactive)
|
||||||
|
(eyebrowse-rename-window-config (eyebrowse--get 'current-slot) (read-string "Workspace: "))
|
||||||
|
(autoscratch-buffer))
|
||||||
|
|
||||||
|
;; always enable
|
||||||
|
(eyebrowse-mode t)
|
||||||
|
(toggle-debug-on-error)
|
||||||
|
(setq eyebrowse-new-workspace 'tvd-new-eyebrowse-workspace
|
||||||
|
eyebrowse-switch-back-and-forth t
|
||||||
|
eyebrowse-wrap-around t
|
||||||
|
eyebrowse-mode-line-style t
|
||||||
|
eyebrowse-slot-format "%s:init")
|
||||||
|
|
||||||
|
;; add a hydra, just in case, it contains hydra commands and hints
|
||||||
|
;; about the actual key bindings, it's also being refered from
|
||||||
|
;; hydra-window/body with "e"
|
||||||
|
(defhydra hydra-eyebrowse (:color blue)
|
||||||
|
"
|
||||||
|
^Eyebrowse Workspace Management^
|
||||||
|
^^--------------------------------------
|
||||||
|
_l_: last window (C-x C-x C-x)
|
||||||
|
_n_: next window (C-x C-x <right>)
|
||||||
|
_p_: prev window (C-x C-x <left>)
|
||||||
|
_x_: close workspace (C-x C-x q)
|
||||||
|
_t_: rename workspace (C-x C-x t)
|
||||||
|
_c_: create workspace (C-x C-x n)
|
||||||
|
|
||||||
|
Use C-x C-x to access eyebrowse directly.
|
||||||
|
"
|
||||||
|
("l" eyebrowse-last-window-config nil)
|
||||||
|
("n" eyebrowse-next-window-config nil)
|
||||||
|
("p" eyebrowse-prev-window-config nil)
|
||||||
|
("x" eyebrowse-close-window-config nil)
|
||||||
|
("t" eyebrowse-rename-window-config nil)
|
||||||
|
("c" eyebrowse-create-window-config nil)
|
||||||
|
("q" nil nil :color red))
|
||||||
|
|
||||||
|
;;Modifying the eyebrowse keymap directly doesn't work because it's
|
||||||
|
;; not setup correctly. I sent a pull request to fix this:
|
||||||
|
;; https://github.com/wasamasa/eyebrowse/pull/94, however, vaslilly choosed
|
||||||
|
;; not to accept it. So, I need to configure the whole chords for every
|
||||||
|
;; function I use AND set the "prefix key" using the weird way above
|
||||||
|
;; (before loading).
|
||||||
|
(global-set-key (kbd "C-x C-x C-x") 'eyebrowse-last-window-config)
|
||||||
|
(global-set-key (kbd "C-x C-x <right>") 'eyebrowse-next-window-config)
|
||||||
|
(global-set-key (kbd "C-x C-x <left>") 'eyebrowse-prev-window-config)
|
||||||
|
(global-set-key (kbd "C-x C-x q") 'eyebrowse-close-window-config)
|
||||||
|
(global-set-key (kbd "C-x C-x t") 'eyebrowse-rename-window-config)
|
||||||
|
(global-set-key (kbd "C-x C-x n") 'eyebrowse-create-window-config)
|
||||||
|
(global-set-key (kbd "C-x C-x ?") 'hydra-eyebrowse/body)
|
||||||
|
|
||||||
|
;; There's also some face config, see defcustom at end of file!
|
||||||
|
|
||||||
;; ** Emacs Interface
|
;; ** Emacs Interface
|
||||||
;; *** Parens
|
;; *** Parens
|
||||||
|
|
||||||
@@ -5854,6 +5924,9 @@ converted to PDF at the same location."
|
|||||||
|
|
||||||
" [" tvd-emacs-version "] "
|
" [" tvd-emacs-version "] "
|
||||||
|
|
||||||
|
; added because of eyebrowse
|
||||||
|
mode-line-misc-info
|
||||||
|
|
||||||
'(:eval (propertize
|
'(:eval (propertize
|
||||||
(if (eq defining-kbd-macro t)
|
(if (eq defining-kbd-macro t)
|
||||||
"[REC]"
|
"[REC]"
|
||||||
@@ -5913,15 +5986,7 @@ converted to PDF at the same location."
|
|||||||
'(outline-4 ((t (:height 1.05 :foreground "DodgerBlue3" :underline t))))
|
'(outline-4 ((t (:height 1.05 :foreground "DodgerBlue3" :underline t))))
|
||||||
'(region ((t (:foreground "Aquamarine" :background "Darkblue"))))
|
'(region ((t (:foreground "Aquamarine" :background "Darkblue"))))
|
||||||
'(secondary-selection ((t (:foreground "Green" :background "darkslateblue"))))
|
'(secondary-selection ((t (:foreground "Green" :background "darkslateblue"))))
|
||||||
'(wg-command-face ((t nil)))
|
'(eyebrowse-mode-line-active ((t (:foreground "Blue" :background "White" :bold t))))
|
||||||
'(wg-current-workgroup-face ((t nil)))
|
|
||||||
'(wg-divider-face ((t nil)))
|
|
||||||
'(wg-filename-face ((t nil)))
|
|
||||||
'(wg-frame-face ((t nil)))
|
|
||||||
'(wg-message-face ((t nil)))
|
|
||||||
'(wg-mode-line-face ((t nil)))
|
|
||||||
'(wg-other-workgroup-face ((t nil)))
|
|
||||||
'(wg-previous-workgroup-face ((t nil)))
|
|
||||||
'(which-func ((t (:background "blue" :foreground "white"))))
|
'(which-func ((t (:background "blue" :foreground "white"))))
|
||||||
'(which-key-key-face ((t (:weight bold)))))
|
'(which-key-key-face ((t (:weight bold)))))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user