Merge branch 'master' of gitlab.com:chriscochrun/dotemacs

This commit is contained in:
Chris Cochrun 2021-03-23 07:00:41 -05:00
commit f3050bd14a
3 changed files with 26 additions and 8 deletions

View file

@ -130,6 +130,7 @@ Let's also turn on =recentf-mode=.
#+end_src
** Let's bootstrap straight.el
#+begin_src emacs-lisp
(setq straight-fix-org t)
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
@ -544,17 +545,25 @@ I do a lot of docker management so having yaml is necessary
** File Management
*** Dired
I'm making a small function in here to open files in the appropriate program using XDG defaults. This is like opening odt files in Libreoffice or mp4 files in MPV.
#+begin_src emacs-lisp
(use-package dired
:ensure nil
:straight nil
:config
(defun chris/dired-open-xdg ()
"Open the file-at-point in the appropriate program"
(interactive)
(let ((file (ignore-errors (dired-get-file-for-visit))))
(browse-url (file-truename file))))
:general
(chris/leader-keys
:states 'normal
:keymaps 'override
"od" '(dired-jump :which-key "open dired here"))
(general-def 'normal dired-mode-map
"q" 'kill-this-buffer))
"q" 'kill-this-buffer
"C-<return>" 'chris/dired-open-xdg))
#+end_src
We need a function to copy the full filename to kill-ring
@ -617,7 +626,6 @@ This is the use-package definition with a lot of customization. Need to setup au
Part of this config includes some special capture templates for my work as a youth minister. I create lessons through both org-mode and org-roam capture templates. The first part comes from org-roam, then the next is org-mode.
#+begin_src emacs-lisp
(use-package org
:straight (:type built-in)
:config
(setq org-startup-indented t
org-edit-src-content-indentation 0
@ -1312,12 +1320,12 @@ Let's add our own eshell prompt. and set the password cache to a significantly h
(propertize path 'face `(:inherit org-level-1))))
(when chris/eshell-status-p
(propertize (or (chris/eshell-status-display) "") 'face font-lock-comment-face))
(propertize "\n" 'face '(:inherit org-todo :weight ultra-bold))
(propertize "\n" 'face '(:inherit org-todo :weight ultra-bold))
" "))))
;;; If the prompt spans over multiple lines, the regexp should match
;;; last line only.
(setq-default eshell-prompt-regexp "^ ")
(setq-default eshell-prompt-regexp "^ ")
(setq eshell-destroy-buffer-when-process-dies t)
(defun chris/pop-eshell ()

View file

@ -110,9 +110,12 @@ cat /tmp/bongo-mpv.socket
youtube-dl --list-formats
youtube-dl --list-formats https://www.youtube.com/watch?v=ry8T67AgbUM
ls
<<<<<<< HEAD
cd
ls
rm Dynamic\ DNS\ Client\ \ 2.0.0.7\ Beta.exe
ls
cat xmrtobtcwall.txt
cp mimeapps.list mimeapps.list.bak
=======
>>>>>>> aa13c8e774c5b244c5fe6a1326d3a0b0ef3465d4

15
init.el
View file

@ -57,6 +57,7 @@
(recentf-mode +1)
(setq straight-fix-org t)
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
@ -324,13 +325,20 @@ vertically."
(use-package dired
:ensure nil
:straight nil
:config
(defun chris/dired-open-xdg ()
"Open the file-at-point in the appropriate program"
(interactive)
(let ((file (ignore-errors (dired-get-file-for-visit))))
(browse-url (file-truename file))))
:general
(chris/leader-keys
:states 'normal
:keymaps 'override
"od" '(dired-jump :which-key "open dired here"))
(general-def 'normal dired-mode-map
"q" 'kill-this-buffer))
"q" 'kill-this-buffer
"C-<return>" 'chris/dired-open-xdg))
(defun chris/dired-yank-filename ()
"Get the full filename from file at point and put into kill-ring"
@ -367,7 +375,6 @@ vertically."
(variable-pitch-mode +1))
(use-package org
:straight (:type built-in)
:config
(setq org-startup-indented t
org-edit-src-content-indentation 0
@ -1005,12 +1012,12 @@ If on a:
(propertize path 'face `(:inherit org-level-1))))
(when chris/eshell-status-p
(propertize (or (chris/eshell-status-display) "") 'face font-lock-comment-face))
(propertize "\n" 'face '(:inherit org-todo :weight ultra-bold))
(propertize "\n" 'face '(:inherit org-todo :weight ultra-bold))
" "))))
;;; If the prompt spans over multiple lines, the regexp should match
;;; last line only.
(setq-default eshell-prompt-regexp "^ ")
(setq-default eshell-prompt-regexp "^ ")
(setq eshell-destroy-buffer-when-process-dies t)
(defun chris/pop-eshell ()