fix and change bindings and icons

This commit is contained in:
2022-12-29 12:58:01 +01:00
parent d95f45d049
commit 99a0d6a185
7 changed files with 2122 additions and 65 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -57,6 +57,12 @@
[[help:kill-line][Cut rest of line]] ........... =C-k= [[move-line-down][Move line down]] .......... =M-down=
[[help:indent-rigidly][Indent lines]] ........... =C-x= =TAB=
*Help*
[[help:helpful-at-point][Symbol at point]] ........ =C-c= =C-d= [[help:describe-variable][Variable]] ................. =C-h= =v=
[[help:helpful-command][Commands]] ................. =C-h= =C= [[help:helpful-variable][Variable (extended)]] ...... =C-h= =V=
[[help:describe-function][Functions]] ................ =C-h= =f= [[help:describe-key][Key]] ...................... =C-h= =k=
[[help:helpful-function][Functions (extended)]] ..... =C-h= =F= [[help:helpful-key][Key (extended)]] ........... =C-h= =K=
*Multiple cursors* [[help:mc/mark-all-dwim][Mark all at point]] .... =M-m= =s= =m= =a=
, Jump to next cursor ...... =C-v= , (un)hide other lines ..... =C-'=
, Jump to previous cursor .. =M-v=
@@ -115,8 +121,14 @@
- [[help:eval-print-last-sexp][last to buffer]] [[help:kill-sexp][Cut expression]] ........... =C-M-k=
[[help:mark-sexp][Mark expression]] .......... =C-M-@= [[help:backward-kill-sexp][Cut last expression]] . =C-M-backsp=
IBuffer
[[help:ibuffer-filter-by-unsaved][Filter unsaved files]] ....... =/= =u= [[help:ibuffer-filter-disable][Disable filter]] ............. =/= =/=
")
(my-org-help-mode)
(when (featurep 'org-appear) (org-appear-mode -1))
(goto-char (point-min))
(local-set-key (kbd "q") 'kill-buffer-and-window)
(local-set-key (kbd "C-g") 'kill-buffer-and-window)

View File

@@ -30,15 +30,15 @@
:config
(setq amx-save-file (concat user-cache-directory "amx-items")))
;; in an ivy action minibuffer use M-o `ivy-dispatching-done' to see
;; in an ivy action minibuffer use M-o (`ivy-dispatching-done') to see
;; valid actions.
(use-package ivy
:delight (ivy-mode "Ivy") ;; \u24BE i
:defer 0.1
;; Ivy-based interface to standard commands
:bind (("C-s" . swiper)
;; ("C-M-s" . swiper-all)
("C-c C-r" . ivy-resume) ;; resumes the last Ivy-based completion.
("<f6>" . ivy-resume)
("C-c v" . ivy-push-view)
("C-c V" . ivy-pop-view))
:config
@@ -56,8 +56,30 @@
:after (ivy counsel)
:config
(setcdr (assq t ivy-format-functions-alist) #'ivy-format-function-line)
;; overwrite to fix error, see https://github.com/Yevgnen/ivy-rich/issues/115#issuecomment-1336951680
(defun ivy-rich--switch-buffer-directory (candidate)
"Return directory of file visited by buffer named CANDIDATE, or nil if no file."
(let* ((buffer (get-buffer candidate))
(fn (buffer-file-name buffer)))
;; if valid filename, i.e. buffer visiting file:
(if fn
;; return containing directory
;; (directory-file-name fn) ;; REMOVED
(file-name-directory fn) ;; ADDED
;; else if mode explicitly offering list-buffers-directory, return that; else nil.
;; buffers that don't explicitly visit files, but would like to show a filename,
;; e.g. magit or dired, set the list-buffers-directory variable
(buffer-local-value 'list-buffers-directory buffer))))
(require 'all-the-icons-ivy-rich) ;; as suggested load `all-the-icons-ivy-rich-mode' before `ivy-rich-mode'
(ivy-rich-mode 1))
(use-package all-the-icons-ivy-rich
:defer ;; to be able to load it after `ivy-rich'
:if (display-graphic-p)
:config
;; defines also nice display-transformers
(all-the-icons-ivy-rich-mode 1))
(use-package swiper
:after ivy)
@@ -65,15 +87,15 @@
:after ivy
:bind (("M-x" . counsel-M-x)
("M-y" . counsel-yank-pop)
;; ("C-x b" . counsel-switch-buffer)
("C-x b" . counsel-switch-buffer)
;; ("C-x b" . counsel-ibuffer)
("C-x b" . counsel-buffer-or-recentf)
("C-x C-f" . counsel-find-file)
("C-x C-r" . counsel-recentf)
;; ("<f1> f" . describe-function) ;; counsel-describe-function, not set bc of helpful.el
;; ("<f1> v" . describe-variable) ;; counsel-describe-variable, net set bc of helpful.el
("<f1> l" . find-library) ;; find-library works better with counsel as counsel-find-library
("<f2> i" . counsel-info-lookup-symbol)
;; ("C-x C-r" . counsel-recentf)
("C-x C-r" . counsel-buffer-or-recentf)
("C-h f" . counsel-describe-function)
("C-h v" . counsel-describe-variable)
("C-h l" . counsel-find-library)
;; ("<f2> i" . counsel-info-lookup-symbol) ;; info-lookup-symbol see helpful-symbol
("<f2> u" . counsel-unicode-char)
("<f2> j" . counsel-set-variable)
;; Ivy-based interface to shell and system tools

View File

@@ -61,14 +61,15 @@
t))))
(use-package ibuf-ext
:defer t
:after (ibuffer)
:bind ((:map ibuffer-mode-map
(("/ u" . ibuffer-filter-by-unsaved))))
:config
(define-ibuffer-filter unsaved
"Toggle current view to buffers whose file is unsaved."
(:description "file is unsaved")
(with-current-buffer buf
(and buffer-file-name (buffer-modified-p))))
(define-key ibuffer-mode-map (kbd "/ u") 'ibuffer-filter-by-unsaved))
(and buffer-file-name (buffer-modified-p)))))
;; recentf stuff
(use-package recentf
@@ -314,32 +315,48 @@ Version 2016-07-13"
;; A better *Help* buffer
(use-package helpful
;;:after counsel
:bind
(;; Note that the built-in `describe-function' includes both functions
;; and macros. `helpful-function' is functions only, so we provide
;; `helpful-callable' as a drop-in replacement to include `helpful-macro'.
("C-h f" . describe-function)
;; ("C-h f" . helpful-callable)
("C-h v" . describe-variable)
;; ("C-h v" . helpful-variable)
("C-h k" . helpful-key)
;; ("C-h f" . helpful-callable) ;; C-h f default describe-function
;; ("C-h v" . helpful-variable) ;; C-h v default describe-variable
;; ("C-h k" . helpful-key) ;; C-h k default describe-key
;; Lookup the current symbol at point. C-c C-d is a common keybinding
;; for this in lisp modes.
("C-c C-d" . helpful-at-point)
;; Look up *F*unctions (excludes macros).
;; By default, C-h F is bound to `Info-goto-emacs-command-node'. Helpful
;; already links to the manual, if a function is referenced there.
("C-h F" . helpful-function)
;; ("C-h F" . helpful-function)
;; Look up functions including macros (like `describe-function').
("C-h F" . helpful-callable)
;; ("C-h F" . counsel-describe-function) ;; calls helpful-callable, see below
;; Look up *K*eys.
;; By default, C-h K is bound to `Info-goto-emacs-key-command-node'.
;; Helpful already links to the manual, if a key is referenced there.
("C-h K" . helpful-key)
;; Look up *V*ariable.
("C-h V" . helpful-variable)
;; ("C-h V" . counsel-describe-variable) ;; calls helpful-vraiable, see below
;; Look up *C*ommands.
;; By default, C-h C is bound to describe `describe-coding-system'. I
;; don't find this very useful, but it's frequently useful to only
;; look at interactive functions.
("C-h C" . helpful-command))
:config
(with-eval-after-load 'ivy
;; Ivy users can use Helpful with counsel commands:
(setq counsel-describe-function-function #'helpful-callable)
(setq counsel-describe-variable-function #'helpful-variable)))
;; (with-eval-after-load 'ivy
;; ;; Ivy users can use Helpful with counsel commands:
;; (setq counsel-describe-function-function #'helpful-callable)
;; (setq counsel-describe-variable-function #'helpful-variable))
)
;;
;; keyboard
@@ -764,8 +781,12 @@ Version 2016-07-13"
))
(easy-menu-define my-org-minor-mode-menu nil "My Org Minor Mode Menu"
'("Org Minor Mode / Toggles" :visible (eq major-mode 'org-mode)
["Org Appear" org-appear-mode
:style toggle :selected org-appear-mode :help "org-appear-mode"]
["Org Fancy Priorities [Ⓟ]" org-fancy-priorities-mode
:style toggle :selected org-fancy-priorities-mode :help "org-sticky-header-mode"]
["Org Indent" org-indent-mode
:style toggle :selected org-indent-mode :help "org-indent-mode"]
["Org Latex Remove Logfiles" (setq org-latex-remove-logfiles (not org-latex-remove-logfiles))
:style toggle :selected org-latex-remove-logfiles :help "org-latex-remove-logfiles"]
["Org Link Descriptive" org-toggle-link-display

View File

@@ -181,6 +181,7 @@ DISPLAY-START: `integer', e.g. 3820"
(use-package all-the-icons
:defer t
:if (display-graphic-p)
:config
(when (and (not (my-font-installed-p "all-the-icons"))
(window-system))
@@ -197,32 +198,59 @@ DISPLAY-START: `integer', e.g. 3820"
(setq dashboard-set-file-icons t)
(setq dashboard-set-navigator t)
(setq dashboard-startup-banner 'logo)
(setq dashboard-navigator-buttons
;; list of lines having list of elements
;; element: (icon title help action face prefix suffix)
`(;; 1st line custom views
(("" "Custom Views:" "custom views" nil default "" "")
(,(all-the-icons-fileicon "elisp" :height 1.0 :v-adjust -0.1) "ELisp" "my-view-elisp" (lambda (&rest _) (my-tab-view-elisp)) )
(,(all-the-icons-alltheicon "python" :height 1.0 :v-adjust 0.0) "Python" "my-view-python" (lambda (&rest _) (my-tab-view-python)) )
(,(all-the-icons-alltheicon "script" :height 1.0 :v-adjust 0.0) "Shell" "my-view-shell" (lambda (&rest _) (my-tab-view-shell)) )
(,(all-the-icons-octicon "file-media" :height 1.0 :v-adjust 0.0) "Gnuplot" "my-view-gnuplot" (lambda (&rest _) (my-tab-view-gnuplot)) )
(,(all-the-icons-octicon "file-pdf" :height 1.0 :v-adjust 0.0) "Org PDF" "my-view-org-pdf" (lambda (&rest _) (my-tab-view-org-pdf)) ))
;; 2nd line major modes 1st part
(("" "Major Modes:" "major modes" nil default "" "")
("" "Deft" "deft" (lambda (&rest _) (deft)) )
("" "EShell" "eshell-mode" (lambda (&rest _) (eshell)) )
("" "Magit" "magit" (lambda (&rest _) (magit)) )
(,(all-the-icons-octicon "mail" :height 1.0 :v-adjust 0.0) "Mu4e" "mu4e" (lambda (&rest _) (mu4e)) )
(,(all-the-icons-octicon "mail" :height 1.0 :v-adjust 0.0) "Notmuch" "notmuch" (lambda (&rest _) (notmuch)) )
("" "Org-Brain" "org-brain-visualize" (lambda (&rest _) (call-interactively 'org-brain-visualize)) ))
;; 3rd line major modes 2nd part
(("" "Org-Drill" "org-drill" (lambda (&rest _) (org-drill)) )
("" "Powershell" "powershell" (lambda (&rest _) (powershell)) )
("" "Shell" "shell" (lambda (&rest _) (shell)) )
("" "Treemacs" "treemacs" (lambda (&rest _) (treemacs)) ))
;; 4th line infos
((,(all-the-icons-material "help_outline" :height 1.1 :v-adjust -0.15) "Help" "?/h" (lambda (&rest _) (describe-mode)) nil)
(,(all-the-icons-material "refresh" :height 1.1 :v-adjust -0.15) "Restart" "restart-emacs" (lambda (&rest _) (restart-emacs)) nil))))
(if (display-graphic-p)
(setq dashboard-navigator-buttons
;; list of lines having list of elements
;; element: (icon title help action face prefix suffix)
`(;; 1st line custom views
(("" "Custom Views:" "custom views" nil default "" "")
(,(all-the-icons-fileicon "elisp" :height 1.0 :v-adjust -0.1) "ELisp" "my-view-elisp" (lambda (&rest _) (my-tab-view-elisp)) )
(,(all-the-icons-alltheicon "python" :height 1.0 :v-adjust 0.0) "Python" "my-view-python" (lambda (&rest _) (my-tab-view-python)) )
(,(all-the-icons-alltheicon "script" :height 1.0 :v-adjust 0.0) "Shell" "my-view-shell" (lambda (&rest _) (my-tab-view-shell)) )
(,(all-the-icons-octicon "file-media" :height 1.0 :v-adjust 0.0) "Gnuplot" "my-view-gnuplot" (lambda (&rest _) (my-tab-view-gnuplot)) )
(,(all-the-icons-octicon "file-pdf" :height 1.0 :v-adjust 0.0) "Org PDF" "my-view-org-pdf" (lambda (&rest _) (my-tab-view-org-pdf)) ))
;; 2nd line major modes 1st part
(("" "Major Modes:" "major modes" nil default "" "")
("" "Deft" "deft" (lambda (&rest _) (deft)) )
("" "EShell" "eshell-mode" (lambda (&rest _) (eshell)) )
("" "Magit" "magit" (lambda (&rest _) (magit)) )
(,(all-the-icons-octicon "mail" :height 1.0 :v-adjust 0.0) "Mu4e" "mu4e" (lambda (&rest _) (mu4e)) )
(,(all-the-icons-octicon "mail" :height 1.0 :v-adjust 0.0) "Notmuch" "notmuch" (lambda (&rest _) (notmuch)) )
("" "Org-Brain" "org-brain-visualize" (lambda (&rest _) (call-interactively 'org-brain-visualize)) ))
;; 3rd line major modes 2nd part
(("" "Org-Drill" "org-drill" (lambda (&rest _) (org-drill)) )
("" "Powershell" "powershell" (lambda (&rest _) (powershell)) )
("" "Shell" "shell" (lambda (&rest _) (shell)) )
("" "Treemacs" "treemacs" (lambda (&rest _) (treemacs)) ))
;; 4th line infos
((,(all-the-icons-material "help_outline" :height 1.1 :v-adjust -0.15) "Help" "?/h" (lambda (&rest _) (describe-mode)) nil)
(,(all-the-icons-material "refresh" :height 1.1 :v-adjust -0.15) "Restart" "restart-emacs" (lambda (&rest _) (restart-emacs)) nil))))
(setq dashboard-navigator-buttons
;; list of lines having list of elements
;; element: (icon title help action face prefix suffix)
`(;; 1st line custom views
(("" "Custom Views:" "custom views" nil default "" "")
("" "ELisp" "my-view-elisp" (lambda (&rest _) (my-tab-view-elisp)) )
("" "Python" "my-view-python" (lambda (&rest _) (my-tab-view-python)) )
("" "Shell" "my-view-shell" (lambda (&rest _) (my-tab-view-shell)) )
("" "Gnuplot" "my-view-gnuplot" (lambda (&rest _) (my-tab-view-gnuplot)) )
("" "Org PDF" "my-view-org-pdf" (lambda (&rest _) (my-tab-view-org-pdf)) ))
;; 2nd line major modes 1st part
(("" "Major Modes:" "major modes" nil default "" "")
("" "Deft" "deft" (lambda (&rest _) (deft)) )
("" "EShell" "eshell-mode" (lambda (&rest _) (eshell)) )
("" "Magit" "magit" (lambda (&rest _) (magit)) )
("" "Mu4e" "mu4e" (lambda (&rest _) (mu4e)) )
("" "Notmuch" "notmuch" (lambda (&rest _) (notmuch)) )
("" "Org-Brain" "org-brain-visualize" (lambda (&rest _) (call-interactively 'org-brain-visualize)) ))
;; 3rd line major modes 2nd part
(("" "Org-Drill" "org-drill" (lambda (&rest _) (org-drill)) )
("" "Powershell" "powershell" (lambda (&rest _) (powershell)) )
("" "Shell" "shell" (lambda (&rest _) (shell)) )
("" "Treemacs" "treemacs" (lambda (&rest _) (treemacs)) ))
;; 4th line infos
(("" "Help" "?/h" (lambda (&rest _) (describe-mode)) nil)
("" "Restart" "restart-emacs" (lambda (&rest _) (restart-emacs)) nil)))))
(setq dashboard-items '((recents . 10)
(bookmarks . 5)
;; (projects . 5)

View File

@@ -332,7 +332,9 @@ Example defines
(setq org-appear-autoemphasis t) ;; toggle emphasis markers, t by default, needs `org-hide-emphasis-markers' active
(setq org-appear-autolinks t) ;; toogle links, needs `org-link-descriptive' active
(setq org-appear-autosubmarkers t) ;; toogle subscripts and superscripts: ^3 -> ³, needs `org-pretty-entities' active
(setq org-appear-autokeywords t)) ;; toogle keywords: #+TITLE: foo -> foo, needs `org-hidden-keywords' active
(setq org-appear-autokeywords t) ;; toogle keywords: #+TITLE: foo -> foo, needs `org-hidden-keywords' active
(setq org-appear-delay 0.5) ;; with delay a mouse click open a link directly and holding down shows the description
(setq org-appear-trigger 'always))
(use-package org-brain ;; uses org-id If you find that org-brain is missing entries, or list entries which doesnt exist, try using M-x org-brain-update-id-locations, which syncs the org-brain entries with the org-id caching system.
:commands (org-brain-visualize)
@@ -556,7 +558,13 @@ Suggest the URL title as a description for resource."
(setq org-roam-directory (expand-file-name "~/Sync/workspace/emacs/org-roam")) ;; check if folder exists
(setq org-roam-db-location (concat user-cache-directory "org-roam.db"))
;; (setq org-roam-graph-viewer nil)
(with-eval-after-load 'which-key
(which-key-add-key-based-replacements
"C-c r" "org-roam"))
:config
;; when browsing notes display also tags
;; set tags `org-roam-tag-add': file: #+FILETAGS: :tag1:...: / * headline :tag1:...:
(setq org-roam-node-display-template "${title} ${tags}")
(org-roam-db-autosync-mode) ;; sync on file change
;;(org-roam-setup)
)
@@ -564,9 +572,14 @@ Suggest the URL title as a description for resource."
(use-package org-roam-graph
:bind (("C-c r g" . org-roam-graph)))
(use-package org-roam-ui
(use-package org-roam-timestamps
:after (org-roam)
:config
(org-roam-timestamps-mode))
(use-package org-roam-ui
:commands (org-roam-ui-mode)
:bind (("C-c r u" . org-roam-ui-mode))
:config
(setq org-roam-ui-sync-theme t)
(setq org-roam-ui-follow t)
@@ -583,24 +596,36 @@ Suggest the URL title as a description for resource."
(use-package org-superstar
;; formerly
;;(require 'org-bullets)
;;(add-hook 'org-mode-hook 'org-bullets-mode)
;; after changing settings run `org-superstar-restart'
:hook (org-mode . org-superstar-mode) ;; defers the loading.
:config
(setq org-superstar-leading-bullet " ·") ;; " " " ·" " ⚫" or to hide: ?\s
;; headlines
(setq org-superstar-leading-bullet " ·") ;; " " " ·" " ⚫" or to hide: ?\s (without quotation marks)
(setq org-superstar-remove-leading-stars nil) ;; to remove the indentation, needs org-superstar-leading-bullet set to ?\s
(setq org-superstar-headline-bullets-list
'(?◉
?○
?✸
?✿))
;; (setq org-superstar-leading-bullet ?\s)
;; (setq org-superstar-leading-bullet "\u200b")
;; (setq org-superstar-headline-bullets-list '(?\s))
;; (setq org-superstar-headline-bullets-list '("\u200b"))
;; (setq org-superstar-headline-bullets-list '(?))
;; items
(setq org-superstar-prettify-item-bullets t) ;; can cause slowdown when using a lot of lists (thousands), run command org-superstar-toggle-lightweight-list or set this variable to nil or see hack on the source web page
(setq org-superstar-remove-leading-stars nil) ;; to remove the indentation
(setq org-superstar-special-todo-items t) ;; using symbols defined in org-superstar-todo-bullet-alist
;; (setq org-superstar-todo-bullet-alist
;; '(("TODO" . 9744)
;; ("WAIT" . 9744)
;; ("DONE" . 9745)
;; ("CANC" . 9745)))
(setq org-superstar-todo-bullet-alist
'(("TODO" . 9744)
("WAIT" . 9744)
("DONE" . 9744)
("CANC" . 9744)))
(setq org-superstar-item-bullet-alist
'((?* . ?•)
(?+ . ?➤)
(?- . ?)))
(setq org-superstar-special-todo-items t) ;; using symbols defined in org-superstar-todo-bullet-alist
(setq org-superstar-todo-bullet-alist ;; ☐ ☑
'(("TODO" . ?☐)
("WAIT" . ?☐)
("DONE" . ?☐)
("CANC" . ?☐)))
(set-face-attribute 'org-superstar-leading nil :foreground "#42444a")) ;; "#42444a"
(use-package org-table

View File

@@ -19,6 +19,7 @@
(setq which-key-dont-use-unicode t))
:config
(which-key-mode)
(setq which-key-allow-multiple-replacements t)
(unless (daemonp)
;; problem if using unicodes and emacsclient, the last line of which-key side-frame is cropped.
(add-to-list 'which-key-replacement-alist '(("TAB" . nil) . ("" . nil)))
@@ -44,6 +45,17 @@
;; formaly which-key-declare-prefixes
;; blob/c7a103a772d808101d7635ec10f292ab9202d9ee/layers/%2Bdistributions/spacemacs-base/packages.el
(which-key-add-key-based-replacements
"C-c !" "flyspell"
"C-c ," "semantic/senator"
"C-x RET" "coding-system"
"C-x 8" "char"
"C-x X" "edebug"
"C-x a" "abbrev"
"C-x n" "narrow"
"C-x p" "project"
"C-x r" "register/rectangle/bookmark"
"C-x t" "tab"
"C-x w" "window"
"M-m" '("root" . "My root")
"M-m a" "applications"
"M-m b" "buffers"