Fixing custom start file for emacs and emacsclient
This commit is contained in:
parent
a06e9417ac
commit
9512bbe82a
|
@ -100,32 +100,6 @@
|
|||
:desc "Clippy describes function under point" "f" #'clippy-describe-function
|
||||
:desc "Clippy describes variable under point" "v" #'clippy-describe-variable))
|
||||
|
||||
(use-package dashboard
|
||||
:init ;; tweak dashboard config before loading it
|
||||
(setq dashboard-set-heading-icons t)
|
||||
(setq dashboard-set-file-icons t)
|
||||
(setq dashboard-banner-logo-title "\nKEYBINDINGS:\
|
||||
\nFind file (SPC .) \
|
||||
Open buffer list (SPC b i)\
|
||||
\nFind recent files (SPC f r) \
|
||||
Open the eshell (SPC e s)\
|
||||
\nOpen dired file manager (SPC d d) \
|
||||
List of keybindings (SPC h b b)")
|
||||
;;(setq dashboard-startup-banner 'logo) ;; use standard emacs logo as banner
|
||||
(setq dashboard-startup-banner "~/.config/doom/doom-emacs-dash.png") ;; use custom image as banner
|
||||
(setq dashboard-center-content nil) ;; set to 't' for centered content
|
||||
(setq dashboard-items '((recents . 5)
|
||||
;; (agenda . 5 ) ;; Agenda crashes Dashboard if using custom org-agenda.
|
||||
(bookmarks . 5)
|
||||
(projects . 5)
|
||||
(registers . 5)))
|
||||
:config
|
||||
(dashboard-setup-startup-hook)
|
||||
(dashboard-modify-heading-icons '((recents . "file-text")
|
||||
(bookmarks . "book"))))
|
||||
|
||||
(setq doom-fallback-buffer-name "*dashboard*")
|
||||
|
||||
(map! :leader
|
||||
(:prefix ("d" . "dired")
|
||||
:desc "Open dired" "d" #'dired
|
||||
|
@ -798,6 +772,8 @@ List of keybindings (SPC h b b)")
|
|||
(map! :leader
|
||||
:desc "Clone indirect buffer other window" "b c" #'clone-indirect-buffer-other-window)
|
||||
|
||||
(setq initial-buffer-choice "~/.config/doom/start.org")
|
||||
|
||||
(map! :leader
|
||||
(:prefix ("w" . "window")
|
||||
:desc "Winner redo" "<right>" #'winner-redo
|
||||
|
|
|
@ -14,9 +14,6 @@
|
|||
- [[#calendar][CALENDAR]]
|
||||
- [[#centaur-tabs][CENTAUR-TABS]]
|
||||
- [[#clippy][CLIPPY]]
|
||||
- [[#dashboard][DASHBOARD]]
|
||||
- [[#configuring-dashboard][Configuring Dashboard]]
|
||||
- [[#dashboard-in-emacsclient][Dashboard in Emacsclient]]
|
||||
- [[#dired][DIRED]]
|
||||
- [[#keybindings-to-open-dired][Keybindings To Open Dired]]
|
||||
- [[#keybindings-within-dired][Keybindings Within Dired]]
|
||||
|
@ -56,6 +53,7 @@
|
|||
- [[#registers][REGISTERS]]
|
||||
- [[#shells][SHELLS]]
|
||||
- [[#splits][SPLITS]]
|
||||
- [[#start-page][START PAGE]]
|
||||
- [[#winner-mode][WINNER MODE]]
|
||||
- [[#zap-to-char][ZAP TO CHAR]]
|
||||
|
||||
|
@ -246,42 +244,6 @@ Gives us a popup box with "Clippy, the paper clip". You can make him say various
|
|||
|
||||
#+end_src
|
||||
|
||||
* DASHBOARD
|
||||
Emacs Dashboard is an extensible startup screen showing you recent files, bookmarks, agenda items and an Emacs banner.
|
||||
|
||||
** Configuring Dashboard
|
||||
#+begin_src emacs-lisp
|
||||
(use-package dashboard
|
||||
:init ;; tweak dashboard config before loading it
|
||||
(setq dashboard-set-heading-icons t)
|
||||
(setq dashboard-set-file-icons t)
|
||||
(setq dashboard-banner-logo-title "\nKEYBINDINGS:\
|
||||
\nFind file (SPC .) \
|
||||
Open buffer list (SPC b i)\
|
||||
\nFind recent files (SPC f r) \
|
||||
Open the eshell (SPC e s)\
|
||||
\nOpen dired file manager (SPC d d) \
|
||||
List of keybindings (SPC h b b)")
|
||||
;;(setq dashboard-startup-banner 'logo) ;; use standard emacs logo as banner
|
||||
(setq dashboard-startup-banner "~/.config/doom/doom-emacs-dash.png") ;; use custom image as banner
|
||||
(setq dashboard-center-content nil) ;; set to 't' for centered content
|
||||
(setq dashboard-items '((recents . 5)
|
||||
;; (agenda . 5 ) ;; Agenda crashes Dashboard if using custom org-agenda.
|
||||
(bookmarks . 5)
|
||||
(projects . 5)
|
||||
(registers . 5)))
|
||||
:config
|
||||
(dashboard-setup-startup-hook)
|
||||
(dashboard-modify-heading-icons '((recents . "file-text")
|
||||
(bookmarks . "book"))))
|
||||
#+end_src
|
||||
|
||||
** Dashboard in Emacsclient
|
||||
This setting ensures that emacsclient always opens on *dashboard* rather than *scratch*.
|
||||
#+begin_src emacs-lisp
|
||||
(setq doom-fallback-buffer-name "*dashboard*")
|
||||
#+end_src
|
||||
|
||||
* DIRED
|
||||
Dired is the file manager within Emacs. Below, I setup keybindings for image previews (peep-dired). Doom Emacs does not use 'SPC d' for any of its keybindings, so I've chosen the format of 'SPC d' plus 'key'.
|
||||
|
||||
|
@ -1296,6 +1258,14 @@ I set splits to default to opening on the right using 'prefer-horizontal-split'.
|
|||
:desc "Clone indirect buffer other window" "b c" #'clone-indirect-buffer-other-window)
|
||||
#+END_SRC
|
||||
|
||||
* START PAGE
|
||||
Instead of using Doom's Dashboard or the Emacs Dashboard program, I have decided to just set an custom start file as my "dashboard" since it allows me more customization options.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq initial-buffer-choice "~/.config/doom/start.org")
|
||||
|
||||
#+end_src
|
||||
|
||||
* WINNER MODE
|
||||
Winner mode has been included with GNU Emacs since version 20. This is a global minor mode and, when activated, it allows you to “undo” (and “redo”) changes in the window configuration with the key commands 'SCP w <left>' and 'SPC w <right>'.
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
(package! flycheck-aspell)
|
||||
(package! calfw)
|
||||
(package! calfw-org)
|
||||
(package! dashboard)
|
||||
;;(package! dashboard)
|
||||
(package! dired-open)
|
||||
(package! dired-subtree)
|
||||
(package! dirvish)
|
||||
|
|
|
@ -1,19 +1,17 @@
|
|||
#+TITLE: DT'S Emacs Start Page
|
||||
#+STARTUP: inlineimages
|
||||
|
||||
[[file:./doom-emacs-dash.png]]
|
||||
[[file:./emacs-start-page.png]]
|
||||
|
||||
* IMPORTANT KEYBINDINGS
|
||||
|
||||
| /KEYBINDING/ | /FUNCTION/ | /DESCRIPTION/ |
|
||||
|------------+-------------------+------------------------|
|
||||
| SPC . | [[elisp:(ido-find-file)][find-file]] | Find a file |
|
||||
| SPC f r | [[elisp:(counsel-recentf)][counsel-recentf]] | Find a recent file |
|
||||
| SPC d d | [[elisp:(dired (getenv "HOME"))][dired]] | Dired file manager |
|
||||
| SPC e s | [[elisp:(eshell)][eshell]] | Launch the eshell |
|
||||
| SPC h r r | [[elisp:(doom/reload)][doom/reload]] | Reload Doom Emacs |
|
||||
| SPC h d h | [[elisp:(doom/help)][doom/help]] | Doom Emacs user manual |
|
||||
| SPC h b b | [[elisp:(counsel-descbinds)][counsel-descbinds]] | Describe keybindings |
|
||||
|-----------+-------------------+---------------------------|
|
||||
| M-x | [[elisp:(counsel-M-x)][counsel-M-x]] | Prompt for Emacs programs |
|
||||
| SPC . | [[elisp:(counsel-find-file)][counsel-find-file]] | Find a file |
|
||||
| SPC f r | [[elisp:(counsel-recentf)][counsel-recentf]] | Find a recent file |
|
||||
| SPC d d | [[elisp:(dired (getenv "HOME"))][dired]] | Dired file manager |
|
||||
| SPC e s | [[elisp:(eshell)][eshell]] | Launch the eshell |
|
||||
| SPC h r r | [[elisp:(doom/reload)][doom/reload]] | Reload Doom Emacs |
|
||||
|-----------+-------------------+---------------------------|
|
||||
|
||||
* BUFFERS & SPLITS
|
||||
|------------------------------+------------------------------+-----------------------------|
|
||||
|
@ -23,9 +21,13 @@
|
|||
| (SPC w c) [[elisp:(evil-window-delete)][evil-window-delete]] | (SPC w l) [[elisp:(evil-window-left 1)][evil-window-left]] | (SPC w h) [[elisp:(evil-window-right 1)][evil-window-right]] |
|
||||
|------------------------------+------------------------------+-----------------------------|
|
||||
|
||||
* DOOM EMACS CONFIG FILES
|
||||
* HELP INFORMATION
|
||||
|-----------------------------+-----------------------------+-------------------------------|
|
||||
| (SPC h d h) [[elisp:(doom/help)][doom/help]] | (SPC h d f) [[elisp:(doom/help-faq)][doom/help-faq]] | (SPC h i) [[elisp:(info)][info]] |
|
||||
| (SPC h f) [[elisp:(counsel-describe-function)][describe-function]] | (SPC h v) [[elisp:(counsel-describe-variable)][describe-variable]] | (SPC h b b) [[elisp:(counsel-descbinds)][describe-bindings]] |
|
||||
|-----------------------------+-----------------------------+-------------------------------|
|
||||
|
||||
| /NAME OF FILE/ | /DESCRIPTION/ |
|
||||
* DOOM EMACS CONFIG FILES
|
||||
|----------------+------------------------------------------------------------|
|
||||
| [[elisp:(find-file (concat (getenv "HOME") "/.config/doom/config.org"))][config.org]] | This is the main user configuration file for Doom Emacs. |
|
||||
| [[elisp:(find-file (concat (getenv "HOME") "/.config/doom/init.el"))][init.el]] | Allows you to turn on/off the standard Doom modules. |
|
||||
|
@ -33,5 +35,7 @@
|
|||
| [[elisp:(find-file (concat (getenv "HOME") "/.config/doom/start.org"))][start.org]] | View/edit your custom start page. |
|
||||
| [[elisp:(find-file (concat (getenv "HOME") "/.config/doom/eshell/aliases"))][eshell/aliases]] | Aliases file for the eshell. |
|
||||
| [[elisp:(find-file (concat (getenv "HOME") "/.config/doom/eshell/profile"))][eshell/profile]] | Profile for the eshell. |
|
||||
|----------------+------------------------------------------------------------|
|
||||
|
||||
=NOTE=: (SPC f p) [[elisp:(doom/find-file-in-private-config)][doom/find-file-in-private-config]] searches for files in HOME/.config/doom/.
|
||||
|
||||
|
|
|
@ -808,7 +808,8 @@ myKeys c =
|
|||
|
||||
-- Emacs (SUPER-e followed by a key)
|
||||
^++^ subKeys "Emacs"
|
||||
[ ("M-e e", addName "Emacsclient Dashboard" $ spawn (myEmacs ++ ("--eval '(dashboard-refresh-buffer)'")))
|
||||
[("M-e e", addName "Emacsclient" $ spawn (myEmacs))
|
||||
-- ("M-e e", addName "Emacsclient Dashboard" $ spawn (myEmacs ++ ("--eval '(dashboard-refresh-buffer)'")))
|
||||
, ("M-e a", addName "Emacsclient EMMS (music)" $ spawn (myEmacs ++ ("--eval '(emms)' --eval '(emms-play-directory-tree \"~/Music/\")'")))
|
||||
, ("M-e b", addName "Emacsclient Ibuffer" $ spawn (myEmacs ++ ("--eval '(ibuffer)'")))
|
||||
, ("M-e d", addName "Emacsclient Dired" $ spawn (myEmacs ++ ("--eval '(dired nil)'")))
|
||||
|
|
|
@ -662,7 +662,8 @@ myKeys c =
|
|||
|
||||
-- Emacs (SUPER-e followed by a key)
|
||||
^++^ subKeys "Emacs"
|
||||
[ ("M-e e", addName "Emacsclient Dashboard" $ spawn (myEmacs ++ ("--eval '(dashboard-refresh-buffer)'")))
|
||||
[("M-e e", addName "Emacsclient" $ spawn (myEmacs))
|
||||
-- ("M-e e", addName "Emacsclient Dashboard" $ spawn (myEmacs ++ ("--eval '(dashboard-refresh-buffer)'")))
|
||||
, ("M-e a", addName "Emacsclient EMMS (music)" $ spawn (myEmacs ++ ("--eval '(emms)' --eval '(emms-play-directory-tree \"~/Music/\")'")))
|
||||
, ("M-e b", addName "Emacsclient Ibuffer" $ spawn (myEmacs ++ ("--eval '(ibuffer)'")))
|
||||
, ("M-e d", addName "Emacsclient Dired" $ spawn (myEmacs ++ ("--eval '(dired nil)'")))
|
||||
|
|
Loading…
Reference in New Issue