Major work on Emacs and XMonad configs.
This commit is contained in:
parent
bab9cbc8b9
commit
a52c88da3f
|
@ -18,6 +18,26 @@
|
|||
(kbd "g <down>") 'centaur-tabs-forward-group
|
||||
(kbd "g <up>") 'centaur-tabs-backward-group)
|
||||
|
||||
(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 "Emacs Is More Than A Text Editor!")
|
||||
;;(setq dashboard-startup-banner 'logo) ;; use standard emacs logo as banner
|
||||
(setq dashboard-startup-banner "~/.config/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 )
|
||||
(bookmarks . 5)
|
||||
(projects . 5)
|
||||
(registers . 5)))
|
||||
:config
|
||||
(dashboard-setup-startup-hook)
|
||||
(dashboard-modify-heading-icons '((recents . "file-text")
|
||||
(bookmarks . "book"))))
|
||||
|
||||
(setq initial-buffer-choice (lambda () (get-buffer "*dashboard*")))
|
||||
|
||||
(map! :leader
|
||||
(:prefix ("d" . "dired")
|
||||
:desc "Open dired" "d" #'dired
|
||||
|
@ -61,8 +81,9 @@
|
|||
(kbd "K") 'elfeed-goodies/split-show-prev)
|
||||
(setq elfeed-feeds (quote
|
||||
(("https://www.reddit.com/r/linux.rss" reddit linux)
|
||||
("https://www.reddit.com/r/commandline.rss" reddit linux)
|
||||
("https://www.reddit.com/r/emacs.rss" reddit linux)
|
||||
("https://www.reddit.com/r/commandline.rss" reddit commandline)
|
||||
("https://www.reddit.com/r/distrotube.rss" reddit distrotube)
|
||||
("https://www.reddit.com/r/emacs.rss" reddit emacs)
|
||||
("https://www.gamingonlinux.com/article_rss.php" gaming linux)
|
||||
("https://hackaday.com/blog/feed/" hackaday linux)
|
||||
("https://opensource.com/feed" opensource linux)
|
||||
|
@ -110,9 +131,22 @@
|
|||
:desc "Eww web browser" "w" #'eww
|
||||
:desc "Eww reload page" "R" #'eww-reload))
|
||||
|
||||
(setq doom-font (font-spec :family "Mononoki Nerd Font" :size 15)
|
||||
(defun eww-display+ (buf _alist)
|
||||
(let ((w (or (window-in-direction 'right)
|
||||
(window-in-direction 'left)
|
||||
(window-in-direction 'below)
|
||||
(window-in-direction 'above)
|
||||
(split-window-horizontally))))
|
||||
(set-window-buffer w buf)
|
||||
w))
|
||||
|
||||
(push `(,(rx "*eww*")
|
||||
(eww-display+))
|
||||
display-buffer-alist)
|
||||
|
||||
(setq doom-font (font-spec :family "Source Code Pro" :size 15)
|
||||
doom-variable-pitch-font (font-spec :family "Ubuntu" :size 15)
|
||||
doom-big-font (font-spec :family "Mononoki Nerd Font" :size 24))
|
||||
doom-big-font (font-spec :family "Source Code Pro" :size 24))
|
||||
(after! doom-themes
|
||||
(setq doom-themes-enable-bold t
|
||||
doom-themes-enable-italic t))
|
||||
|
|
|
@ -7,7 +7,13 @@
|
|||
- [[#about-this-config][ABOUT THIS CONFIG]]
|
||||
- [[#bookmarks-and-buffers][BOOKMARKS AND BUFFERS]]
|
||||
- [[#centaur-tabs][CENTAUR-TABS]]
|
||||
- [[#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]]
|
||||
- [[#keybindings-within-dired-with-peep-dired-mode-enabled][Keybindings Within Dired With Peep-Dired-Mode Enabled]]
|
||||
- [[#doom-theme][DOOM THEME]]
|
||||
- [[#elfeed][ELFEED]]
|
||||
- [[#emms][EMMS]]
|
||||
|
@ -74,19 +80,60 @@ To use tabs in Doom Emacs, be sure to uncomment "tabs" in Doom's init.el. Displ
|
|||
(kbd "g <up>") 'centaur-tabs-backward-group)
|
||||
#+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 "Emacs Is More Than A Text Editor!")
|
||||
;;(setq dashboard-startup-banner 'logo) ;; use standard emacs logo as banner
|
||||
(setq dashboard-startup-banner "~/.config/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 )
|
||||
(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 initial-buffer-choice (lambda () (get-buffer "*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'.
|
||||
|
||||
| COMMAND | DESCRIPTION | KEYBINDING |
|
||||
|-------------------------------------------+-------------------------------------------------+------------|
|
||||
| dired | /Open dired file manager/ | SPC d d |
|
||||
| dired-jump | /Jump to current directory in dired/ | SPC d j |
|
||||
| (in dired) peep-dired | /Toggle image previews within dired/ | SPC d p |
|
||||
| (in dired) dired-view-file | /View file in dired/ | SPC d v |
|
||||
| (in dired) dired-up-directory | /Go up in the directory tree/ | h |
|
||||
| (in dired) dired-find-file | /Go down in the directory tree (or open if file)/ | l |
|
||||
| (in peep-dired-mode) peep-dired-next-file | /Move to next file in peep-dired-mode/ | j |
|
||||
| (in peep-dired-mode) peep-dired-prev-file | /Move to previous file in peep-dired-mode/ | k |
|
||||
** Keybindings To Open Dired
|
||||
| COMMAND | DESCRIPTION | KEYBINDING |
|
||||
|------------+------------------------------------+------------|
|
||||
| dired | /Open dired file manager/ | SPC d d |
|
||||
| dired-jump | /Jump to current directory in dired/ | SPC d j |
|
||||
|
||||
** Keybindings Within Dired
|
||||
| COMMAND | DESCRIPTION | KEYBINDING |
|
||||
|---------------------+---------------------------------------------+------------|
|
||||
| dired-view-file | /View file in dired/ | SPC d v |
|
||||
| dired-up-directory | /Go up in directory tree/ | h |
|
||||
| dired-find-file | /Go down in directory tree (or open if file)/ | l |
|
||||
| dired-next-line | Move down to next line | j |
|
||||
| dired-previous-line | Move up to previous line | k |
|
||||
|
||||
** Keybindings Within Dired With Peep-Dired-Mode Enabled
|
||||
| COMMAND | DESCRIPTION | KEYBINDING |
|
||||
|----------------------+------------------------------------------+------------|
|
||||
| peep-dired | /Toggle previews within dired/ | SPC d p |
|
||||
| peep-dired-next-file | /Move to next file in peep-dired-mode/ | j |
|
||||
| peep-dired-prev-file | /Move to previous file in peep-dired-mode/ | k |
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(map! :leader
|
||||
|
@ -142,8 +189,9 @@ An RSS newsfeed reader for Emacs.
|
|||
(kbd "K") 'elfeed-goodies/split-show-prev)
|
||||
(setq elfeed-feeds (quote
|
||||
(("https://www.reddit.com/r/linux.rss" reddit linux)
|
||||
("https://www.reddit.com/r/commandline.rss" reddit linux)
|
||||
("https://www.reddit.com/r/emacs.rss" reddit linux)
|
||||
("https://www.reddit.com/r/commandline.rss" reddit commandline)
|
||||
("https://www.reddit.com/r/distrotube.rss" reddit distrotube)
|
||||
("https://www.reddit.com/r/emacs.rss" reddit emacs)
|
||||
("https://www.gamingonlinux.com/article_rss.php" gaming linux)
|
||||
("https://hackaday.com/blog/feed/" hackaday linux)
|
||||
("https://opensource.com/feed" opensource linux)
|
||||
|
@ -229,12 +277,12 @@ Settings related to fonts within Doom Emacs:
|
|||
+ 'doom-variable-pitch-font' -- variable font which is useful in some Emacs plugins.
|
||||
+ 'doom-big-font' -- used in doom-big-font-mode; useful for presentations.
|
||||
+ 'font-lock-comment-face' -- for comments.
|
||||
+ 'font-lock-keyword-face' -- for keywords with special significance, like ‘for’ and ‘if’ in C.
|
||||
+ 'font-lock-keyword-face' -- for keywords with special significance like 'setq' in elisp.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq doom-font (font-spec :family "Mononoki Nerd Font" :size 15)
|
||||
(setq doom-font (font-spec :family "Source Code Pro" :size 15)
|
||||
doom-variable-pitch-font (font-spec :family "Ubuntu" :size 15)
|
||||
doom-big-font (font-spec :family "Mononoki Nerd Font" :size 24))
|
||||
doom-big-font (font-spec :family "Source Code Pro" :size 24))
|
||||
(after! doom-themes
|
||||
(setq doom-themes-enable-bold t
|
||||
doom-themes-enable-italic t))
|
||||
|
@ -294,7 +342,7 @@ By default, Doom Emacs does not use 'SPC v', so the format I use for these bindi
|
|||
#+END_SRC
|
||||
|
||||
* LINE SETTINGS
|
||||
I set comment-line to 'SPC TAB TAB' which is a rather comfortable keybinding for me on my ErgoDox EZ keyboard. The standard Emacs keybinding for comment-line is 'C-x C-;'. The other keybindings are for commands that toggle on/off various line-related settings. Doom Emacs uses 'SPC t' for "toggle" commands, so I choose 'SPC t' plus 'key' for those bindings.
|
||||
I set comment-line to 'SPC TAB TAB' which is a rather comfortable keybinding for me on my ZSA Moonlander keyboard. The standard Emacs keybinding for comment-line is 'C-x C-;'. The other keybindings are for commands that toggle on/off various line-related settings. Doom Emacs uses 'SPC t' for "toggle" commands, so I choose 'SPC t' plus 'key' for those bindings.
|
||||
|
||||
| COMMAND | DESCRIPTION | KEYBINDING |
|
||||
|--------------------------+-------------------------------------------+-------------|
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
:ui
|
||||
;;deft ; notational velocity for Emacs
|
||||
doom ; what makes DOOM look the way it does
|
||||
doom-dashboard ; a nifty splash screen for Emacs
|
||||
;;doom-dashboard ; a nifty splash screen for Emacs
|
||||
doom-quit ; DOOM quit-message prompts when you quit Emacs
|
||||
(emoji +unicode) ; 🙂
|
||||
;;fill-column ; a `fill-column' indicator
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
;(unpin! t)
|
||||
(package! flycheck-aspell)
|
||||
(package! async)
|
||||
(package! dashboard)
|
||||
(package! dired-open)
|
||||
(package! dmenu)
|
||||
(package! elfeed-goodies)
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
[xin_0]
|
||||
file=/home/dt/wallpapers/0015.jpg
|
||||
file=/home/dt/wallpapers/0103.jpg
|
||||
mode=0
|
||||
bgcolor=#000000
|
||||
|
||||
[xin_1]
|
||||
file=/home/dt/wallpapers/0015.jpg
|
||||
file=/home/dt/wallpapers/0103.jpg
|
||||
mode=0
|
||||
bgcolor=#000000
|
||||
|
||||
[xin_2]
|
||||
file=/home/dt/wallpapers/0015.jpg
|
||||
file=/home/dt/wallpapers/0103.jpg
|
||||
mode=0
|
||||
bgcolor=#000000
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
[geometry]
|
||||
posx=1928
|
||||
posy=28
|
||||
sizex=1900
|
||||
sizey=1040
|
||||
posx=1936
|
||||
posy=40
|
||||
sizex=932
|
||||
sizey=1020
|
||||
|
||||
[nitrogen]
|
||||
view=icon
|
||||
|
|
|
@ -19,11 +19,16 @@
|
|||
- [[#dashboard][DASHBOARD]]
|
||||
- [[#configuring-dashboard][Configuring Dashboard]]
|
||||
- [[#dashboard-in-emacsclient][Dashboard in Emacsclient]]
|
||||
- [[#elfeed][ELFEED]]
|
||||
- [[#evaluate-elisp-expressions][EVALUATE ELISP EXPRESSIONS]]
|
||||
- [[#file-manager-dired][FILE MANAGER (DIRED)]]
|
||||
- [[#keybindings-to-open-dired][Keybindings To Open Dired]]
|
||||
- [[#keybindings-within-dired][Keybindings Within Dired]]
|
||||
- [[#keybindings-for-peep-dired-mode][Keybindings For Peep-Dired-Mode]]
|
||||
- [[#finding-files][FINDING FILES]]
|
||||
- [[#files][FILES]]
|
||||
- [[#file-related-keybindings][File-related Keybindings]]
|
||||
- [[#installing-some-useful-file-related-modules][Installing Some Useful File-related Modules]]
|
||||
- [[#useful-file-functions][Useful File Functions]]
|
||||
- [[#fonts][FONTS]]
|
||||
- [[#setting-the-font-face][Setting The Font Face]]
|
||||
- [[#zooming-in-and-out][Zooming In and Out]]
|
||||
|
@ -47,6 +52,7 @@
|
|||
- [[#source-code-block-syntax-highlighting][Source Code Block Syntax Highlighting]]
|
||||
- [[#automatically-create-table-of-contents][Automatically Create Table of Contents]]
|
||||
- [[#projectile][PROJECTILE]]
|
||||
- [[#registers][REGISTERS]]
|
||||
- [[#scrolling][SCROLLING]]
|
||||
- [[#shells][SHELLS]]
|
||||
- [[#eshell][Eshell]]
|
||||
|
@ -140,6 +146,7 @@ This is an icon set that can be used with dashboard, dired, ibuffer and other Em
|
|||
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
|
||||
|
@ -162,10 +169,66 @@ Emacs Dashboard is an extensible startup screen showing you recent files, bookma
|
|||
|
||||
** Dashboard in Emacsclient
|
||||
This setting ensures that emacsclient always opens on *dashboard* rather than *scratch*.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq initial-buffer-choice (lambda () (get-buffer "*dashboard*")))
|
||||
#+end_src
|
||||
|
||||
* ELFEED
|
||||
An RSS newsfeed reader for Emacs.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package elfeed-goodies)
|
||||
(elfeed-goodies/setup)
|
||||
(setq elfeed-goodies/entry-pane-size 0.5)
|
||||
(add-hook 'elfeed-show-mode-hook 'visual-line-mode)
|
||||
(evil-define-key 'normal elfeed-show-mode-map
|
||||
(kbd "J") 'elfeed-goodies/split-show-next
|
||||
(kbd "K") 'elfeed-goodies/split-show-prev)
|
||||
(evil-define-key 'normal elfeed-search-mode-map
|
||||
(kbd "J") 'elfeed-goodies/split-show-next
|
||||
(kbd "K") 'elfeed-goodies/split-show-prev)
|
||||
(setq elfeed-feeds (quote
|
||||
(("https://www.reddit.com/r/linux.rss" reddit linux)
|
||||
("https://www.reddit.com/r/commandline.rss" reddit commandline)
|
||||
("https://www.reddit.com/r/distrotube.rss" reddit distrotube)
|
||||
("https://www.reddit.com/r/emacs.rss" reddit emacs)
|
||||
("https://www.gamingonlinux.com/article_rss.php" gaming linux)
|
||||
("https://hackaday.com/blog/feed/" hackaday linux)
|
||||
("https://opensource.com/feed" opensource linux)
|
||||
("https://linux.softpedia.com/backend.xml" softpedia linux)
|
||||
("https://itsfoss.com/feed/" itsfoss linux)
|
||||
("https://www.zdnet.com/topic/linux/rss.xml" zdnet linux)
|
||||
("https://www.phoronix.com/rss.php" phoronix linux)
|
||||
("http://feeds.feedburner.com/d0od" omgubuntu linux)
|
||||
("https://www.computerworld.com/index.rss" computerworld linux)
|
||||
("https://www.networkworld.com/category/linux/index.rss" networkworld linux)
|
||||
("https://www.techrepublic.com/rssfeeds/topic/open-source/" techrepublic linux)
|
||||
("https://betanews.com/feed" betanews linux)
|
||||
("http://lxer.com/module/newswire/headlines.rss" lxer linux)
|
||||
("https://distrowatch.com/news/dwd.xml" distrowatch linux))))
|
||||
#+end_src
|
||||
|
||||
* EVALUATE ELISP EXPRESSIONS
|
||||
I choose to use the format 'SPC e' plus 'key' for these (I also use 'SPC e' for 'eww' keybindings).
|
||||
|
||||
| COMMAND | DESCRIPTION | KEYBINDING |
|
||||
|-----------------+------------------------------------------------+------------|
|
||||
| eval-buffer | /Evaluate elisp in buffer/ | SPC e b |
|
||||
| eval-defun | /Evaluate the defun containing or after point/ | SPC e d |
|
||||
| eval-expression | /Evaluate an elisp expression/ | SPC e e |
|
||||
| eval-last-sexp | /Evaluate elisp expression before point/ | SPC e l |
|
||||
| eval-region | /Evaluate elisp in region/ | SPC e r |
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(nvmap :states '(normal visual) :keymaps 'override :prefix "SPC"
|
||||
"e b" '(eval-buffer :which-key "Eval elisp in buffer")
|
||||
"e d" '(eval-defun :which-key "Eval defun")
|
||||
"e e" '(eval-expression :which-key "Eval elisp expression")
|
||||
"e l" '(eval-last-sexp :which-key "Eval last sexression")
|
||||
"e r" '(eval-region :which-key "Eval region"))
|
||||
#+end_src
|
||||
|
||||
* FILE MANAGER (DIRED)
|
||||
Dired is the file manager within Emacs. Below, I setup keybindings for image previews (peep-dired). I've chosen the format of 'SPC d' plus 'key'.
|
||||
|
||||
|
@ -218,13 +281,54 @@ Dired is the file manager within Emacs. Below, I setup keybindings for image pr
|
|||
("mp4" . "mpv")))
|
||||
#+end_src
|
||||
|
||||
* FINDING FILES
|
||||
* FILES
|
||||
** File-related Keybindings
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(nvmap :states '(normal visual) :keymaps 'override :prefix "SPC"
|
||||
"." '(find-file :which-key "Find file")
|
||||
"f f" '(find-file :which-key "Find file")
|
||||
"f r" '(counsel-recentf :which-key "Recent files")
|
||||
"f s" '(save-buffer :which-key "Save file")
|
||||
"f u" '(sudo-edit-find-file :which-key "Sudo find file")
|
||||
"f y" '(dt/show-and-copy-buffer-path :which-key "Yank file path")
|
||||
"f C" '(copy-file :which-key "Copy file")
|
||||
"f D" '(delete-file :which-key "Delete file")
|
||||
"f R" '(rename-file :which-key "Rename file")
|
||||
"f S" '(write-file :which-key "Save file as...")
|
||||
"f U" '(sudo-edit :which-key "Sudo edit file"))
|
||||
#+end_src
|
||||
|
||||
** Installing Some Useful File-related Modules
|
||||
Though 'recentf' is one way to find recent files although I prefer using 'counsel-recentf'.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package recentf
|
||||
:config
|
||||
(recentf-mode))
|
||||
(use-package sudo-edit) ;; Utilities for opening files with sudo
|
||||
|
||||
#+end_src
|
||||
|
||||
** Useful File Functions
|
||||
#+begin_src emacs-lisp
|
||||
(defun dt/show-and-copy-buffer-path ()
|
||||
"Show and copy the full path to the current file in the minibuffer."
|
||||
(interactive)
|
||||
;; list-buffers-directory is the variable set in dired buffers
|
||||
(let ((file-name (or (buffer-file-name) list-buffers-directory)))
|
||||
(if file-name
|
||||
(message (kill-new file-name))
|
||||
(error "Buffer not visiting a file"))))
|
||||
(defun dt/show-buffer-path-name ()
|
||||
"Show the full path to the current file in the minibuffer."
|
||||
(interactive)
|
||||
(let ((file-name (buffer-file-name)))
|
||||
(if file-name
|
||||
(progn
|
||||
(message file-name)
|
||||
(kill-new file-name))
|
||||
(error "Buffer not visiting a file"))))
|
||||
#+end_src
|
||||
|
||||
* FONTS
|
||||
|
@ -278,9 +382,10 @@ General.el allows us to set keybindings. As a longtime Doom Emacs user, I have
|
|||
#+begin_src emacs-lisp
|
||||
(nvmap :states '(normal visual) :keymaps 'override :prefix "SPC"
|
||||
"SPC" '(counsel-M-x :which-key "M-x")
|
||||
"." '(find-file :which-key "Find file")
|
||||
"f r" '(counsel-recentf :which-key "Recent files")
|
||||
"c c" '(compile :which-key "Compile")
|
||||
"c C" '(recompile :which-key "Recompile")
|
||||
"h r r" '((lambda () (interactive) (load-file "~/.emacs.d/init.el")) :which-key "Reload emacs config")
|
||||
"m e" '(org-export-dispatch :which-key "Org export dispatch")
|
||||
"t t" '(toggle-truncate-lines :which-key "Toggle truncate lines"))
|
||||
#+end_src
|
||||
|
||||
|
@ -406,12 +511,10 @@ A git client for Emacs. Often cited as a killer feature for Emacs.
|
|||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package magit)
|
||||
(use-package magit-todos
|
||||
:config (magit-todos-mode))
|
||||
#+end_src
|
||||
|
||||
* ORG MODE
|
||||
Org Mode is THE killer feature within Emacs. But it does need some tweaking.
|
||||
Org Mode is =THE= killer feature within Emacs. But it does need some tweaking.
|
||||
|
||||
** Defining A Few Things
|
||||
#+begin_src emacs-lisp
|
||||
|
@ -431,7 +534,7 @@ Org Mode is THE killer feature within Emacs. But it does need some tweaking.
|
|||
#+end_src
|
||||
|
||||
** Enabling Org Bullets
|
||||
Org-bullets gives us attractive bullets rather asterisks.
|
||||
Org-bullets gives us attractive bullets rather than asterisks.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package org-bullets)
|
||||
|
@ -508,6 +611,11 @@ Toc-org helps you to have an up-to-date table of contents in org files without e
|
|||
:init (add-hook 'org-mode-hook 'toc-org-enable))
|
||||
#+end_src
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package ox-man
|
||||
:ensure nil)
|
||||
#+end_src
|
||||
|
||||
* PROJECTILE
|
||||
#+begin_src emacs-lisp
|
||||
(use-package projectile
|
||||
|
@ -515,6 +623,38 @@ Toc-org helps you to have an up-to-date table of contents in org files without e
|
|||
(projectile-global-mode 1))
|
||||
#+end_src
|
||||
|
||||
* REGISTERS
|
||||
Emacs registers are compartments where you can save text, rectangles and positions for later use. Once you save text or a rectangle in a register, you can copy it into the buffer once or many times; once you save a position in a register, you can jump back to that position once or many times. The default GNU Emacs keybindings for these commands (with the exception of counsel-register) involves 'C-x r' followed by one or more other keys. I wanted to make this a little more user friendly, so I chose to replace the 'C-x r' part of the key chords with 'SPC r'.
|
||||
|
||||
| COMMAND | DESCRIPTION | KEYBINDING |
|
||||
|----------------------------------+----------------------------------+------------|
|
||||
| copy-to-register | /Copy to register/ | SPC r c |
|
||||
| frameset-to-register | /Frameset to register/ | SPC r f |
|
||||
| insert-register | /Insert contents of register/ | SPC r i |
|
||||
| jump-to-register | /Jump to register/ | SPC r j |
|
||||
| list-registers | /List registers/ | SPC r l |
|
||||
| number-to-register | /Number to register/ | SPC r n |
|
||||
| counsel-register | /Interactively choose a register/ | SPC r r |
|
||||
| view-register | /View a register/ | SPC r v |
|
||||
| window-configuration-to-register | /Window configuration to register/ | SPC r w |
|
||||
| increment-register | /Increment register/ | SPC r + |
|
||||
| point-to-register | /Point to register/ | SPC r SPC |
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(nvmap :prefix "SPC"
|
||||
"r c" '(copy-to-register :which-key "Copy to register")
|
||||
"r f" '(frameset-to-register :which-key "Frameset to register")
|
||||
"r i" '(insert-register :which-key "Insert register")
|
||||
"r j" '(jump-to-register :which-key "Jump to register")
|
||||
"r l" '(list-registers :which-key "List registers")
|
||||
"r n" '(number-to-register :which-key "Number to register")
|
||||
"r r" '(counsel-register :which-key "Choose a register")
|
||||
"r v" '(view-register :which-key "View a register")
|
||||
"r w" '(window-configuration-to-register :which-key "Window configuration to register")
|
||||
"r +" '(increment-register :which-key "Increment register")
|
||||
"r SPC" '(point-to-register :which-key "Point to register"))
|
||||
#+end_src
|
||||
|
||||
* SCROLLING
|
||||
Emacs' default scrolling is annoying because of the sudden half-page jumps. Also, I wanted to adjust the scrolling speed.
|
||||
|
||||
|
@ -564,6 +704,7 @@ Vterm is a terminal emulator within Emacs. The 'shell-file-name' setting sets t
|
|||
* SPLITS AND WINDOW CONTROLS
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(winner-mode 1)
|
||||
(nvmap :prefix "SPC"
|
||||
;; Window splits
|
||||
"w c" '(evil-window-delete :which-key "Close window")
|
||||
|
@ -575,7 +716,10 @@ Vterm is a terminal emulator within Emacs. The 'shell-file-name' setting sets t
|
|||
"w j" '(evil-window-down :which-key "Window down")
|
||||
"w k" '(evil-window-up :which-key "Window up")
|
||||
"w l" '(evil-window-right :which-key "Window right")
|
||||
"w w" '(evil-window-next :which-key "Goto next window"))
|
||||
"w w" '(evil-window-next :which-key "Goto next window")
|
||||
;; winner mode
|
||||
"w <left>" '(winner-undo :which-key "Winner undo")
|
||||
"w <right>" '(winner-redo :which-key "Winner redo"))
|
||||
#+end_src
|
||||
|
||||
* THEME
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(package-selected-packages
|
||||
'(dired smex org-tempo all-the-icons-dired which-key vterm use-package toc-org projectile peep-dired org-bullets magit-todos magit-lfs ivy-rich ivy-posframe haskell-mode general evil-collection eshell-syntax-highlighting doom-themes doom-modeline dired-open dashboard counsel)))
|
||||
'(elfeed-goodies sudo-edit ox-man dired smex org-tempo all-the-icons-dired which-key vterm use-package toc-org projectile peep-dired org-bullets magit-todos magit-lfs ivy-rich ivy-posframe haskell-mode general evil-collection eshell-syntax-highlighting doom-themes doom-modeline dired-open dashboard counsel)))
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
|
|
|
@ -152,6 +152,7 @@ myStartupHook = do
|
|||
spawnOnce "nm-applet &"
|
||||
spawnOnce "volumeicon &"
|
||||
spawnOnce "trayer --edge top --align right --widthtype request --padding 6 --SetDockType true --SetPartialStrut true --expand true --monitor 1 --transparent true --alpha 0 --tint 0x282c34 --height 22 &"
|
||||
spawnOnce "conky -c $HOME/.config/conky/chimera.conkyrc" -- emacs daemon for the emacsclient
|
||||
spawnOnce "/usr/bin/emacs --daemon &" -- emacs daemon for the emacsclient
|
||||
-- spawnOnce "kak -d -s mysession &" -- kakoune daemon for better performance
|
||||
-- spawnOnce "urxvtd -q -o -f &" -- urxvt daemon for better performance
|
||||
|
@ -371,7 +372,7 @@ myManageHook :: XMonad.Query (Data.Monoid.Endo WindowSet)
|
|||
myManageHook = composeAll
|
||||
-- using 'doShift ( myWorkspaces !! 7)' sends program to workspace 8!
|
||||
-- I'm doing it this way because otherwise I would have to write out the full
|
||||
-- name of my workspaces, and the names would very long if using clickable workspaces.
|
||||
-- name of my workspaces and the names would be very long if using clickable workspaces.
|
||||
[ title =? "Mozilla Firefox" --> doShift ( myWorkspaces !! 1 )
|
||||
, className =? "mpv" --> doShift ( myWorkspaces !! 7 )
|
||||
, className =? "Gimp" --> doShift ( myWorkspaces !! 8 )
|
||||
|
@ -385,30 +386,30 @@ myManageHook = composeAll
|
|||
* Keybindings
|
||||
I am using the Xmonad.Util.EZConfig module which allows keybindings to be written in simpler, emacs-like format. The Super/Windows key is 'M' (the modkey). The ALT key is 'M1'. SHIFT is 'S' and CTR is 'C'.
|
||||
|
||||
| A FEW IMPORTANT KEYBINDINGS | ASSOCIATED ACTION |
|
||||
|-----------------------------+----------------------------------------------------------------------|
|
||||
| MODKEY + RETURN | opens terminal (alacritty is the terminal but can be easily changed) |
|
||||
| MODKEY + SHIFT + RETURN | opens run launcher (XMonad's shell xprompt) |
|
||||
| MODKEY + TAB | rotates through the available layouts |
|
||||
| MODKEY + SPACE | toggles fullscreen on/off (useful for watching videos) |
|
||||
| MODKEY + SHIFT + c | closes window with focus |
|
||||
| MODKEY + SHIFT + r | restarts xmonad |
|
||||
| MODKEY + SHIFT + q | quits xmonad |
|
||||
| MODKEY + 1-9 | switch focus to workspace (1-9) |
|
||||
| MODKEY + SHIFT + 1-9 | send focused window to workspace (1-9) |
|
||||
| MODKEY + j | windows focus down (switches focus between windows in the stack) |
|
||||
| MODKEY + k | windows focus up (switches focus between windows in the stack) |
|
||||
| MODKEY + SHIFT + j | windows swap down (swap windows in the stack) |
|
||||
| MODKEY + SHIFT + k | windows swap up (swap the windows in the stack) |
|
||||
| MODKEY + h | shrink window (decreases window width) |
|
||||
| MODKEY + l | expand window (increases window width) |
|
||||
| MODKEY + w | switches focus to monitor 1 |
|
||||
| MODKEY + e | switches focus to monitor 2 |
|
||||
| MODKEY + r | switches focus to monitor 3 |
|
||||
| MODKEY + period | switch focus to next monitor |
|
||||
| MODKEY + comma | switch focus to prev monitor |
|
||||
| MODKEY + SPACE | toggles fullscreen on/off (useful for watching videos) |
|
||||
| MODKEY + t | force floating window back into tiling |
|
||||
| A FEW KEYBINDINGS | ASSOCIATED ACTION |
|
||||
|-------------------------+--------------------------------------------------------------|
|
||||
| MODKEY + RETURN | opens terminal (alacritty) |
|
||||
| MODKEY + SHIFT + RETURN | opens run launcher (dmenu) |
|
||||
| MODKEY + TAB | rotates through the available layouts |
|
||||
| MODKEY + SPACE | toggles fullscreen on/off (useful for watching videos) |
|
||||
| MODKEY + SHIFT + c | closes window with focus |
|
||||
| MODKEY + SHIFT + r | restarts xmonad |
|
||||
| MODKEY + SHIFT + q | quits xmonad |
|
||||
| MODKEY + 1-9 | switch focus to workspace (1-9) |
|
||||
| MODKEY + SHIFT + 1-9 | send focused window to workspace (1-9) |
|
||||
| MODKEY + j | windows focus down (switches focus between windows in stack) |
|
||||
| MODKEY + k | windows focus up (switches focus between windows in stack) |
|
||||
| MODKEY + SHIFT + j | windows swap down (swap windows in the stack) |
|
||||
| MODKEY + SHIFT + k | windows swap up (swap the windows in the stack) |
|
||||
| MODKEY + h | shrink window (decreases window width) |
|
||||
| MODKEY + l | expand window (increases window width) |
|
||||
| MODKEY + w | switches focus to monitor 1 |
|
||||
| MODKEY + e | switches focus to monitor 2 |
|
||||
| MODKEY + r | switches focus to monitor 3 |
|
||||
| MODKEY + period | switch focus to next monitor |
|
||||
| MODKEY + comma | switch focus to prev monitor |
|
||||
| MODKEY + SPACE | toggles fullscreen on/off (useful for watching videos) |
|
||||
| MODKEY + t | force floating window back into tiling |
|
||||
|
||||
#+BEGIN_SRC haskell
|
||||
myKeys :: [(String, X ())]
|
||||
|
|
|
@ -107,6 +107,7 @@ myStartupHook = do
|
|||
spawnOnce "nm-applet &"
|
||||
spawnOnce "volumeicon &"
|
||||
spawnOnce "trayer --edge top --align right --widthtype request --padding 6 --SetDockType true --SetPartialStrut true --expand true --monitor 1 --transparent true --alpha 0 --tint 0x282c34 --height 22 &"
|
||||
spawnOnce "conky -c $HOME/.config/conky/chimera.conkyrc" -- emacs daemon for the emacsclient
|
||||
spawnOnce "/usr/bin/emacs --daemon &" -- emacs daemon for the emacsclient
|
||||
-- spawnOnce "kak -d -s mysession &" -- kakoune daemon for better performance
|
||||
-- spawnOnce "urxvtd -q -o -f &" -- urxvt daemon for better performance
|
||||
|
@ -301,7 +302,7 @@ myManageHook :: XMonad.Query (Data.Monoid.Endo WindowSet)
|
|||
myManageHook = composeAll
|
||||
-- using 'doShift ( myWorkspaces !! 7)' sends program to workspace 8!
|
||||
-- I'm doing it this way because otherwise I would have to write out the full
|
||||
-- name of my workspaces, and the names would very long if using clickable workspaces.
|
||||
-- name of my workspaces and the names would be very long if using clickable workspaces.
|
||||
[ title =? "Mozilla Firefox" --> doShift ( myWorkspaces !! 1 )
|
||||
, className =? "mpv" --> doShift ( myWorkspaces !! 7 )
|
||||
, className =? "Gimp" --> doShift ( myWorkspaces !! 8 )
|
||||
|
|
Loading…
Reference in New Issue