~removed goto functions and using lambdas now

Goto functions just open dired instances for a specific folder, which a
lambda can do better. Instead of having to load the new file just to use
the function, just make the bindings directly via dired.
This commit is contained in:
AChavali
2020-02-09 18:28:28 +00:00
parent eb203c229c
commit 08cc5bd148
2 changed files with 6 additions and 21 deletions

View File

@@ -141,6 +141,7 @@ If RETURN-P, return the message as a string instead of displaying it."
:icon (all-the-icons-octicon "bookmark" :face 'font-lock-keyword-face) :icon (all-the-icons-octicon "bookmark" :face 'font-lock-keyword-face)
:action bookmark-jump))) :action bookmark-jump)))
#+END_SRC #+END_SRC
- Space image comes from [[https://flaticon.com][website]] - Space image comes from [[https://flaticon.com][website]]
- Remove the Github link to the official Doom Emacs repository: it's in muscle memory - Remove the Github link to the official Doom Emacs repository: it's in muscle memory
at this point. at this point.
@@ -340,7 +341,7 @@ each of the unit tests ran."
:server-id 'typescript)))) :server-id 'typescript))))
#+END_SRC #+END_SRC
* Keymap * Keymap
- General keymap for leader General keymap for leader
** Personal ** Personal
- Prefix "SPC m" (rebound from local-leader) that will hold personal keybinds - Prefix "SPC m" (rebound from local-leader) that will hold personal keybinds
for functions that I like using for functions that I like using
@@ -350,16 +351,16 @@ each of the unit tests ran."
(map! (map!
:leader :leader
:prefix ("m" . "personal") ; Personal :prefix ("m" . "personal") ; Personal
:desc "Open books" "b" #'oreodave/goto-books ; I like my books :desc "Open books" "b" #'(lambda () (interactive) (dired (concat org-directory "/Books"))); I like my books
:desc "Open school dir" "s" #'oreodave/goto-school ; I like my schooling :desc "Open school dir" "s" #'(lambda () (interactive) (dired (expand-file-name "~/School")))
:desc "Open weather" "w" #'oreodave/weather ; Nah I don't like the weather
:desc "Open notes" "n" #'(lambda () (interactive) (dired org-directory)) :desc "Open notes" "n" #'(lambda () (interactive) (dired org-directory))
:desc "Open code" "c" #'(lambda () (interactive) (dired (expand-file-name "~/Code")))
:desc "Open weather" "w" #'oreodave/weather
:desc "Change theme" "t" #'oreodave/theme/set-new-theme ; From my own collection :desc "Change theme" "t" #'oreodave/theme/set-new-theme ; From my own collection
(:after pdf-view (:after pdf-view
:desc "Goto page on pdf" "p" #'pdf-view-goto-page) :desc "Goto page on pdf" "p" #'pdf-view-goto-page)
:desc "Reload emacs" "r" #'oreodave/reload) ; Reload is necessary :desc "Reload emacs" "r" #'oreodave/reload) ; Reload is necessary
#+END_SRC #+END_SRC
** Counsel ** Counsel
- Counsel keybind config - Counsel keybind config
- Mostly just convenience stuff that happens to use counsel - Mostly just convenience stuff that happens to use counsel

View File

@@ -11,14 +11,6 @@ Personal functionality that aid my workflow or are just cool.
#+END_SRC #+END_SRC
Reload the doom session by brute force fully loading the "config.el" file in the Reload the doom session by brute force fully loading the "config.el" file in the
doom private directory. doom private directory.
* Go to Books
#+BEGIN_SRC elisp
(defun oreodave/goto-books ()
"Goto the books section"
(interactive)
(dired (concat org-directory "/Books")))
#+END_SRC
Open a Dired session to the books directory in the org-directory.
* Change theme * Change theme
#+BEGIN_SRC elisp #+BEGIN_SRC elisp
(setq oreodave/themes/theme-list '(doom-solarized-dark doom-gruvbox doom-city-lights (setq oreodave/themes/theme-list '(doom-solarized-dark doom-gruvbox doom-city-lights
@@ -58,14 +50,6 @@ Allow user to set a theme from a limited set of candidates, based on
- Light themes other than Emacs default, maybe sometimes solarized-light - Light themes other than Emacs default, maybe sometimes solarized-light
- Horrid low contrast ones with no colour. Grayscale particularly. I can't - Horrid low contrast ones with no colour. Grayscale particularly. I can't
handle those. handle those.
* Go to School directory
#+BEGIN_SRC elisp
(defun oreodave/goto-school ()
"Goto the school directory"
(interactive)
(dired (expand-file-name "~/School")))
#+END_SRC
Going to the school directory, quick access to school work.
* Password store * Password store
Function to get a password given a key. Function to get a password given a key.
#+BEGIN_SRC elisp #+BEGIN_SRC elisp