diff-hl-margin-mode
when in tty
This commit is contained in:
parent
a59dbfd6a3
commit
79da59700b
1 changed files with 19 additions and 19 deletions
38
init.el
38
init.el
|
@ -37,7 +37,6 @@
|
|||
(global-ligature-mode 't)
|
||||
)
|
||||
|
||||
|
||||
(setup flycheck
|
||||
(:require flycheck)
|
||||
(:hook-into prog-mode)
|
||||
|
@ -58,12 +57,9 @@
|
|||
backup-directory-alist `(("." . ,temporary-file-directory))
|
||||
auto-save-files-name-transforms `((".*" ,temporary-file-directory t))
|
||||
backup-by-copying t)
|
||||
(defun fix-vertical-border-background-face (&rest args)
|
||||
(set-face-background 'vertical-border (face-background 'default)))
|
||||
(advice-add 'load-theme :after #'fix-vertical-border-background-face)
|
||||
(defun ccr/set-faces ()
|
||||
(set-face-attribute 'default nil :font "Fira Code 12")
|
||||
(fix-vertical-border-background-face)
|
||||
(set-face-background 'vertical-border (face-background 'default))
|
||||
(meow--prepare-face)
|
||||
(set-display-table-slot standard-display-table 'vertical-border (make-glyph-code ?┃)))
|
||||
(if (daemonp)
|
||||
|
@ -76,16 +72,16 @@
|
|||
(global-auto-revert-mode t)
|
||||
(show-paren-mode 1)
|
||||
(column-number-mode 1)
|
||||
(unless (display-graphic-p) ;; FIXME make it work when starting Emacs as daemon
|
||||
(advice-add 'enable-theme
|
||||
:after
|
||||
#'(lambda (&rest rest)
|
||||
(let* ((bg-color (face-attribute 'default :background))
|
||||
(ansi-command (format "\033]11;#%s\007"
|
||||
(string-remove-prefix "#" bg-color))))
|
||||
(send-string-to-terminal ansi-command))))
|
||||
(defun reset-terminal () (send-string-to-terminal "\033c"))
|
||||
(add-hook 'kill-emacs-hook #'reset-terminal))
|
||||
(advice-add 'enable-theme
|
||||
:after
|
||||
#'(lambda (&rest rest)
|
||||
(set-face-background 'vertical-border (face-background 'default))
|
||||
(let* ((bg-color (face-attribute 'default :background))
|
||||
(ansi-command (format "\033]11;#%s\007"
|
||||
(string-remove-prefix "#" bg-color))))
|
||||
(send-string-to-terminal ansi-command))))
|
||||
(defun reset-terminal () (send-string-to-terminal "\033c"))
|
||||
(add-hook 'kill-emacs-hook #'reset-terminal)
|
||||
(ef-themes-select 'ef-day)
|
||||
|
||||
(defun ccr/reload-emacs ()
|
||||
|
@ -418,12 +414,16 @@
|
|||
"C-c n j" org-roam-dailies-capture-today)
|
||||
(org-roam-db-autosync-mode))
|
||||
|
||||
|
||||
|
||||
(setup diff-hl
|
||||
(global-diff-hl-mode 1)
|
||||
(defun maybe-diff-hl-margin-local-mode ()
|
||||
(unless (display-graphic-p) (diff-hl-margin-local-mode)))
|
||||
(if (daemonp)
|
||||
(add-hook 'server-after-make-frame-hook #'maybe-diff-hl-margin-local-mode)))
|
||||
(defun maybe-diff-hl-margin-mode ()
|
||||
(unless (display-graphic-p) (diff-hl-margin-mode)))
|
||||
(when (daemonp)
|
||||
;; FIXME not optimal, after the first time that a client creates a frame all the other frames
|
||||
;; will use `diff-hl-margin-mode`, even if they are graphical
|
||||
(add-hook 'server-after-make-frame-hook #'maybe-diff-hl-margin-mode)))
|
||||
|
||||
(setup dirvish
|
||||
(dirvish-override-dired-mode)
|
||||
|
|
Reference in a new issue