mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2023-02-13 20:55:19 -05:00
Minor edits
This commit is contained in:
parent
eac13c0169
commit
d94dcaed8e
9 changed files with 814 additions and 498 deletions
2
.bashrc
2
.bashrc
|
@ -204,3 +204,5 @@ alias rr='curl -s -L https://raw.githubusercontent.com/keroserene/rickrollrc/mas
|
|||
|
||||
### RANDOM COLOR SCRIPT ###
|
||||
/opt/shell-color-scripts/colorscript.sh random
|
||||
|
||||
source /home/dt/.config/broot/launcher/bash/br
|
||||
|
|
|
@ -239,8 +239,8 @@ globalkeys = my_table.join(
|
|||
{description = "surf web browser" , group = "gui apps" }),
|
||||
awful.key({ modkey, altkey }, "c", function () awful.util.spawn( terminal.." -e cmus" ) end,
|
||||
{description = "cmus" , group = "terminal apps" }),
|
||||
awful.key({ modkey, altkey }, "e", function () awful.util.spawn( terminal.." -e neomutt" ) end,
|
||||
{description = "neomutt email" , group = "terminal apps" }),
|
||||
awful.key({ modkey, altkey }, "e", function () awful.util.spawn( "emacsclient -a 'emacs' -c" ) end,
|
||||
{description = "emacs client" , group = "gui apps" }),
|
||||
awful.key({ modkey, altkey }, "f", function () awful.util.spawn( terminal.." -e sh ./.config/vifm/scripts/vifmrun" ) end,
|
||||
{description = "vifm" , group = "terminal apps" }),
|
||||
awful.key({ modkey, altkey }, "i", function () awful.util.spawn( terminal.." -e irssi" ) end,
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
c.aliases = {'q': 'quit', 'w': 'session-save', 'wq': 'quit --save'}
|
||||
|
||||
# Setting dark mode
|
||||
config.set("colors.webpage.darkmode.enabled", True)
|
||||
# config.set("colors.webpage.darkmode.enabled", True)
|
||||
|
||||
|
||||
# Which cookies to accept. With QtWebEngine, this setting also controls
|
||||
|
@ -371,3 +371,11 @@ config.bind('t', 'set-cmd-text -s :open -t')
|
|||
config.bind('xb', 'config-cycle statusbar.show always never')
|
||||
config.bind('xt', 'config-cycle tabs.show always never')
|
||||
config.bind('xx', 'config-cycle statusbar.show always never;; config-cycle tabs.show always never')
|
||||
|
||||
# Bindings for cycling through CSS stylesheets from Solarized Everything CSS:
|
||||
# https://github.com/alphapapa/solarized-everything-css
|
||||
config.bind(',ap', 'config-cycle content.user_stylesheets ~/solarized-everything-css/css/apprentice/apprentice-all-sites.css ""')
|
||||
config.bind(',dr', 'config-cycle content.user_stylesheets ~/solarized-everything-css/css/darculized/darculized-all-sites.css ""')
|
||||
config.bind(',gr', 'config-cycle content.user_stylesheets ~/solarized-everything-css/css/gruvbox/gruvbox-all-sites.css ""')
|
||||
config.bind(',sd', 'config-cycle content.user_stylesheets ~/solarized-everything-css/css/solarized-dark/solarized-dark-all-sites.css ""')
|
||||
config.bind(',sl', 'config-cycle content.user_stylesheets ~/solarized-everything-css/css/solarized-light/solarized-light-all-sites.css ""')
|
||||
|
|
|
@ -1,50 +1,9 @@
|
|||
(setq doom-font (font-spec :family "SauceCodePro Nerd Font" :size 15)
|
||||
doom-variable-pitch-font (font-spec :family "Ubuntu" :size 15)
|
||||
doom-big-font (font-spec :family "SauceCodePro Nerd Font" :size 24))
|
||||
(after! doom-themes
|
||||
(setq
|
||||
doom-themes-enable-bold t
|
||||
doom-themes-enable-italic t))
|
||||
|
||||
(setq doom-theme 'doom-one)
|
||||
(map! :leader
|
||||
:desc "Load new theme"
|
||||
"h t" #'counsel-load-theme)
|
||||
|
||||
(setq display-line-numbers-type t)
|
||||
(map! :leader
|
||||
:desc "Toggle truncate lines"
|
||||
"l t" #'toggle-truncate-lines)
|
||||
|
||||
(after! org
|
||||
(setq org-directory "~/Org/"
|
||||
org-agenda-files '("~/Org/agenda.org")
|
||||
org-default-notes-file (expand-file-name "notes.org" org-directory)
|
||||
org-ellipsis " ▼ "
|
||||
org-log-done 'time
|
||||
org-journal-dir "~/Org/journal/"
|
||||
org-journal-date-format "%B %d, %Y (%A)"
|
||||
org-journal-file-format "%Y-%m-%d.org"
|
||||
;; ex. of org-link-abbrev-alist in action
|
||||
;; [[arch-wiki:Name_of_Page][Description]]
|
||||
org-link-abbrev-alist
|
||||
'(("google" . "http://www.google.com/search?q=")
|
||||
("arch-wiki" . "https://wiki.archlinux.org/index.php/")
|
||||
("ddg" . "https://duckduckgo.com/?q=")
|
||||
("wiki" . "https://en.wikipedia.org/wiki/"))
|
||||
org-todo-keywords '((sequence "TODO(t)" "PROJ(p)" "VIDEO(v)" "WAIT(w)" "|" "DONE(d)" "CANCELLED(c)" )))
|
||||
;; Nicer bullets in org-mode
|
||||
(require 'org-bullets)
|
||||
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))))
|
||||
|
||||
(setq shell-file-name "/bin/fish")
|
||||
|
||||
(setq eshell-aliases-file "~/.doom.d/aliases")
|
||||
|
||||
(defun prefer-horizontal-split ()
|
||||
(set-variable 'split-height-threshold nil t)
|
||||
(set-variable 'split-width-threshold 40 t)) ; make this as low as needed
|
||||
(add-hook 'markdown-mode-hook 'prefer-horizontal-split)
|
||||
:desc "List bookmarks"
|
||||
"b L" #'list-bookmarks
|
||||
:leader
|
||||
:desc "Save current bookmarks to bookmark file"
|
||||
"b w" #'bookmark-save)
|
||||
|
||||
(setq centaur-tabs-set-bar 'over
|
||||
centaur-tabs-set-icons t
|
||||
|
@ -55,125 +14,34 @@
|
|||
centaur-tabs-modified-marker "•")
|
||||
(map! :leader
|
||||
:desc "Toggle tabs on/off"
|
||||
"t o" #'centaur-tabs-local-mode
|
||||
:leader
|
||||
:desc "Switch tab groups"
|
||||
"t s" #'centaur-tabs-counsel-switch-group
|
||||
:leader
|
||||
:desc "Toggle tab groups"
|
||||
"t t" #'centaur-tabs-toggle-groups
|
||||
:leader
|
||||
:desc "Kill all buffers in group"
|
||||
"t k" #'centaur-tabs-kill-all-buffer-in-current-group
|
||||
:leader
|
||||
:desc "Next tab"
|
||||
"t n" #'centaur-tabs-forward
|
||||
:leader
|
||||
:desc "Previous tab"
|
||||
"t p" #'centaur-tabs-backward)
|
||||
|
||||
(require 'ox-groff)
|
||||
"t c" #'centaur-tabs-local-mode)
|
||||
(evil-define-key 'normal centaur-tabs-mode-map (kbd "g <right>") 'centaur-tabs-forward ; default Doom binding is 'g t'
|
||||
(kbd "g <left>") 'centaur-tabs-backward ; default Doom binding is 'g T'
|
||||
(kbd "g <down>") 'centaur-tabs-forward-group
|
||||
(kbd "g <up>") 'centaur-tabs-backward-group)
|
||||
|
||||
(map! :leader
|
||||
:desc "Edit agenda file"
|
||||
"/ a" #'(lambda () (interactive) (find-file "~/Org/agenda.org")))
|
||||
(map! :leader
|
||||
:desc "Edit doom config.org"
|
||||
"/ c" #'(lambda () (interactive) (find-file "~/.doom.d/config.org")))
|
||||
(map! :leader
|
||||
:desc "Edit eshell aliases"
|
||||
"/ e" #'(lambda () (interactive) (find-file "~/.doom.d/aliases")))
|
||||
(map! :leader
|
||||
:desc "Edit doom init.el"
|
||||
"/ i" #'(lambda () (interactive) (find-file "~/.doom.d/init.el")))
|
||||
(map! :leader
|
||||
:desc "Edit doom packages.el"
|
||||
"/ p" #'(lambda () (interactive) (find-file "~/.doom.d/packages.el")))
|
||||
(map! :leader
|
||||
:desc "Ssh into distrotube.com"
|
||||
"/ s" #'(lambda () (interactive) (find-file "/scp:derek@distrotube.com")))
|
||||
|
||||
(map! :leader
|
||||
:desc "Ssh into distrotube.com"
|
||||
"\\ d" #'(lambda () (interactive) (find-file "/scp:derek@distrotube.com")))
|
||||
(map! :leader
|
||||
:desc "Ssh into my nextcloud"
|
||||
"\\ n" #'(lambda () (interactive) (find-file "/scp:derek@distrotube.net")))
|
||||
|
||||
(map!
|
||||
(:after dired
|
||||
(:map dired-mode-map
|
||||
:leader
|
||||
"l i" #'peep-dired
|
||||
)))
|
||||
:desc "Dired"
|
||||
"d d" #'dired
|
||||
:leader
|
||||
:desc "Dired jump to current"
|
||||
"d j" #'dired-jump
|
||||
(:after dired
|
||||
(:map dired-mode-map
|
||||
:leader
|
||||
:desc "Peep-dired image previews"
|
||||
"d p" #'peep-dired
|
||||
:leader
|
||||
:desc "Dired view file"
|
||||
"d v" #'dired-view-file)))
|
||||
(evil-define-key 'normal peep-dired-mode-map (kbd "j") 'peep-dired-next-file
|
||||
(kbd "k") 'peep-dired-prev-file)
|
||||
(add-hook 'peep-dired-hook 'evil-normalize-keymaps)
|
||||
|
||||
(after! neotree
|
||||
(setq neo-smart-open t
|
||||
neo-window-fixed-size nil))
|
||||
(after! doom-themes
|
||||
(setq doom-neotree-enable-variable-pitch t))
|
||||
|
||||
(require 'sublimity-scroll)
|
||||
(require 'sublimity-map)
|
||||
;; (require 'sublimity-attractive)
|
||||
(sublimity-mode 0)
|
||||
|
||||
(setq browse-url-browser-function 'eww-browse-url)
|
||||
|
||||
(use-package emms
|
||||
:ensure t
|
||||
:config
|
||||
(require 'emms-setup)
|
||||
(require 'emms-info)
|
||||
(require 'emms-cue)
|
||||
(require 'emms-mode-line)
|
||||
(require 'emms-playing-time)
|
||||
(setq emms-source-file-default-directory "~/Music/Non-Classical/70s-80s/")
|
||||
(setq emms-playlist-buffer-name "*Music*")
|
||||
(setq emms-info-asynchronously t)
|
||||
(unless (eq system-type 'windows-nt)
|
||||
(setq emms-source-file-directory-tree-function
|
||||
'emms-source-file-directory-tree-find))
|
||||
(emms-all)
|
||||
(emms-default-players)
|
||||
(emms-mode-line 1)
|
||||
(emms-playing-time 1))
|
||||
|
||||
(add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu4e")
|
||||
(require 'mu4e)
|
||||
(require 'smtpmail)
|
||||
(setq mu4e-get-mail-command "mbsync -c ~/.emacs.d/mu4e/.mbsyncrc -a"
|
||||
mu4e-update-interval 300
|
||||
user-mail-address "derek@distrotube.com"
|
||||
user-full-name "Derek Taylor"
|
||||
mu4e-compose-signature
|
||||
(concat
|
||||
"Derek Taylor\n"
|
||||
"http://www.youtube.com/DistroTube\n")
|
||||
message-send-mail-function 'smtpmail-send-it
|
||||
starttls-use-gnutls t
|
||||
smtpmail-starttls-credentials '(("smtp.1and1.com" 587 nil nil))
|
||||
smtpmail-auth-credentials '(("smtp.1and1.com" 587 "derek@distrotube.com" nil))
|
||||
smtpmail-default-smtp-server "smtp.1and1.com"
|
||||
smtpmail-smtp-server "smtp.1and1.com"
|
||||
smtpmail-smtp-service 587)
|
||||
(setq mu4e-sent-folder "/Sent"
|
||||
mu4e-drafts-folder "/Drafts"
|
||||
mu4e-trash-folder "/Trash"
|
||||
mu4e-refile-folder "/All Mail")
|
||||
(setq mu4e-maildir-shortcuts
|
||||
'(("/derek-distrotube/Inbox" . ?i)
|
||||
("/derek-distrotube/Sent" . ?s)
|
||||
("/derek-distrotube/All Mail" . ?a)
|
||||
("/derek-distrotube/Trash" . ?t)))
|
||||
|
||||
(after! mastodon
|
||||
(setq mastodon-instance-url "https://mastodon.technology/"))
|
||||
|
||||
(setq md4rd-subs-active '(archlinux commandline DistroTube DoomEmacs emacs freesoftware lbry linux linux4noobs linuxmasterrace linnuxquestions orgmode qutebrowser suckless Ubuntu unixporn UsabilityPorn vim xmonad))
|
||||
(setq doom-theme 'doom-one)
|
||||
(map! :leader
|
||||
:desc "Load new theme"
|
||||
"h t" #'counsel-load-theme)
|
||||
|
||||
(custom-set-variables
|
||||
'(elfeed-feeds
|
||||
|
@ -193,3 +61,236 @@
|
|||
("https://betanews.com/feed" betanews linux)
|
||||
("http://lxer.com/module/newswire/headlines.rss" lxer linux)
|
||||
("https://distrowatch.com/news/dwd.xml" distrowatch linux)))))
|
||||
|
||||
(require 'emms-setup)
|
||||
(require 'emms-info)
|
||||
(require 'emms-cue)
|
||||
(require 'emms-mode-line)
|
||||
(require 'emms-playing-time)
|
||||
(emms-all)
|
||||
(emms-default-players)
|
||||
(emms-mode-line 1)
|
||||
(emms-playing-time 1)
|
||||
(setq emms-source-file-default-directory "~/Music/Non-Classical/70s-80s/"
|
||||
emms-playlist-buffer-name "*Music*"
|
||||
emms-info-asynchronously t
|
||||
emms-source-file-directory-tree-function 'emms-source-file-directory-tree-find)
|
||||
(map! :leader
|
||||
:desc "Go to emms playlist"
|
||||
"a a" #'emms-playlist-mode-go
|
||||
:leader
|
||||
:desc "Emms pause track"
|
||||
"a x" #'emms-pause
|
||||
:leader
|
||||
:desc "Emms stop track"
|
||||
"a s" #'emms-stop
|
||||
:leader
|
||||
:desc "Emms play previous track"
|
||||
"a p" #'emms-previous
|
||||
:leader
|
||||
:desc "Emms play next track"
|
||||
"a n" #'emms-next)
|
||||
|
||||
(map! :leader
|
||||
:desc "Evaluate elisp in buffer"
|
||||
"e b" #'eval-buffer
|
||||
:leader
|
||||
:desc "Evaluate defun"
|
||||
"e d" #'eval-defun
|
||||
:leader
|
||||
:desc "Evaluate elisp expression"
|
||||
"e e" #'eval-expression
|
||||
:leader
|
||||
:desc "Evaluate last sexpression"
|
||||
"e l" #'eval-last-sexp
|
||||
:leader
|
||||
:desc "Evaluate elisp in region"
|
||||
"e r" #'eval-region)
|
||||
|
||||
(setq browse-url-browser-function 'eww-browse-url)
|
||||
(map! :leader
|
||||
:desc "Eww web browser"
|
||||
"e w" #'eww
|
||||
:leader
|
||||
:desc "Eww reload page"
|
||||
"e R" #'eww-reload
|
||||
:leader
|
||||
:desc "Search web for text between BEG/END"
|
||||
"s w" #'eww-search-words)
|
||||
|
||||
(setq doom-font (font-spec :family "SauceCodePro Nerd Font Mono" :size 15)
|
||||
doom-variable-pitch-font (font-spec :family "Ubuntu" :size 15)
|
||||
doom-big-font (font-spec :family "SauceCodePro Nerd Font Mono" :size 24))
|
||||
(after! doom-themes
|
||||
(setq doom-themes-enable-bold t
|
||||
doom-themes-enable-italic t))
|
||||
(custom-set-faces!
|
||||
'(font-lock-comment-face :slant italic)
|
||||
'(font-lock-keyword-face :slant italic))
|
||||
|
||||
(map! :leader
|
||||
:desc "Ivy push view"
|
||||
"v p" #'ivy-push-view
|
||||
:leader
|
||||
:desc "Ivy switch view"
|
||||
"v s" #'ivy-switch-view)
|
||||
|
||||
(setq display-line-numbers-type t)
|
||||
(map! :leader
|
||||
:desc "Toggle truncate lines"
|
||||
"t t" #'toggle-truncate-lines)
|
||||
|
||||
(require 'ox-groff)
|
||||
|
||||
(after! mastodon
|
||||
(setq mastodon-instance-url "https://mastodon.technology/"))
|
||||
|
||||
(setq md4rd-subs-active '(archlinux commandline DistroTube DoomEmacs emacs freesoftware lbry linux linux4noobs linuxmasterrace linnuxquestions orgmode qutebrowser suckless Ubuntu unixporn UsabilityPorn vim xmonad))
|
||||
|
||||
(add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu4e")
|
||||
(require 'mu4e)
|
||||
(require 'smtpmail)
|
||||
(setq mu4e-get-mail-command "mbsync -c ~/.emacs.d/mu4e/.mbsyncrc -a"
|
||||
mu4e-update-interval 300
|
||||
user-mail-address "derek@distrotube.com"
|
||||
user-full-name "Derek Taylor"
|
||||
mu4e-compose-signature
|
||||
(concat
|
||||
"Derek Taylor\n"
|
||||
"http://www.youtube.com/DistroTube\n")
|
||||
message-send-mail-function 'smtpmail-send-it
|
||||
starttls-use-gnutls t
|
||||
smtpmail-starttls-credentials '(("smtp.1and1.com" 587 nil nil))
|
||||
smtpmail-auth-credentials '(("smtp.1and1.com" 587 "derek@distrotube.com" nil))
|
||||
smtpmail-default-smtp-server "smtp.1and1.com"
|
||||
smtpmail-smtp-server "smtp.1and1.com"
|
||||
smtpmail-smtp-service 587
|
||||
mu4e-sent-folder "/Sent"
|
||||
mu4e-drafts-folder "/Drafts"
|
||||
mu4e-trash-folder "/Trash"
|
||||
mu4e-refile-folder "/All Mail"
|
||||
mu4e-maildir-shortcuts
|
||||
'(("/derek-distrotube/Inbox" . ?i)
|
||||
("/derek-distrotube/Sent" . ?s)
|
||||
("/derek-distrotube/All Mail" . ?a)
|
||||
("/derek-distrotube/Trash" . ?t)))
|
||||
|
||||
(after! neotree
|
||||
(setq neo-smart-open t
|
||||
neo-window-fixed-size nil))
|
||||
(after! doom-themes
|
||||
(setq doom-neotree-enable-variable-pitch t))
|
||||
(map! :leader
|
||||
:desc "Toggle neotree file viewer"
|
||||
"t n" #'toggle-neotree)
|
||||
|
||||
(map! :leader
|
||||
:desc "Edit agenda file"
|
||||
"/ a" #'(lambda () (interactive) (find-file "~/Org/agenda.org"))
|
||||
:leader
|
||||
:desc "Edit doom config.org"
|
||||
"/ c" #'(lambda () (interactive) (find-file "~/.doom.d/config.org"))
|
||||
:leader
|
||||
:desc "Edit eshell aliases"
|
||||
"/ e" #'(lambda () (interactive) (find-file "~/.doom.d/aliases"))
|
||||
:leader
|
||||
:desc "Edit doom init.el"
|
||||
"/ i" #'(lambda () (interactive) (find-file "~/.doom.d/init.el"))
|
||||
:leader
|
||||
:desc "Edit doom packages.el"
|
||||
"/ p" #'(lambda () (interactive) (find-file "~/.doom.d/packages.el")))
|
||||
|
||||
(after! org
|
||||
(require 'org-bullets) ; Nicer bullets in org-mode
|
||||
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
|
||||
(setq org-directory "~/Org/"
|
||||
org-agenda-files '("~/Org/agenda.org")
|
||||
org-default-notes-file (expand-file-name "notes.org" org-directory)
|
||||
org-ellipsis " ▼ "
|
||||
org-log-done 'time
|
||||
org-journal-dir "~/Org/journal/"
|
||||
org-journal-date-format "%B %d, %Y (%A)"
|
||||
org-journal-file-format "%Y-%m-%d.org"
|
||||
org-hide-emphasis-markers t
|
||||
;; ex. of org-link-abbrev-alist in action
|
||||
;; [[arch-wiki:Name_of_Page][Description]]
|
||||
org-link-abbrev-alist ; This overwrites the default Doom org-link-abbrev-list
|
||||
'(("google" . "http://www.google.com/search?q=")
|
||||
("arch-wiki" . "https://wiki.archlinux.org/index.php/")
|
||||
("ddg" . "https://duckduckgo.com/?q=")
|
||||
("wiki" . "https://en.wikipedia.org/wiki/"))
|
||||
org-todo-keywords ; This overwrites the default Doom org-todo-keywords
|
||||
'((sequence
|
||||
"TODO(t)" ; A task that is ready to be tackled
|
||||
"BLOG(b)" ; Blog writing assignments
|
||||
"GYM(g)" ; Things to accomplish at the gym
|
||||
"PROJ(p)" ; A project that contains other tasks
|
||||
"VIDEO(v)" ; Video assignments
|
||||
"WAIT(w)" ; Something is holding up this task
|
||||
"|" ; The pipe necessary to separate "active" states and "inactive" states
|
||||
"DONE(d)" ; Task has been completed
|
||||
"CANCELLED(c)" )))) ; Task has been cancelled
|
||||
|
||||
(map! :leader
|
||||
:desc "Copy to register"
|
||||
"r c" #'copy-to-register
|
||||
:leader
|
||||
:desc "Frameset to register"
|
||||
"r f" #'frameset-to-register
|
||||
:leader
|
||||
:desc "Insert contents of register"
|
||||
"r i" #'insert-register
|
||||
:leader
|
||||
:desc "Jump to register"
|
||||
"r j" #'jump-to-register
|
||||
:leader
|
||||
:desc "List registers"
|
||||
"r l" #'list-registers
|
||||
:leader
|
||||
:desc "Number to register"
|
||||
"r n" #'number-to-register
|
||||
:leader
|
||||
:desc "Interactively choose a register"
|
||||
"r r" #'counsel-register
|
||||
:leader
|
||||
:desc "View a register"
|
||||
"r v" #'view-register
|
||||
:leader
|
||||
:desc "Window configuration to register"
|
||||
"r w" #'window-configuration-to-register
|
||||
:leader
|
||||
:desc "Increment register"
|
||||
"r +" #'increment-register
|
||||
:leader
|
||||
:desc "Point to register"
|
||||
"r SPC" #'point-to-register)
|
||||
|
||||
(map! :leader
|
||||
:desc "Ssh into distrotube.com"
|
||||
"\\ d" #'(lambda () (interactive) (find-file "/scp:derek@distrotube.com"))
|
||||
:leader
|
||||
:desc "Ssh into my nextcloud"
|
||||
"\\ n" #'(lambda () (interactive) (find-file "/scp:derek@distrotube.net")))
|
||||
|
||||
(setq shell-file-name "/bin/fish"
|
||||
eshell-aliases-file "~/.doom.d/aliases")
|
||||
|
||||
(defun prefer-horizontal-split ()
|
||||
(set-variable 'split-height-threshold nil t)
|
||||
(set-variable 'split-width-threshold 40 t)) ; make this as low as needed
|
||||
(add-hook 'markdown-mode-hook 'prefer-horizontal-split)
|
||||
(map! :leader
|
||||
:desc "Clone indirect buffer other window"
|
||||
"b c" #'clone-indirect-buffer-other-window)
|
||||
|
||||
(require 'sublimity-scroll)
|
||||
(require 'sublimity-map)
|
||||
(require 'sublimity-attractive)
|
||||
(sublimity-mode 0)
|
||||
|
||||
(map! :leader
|
||||
:desc "Winner redo"
|
||||
"w <right>" #'winner-redo
|
||||
:leader
|
||||
:desc "Winner undo"
|
||||
"w <left>" #'winner-undo)
|
||||
|
|
|
@ -1,103 +1,60 @@
|
|||
#+TITLE: DT's Doom Emacs Config
|
||||
#+AUTHOR: Derek Taylor (DT)
|
||||
#+DESCRIPTION: DT's personal Doom Emacs config.
|
||||
#+STARTUP: showeverything
|
||||
|
||||
* FONTS
|
||||
Doom exposes five (optional) variables for controlling fonts in Doom. Here
|
||||
are the three important ones:
|
||||
+ `doom-font' -- standard monospace font that is used for most things in 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.
|
||||
* TABLE OF CONTENTS :toc:
|
||||
- [[#about-this-config][ABOUT THIS CONFIG]]
|
||||
- [[#bookmarks-and-buffers][BOOKMARKS AND BUFFERS]]
|
||||
- [[#centaur-tabs][CENTAUR-TABS]]
|
||||
- [[#dired][DIRED]]
|
||||
- [[#doom-theme][DOOM THEME]]
|
||||
- [[#elfeed][ELFEED]]
|
||||
- [[#emms][EMMS]]
|
||||
- [[#evaluate-elisp-expressions][EVALUATE ELISP EXPRESSIONS]]
|
||||
- [[#eww][EWW]]
|
||||
- [[#fonts][FONTS]]
|
||||
- [[#ivy][IVY]]
|
||||
- [[#line-settings][LINE SETTINGS]]
|
||||
- [[#manpages][MANPAGES]]
|
||||
- [[#mastodon][MASTODON]]
|
||||
- [[#md4rd][MD4RD]]
|
||||
- [[#mu4e][MU4E]]
|
||||
- [[#neotree][NEOTREE]]
|
||||
- [[#open-specific-files][OPEN SPECIFIC FILES]]
|
||||
- [[#org-mode][ORG MODE]]
|
||||
- [[#registers][REGISTERS]]
|
||||
- [[#remote-connections][REMOTE CONNECTIONS]]
|
||||
- [[#shells][SHELLS]]
|
||||
- [[#splits][SPLITS]]
|
||||
- [[#sublimity][SUBLIMITY]]
|
||||
- [[#winner-mode][WINNER MODE]]
|
||||
|
||||
* ABOUT THIS CONFIG
|
||||
This is my personal Doom Emacs config. Doom Emacs is a distribution of Emacs that uses the "evil" keybindings (Vim keybindings) and includes a number of nice extensions and a bit of configuration out of the box. I am maintaing this config not just for myself, but also for those that want to explore some of what is possible with Emacs. I will add a lot of examples of plugins and settings, some of them I may not even use personally. I do this because many people following me on YouTube look at my configs as "documentation".
|
||||
|
||||
* BOOKMARKS AND BUFFERS
|
||||
Doom Emacs uses 'SPC b' for keybindings related to bookmarks and buffers. Bookmarks are somewhat like registers in that they record positions you can jump to. Unlike registers, they have long names, and they persist automatically from one Emacs session to the next. The prototypical use of bookmarks is to record where you were reading in various files. Regarding /buffers/, the text you are editing in Emacs resides in an object called a /buffer/. Each time you visit a file, a buffer is used to hold the file’s text. Each time you invoke Dired, a buffer is used to hold the directory listing.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq doom-font (font-spec :family "SauceCodePro Nerd Font" :size 15)
|
||||
doom-variable-pitch-font (font-spec :family "Ubuntu" :size 15)
|
||||
doom-big-font (font-spec :family "SauceCodePro Nerd Font" :size 24))
|
||||
(after! doom-themes
|
||||
(setq
|
||||
doom-themes-enable-bold t
|
||||
doom-themes-enable-italic t))
|
||||
#+END_SRC
|
||||
|
||||
* DOOM THEME
|
||||
Setting the theme to doom-one. To try out new themes, I set a keybinding for counsel-load-theme with SPC-h-t.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq doom-theme 'doom-one)
|
||||
(map! :leader
|
||||
:desc "Load new theme"
|
||||
"h t" #'counsel-load-theme)
|
||||
:desc "List bookmarks"
|
||||
"b L" #'list-bookmarks
|
||||
:leader
|
||||
:desc "Save current bookmarks to bookmark file"
|
||||
"b w" #'bookmark-save)
|
||||
#+END_SRC
|
||||
|
||||
* LINE SETTINGS
|
||||
I have toggled display-line-numbers-type so I have line numbers displayed. I also set a keybinding to be able to toggle-truncate-lines with SPC-l-t.
|
||||
* CENTAUR-TABS
|
||||
To use tabs in Doom Emacs, be sure to uncomment "tabs" in Doom's init.el. Displays tabs at the top of the window similar to tabbed web browsers such as Firefox. I don't actually use tabs in Emacs. I placed this in my config to help others who may want tabs. In the default configuration of Doom Emacs, 'SPC t' is used for "toggle" keybindings, so I choose 'SPC t c' to toggle centaur-tabs. The "g" prefix for keybindings is used for a bunch of evil keybindings in Doom, but "g" plus the arrow keys were not used, so I thought I would bind those for tab navigation. But I did leave the default "g t" and "g T" intact if you prefer to use those for centaur-tabs-forward/backward.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq display-line-numbers-type t)
|
||||
(map! :leader
|
||||
:desc "Toggle truncate lines"
|
||||
"l t" #'toggle-truncate-lines)
|
||||
#+END_SRC
|
||||
|
||||
* ORG MODE
|
||||
Note that I wrapped most of this in (after! org). Without this, my settings might be evaluated too early, which will result in my settings being overwritten by Doom's defaults. I have also enabled org-journal by adding (+journal) to the org section of Doom Emacs' init.el.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(after! org
|
||||
(setq org-directory "~/Org/"
|
||||
org-agenda-files '("~/Org/agenda.org")
|
||||
org-default-notes-file (expand-file-name "notes.org" org-directory)
|
||||
org-ellipsis " ▼ "
|
||||
org-log-done 'time
|
||||
org-journal-dir "~/Org/journal/"
|
||||
org-journal-date-format "%B %d, %Y (%A)"
|
||||
org-journal-file-format "%Y-%m-%d.org"
|
||||
;; ex. of org-link-abbrev-alist in action
|
||||
;; [[arch-wiki:Name_of_Page][Description]]
|
||||
org-link-abbrev-alist
|
||||
'(("google" . "http://www.google.com/search?q=")
|
||||
("arch-wiki" . "https://wiki.archlinux.org/index.php/")
|
||||
("ddg" . "https://duckduckgo.com/?q=")
|
||||
("wiki" . "https://en.wikipedia.org/wiki/"))
|
||||
org-todo-keywords '((sequence "TODO(t)" "PROJ(p)" "VIDEO(v)" "WAIT(w)" "|" "DONE(d)" "CANCELLED(c)" )))
|
||||
;; Nicer bullets in org-mode
|
||||
(require 'org-bullets)
|
||||
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))))
|
||||
#+END_SRC
|
||||
|
||||
* SHELLS
|
||||
The =inferior shell= is what you get when you run M-x shell. It is a wrapper around your default shell. It is governed by explicit-shell-file-name, the ESHELL environment variable or shell-file-name, in that order. Below, I demonstrate how to change shell to use fish even though the default shell may be something else. This will also make M-x term and M-x ansi-term default to fish, though it asks you to confirm before it launches.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq shell-file-name "/bin/fish")
|
||||
#+END_SRC
|
||||
|
||||
Sets the file for where I place my eshell aliases.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq eshell-aliases-file "~/.doom.d/aliases")
|
||||
#+END_SRC
|
||||
|
||||
* SPLITS
|
||||
Force splits to open on the right
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun prefer-horizontal-split ()
|
||||
(set-variable 'split-height-threshold nil t)
|
||||
(set-variable 'split-width-threshold 40 t)) ; make this as low as needed
|
||||
(add-hook 'markdown-mode-hook 'prefer-horizontal-split)
|
||||
#+END_SRC
|
||||
|
||||
* TABS (centaur-tabs)
|
||||
To use tabs in Doom Emacs, be sure to uncomment "tabs" in Doom's init.el. Displays tabs at the top of the window similar to tabbed web browsers such as Firefox. I don't actually use tabs in Emacs. I placed this in my config to help others who may want tabs. In the default configuration of Doom Emacs, there are just a few keybindings that use SPC-t, so it wasn't too difficult to find appropriate keybindings using that prefix for "tabs".
|
||||
| COMMAND | DESCRIPTION | KEYBINDING |
|
||||
|-----------------------------------------------+---------------------------+------------|
|
||||
| centaur-tabs-local-mode | Toggle tabs on/off | SPC-t-o |
|
||||
| centaur-tabs-counsel-switch-group | Switch tab groups | SPC-t-s |
|
||||
| centaur-tabs-toggle-groups | Toggle tab groups | SPC-t-t |
|
||||
| centaur-tabs-kill-all-buffer-in-current-group | Kill all buffers in group | SPC-t-k |
|
||||
| centaur-tabs-forward | Next tab | SPC-t-n |
|
||||
| centaur-tabs-backward | Previous tab | SPC-t-k |
|
||||
| COMMAND | DESCRIPTION | KEYBINDING |
|
||||
|-----------------------------+--------------------+------------------|
|
||||
| centaur-tabs-local-mode | Toggle tabs on/off | SPC t c |
|
||||
| centaur-tabs-forward | Next tab | g <right> or g t |
|
||||
| centaur-tabs-backward | Previous tab | g <left> or g T |
|
||||
| centaur-tabs-forward-group | Next tab group | g <down> |
|
||||
| centaur-tabs-backward-group | Previous tab group | g <up> |
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq centaur-tabs-set-bar 'over
|
||||
|
@ -109,195 +66,56 @@ To use tabs in Doom Emacs, be sure to uncomment "tabs" in Doom's init.el. Displ
|
|||
centaur-tabs-modified-marker "•")
|
||||
(map! :leader
|
||||
:desc "Toggle tabs on/off"
|
||||
"t o" #'centaur-tabs-local-mode
|
||||
:leader
|
||||
:desc "Switch tab groups"
|
||||
"t s" #'centaur-tabs-counsel-switch-group
|
||||
:leader
|
||||
:desc "Toggle tab groups"
|
||||
"t t" #'centaur-tabs-toggle-groups
|
||||
:leader
|
||||
:desc "Kill all buffers in group"
|
||||
"t k" #'centaur-tabs-kill-all-buffer-in-current-group
|
||||
:leader
|
||||
:desc "Next tab"
|
||||
"t n" #'centaur-tabs-forward
|
||||
:leader
|
||||
:desc "Previous tab"
|
||||
"t p" #'centaur-tabs-backward)
|
||||
"t c" #'centaur-tabs-local-mode)
|
||||
(evil-define-key 'normal centaur-tabs-mode-map (kbd "g <right>") 'centaur-tabs-forward ; default Doom binding is 'g t'
|
||||
(kbd "g <left>") 'centaur-tabs-backward ; default Doom binding is 'g T'
|
||||
(kbd "g <down>") 'centaur-tabs-forward-group
|
||||
(kbd "g <up>") 'centaur-tabs-backward-group)
|
||||
#+END_SRC
|
||||
|
||||
* MANPAGES
|
||||
* 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'.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(require 'ox-groff)
|
||||
#+END_SRC
|
||||
|
||||
* OPEN SPECIFIC FILES
|
||||
Keybindings to open files that I work with all the time using the find-file command, which is the interactive file search you see using C-x C-f in vanilla Emacs or SPC-f-f in Doom Emacs. These keybindings use find-file non-interactively since we specify exactly what file to open. By default, Doom Emacs does not use SPC-/, so the format I use for these bindings is SPC-/ plus "key".
|
||||
|
||||
| PATH TO FILE | DESCRIPTION | KEYBINDING |
|
||||
|------------------------+-------------------------+------------|
|
||||
| ~/Org/agenda.org | Edit agenda file | SPC-/-a |
|
||||
| ~/.doom.d/config.org" | Edit doom config.org | SPC-/-c |
|
||||
| ~/.doom.d/aliases" | Edit eshell aliases | SPC-/-e |
|
||||
| ~/.doom.d/init.el" | Edit doom init.el | SPC-/-i |
|
||||
| ~/.doom.d/packages.el" | Edit doom packages.el | SPC-/-p |
|
||||
| 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 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 |
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(map! :leader
|
||||
:desc "Edit agenda file"
|
||||
"/ a" #'(lambda () (interactive) (find-file "~/Org/agenda.org")))
|
||||
(map! :leader
|
||||
:desc "Edit doom config.org"
|
||||
"/ c" #'(lambda () (interactive) (find-file "~/.doom.d/config.org")))
|
||||
(map! :leader
|
||||
:desc "Edit eshell aliases"
|
||||
"/ e" #'(lambda () (interactive) (find-file "~/.doom.d/aliases")))
|
||||
(map! :leader
|
||||
:desc "Edit doom init.el"
|
||||
"/ i" #'(lambda () (interactive) (find-file "~/.doom.d/init.el")))
|
||||
(map! :leader
|
||||
:desc "Edit doom packages.el"
|
||||
"/ p" #'(lambda () (interactive) (find-file "~/.doom.d/packages.el")))
|
||||
(map! :leader
|
||||
:desc "Ssh into distrotube.com"
|
||||
"/ s" #'(lambda () (interactive) (find-file "/scp:derek@distrotube.com")))
|
||||
#+END_SRC
|
||||
|
||||
* REMOTE CONNECTIONS
|
||||
Keybindings for ssh'ing into remote machines. By default, Doom Emacs does not use SPC-\, so the format I use for these bindings is SPC-\ plus "key".
|
||||
|
||||
| DESCRIPTION | KEYBINDING |
|
||||
|-------------------------+------------|
|
||||
| Ssh into distrotube.com | SPC-\-d |
|
||||
| Ssh into my nextcloud | SPC-\-n |
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(map! :leader
|
||||
:desc "Ssh into distrotube.com"
|
||||
"\\ d" #'(lambda () (interactive) (find-file "/scp:derek@distrotube.com")))
|
||||
(map! :leader
|
||||
:desc "Ssh into my nextcloud"
|
||||
"\\ n" #'(lambda () (interactive) (find-file "/scp:derek@distrotube.net")))
|
||||
#+END_SRC
|
||||
|
||||
* FILE MANAGER (dired)
|
||||
Image previews in dired
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(map!
|
||||
(:after dired
|
||||
(:map dired-mode-map
|
||||
:leader
|
||||
"l i" #'peep-dired
|
||||
)))
|
||||
:desc "Dired"
|
||||
"d d" #'dired
|
||||
:leader
|
||||
:desc "Dired jump to current"
|
||||
"d j" #'dired-jump
|
||||
(:after dired
|
||||
(:map dired-mode-map
|
||||
:leader
|
||||
:desc "Peep-dired image previews"
|
||||
"d p" #'peep-dired
|
||||
:leader
|
||||
:desc "Dired view file"
|
||||
"d v" #'dired-view-file)))
|
||||
(evil-define-key 'normal peep-dired-mode-map (kbd "j") 'peep-dired-next-file
|
||||
(kbd "k") 'peep-dired-prev-file)
|
||||
(add-hook 'peep-dired-hook 'evil-normalize-keymaps)
|
||||
#+END_SRC
|
||||
|
||||
* FILE TREE VIEWER (Neotree)
|
||||
When you open neotree, it jumps to the current file thanks to neo-smart-open. The neo-window-fixed-size setting makes the neotree width be adjustable.
|
||||
* DOOM THEME
|
||||
Setting the theme to doom-one. To try out new themes, I set a keybinding for counsel-load-theme with 'SPC h t'.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(after! neotree
|
||||
(setq neo-smart-open t
|
||||
neo-window-fixed-size nil))
|
||||
(after! doom-themes
|
||||
(setq doom-neotree-enable-variable-pitch t))
|
||||
(setq doom-theme 'doom-one)
|
||||
(map! :leader
|
||||
:desc "Load new theme"
|
||||
"h t" #'counsel-load-theme)
|
||||
#+END_SRC
|
||||
|
||||
* SUBLIMITY
|
||||
The sublimity extension offers Sublime-like smooth scrolling and an experimental minimap. You can also require sublimity-attractive if you want to center everything for a distraction-free mode. I do not use this extension, hence the reason I have sublimity-mode set to 0. Set this to 1 to enable it.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(require 'sublimity-scroll)
|
||||
(require 'sublimity-map)
|
||||
;; (require 'sublimity-attractive)
|
||||
(sublimity-mode 0)
|
||||
#+END_SRC
|
||||
|
||||
* BROWSER (eww)
|
||||
Set urls to open in a specific browser. I set this to use Emacs' own browser (eww).
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq browse-url-browser-function 'eww-browse-url)
|
||||
#+END_SRC
|
||||
|
||||
* AUDIO PLAYER (emms)
|
||||
One of the media players available for Emacs is emms, which stands for Emacs Multimedia System.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package emms
|
||||
:ensure t
|
||||
:config
|
||||
(require 'emms-setup)
|
||||
(require 'emms-info)
|
||||
(require 'emms-cue)
|
||||
(require 'emms-mode-line)
|
||||
(require 'emms-playing-time)
|
||||
(setq emms-source-file-default-directory "~/Music/Non-Classical/70s-80s/")
|
||||
(setq emms-playlist-buffer-name "*Music*")
|
||||
(setq emms-info-asynchronously t)
|
||||
(unless (eq system-type 'windows-nt)
|
||||
(setq emms-source-file-directory-tree-function
|
||||
'emms-source-file-directory-tree-find))
|
||||
(emms-all)
|
||||
(emms-default-players)
|
||||
(emms-mode-line 1)
|
||||
(emms-playing-time 1))
|
||||
#+END_SRC
|
||||
|
||||
* EMAIL CLIENT (mu4e)
|
||||
Setting up mu4e which is an email client that works within emacs. You must install mu4e and mbsync through your Linux distribution's package manager. Setting up smtp for sending mail. Make sure the gnutls command line utils are installed. Package 'gnutls-bin' in Debian/Ubuntu, and 'gnutls' in Arch.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu4e")
|
||||
(require 'mu4e)
|
||||
(require 'smtpmail)
|
||||
(setq mu4e-get-mail-command "mbsync -c ~/.emacs.d/mu4e/.mbsyncrc -a"
|
||||
mu4e-update-interval 300
|
||||
user-mail-address "derek@distrotube.com"
|
||||
user-full-name "Derek Taylor"
|
||||
mu4e-compose-signature
|
||||
(concat
|
||||
"Derek Taylor\n"
|
||||
"http://www.youtube.com/DistroTube\n")
|
||||
message-send-mail-function 'smtpmail-send-it
|
||||
starttls-use-gnutls t
|
||||
smtpmail-starttls-credentials '(("smtp.1and1.com" 587 nil nil))
|
||||
smtpmail-auth-credentials '(("smtp.1and1.com" 587 "derek@distrotube.com" nil))
|
||||
smtpmail-default-smtp-server "smtp.1and1.com"
|
||||
smtpmail-smtp-server "smtp.1and1.com"
|
||||
smtpmail-smtp-service 587)
|
||||
(setq mu4e-sent-folder "/Sent"
|
||||
mu4e-drafts-folder "/Drafts"
|
||||
mu4e-trash-folder "/Trash"
|
||||
mu4e-refile-folder "/All Mail")
|
||||
(setq mu4e-maildir-shortcuts
|
||||
'(("/derek-distrotube/Inbox" . ?i)
|
||||
("/derek-distrotube/Sent" . ?s)
|
||||
("/derek-distrotube/All Mail" . ?a)
|
||||
("/derek-distrotube/Trash" . ?t)))
|
||||
#+END_SRC
|
||||
|
||||
* MASTODON CLIENT (mastodon)
|
||||
Note that I wrapped my settings with (after! mastodon). Without this, my settings will be overwritten by the default settings for this module, which is "mastodon.social".
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(after! mastodon
|
||||
(setq mastodon-instance-url "https://mastodon.technology/"))
|
||||
#+END_SRC
|
||||
|
||||
* REDDIT CLIENT (md4rd)
|
||||
An Emacs reddit client.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq md4rd-subs-active '(archlinux commandline DistroTube DoomEmacs emacs freesoftware lbry linux linux4noobs linuxmasterrace linnuxquestions orgmode qutebrowser suckless Ubuntu unixporn UsabilityPorn vim xmonad))
|
||||
#+END_SRC
|
||||
|
||||
* RSS READER (elfeed)
|
||||
* ELFEED
|
||||
An RSS newsfeed reader for Emacs.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
|
@ -320,3 +138,380 @@ An RSS newsfeed reader for Emacs.
|
|||
("http://lxer.com/module/newswire/headlines.rss" lxer linux)
|
||||
("https://distrowatch.com/news/dwd.xml" distrowatch linux)))))
|
||||
#+END_SRC
|
||||
|
||||
* EMMS
|
||||
One of the media players available for Emacs is emms, which stands for Emacs Multimedia System. By default, Doom Emacs does not use 'SPC a',' so the format I use for these bindings is 'SPC a' plus 'key'.
|
||||
|
||||
| COMMAND | DESCRIPTION | KEYBINDING |
|
||||
|-----------------------+-----------------------------------+------------|
|
||||
| emms-playlist-mode-go | /Switch to the playlist buffer/ | SPC a a |
|
||||
| emms-pause | /Pause the track/ | SPC a x |
|
||||
| emms-stop | /Stop the track/ | SPC a s |
|
||||
| emms-previous | /Play previous track in playlist/ | SPC a p |
|
||||
| emms-next | /Play next track in playlist/ | SPC a n |
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(require 'emms-setup)
|
||||
(require 'emms-info)
|
||||
(require 'emms-cue)
|
||||
(require 'emms-mode-line)
|
||||
(require 'emms-playing-time)
|
||||
(emms-all)
|
||||
(emms-default-players)
|
||||
(emms-mode-line 1)
|
||||
(emms-playing-time 1)
|
||||
(setq emms-source-file-default-directory "~/Music/Non-Classical/70s-80s/"
|
||||
emms-playlist-buffer-name "*Music*"
|
||||
emms-info-asynchronously t
|
||||
emms-source-file-directory-tree-function 'emms-source-file-directory-tree-find)
|
||||
(map! :leader
|
||||
:desc "Go to emms playlist"
|
||||
"a a" #'emms-playlist-mode-go
|
||||
:leader
|
||||
:desc "Emms pause track"
|
||||
"a x" #'emms-pause
|
||||
:leader
|
||||
:desc "Emms stop track"
|
||||
"a s" #'emms-stop
|
||||
:leader
|
||||
:desc "Emms play previous track"
|
||||
"a p" #'emms-previous
|
||||
:leader
|
||||
:desc "Emms play next track"
|
||||
"a n" #'emms-next)
|
||||
#+END_SRC
|
||||
|
||||
* EVALUATE ELISP EXPRESSIONS
|
||||
Changing some keybindings from their defaults to better fit with Doom Emacs, and to avoid conflicts with my window managers which sometimes use the control key in their keybindings. By default, Doom Emacs does not use 'SPC e' for anything, so 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
|
||||
(map! :leader
|
||||
:desc "Evaluate elisp in buffer"
|
||||
"e b" #'eval-buffer
|
||||
:leader
|
||||
:desc "Evaluate defun"
|
||||
"e d" #'eval-defun
|
||||
:leader
|
||||
:desc "Evaluate elisp expression"
|
||||
"e e" #'eval-expression
|
||||
:leader
|
||||
:desc "Evaluate last sexpression"
|
||||
"e l" #'eval-last-sexp
|
||||
:leader
|
||||
:desc "Evaluate elisp in region"
|
||||
"e r" #'eval-region)
|
||||
#+END_SRC
|
||||
|
||||
* EWW
|
||||
EWW is the Emacs Web Wowser, the builtin browser in Emacs. Below I set urls to open in a specific browser (eww) with browse-url-browser-function. By default, Doom Emacs does not use 'SPC e' for anything, so I choose to use the format 'SPC e' plus 'key' for these (I also use 'SPC e' for 'eval' keybindings). I chose to use 'SPC s w' for eww-search-words because Doom Emacs uses 'SPC s' for 'search' commands.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq browse-url-browser-function 'eww-browse-url)
|
||||
(map! :leader
|
||||
:desc "Eww web browser"
|
||||
"e w" #'eww
|
||||
:leader
|
||||
:desc "Eww reload page"
|
||||
"e R" #'eww-reload
|
||||
:leader
|
||||
:desc "Search web for text between BEG/END"
|
||||
"s w" #'eww-search-words)
|
||||
#+END_SRC
|
||||
|
||||
* FONTS
|
||||
Settings related to fonts within Doom Emacs:
|
||||
+ 'doom-font' -- standard monospace font that is used for most things in 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.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq doom-font (font-spec :family "SauceCodePro Nerd Font Mono" :size 15)
|
||||
doom-variable-pitch-font (font-spec :family "Ubuntu" :size 15)
|
||||
doom-big-font (font-spec :family "SauceCodePro Nerd Font Mono" :size 24))
|
||||
(after! doom-themes
|
||||
(setq doom-themes-enable-bold t
|
||||
doom-themes-enable-italic t))
|
||||
(custom-set-faces!
|
||||
'(font-lock-comment-face :slant italic)
|
||||
'(font-lock-keyword-face :slant italic))
|
||||
#+END_SRC
|
||||
|
||||
* IVY
|
||||
Ivy is a generic completion mechanism for Emacs. By default, Doom Emacs does not use 'SPC v', so the format I use for these bindings is 'SPC v' plus 'key'.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(map! :leader
|
||||
:desc "Ivy push view"
|
||||
"v p" #'ivy-push-view
|
||||
:leader
|
||||
:desc "Ivy switch view"
|
||||
"v s" #'ivy-switch-view)
|
||||
#+END_SRC
|
||||
|
||||
* LINE SETTINGS
|
||||
I have toggled display-line-numbers-type so I have line numbers displayed. Doom Emacs uses 'SPC t' for "toggle" commands, so I choose 'SPC t t' for toggle-truncate-lines.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq display-line-numbers-type t)
|
||||
(map! :leader
|
||||
:desc "Toggle truncate lines"
|
||||
"t t" #'toggle-truncate-lines)
|
||||
#+END_SRC
|
||||
|
||||
* MANPAGES
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(require 'ox-groff)
|
||||
#+END_SRC
|
||||
|
||||
* MASTODON
|
||||
Mastodon.el is a mastodon client for Emacs. Note that I wrapped my settings with (after! mastodon). Without this, my settings for the mastodon instance that I use would be overwritten by the default settings for this module, which is "mastodon.social".
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(after! mastodon
|
||||
(setq mastodon-instance-url "https://mastodon.technology/"))
|
||||
#+END_SRC
|
||||
|
||||
* MD4RD
|
||||
An Emacs reddit client that stands for /Mode For Reddit/. Below, I'm setting the subreddits that I'm following.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq md4rd-subs-active '(archlinux commandline DistroTube DoomEmacs emacs freesoftware lbry linux linux4noobs linuxmasterrace linnuxquestions orgmode qutebrowser suckless Ubuntu unixporn UsabilityPorn vim xmonad))
|
||||
#+END_SRC
|
||||
|
||||
* MU4E
|
||||
Setting up mu4e which is an email client that works within emacs. You must install mu4e and mbsync through your Linux distribution's package manager. Setting up smtp for sending mail. Make sure the gnutls command line utils are installed. Package 'gnutls-bin' in Debian/Ubuntu, and 'gnutls' in Arch.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu4e")
|
||||
(require 'mu4e)
|
||||
(require 'smtpmail)
|
||||
(setq mu4e-get-mail-command "mbsync -c ~/.emacs.d/mu4e/.mbsyncrc -a"
|
||||
mu4e-update-interval 300
|
||||
user-mail-address "derek@distrotube.com"
|
||||
user-full-name "Derek Taylor"
|
||||
mu4e-compose-signature
|
||||
(concat
|
||||
"Derek Taylor\n"
|
||||
"http://www.youtube.com/DistroTube\n")
|
||||
message-send-mail-function 'smtpmail-send-it
|
||||
starttls-use-gnutls t
|
||||
smtpmail-starttls-credentials '(("smtp.1and1.com" 587 nil nil))
|
||||
smtpmail-auth-credentials '(("smtp.1and1.com" 587 "derek@distrotube.com" nil))
|
||||
smtpmail-default-smtp-server "smtp.1and1.com"
|
||||
smtpmail-smtp-server "smtp.1and1.com"
|
||||
smtpmail-smtp-service 587
|
||||
mu4e-sent-folder "/Sent"
|
||||
mu4e-drafts-folder "/Drafts"
|
||||
mu4e-trash-folder "/Trash"
|
||||
mu4e-refile-folder "/All Mail"
|
||||
mu4e-maildir-shortcuts
|
||||
'(("/derek-distrotube/Inbox" . ?i)
|
||||
("/derek-distrotube/Sent" . ?s)
|
||||
("/derek-distrotube/All Mail" . ?a)
|
||||
("/derek-distrotube/Trash" . ?t)))
|
||||
#+END_SRC
|
||||
|
||||
* NEOTREE
|
||||
Neotree is a file tree viewer. When you open neotree, it jumps to the current file thanks to neo-smart-open. The neo-window-fixed-size setting makes the neotree width be adjustable. Doom Emacs had no keybindings set for neotree. Since Doom Emacs uses 'SPC t' for 'toggle' keybindings, I used 'SPC t n' for toggle-neotree.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(after! neotree
|
||||
(setq neo-smart-open t
|
||||
neo-window-fixed-size nil))
|
||||
(after! doom-themes
|
||||
(setq doom-neotree-enable-variable-pitch t))
|
||||
(map! :leader
|
||||
:desc "Toggle neotree file viewer"
|
||||
"t n" #'toggle-neotree)
|
||||
#+END_SRC
|
||||
|
||||
* OPEN SPECIFIC FILES
|
||||
Keybindings to open files that I work with all the time using the find-file command, which is the interactive file search that opens with 'C-x C-f' in GNU Emacs or 'SPC f f' in Doom Emacs. These keybindings use find-file non-interactively since we specify exactly what file to open. The format I use for these bindings is 'SPC /' plus 'key' since Doom Emacs does not use these keybindings.
|
||||
|
||||
| PATH TO FILE | DESCRIPTION | KEYBINDING |
|
||||
|------------------------+-------------------------+------------|
|
||||
| ~/Org/agenda.org | /Edit agenda file/ | SPC / a |
|
||||
| ~/.doom.d/config.org" | /Edit doom config.org/ | SPC / c |
|
||||
| ~/.doom.d/aliases" | /Edit eshell aliases/ | SPC / e |
|
||||
| ~/.doom.d/init.el" | /Edit doom init.el/ | SPC / i |
|
||||
| ~/.doom.d/packages.el" | /Edit doom packages.el/ | SPC / p |
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(map! :leader
|
||||
:desc "Edit agenda file"
|
||||
"/ a" #'(lambda () (interactive) (find-file "~/Org/agenda.org"))
|
||||
:leader
|
||||
:desc "Edit doom config.org"
|
||||
"/ c" #'(lambda () (interactive) (find-file "~/.doom.d/config.org"))
|
||||
:leader
|
||||
:desc "Edit eshell aliases"
|
||||
"/ e" #'(lambda () (interactive) (find-file "~/.doom.d/aliases"))
|
||||
:leader
|
||||
:desc "Edit doom init.el"
|
||||
"/ i" #'(lambda () (interactive) (find-file "~/.doom.d/init.el"))
|
||||
:leader
|
||||
:desc "Edit doom packages.el"
|
||||
"/ p" #'(lambda () (interactive) (find-file "~/.doom.d/packages.el")))
|
||||
#+END_SRC
|
||||
|
||||
* ORG MODE
|
||||
Note that I wrapped most of this in (after! org). Without this, my settings might be evaluated too early, which will result in my settings being overwritten by Doom's defaults. I have also enabled org-journal by adding (+journal) to the org section of my Doom Emacs' init.el.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(after! org
|
||||
(require 'org-bullets) ; Nicer bullets in org-mode
|
||||
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
|
||||
(setq org-directory "~/Org/"
|
||||
org-agenda-files '("~/Org/agenda.org")
|
||||
org-default-notes-file (expand-file-name "notes.org" org-directory)
|
||||
org-ellipsis " ▼ "
|
||||
org-log-done 'time
|
||||
org-journal-dir "~/Org/journal/"
|
||||
org-journal-date-format "%B %d, %Y (%A)"
|
||||
org-journal-file-format "%Y-%m-%d.org"
|
||||
org-hide-emphasis-markers t
|
||||
;; ex. of org-link-abbrev-alist in action
|
||||
;; [[arch-wiki:Name_of_Page][Description]]
|
||||
org-link-abbrev-alist ; This overwrites the default Doom org-link-abbrev-list
|
||||
'(("google" . "http://www.google.com/search?q=")
|
||||
("arch-wiki" . "https://wiki.archlinux.org/index.php/")
|
||||
("ddg" . "https://duckduckgo.com/?q=")
|
||||
("wiki" . "https://en.wikipedia.org/wiki/"))
|
||||
org-todo-keywords ; This overwrites the default Doom org-todo-keywords
|
||||
'((sequence
|
||||
"TODO(t)" ; A task that is ready to be tackled
|
||||
"BLOG(b)" ; Blog writing assignments
|
||||
"GYM(g)" ; Things to accomplish at the gym
|
||||
"PROJ(p)" ; A project that contains other tasks
|
||||
"VIDEO(v)" ; Video assignments
|
||||
"WAIT(w)" ; Something is holding up this task
|
||||
"|" ; The pipe necessary to separate "active" states and "inactive" states
|
||||
"DONE(d)" ; Task has been completed
|
||||
"CANCELLED(c)" )))) ; Task has been cancelled
|
||||
#+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, and since I am using Doom Emacs, I choose 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
|
||||
(map! :leader
|
||||
:desc "Copy to register"
|
||||
"r c" #'copy-to-register
|
||||
:leader
|
||||
:desc "Frameset to register"
|
||||
"r f" #'frameset-to-register
|
||||
:leader
|
||||
:desc "Insert contents of register"
|
||||
"r i" #'insert-register
|
||||
:leader
|
||||
:desc "Jump to register"
|
||||
"r j" #'jump-to-register
|
||||
:leader
|
||||
:desc "List registers"
|
||||
"r l" #'list-registers
|
||||
:leader
|
||||
:desc "Number to register"
|
||||
"r n" #'number-to-register
|
||||
:leader
|
||||
:desc "Interactively choose a register"
|
||||
"r r" #'counsel-register
|
||||
:leader
|
||||
:desc "View a register"
|
||||
"r v" #'view-register
|
||||
:leader
|
||||
:desc "Window configuration to register"
|
||||
"r w" #'window-configuration-to-register
|
||||
:leader
|
||||
:desc "Increment register"
|
||||
"r +" #'increment-register
|
||||
:leader
|
||||
:desc "Point to register"
|
||||
"r SPC" #'point-to-register)
|
||||
#+END_SRC
|
||||
|
||||
* REMOTE CONNECTIONS
|
||||
Keybindings for ssh'ing into remote machines. By default, Doom Emacs does not use 'SPC \', so the format I use for these bindings is 'SPC \' plus 'key'.
|
||||
|
||||
| DESCRIPTION | KEYBINDING |
|
||||
|-------------------------+----------- |
|
||||
| Ssh into distrotube.com | SPC \ d |
|
||||
| Ssh into my nextcloud | SPC \ n |
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(map! :leader
|
||||
:desc "Ssh into distrotube.com"
|
||||
"\\ d" #'(lambda () (interactive) (find-file "/scp:derek@distrotube.com"))
|
||||
:leader
|
||||
:desc "Ssh into my nextcloud"
|
||||
"\\ n" #'(lambda () (interactive) (find-file "/scp:derek@distrotube.net")))
|
||||
#+END_SRC
|
||||
|
||||
* SHELLS
|
||||
Settings for the various shells and terminal emulators within Emacs.
|
||||
+ 'shell-file-name' -- sets the shell to be used in M-x shell, M-x term, M-x ansi-term and M-x vterm.
|
||||
+ 'eshell-aliases-file' -- sets an aliases file for the eshell.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq shell-file-name "/bin/fish"
|
||||
eshell-aliases-file "~/.doom.d/aliases")
|
||||
#+END_SRC
|
||||
|
||||
* SPLITS
|
||||
I set splits to default to opening on the right using 'prefer-horizontal-split'. I set a keybinding for 'clone-indirect-buffer-other-window' for when I want to have the same document in two splits. The text of the indirect buffer is always identical to the text of its base buffer; changes made by editing either one are visible immediately in the other. But in all other respects, the indirect buffer and its base buffer are completely separate. For example, I can fold one split but other will be unfolded.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun prefer-horizontal-split ()
|
||||
(set-variable 'split-height-threshold nil t)
|
||||
(set-variable 'split-width-threshold 40 t)) ; make this as low as needed
|
||||
(add-hook 'markdown-mode-hook 'prefer-horizontal-split)
|
||||
(map! :leader
|
||||
:desc "Clone indirect buffer other window"
|
||||
"b c" #'clone-indirect-buffer-other-window)
|
||||
#+END_SRC
|
||||
|
||||
* SUBLIMITY
|
||||
The sublimity extension offers Sublime-like smooth scrolling and an experimental minimap. You can also require sublimity-attractive if you want to center everything for a distraction-free mode. I do not use this extension, hence the reason I have sublimity-mode set to 0. Set this to 1 to enable it.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(require 'sublimity-scroll)
|
||||
(require 'sublimity-map)
|
||||
(require 'sublimity-attractive)
|
||||
(sublimity-mode 0)
|
||||
#+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>'.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(map! :leader
|
||||
:desc "Winner redo"
|
||||
"w <right>" #'winner-redo
|
||||
:leader
|
||||
:desc "Winner undo"
|
||||
"w <left>" #'winner-undo)
|
||||
#+END_SRC
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
;;deft ; notational velocity for Emacs
|
||||
doom ; what makes DOOM look the way it does
|
||||
doom-dashboard ; a nifty splash screen for Emacs
|
||||
doom-quit ; DOOM quit-message prompts when you quit Emacs
|
||||
;;doom-quit ; DOOM quit-message prompts when you quit Emacs
|
||||
;;fill-column ; a `fill-column' indicator
|
||||
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
|
||||
;;hydra
|
||||
|
@ -44,7 +44,7 @@
|
|||
(popup +defaults) ; tame sudden yet inevitable temporary windows
|
||||
;;pretty-code ; ligatures or substitute text with pretty symbols
|
||||
;;tabs ; an tab bar for Emacs
|
||||
;;treemacs ; a project drawer, like neotree but cooler
|
||||
treemacs ; a project drawer, like neotree but cooler
|
||||
;;unicode ; extended unicode support for various languages
|
||||
vc-gutter ; vcs diff in the fringe
|
||||
vi-tilde-fringe ; fringe tildes to mark beyond EOB
|
||||
|
|
|
@ -60,6 +60,5 @@
|
|||
(package! rainbow-mode)
|
||||
(package! sublimity)
|
||||
(package! tldr)
|
||||
(package! treemacs)
|
||||
(package! wc-mode)
|
||||
(package! writeroom-mode)
|
||||
|
|
|
@ -29,16 +29,14 @@
|
|||
#+ATTR_HTML: :alt XMonad Scrot :title XMonad Scrot :align left
|
||||
[[https://gitlab.com/dwt1/dotfiles/-/raw/master/.screenshots/dotfiles05-thumb.png]]
|
||||
|
||||
Xmonad is a dynamically tiling X11 window manager that is written and
|
||||
configured in Haskell. Official documentation: [[https://xmonad.org][https://xmonad.org]]
|
||||
Xmonad is a dynamically tiling X11 window manager that is written and configured in Haskell.
|
||||
- XMonad Official Website: [[https://xmonad.org][https://xmonad.org]]
|
||||
|
||||
This is the xmonad configuration of Derek Taylor (DistroTube)
|
||||
- My YouTube: [[http://www.youtube.com/c/DistroTube][http://www.youtube.com/c/DistroTube]]
|
||||
- My GitLab: [[http://www.gitlab.com/dwt1/][http://www.gitlab.com/dwt1/]]
|
||||
|
||||
Keep in mind, that my configs are purposely bloated with examples of
|
||||
what you can do with xmonad. It is written more as a study guide rather
|
||||
than a config that you should download and use.
|
||||
Keep in mind, that my configs are purposely bloated with examples of what you can do with xmonad. It is written more as a study guide rather than a config that you should download and use.
|
||||
|
||||
* Imports
|
||||
These are Haskell modules that we must import so that we can use their functions later in the config.
|
||||
|
@ -112,7 +110,7 @@ import XMonad.Prompt.Ssh
|
|||
import XMonad.Prompt.XMonad
|
||||
import Control.Arrow (first)
|
||||
|
||||
-- Utilities
|
||||
-- Utilities
|
||||
import XMonad.Util.EZConfig (additionalKeysP)
|
||||
import XMonad.Util.NamedScratchpad
|
||||
import XMonad.Util.Run (runProcessWithInput, safeSpawn, spawnPipe)
|
||||
|
@ -120,9 +118,7 @@ import XMonad.Util.SpawnOnce
|
|||
#+END_SRC
|
||||
|
||||
* Variables
|
||||
It's nice to assign values to stuff that you will use more than once
|
||||
in the config. Setting values for things like font, terminal and editor
|
||||
means you only have to change the value here to make changes globally.
|
||||
It's nice to assign values to stuff that you will use more than once in the config. Setting values for things like font, terminal and editor means you only have to change the value here to make changes globally.
|
||||
|
||||
#+BEGIN_SRC haskell
|
||||
myFont :: String
|
||||
|
@ -175,8 +171,7 @@ myStartupHook = do
|
|||
#+END_SRC
|
||||
|
||||
* Gridselect
|
||||
GridSelect displays items (programs, open windows, etc.) in a 2D grid
|
||||
and lets the user select from it with the cursor/hjkl keys or the mouse.
|
||||
GridSelect displays items (programs, open windows, etc.) in a 2D grid and lets the user select from it with the cursor/hjkl keys or the mouse.
|
||||
|
||||
#+BEGIN_SRC haskell
|
||||
myColorizer :: Window -> Bool -> X (String, String)
|
||||
|
@ -225,10 +220,7 @@ myAppGrid = [ ("Audacity", "audacity")
|
|||
#+END_SRC
|
||||
|
||||
* Treeselect
|
||||
TreeSelect displays your workspaces or actions in a Tree-like format.
|
||||
You can select desired workspace/action with the cursor or hjkl keys.
|
||||
My TreeSelect menu is rather large and includes a mixture of applications,
|
||||
web bookmarks, configuration files and xmonad actions.
|
||||
TreeSelect displays your workspaces or actions in a Tree-like format. You can select desired workspace/action with the cursor or hjkl keys. My TreeSelect menu is rather large and includes a mixture of applications, web bookmarks, configuration files and xmonad actions.
|
||||
|
||||
** Treeselect Menu Entries
|
||||
#+BEGIN_SRC haskell
|
||||
|
@ -484,11 +476,7 @@ treeselectAction a = TS.treeselectAction a
|
|||
#+END_SRC
|
||||
|
||||
** Treeselect Settings
|
||||
Configuration options for the treeSelect menus.
|
||||
Keybindings for treeSelect menus. Use h-j-k-l to navigate.
|
||||
Use 'o' and 'i' to move forward/back in the workspace history.
|
||||
Single KEY's are for top-level nodes. SUPER+KEY are for the
|
||||
second-level nodes. SUPER+ALT+KEY are third-level nodes.
|
||||
Configuration options for the treeSelect menus. Keybindings for treeSelect menus. Use h-j-k-l to navigate. Use 'o' and 'i' to move forward/back in the workspace history. Single KEY's are for top-level nodes. SUPER+KEY are for the second-level nodes. SUPER+ALT+KEY are third-level nodes.
|
||||
|
||||
#+BEGIN_SRC haskell
|
||||
tsDefaultConfig :: TS.TSConfig a
|
||||
|
@ -521,6 +509,25 @@ myTreeNavigation = M.fromList
|
|||
, ((0, xK_l), TS.moveChild)
|
||||
, ((0, xK_o), TS.moveHistBack)
|
||||
, ((0, xK_i), TS.moveHistForward)
|
||||
, ((0, xK_a), TS.moveTo ["+ Accessories"])
|
||||
, ((0, xK_e), TS.moveTo ["+ Games"])
|
||||
, ((0, xK_g), TS.moveTo ["+ Graphics"])
|
||||
, ((0, xK_i), TS.moveTo ["+ Internet"])
|
||||
, ((0, xK_m), TS.moveTo ["+ Multimedia"])
|
||||
, ((0, xK_o), TS.moveTo ["+ Office"])
|
||||
, ((0, xK_p), TS.moveTo ["+ Programming"])
|
||||
, ((0, xK_s), TS.moveTo ["+ System"])
|
||||
, ((0, xK_b), TS.moveTo ["+ Bookmarks"])
|
||||
, ((0, xK_c), TS.moveTo ["+ Config Files"])
|
||||
, ((0, xK_r), TS.moveTo ["+ Screenshots"])
|
||||
, ((mod4Mask, xK_l), TS.moveTo ["+ Bookmarks", "+ Linux"])
|
||||
, ((mod4Mask, xK_e), TS.moveTo ["+ Bookmarks", "+ Emacs"])
|
||||
, ((mod4Mask, xK_s), TS.moveTo ["+ Bookmarks", "+ Search and Reference"])
|
||||
, ((mod4Mask, xK_p), TS.moveTo ["+ Bookmarks", "+ Programming"])
|
||||
, ((mod4Mask, xK_v), TS.moveTo ["+ Bookmarks", "+ Vim"])
|
||||
, ((mod4Mask .|. altMask, xK_a), TS.moveTo ["+ Bookmarks", "+ Linux", "+ Arch Linux"])
|
||||
, ((mod4Mask .|. altMask, xK_n), TS.moveTo ["+ Bookmarks", "+ Linux", "+ Linux News"])
|
||||
, ((mod4Mask .|. altMask, xK_w), TS.moveTo ["+ Bookmarks", "+ Linux", "+ Window Managers"])
|
||||
]
|
||||
#+END_SRC
|
||||
|
||||
|
@ -577,8 +584,7 @@ promptList' = [ ("c", calcPrompt, "qalc") -- requires qalculate-gtk
|
|||
#+END_SRC
|
||||
|
||||
** Custom Prompts
|
||||
calcPrompt requires a cli calculator called qalcualte-gtk.
|
||||
You could use this as a template for other custom prompts that
|
||||
calcPrompt requires a cli calculator called qalcualte-gtk. You could use this as a template for other custom prompts that use command line programs that return a single line of output.
|
||||
|
||||
#+BEGIN_SRC haskell
|
||||
calcPrompt c ans =
|
||||
|
@ -635,9 +641,7 @@ dtXPKeymap = M.fromList $
|
|||
#+END_SRC
|
||||
|
||||
** Search Engines
|
||||
Xmonad has several search engines available to use located in
|
||||
XMonad.Actions.Search. Additionally, you can add other search engines
|
||||
such as those listed below.
|
||||
Xmonad has several search engines available to use located in XMonad.Actions.Search. Additionally, you can add other search engines such as those listed below.
|
||||
|
||||
#+BEGIN_SRC haskell
|
||||
archwiki, ebay, news, reddit, urban :: S.SearchEngine
|
||||
|
@ -671,8 +675,7 @@ searchList = [ ("a", archwiki)
|
|||
#+END_SRC
|
||||
|
||||
* Scratchpads
|
||||
Allows to have several floating scratchpads running different applications.
|
||||
Import Util.NamedScratchpad. Bind a key to namedScratchpadSpawnAction.
|
||||
Allows to have several floating scratchpads running different applications. Import Util.NamedScratchpad. Bind a key to namedScratchpadSpawnAction.
|
||||
|
||||
#+BEGIN_SRC haskell
|
||||
myScratchPads :: [NamedScratchpad]
|
||||
|
@ -699,8 +702,7 @@ myScratchPads = [ NS "terminal" spawnTerm findTerm manageTerm
|
|||
#+END_SRC
|
||||
|
||||
* Layouts
|
||||
Makes setting the spacingRaw simpler to write. The spacingRaw
|
||||
module adds a configurable amount of space around windows.
|
||||
Makes setting the spacingRaw simpler to write. The spacingRaw module adds a configurable amount of space around windows.
|
||||
|
||||
#+BEGIN_SRC haskell
|
||||
mySpacing :: Integer -> l a -> XMonad.Layout.LayoutModifier.ModifiedLayout Spacing l a
|
||||
|
@ -784,11 +786,7 @@ myLayoutHook = avoidStruts $ mouseResize $ windowArrange $ T.toggleLayouts float
|
|||
#+END_SRC
|
||||
|
||||
* Workspaces
|
||||
My workspaces are clickable meaning that the mouse can be used to switch
|
||||
workspaces. This requires xdotool. You need to use UnsafeStdInReader instead
|
||||
of simply StdInReader in xmobar config so you can pass actions to it. Also,
|
||||
you will notice I add <fn> tags to the clickable workspaces to select from
|
||||
the additionalFonts that I have set in my xmobar configs.
|
||||
My workspaces are clickable meaning that the mouse can be used to switch workspaces. This requires xdotool. You need to use UnsafeStdInReader instead of simply StdInReader in xmobar config so you can pass actions to it. Also, you will notice I add <fn> tags to the clickable workspaces to select from the additionalFonts that I have set in my xmobar configs.
|
||||
|
||||
#+BEGIN_SRC haskell
|
||||
xmobarEscape :: String -> String
|
||||
|
@ -808,11 +806,7 @@ myWorkspaces = clickable . (map xmobarEscape)
|
|||
#+END_SRC
|
||||
|
||||
* Managehook
|
||||
Sets some rules for certain programs. Examples include forcing certain
|
||||
programs to always float, or to always appear on a certain workspace.
|
||||
Forcing programs to a certain workspace with a doShift requires xdotool
|
||||
if you are using clickable workspaces. You need the className or title
|
||||
of the program. Use xprop to get this info.
|
||||
Sets some rules for certain programs. Examples include forcing certain programs to always float, or to always appear on a certain workspace. Forcing programs to a certain workspace with a doShift requires xdotool if you are using clickable workspaces. You need the className or title of the program. Use xprop to get this info.
|
||||
|
||||
#+BEGIN_SRC haskell
|
||||
myManageHook :: XMonad.Query (Data.Monoid.Endo WindowSet)
|
||||
|
@ -820,7 +814,7 @@ 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.
|
||||
[ className =? "htop" --> doShift ( myWorkspaces !! 7 )
|
||||
[ className =? "htop" --> doShift ( myWorkspaces !! 7 )
|
||||
, title =? "firefox" --> doShift ( myWorkspaces !! 1 )
|
||||
, className =? "mpv" --> doShift ( myWorkspaces !! 7 )
|
||||
-- , className =? "vlc" --> doShift ( myWorkspaces !! 7 )
|
||||
|
@ -833,9 +827,7 @@ myManageHook = composeAll
|
|||
#+END_SRC
|
||||
|
||||
* Loghook
|
||||
Sets opacity for inactive (unfocused) windows. I prefer to not use
|
||||
this feature so I've set opacity to 1.0. If you want opacity, set
|
||||
this to a value of less than 1 (such as 0.9 for 90% opacity).
|
||||
Sets opacity for inactive (unfocused) windows. I prefer to not use this feature so I've set opacity to 1.0. If you want opacity, set this to a value of less than 1 (such as 0.9 for 90% opacity).
|
||||
|
||||
#+BEGIN_SRC haskell
|
||||
myLogHook :: X ()
|
||||
|
@ -878,7 +870,7 @@ myKeys =
|
|||
, ("M-S-q", io exitSuccess) -- Quits xmonad
|
||||
|
||||
-- Open my preferred terminal
|
||||
, ("M-<Return>", spawn myTerminal)
|
||||
, ("M-<Return>", spawn (myTerminal ++ " -e fish"))
|
||||
|
||||
-- Run Prompt
|
||||
, ("M-S-<Return>", shellPrompt dtXPConfig) -- Shell Prompt
|
||||
|
@ -948,23 +940,23 @@ myKeys =
|
|||
, ("M-u <Space>", spawn "mocp --toggle-pause")
|
||||
|
||||
-- Emacs (CTRL-e followed by a key)
|
||||
, ("C-e e", spawn "emacsclient -c -a ''") -- start emacs
|
||||
, ("C-e b", spawn "emacsclient -c -a '' --eval '(ibuffer)'") -- list emacs buffers
|
||||
, ("C-e d", spawn "emacsclient -c -a '' --eval '(dired nil)'") -- dired emacs file manager
|
||||
, ("C-e i", spawn "emacsclient -c -a '' --eval '(erc)'") -- erc emacs irc client
|
||||
, ("C-e m", spawn "emacsclient -c -a '' --eval '(mu4e)'") -- mu4e emacs email client
|
||||
, ("C-e n", spawn "emacsclient -c -a '' --eval '(elfeed)'") -- elfeed emacs rss client
|
||||
, ("C-e s", spawn "emacsclient -c -a '' --eval '(eshell)'") -- eshell within emacs
|
||||
, ("C-e t", spawn "emacsclient -c -a '' --eval '(mastodon)'") -- mastodon within emacs
|
||||
, ("C-e v", spawn "emacsclient -c -a '' --eval '(+vterm/here nil)'") -- vterm within emacs
|
||||
, ("C-e e", spawn "emacsclient -c -a 'emacs'") -- start emacs
|
||||
, ("C-e b", spawn "emacsclient -c -a 'emacs' --eval '(ibuffer)'") -- list emacs buffers
|
||||
, ("C-e d", spawn "emacsclient -c -a 'emacs' --eval '(dired nil)'") -- dired emacs file manager
|
||||
, ("C-e i", spawn "emacsclient -c -a 'emacs' --eval '(erc)'") -- erc emacs irc client
|
||||
, ("C-e m", spawn "emacsclient -c -a 'emacs' --eval '(mu4e)'") -- mu4e emacs email client
|
||||
, ("C-e n", spawn "emacsclient -c -a 'emacs' --eval '(elfeed)'") -- elfeed emacs rss client
|
||||
, ("C-e s", spawn "emacsclient -c -a 'emacs' --eval '(eshell)'") -- eshell within emacs
|
||||
, ("C-e t", spawn "emacsclient -c -a 'emacs' --eval '(mastodon)'") -- mastodon within emacs
|
||||
, ("C-e v", spawn "emacsclient -c -a 'emacs' --eval '(+vterm/here nil)'") -- vterm within emacs
|
||||
-- emms is an emacs audio player. I set it to auto start playing in a specific directory.
|
||||
, ("C-e a", spawn "emacsclient -c -a '' --eval '(emms)' --eval '(emms-play-directory-tree \"~/Music/Non-Classical/70s-80s/\")'")
|
||||
, ("C-e a", spawn "emacsclient -c -a 'emacs' --eval '(emms)' --eval '(emms-play-directory-tree \"~/Music/Non-Classical/70s-80s/\")'")
|
||||
|
||||
--- My Applications (Super+Alt+Key)
|
||||
, ("M-M1-a", spawn (myTerminal ++ " -e ncpamixer"))
|
||||
, ("M-M1-b", spawn "surf www.youtube.com/c/DistroTube/")
|
||||
, ("M-M1-e", spawn (myTerminal ++ " -e neomutt"))
|
||||
, ("M-M1-f", spawn (myTerminal ++ " -e sh ./.config/vifm/scripts/vifmrun"))
|
||||
, ("M-M1-f", spawn (myTerminal ++ " -e sh ./.config/vifm/scripts/vifmrun | bash"))
|
||||
, ("M-M1-i", spawn (myTerminal ++ " -e irssi"))
|
||||
, ("M-M1-j", spawn (myTerminal ++ " -e joplin"))
|
||||
, ("M-M1-l", spawn (myTerminal ++ " -e lynx https://distrotube.com"))
|
||||
|
|
|
@ -66,7 +66,7 @@ import XMonad.Prompt.Ssh
|
|||
import XMonad.Prompt.XMonad
|
||||
import Control.Arrow (first)
|
||||
|
||||
-- Utilities
|
||||
-- Utilities
|
||||
import XMonad.Util.EZConfig (additionalKeysP)
|
||||
import XMonad.Util.NamedScratchpad
|
||||
import XMonad.Util.Run (runProcessWithInput, safeSpawn, spawnPipe)
|
||||
|
@ -439,6 +439,25 @@ myTreeNavigation = M.fromList
|
|||
, ((0, xK_l), TS.moveChild)
|
||||
, ((0, xK_o), TS.moveHistBack)
|
||||
, ((0, xK_i), TS.moveHistForward)
|
||||
, ((0, xK_a), TS.moveTo ["+ Accessories"])
|
||||
, ((0, xK_e), TS.moveTo ["+ Games"])
|
||||
, ((0, xK_g), TS.moveTo ["+ Graphics"])
|
||||
, ((0, xK_i), TS.moveTo ["+ Internet"])
|
||||
, ((0, xK_m), TS.moveTo ["+ Multimedia"])
|
||||
, ((0, xK_o), TS.moveTo ["+ Office"])
|
||||
, ((0, xK_p), TS.moveTo ["+ Programming"])
|
||||
, ((0, xK_s), TS.moveTo ["+ System"])
|
||||
, ((0, xK_b), TS.moveTo ["+ Bookmarks"])
|
||||
, ((0, xK_c), TS.moveTo ["+ Config Files"])
|
||||
, ((0, xK_r), TS.moveTo ["+ Screenshots"])
|
||||
, ((mod4Mask, xK_l), TS.moveTo ["+ Bookmarks", "+ Linux"])
|
||||
, ((mod4Mask, xK_e), TS.moveTo ["+ Bookmarks", "+ Emacs"])
|
||||
, ((mod4Mask, xK_s), TS.moveTo ["+ Bookmarks", "+ Search and Reference"])
|
||||
, ((mod4Mask, xK_p), TS.moveTo ["+ Bookmarks", "+ Programming"])
|
||||
, ((mod4Mask, xK_v), TS.moveTo ["+ Bookmarks", "+ Vim"])
|
||||
, ((mod4Mask .|. altMask, xK_a), TS.moveTo ["+ Bookmarks", "+ Linux", "+ Arch Linux"])
|
||||
, ((mod4Mask .|. altMask, xK_n), TS.moveTo ["+ Bookmarks", "+ Linux", "+ Linux News"])
|
||||
, ((mod4Mask .|. altMask, xK_w), TS.moveTo ["+ Bookmarks", "+ Linux", "+ Window Managers"])
|
||||
]
|
||||
|
||||
dtXPConfig :: XPConfig
|
||||
|
@ -684,7 +703,7 @@ 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.
|
||||
[ className =? "htop" --> doShift ( myWorkspaces !! 7 )
|
||||
[ className =? "htop" --> doShift ( myWorkspaces !! 7 )
|
||||
, title =? "firefox" --> doShift ( myWorkspaces !! 1 )
|
||||
, className =? "mpv" --> doShift ( myWorkspaces !! 7 )
|
||||
-- , className =? "vlc" --> doShift ( myWorkspaces !! 7 )
|
||||
|
@ -707,7 +726,7 @@ myKeys =
|
|||
, ("M-S-q", io exitSuccess) -- Quits xmonad
|
||||
|
||||
-- Open my preferred terminal
|
||||
, ("M-<Return>", spawn myTerminal)
|
||||
, ("M-<Return>", spawn (myTerminal ++ " -e fish"))
|
||||
|
||||
-- Run Prompt
|
||||
, ("M-S-<Return>", shellPrompt dtXPConfig) -- Shell Prompt
|
||||
|
@ -777,23 +796,23 @@ myKeys =
|
|||
, ("M-u <Space>", spawn "mocp --toggle-pause")
|
||||
|
||||
-- Emacs (CTRL-e followed by a key)
|
||||
, ("C-e e", spawn "emacsclient -c -a ''") -- start emacs
|
||||
, ("C-e b", spawn "emacsclient -c -a '' --eval '(ibuffer)'") -- list emacs buffers
|
||||
, ("C-e d", spawn "emacsclient -c -a '' --eval '(dired nil)'") -- dired emacs file manager
|
||||
, ("C-e i", spawn "emacsclient -c -a '' --eval '(erc)'") -- erc emacs irc client
|
||||
, ("C-e m", spawn "emacsclient -c -a '' --eval '(mu4e)'") -- mu4e emacs email client
|
||||
, ("C-e n", spawn "emacsclient -c -a '' --eval '(elfeed)'") -- elfeed emacs rss client
|
||||
, ("C-e s", spawn "emacsclient -c -a '' --eval '(eshell)'") -- eshell within emacs
|
||||
, ("C-e t", spawn "emacsclient -c -a '' --eval '(mastodon)'") -- mastodon within emacs
|
||||
, ("C-e v", spawn "emacsclient -c -a '' --eval '(+vterm/here nil)'") -- vterm within emacs
|
||||
, ("C-e e", spawn "emacsclient -c -a 'emacs'") -- start emacs
|
||||
, ("C-e b", spawn "emacsclient -c -a 'emacs' --eval '(ibuffer)'") -- list emacs buffers
|
||||
, ("C-e d", spawn "emacsclient -c -a 'emacs' --eval '(dired nil)'") -- dired emacs file manager
|
||||
, ("C-e i", spawn "emacsclient -c -a 'emacs' --eval '(erc)'") -- erc emacs irc client
|
||||
, ("C-e m", spawn "emacsclient -c -a 'emacs' --eval '(mu4e)'") -- mu4e emacs email client
|
||||
, ("C-e n", spawn "emacsclient -c -a 'emacs' --eval '(elfeed)'") -- elfeed emacs rss client
|
||||
, ("C-e s", spawn "emacsclient -c -a 'emacs' --eval '(eshell)'") -- eshell within emacs
|
||||
, ("C-e t", spawn "emacsclient -c -a 'emacs' --eval '(mastodon)'") -- mastodon within emacs
|
||||
, ("C-e v", spawn "emacsclient -c -a 'emacs' --eval '(+vterm/here nil)'") -- vterm within emacs
|
||||
-- emms is an emacs audio player. I set it to auto start playing in a specific directory.
|
||||
, ("C-e a", spawn "emacsclient -c -a '' --eval '(emms)' --eval '(emms-play-directory-tree \"~/Music/Non-Classical/70s-80s/\")'")
|
||||
, ("C-e a", spawn "emacsclient -c -a 'emacs' --eval '(emms)' --eval '(emms-play-directory-tree \"~/Music/Non-Classical/70s-80s/\")'")
|
||||
|
||||
--- My Applications (Super+Alt+Key)
|
||||
, ("M-M1-a", spawn (myTerminal ++ " -e ncpamixer"))
|
||||
, ("M-M1-b", spawn "surf www.youtube.com/c/DistroTube/")
|
||||
, ("M-M1-e", spawn (myTerminal ++ " -e neomutt"))
|
||||
, ("M-M1-f", spawn (myTerminal ++ " -e sh ./.config/vifm/scripts/vifmrun"))
|
||||
, ("M-M1-f", spawn (myTerminal ++ " -e sh ./.config/vifm/scripts/vifmrun | bash"))
|
||||
, ("M-M1-i", spawn (myTerminal ++ " -e irssi"))
|
||||
, ("M-M1-j", spawn (myTerminal ++ " -e joplin"))
|
||||
, ("M-M1-l", spawn (myTerminal ++ " -e lynx https://distrotube.com"))
|
||||
|
|
Loading…
Add table
Reference in a new issue