From a84e5b32bf03a0cea74f64fbb812e4def79e71ba Mon Sep 17 00:00:00 2001 From: Derek Taylor Date: Fri, 18 Jun 2021 10:23:22 -0500 Subject: [PATCH] Fixing sublayout errors in XMonad. Playing with prettify symbols in Doom Emacs. --- .config/doom/config.el | 34 +++++++++++++++++++++++++++- .config/doom/config.org | 42 ++++++++++++++++++++++++++++++++++- .config/doom/packages.el | 2 ++ .config/nitrogen/bg-saved.cfg | 12 +--------- .config/nitrogen/nitrogen.cfg | 8 +++---- .xmonad/README.org | 10 +++++++++ .xmonad/xmonad.hs | 8 +++++++ 7 files changed, 99 insertions(+), 17 deletions(-) diff --git a/.config/doom/config.el b/.config/doom/config.el index e2ab666..a7ff0bd 100644 --- a/.config/doom/config.el +++ b/.config/doom/config.el @@ -62,6 +62,9 @@ (defalias 'year-calendar 'dt/year-calendar) +(use-package! calfw) +(use-package! calfw-org) + (setq centaur-tabs-set-bar 'over centaur-tabs-set-icons t centaur-tabs-gray-out-icons 'buffer @@ -221,7 +224,6 @@ (custom-set-faces! '(font-lock-comment-face :slant italic) '(font-lock-keyword-face :slant italic)) -(setq global-prettify-symbols-mode t) (setq ivy-posframe-display-functions-alist '((swiper . ivy-posframe-display-at-point) @@ -367,6 +369,28 @@ :desc "Edit doom init.el" "i" #'(lambda () (interactive) (find-file "~/.config/doom/init.el")) :desc "Edit doom packages.el" "p" #'(lambda () (interactive) (find-file "~/.config/doom/packages.el")))) +(defun my/org-mode/load-prettify-symbols () "Prettify org mode keywords" + (interactive) + (setq prettify-symbols-alist + (mapcan (lambda (x) (list x (cons (upcase (car x)) (cdr x)))) + '(("#+begin_src" . ?) + ("#+end_src" . ?) + ("#+begin_example" . ?) + ("#+end_example" . ?) + ("#+DATE:" . ?⏱) + ("#+AUTHOR:" . ?✏) + ("[ ]" . ?☐) + ("[X]" . ?☑ ) + ("[-]" . ?❍ ) + ("lambda" . ?λ) + ("#+header:" . ?) + ("#+name:" . ?﮸) + ("#+results:" . ?) + ("#+call:" . ?) + (":properties:" . ?) + (":logbook:" . ?)))) + (prettify-symbols-mode 1)) + (map! :leader :desc "Org babel tangle" "m B" #'org-babel-tangle) (after! org @@ -399,6 +423,14 @@ "DONE(d)" ; Task has been completed "CANCELLED(c)" )))) ; Task has been cancelled +(custom-set-faces + '(org-level-1 ((t (:inherit outline-1 :height 1.2)))) + '(org-level-2 ((t (:inherit outline-2 :height 1.0)))) + '(org-level-3 ((t (:inherit outline-3 :height 1.0)))) + '(org-level-4 ((t (:inherit outline-4 :height 1.0)))) + '(org-level-5 ((t (:inherit outline-5 :height 1.0)))) +) + (use-package ox-man) (use-package ox-gemini) diff --git a/.config/doom/config.org b/.config/doom/config.org index 4ffb962..50f3268 100644 --- a/.config/doom/config.org +++ b/.config/doom/config.org @@ -122,6 +122,12 @@ See also: https://stackoverflow.com/questions/9547912/emacs-calendar-show-more-t (defalias 'year-calendar 'dt/year-calendar) #+end_src +Let's also play around with calfw. +#+begin_src emacs-lisp +(use-package! calfw) +(use-package! calfw-org) +#+end_src + * 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. @@ -390,7 +396,6 @@ Settings related to fonts within Doom Emacs: (custom-set-faces! '(font-lock-comment-face :slant italic) '(font-lock-keyword-face :slant italic)) -(setq global-prettify-symbols-mode t) #+END_SRC * IVY @@ -635,6 +640,30 @@ Keybindings to open files that I work with all the time using the find-file comm * 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 +(defun my/org-mode/load-prettify-symbols () "Prettify org mode keywords" + (interactive) + (setq prettify-symbols-alist + (mapcan (lambda (x) (list x (cons (upcase (car x)) (cdr x)))) + '(("#+begin_src" . ?) + ("#+end_src" . ?) + ("#+begin_example" . ?) + ("#+end_example" . ?) + ("#+DATE:" . ?⏱) + ("#+AUTHOR:" . ?✏) + ("[ ]" . ?☐) + ("[X]" . ?☑ ) + ("[-]" . ?❍ ) + ("lambda" . ?λ) + ("#+header:" . ?) + ("#+name:" . ?﮸) + ("#+results:" . ?) + ("#+call:" . ?) + (":properties:" . ?) + (":logbook:" . ?)))) + (prettify-symbols-mode 1)) +#+end_src + #+BEGIN_SRC emacs-lisp (map! :leader :desc "Org babel tangle" "m B" #'org-babel-tangle) @@ -669,6 +698,17 @@ Note that I wrapped most of this in (after! org). Without this, my settings mig "CANCELLED(c)" )))) ; Task has been cancelled #+END_SRC +Setting the font sizes for each header level in Org mode. +#+begin_src emacs-lisp +(custom-set-faces + '(org-level-1 ((t (:inherit outline-1 :height 1.2)))) + '(org-level-2 ((t (:inherit outline-2 :height 1.0)))) + '(org-level-3 ((t (:inherit outline-3 :height 1.0)))) + '(org-level-4 ((t (:inherit outline-4 :height 1.0)))) + '(org-level-5 ((t (:inherit outline-5 :height 1.0)))) +) +#+end_src + We need ox-man for "Org eXporting" to manpage format. #+BEGIN_SRC emacs-lisp (use-package ox-man) diff --git a/.config/doom/packages.el b/.config/doom/packages.el index 3c50ff4..d65b836 100644 --- a/.config/doom/packages.el +++ b/.config/doom/packages.el @@ -50,6 +50,8 @@ ;(unpin! t) (package! flycheck-aspell) (package! async) +(package! calfw) +(package! calfw-org) (package! dashboard) (package! dired-open) (package! dmenu) diff --git a/.config/nitrogen/bg-saved.cfg b/.config/nitrogen/bg-saved.cfg index 6d106f4..afe8bc8 100644 --- a/.config/nitrogen/bg-saved.cfg +++ b/.config/nitrogen/bg-saved.cfg @@ -1,14 +1,4 @@ -[xin_0] -file=/home/dt/wallpapers/1613962661654.jpg -mode=0 -bgcolor=#000000 - [xin_1] -file=/home/dt/wallpapers/1613962661654.jpg -mode=0 -bgcolor=#000000 - -[xin_2] -file=/home/dt/wallpapers/1613962661654.jpg +file=/home/dt/wallpapers/0078.jpg mode=0 bgcolor=#000000 diff --git a/.config/nitrogen/nitrogen.cfg b/.config/nitrogen/nitrogen.cfg index 0587c6b..119ed4b 100644 --- a/.config/nitrogen/nitrogen.cfg +++ b/.config/nitrogen/nitrogen.cfg @@ -1,8 +1,8 @@ [geometry] -posx=1920 -posy=0 -sizex=1920 -sizey=1080 +posx=16 +posy=40 +sizex=1884 +sizey=1020 [nitrogen] view=icon diff --git a/.xmonad/README.org b/.xmonad/README.org index a1c7324..89b6107 100644 --- a/.xmonad/README.org +++ b/.xmonad/README.org @@ -1,6 +1,8 @@ #+TITLE: XMonad Config #+PROPERTY: header-args :tangle xmonad.hs #+STARTUP: showeverything +#+AUTHOR: Derek Taylor +#+DATE: 06-16-2021 * Table Of Contents :toc: - [[#about-this-config][About This Config]] @@ -90,6 +92,7 @@ import XMonad.Layout.Simplest import XMonad.Layout.Spacing import XMonad.Layout.SubLayouts import XMonad.Layout.WindowArranger (windowArrange, WindowArrangerMsg(..)) +import XMonad.Layout.WindowNavigation import qualified XMonad.Layout.ToggleLayouts as T (toggleLayouts, ToggleLayout(Toggle)) import qualified XMonad.Layout.MultiToggle as MT (Toggle(..)) @@ -270,6 +273,7 @@ mySpacing' i = spacingRaw True (Border i i i i) True (Border i i i i) True -- mySpacing n sets the gap size around the windows. tall = renamed [Replace "tall"] $ smartBorders + $ windowNavigation $ addTabs shrinkText myTabTheme $ subLayout [] (smartBorders Simplest) $ limitWindows 12 @@ -277,6 +281,7 @@ tall = renamed [Replace "tall"] $ ResizableTall 1 (3/100) (1/2) [] magnify = renamed [Replace "magnify"] $ smartBorders + $ windowNavigation $ addTabs shrinkText myTabTheme $ subLayout [] (smartBorders Simplest) $ magnifier @@ -285,6 +290,7 @@ magnify = renamed [Replace "magnify"] $ ResizableTall 1 (3/100) (1/2) [] monocle = renamed [Replace "monocle"] $ smartBorders + $ windowNavigation $ addTabs shrinkText myTabTheme $ subLayout [] (smartBorders Simplest) $ limitWindows 20 Full @@ -293,6 +299,7 @@ floats = renamed [Replace "floats"] $ limitWindows 20 simplestFloat grid = renamed [Replace "grid"] $ smartBorders + $ windowNavigation $ addTabs shrinkText myTabTheme $ subLayout [] (smartBorders Simplest) $ limitWindows 12 @@ -301,18 +308,21 @@ grid = renamed [Replace "grid"] $ Grid (16/10) spirals = renamed [Replace "spirals"] $ smartBorders + $ windowNavigation $ addTabs shrinkText myTabTheme $ subLayout [] (smartBorders Simplest) $ mySpacing' 8 $ spiral (6/7) threeCol = renamed [Replace "threeCol"] $ smartBorders + $ windowNavigation $ addTabs shrinkText myTabTheme $ subLayout [] (smartBorders Simplest) $ limitWindows 7 $ ThreeCol 1 (3/100) (1/2) threeRow = renamed [Replace "threeRow"] $ smartBorders + $ windowNavigation $ addTabs shrinkText myTabTheme $ subLayout [] (smartBorders Simplest) $ limitWindows 7 diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index f37912b..4f6337f 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -55,6 +55,7 @@ import XMonad.Layout.Simplest import XMonad.Layout.Spacing import XMonad.Layout.SubLayouts import XMonad.Layout.WindowArranger (windowArrange, WindowArrangerMsg(..)) +import XMonad.Layout.WindowNavigation import qualified XMonad.Layout.ToggleLayouts as T (toggleLayouts, ToggleLayout(Toggle)) import qualified XMonad.Layout.MultiToggle as MT (Toggle(..)) @@ -204,6 +205,7 @@ mySpacing' i = spacingRaw True (Border i i i i) True (Border i i i i) True -- mySpacing n sets the gap size around the windows. tall = renamed [Replace "tall"] $ smartBorders + $ windowNavigation $ addTabs shrinkText myTabTheme $ subLayout [] (smartBorders Simplest) $ limitWindows 12 @@ -211,6 +213,7 @@ tall = renamed [Replace "tall"] $ ResizableTall 1 (3/100) (1/2) [] magnify = renamed [Replace "magnify"] $ smartBorders + $ windowNavigation $ addTabs shrinkText myTabTheme $ subLayout [] (smartBorders Simplest) $ magnifier @@ -219,6 +222,7 @@ magnify = renamed [Replace "magnify"] $ ResizableTall 1 (3/100) (1/2) [] monocle = renamed [Replace "monocle"] $ smartBorders + $ windowNavigation $ addTabs shrinkText myTabTheme $ subLayout [] (smartBorders Simplest) $ limitWindows 20 Full @@ -227,6 +231,7 @@ floats = renamed [Replace "floats"] $ limitWindows 20 simplestFloat grid = renamed [Replace "grid"] $ smartBorders + $ windowNavigation $ addTabs shrinkText myTabTheme $ subLayout [] (smartBorders Simplest) $ limitWindows 12 @@ -235,18 +240,21 @@ grid = renamed [Replace "grid"] $ Grid (16/10) spirals = renamed [Replace "spirals"] $ smartBorders + $ windowNavigation $ addTabs shrinkText myTabTheme $ subLayout [] (smartBorders Simplest) $ mySpacing' 8 $ spiral (6/7) threeCol = renamed [Replace "threeCol"] $ smartBorders + $ windowNavigation $ addTabs shrinkText myTabTheme $ subLayout [] (smartBorders Simplest) $ limitWindows 7 $ ThreeCol 1 (3/100) (1/2) threeRow = renamed [Replace "threeRow"] $ smartBorders + $ windowNavigation $ addTabs shrinkText myTabTheme $ subLayout [] (smartBorders Simplest) $ limitWindows 7