|
@@ -78,6 +78,16 @@ Experimenting with that package. I might need to fork it in the future to add th
|
|
|
(package! pico8-mode :recipe (:host github :repo "Kaali/pico8-mode"))
|
|
(package! pico8-mode :recipe (:host github :repo "Kaali/pico8-mode"))
|
|
|
#+end_src
|
|
#+end_src
|
|
|
* TODO Config variables to make stuff easily tweakable
|
|
* TODO Config variables to make stuff easily tweakable
|
|
|
|
|
+*** Powershell
|
|
|
|
|
+#+begin_src emacs-lisp
|
|
|
|
|
+(package! powershell.el :ignore (not (eq system-type 'windows-nt)) :recipe (:host github :repo "jschaf/powershell.el"))
|
|
|
|
|
+#+end_src
|
|
|
|
|
+*** Wikinforg
|
|
|
|
|
+#+begin_src emacs-lisp
|
|
|
|
|
+(package! wikinfo :recipe (:host github :repo "progfolio/wikinfo"))
|
|
|
|
|
+(package! wikinforg :recipe (:host github :repo "progfolio/wikinforg"))
|
|
|
|
|
+#+end_src
|
|
|
|
|
+* TODO Config variables to make stuff easily tweakable
|
|
|
* Helper functions
|
|
* Helper functions
|
|
|
I had issues before dealing with specific patterns at configuration time. At
|
|
I had issues before dealing with specific patterns at configuration time. At
|
|
|
this moment, I don't have all the packages nor do I want to deal with them
|
|
this moment, I don't have all the packages nor do I want to deal with them
|
|
@@ -230,8 +240,7 @@ I'm disabling the font icons when one of the fonts (here GitHub's) isn't present
|
|
|
so I can directly fallback on the unicode symbols. Allows me to tone down the
|
|
so I can directly fallback on the unicode symbols. Allows me to tone down the
|
|
|
visual noise.
|
|
visual noise.
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
-(use-package! doom-modeline
|
|
|
|
|
- :config
|
|
|
|
|
|
|
+(after! doom-modeline
|
|
|
(if (member "github-octicons" (font-family-list))
|
|
(if (member "github-octicons" (font-family-list))
|
|
|
(progn
|
|
(progn
|
|
|
(setq doom-modeline-icon t)
|
|
(setq doom-modeline-icon t)
|
|
@@ -268,6 +277,7 @@ file locations are derived from the org directory), so the ~after!~ hook won't
|
|
|
update those variables.
|
|
update those variables.
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
(use-package! org
|
|
(use-package! org
|
|
|
|
|
+ :after doom
|
|
|
:init
|
|
:init
|
|
|
(let ((base-folder-name "Notes"))
|
|
(let ((base-folder-name "Notes"))
|
|
|
(when (eq system-type 'windows-nt)
|
|
(when (eq system-type 'windows-nt)
|
|
@@ -298,8 +308,7 @@ using a different background color.
|
|
|
Also tweaking the ellipsis character to actually use an ellipsis character and
|
|
Also tweaking the ellipsis character to actually use an ellipsis character and
|
|
|
disabling the line numbers.
|
|
disabling the line numbers.
|
|
|
#+begin_src emacs-lisp
|
|
#+begin_src emacs-lisp
|
|
|
-(use-package! org
|
|
|
|
|
- :config
|
|
|
|
|
|
|
+(after! org
|
|
|
(setq org-ellipsis "…")
|
|
(setq org-ellipsis "…")
|
|
|
(custom-set-faces! '(org-block :extend t))
|
|
(custom-set-faces! '(org-block :extend t))
|
|
|
(add-hook 'org-mode-hook (lambda () (setq-local display-line-numbers nil))))
|
|
(add-hook 'org-mode-hook (lambda () (setq-local display-line-numbers nil))))
|
|
@@ -308,8 +317,7 @@ disabling the line numbers.
|
|
|
I kinda like this feature and want it back on C-k on Org. The current snippet is
|
|
I kinda like this feature and want it back on C-k on Org. The current snippet is
|
|
|
broken, I need to find the proper way to turn digraph input back on.
|
|
broken, I need to find the proper way to turn digraph input back on.
|
|
|
#+begin_src emacs-lisp :tangle no
|
|
#+begin_src emacs-lisp :tangle no
|
|
|
-(use-package! org
|
|
|
|
|
- :config
|
|
|
|
|
|
|
+(after! org
|
|
|
(map! :map evil-org-mode-map
|
|
(map! :map evil-org-mode-map
|
|
|
:i "C-k" 'evil-insert-digraph))
|
|
:i "C-k" 'evil-insert-digraph))
|
|
|
#+end_src
|
|
#+end_src
|
|
@@ -318,8 +326,7 @@ I'd like to track when I finish tasks. I'm not feeling that adding a note each
|
|
|
time I close an item might be the best thing as I'd get tired of the prompt
|
|
time I close an item might be the best thing as I'd get tired of the prompt
|
|
|
really quickly. I'll reserve this to manual additions.
|
|
really quickly. I'll reserve this to manual additions.
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
-(use-package! org
|
|
|
|
|
- :config
|
|
|
|
|
|
|
+(after! org
|
|
|
(setq org-log-done 'time))
|
|
(setq org-log-done 'time))
|
|
|
#+END_SRC
|
|
#+END_SRC
|
|
|
** TODO Org Brain
|
|
** TODO Org Brain
|
|
@@ -328,8 +335,9 @@ default brain(s) down. A small fix to avoid org-brain's key bindings be
|
|
|
overwritten by evil.
|
|
overwritten by evil.
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
-(use-package! org-brain
|
|
|
|
|
- :config
|
|
|
|
|
|
|
+(after! org-brain
|
|
|
|
|
+;; HACK @work
|
|
|
|
|
+ (setq org-brain-path "C:\\Users\\fdormont\\Documents\\Notes\\Brain")
|
|
|
(evil-set-initial-state 'org-brain-visualize-mode 'emacs)
|
|
(evil-set-initial-state 'org-brain-visualize-mode 'emacs)
|
|
|
(custom-set-faces!
|
|
(custom-set-faces!
|
|
|
`(org-brain-child :inherit fixed-pitch :foreground ,(doom-color 'blue))
|
|
`(org-brain-child :inherit fixed-pitch :foreground ,(doom-color 'blue))
|
|
@@ -341,8 +349,7 @@ overwritten by evil.
|
|
|
Working icon display with ~all-the-icons~ to have a small icon before various
|
|
Working icon display with ~all-the-icons~ to have a small icon before various
|
|
|
kind of resource links.
|
|
kind of resource links.
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
-(use-package! org-brain
|
|
|
|
|
- :config
|
|
|
|
|
|
|
+(after! org-brain
|
|
|
(defun org-brain-insert-resource-icon (link)
|
|
(defun org-brain-insert-resource-icon (link)
|
|
|
"Insert an icon, based on content of org-mode LINK."
|
|
"Insert an icon, based on content of org-mode LINK."
|
|
|
(let ((starts_with_http (string-prefix-p "http" link)))
|
|
(let ((starts_with_http (string-prefix-p "http" link)))
|
|
@@ -358,6 +365,8 @@ kind of resource links.
|
|
|
;; (propertize (all-the-icons-faicon "file-code-o") 'face '(:foreground "red") )
|
|
;; (propertize (all-the-icons-faicon "file-code-o") 'face '(:foreground "red") )
|
|
|
((string-suffix-p ".pdf" link)
|
|
((string-suffix-p ".pdf" link)
|
|
|
(all-the-icons-octicon "file-pdf"))
|
|
(all-the-icons-octicon "file-pdf"))
|
|
|
|
|
+ ((string-match "shadertoy\\.com" link)
|
|
|
|
|
+ (all-the-icons-fileicon "vertex-shader"))
|
|
|
((string-match "\\.cpp" link)
|
|
((string-match "\\.cpp" link)
|
|
|
(all-the-icons-alltheicon "cplusplus"))
|
|
(all-the-icons-alltheicon "cplusplus"))
|
|
|
((string-match "\\.cs" link)
|
|
((string-match "\\.cs" link)
|
|
@@ -431,6 +440,7 @@ characters.
|
|
|
:localleader
|
|
:localleader
|
|
|
:desc "brain" "B" nil
|
|
:desc "brain" "B" nil
|
|
|
:desc "Get Id" "Bi" #'org-brain-get-id
|
|
:desc "Get Id" "Bi" #'org-brain-get-id
|
|
|
|
|
+ :desc "Ensure ids" "BI" #'org-brain-ensure-ids-in-buffer
|
|
|
:desc "Visualize" "Bv" #'org-brain-visualize
|
|
:desc "Visualize" "Bv" #'org-brain-visualize
|
|
|
)))
|
|
)))
|
|
|
#+end_src
|
|
#+end_src
|
|
@@ -447,6 +457,15 @@ Here's some keybindings vaguely inspired from my experience with Spacemacs.
|
|
|
:desc "Narrow to element" "mNb" #'org-narrow-to-block
|
|
:desc "Narrow to element" "mNb" #'org-narrow-to-block
|
|
|
:desc "Widen" "mNw" #'widen)
|
|
:desc "Widen" "mNw" #'widen)
|
|
|
#+END_SRC
|
|
#+END_SRC
|
|
|
|
|
+(map! :map org-mode-map
|
|
|
|
|
+ (:when (featurep! :lang org +brain)
|
|
|
|
|
+ :localleader
|
|
|
|
|
+ (:prefix ("B" . "brain")
|
|
|
|
|
+ :desc "Get Id" "i" #'org-brain-get-id
|
|
|
|
|
+ :desc "Ensure ids" "I" #'org-brain-ensure-ids-in-buffer
|
|
|
|
|
+ :desc "Visualize" "v" #'org-brain-visualize
|
|
|
|
|
+ )))
|
|
|
|
|
+#+end_src
|
|
|
** TODO Org-Agenga
|
|
** TODO Org-Agenga
|
|
|
*** TODO French day names
|
|
*** TODO French day names
|
|
|
#+begin_src emacs-lisp
|
|
#+begin_src emacs-lisp
|
|
@@ -460,8 +479,7 @@ Here's some keybindings vaguely inspired from my experience with Spacemacs.
|
|
|
#+end_src
|
|
#+end_src
|
|
|
** TODO Org-Capture
|
|
** TODO Org-Capture
|
|
|
#+begin_src emacs-lisp
|
|
#+begin_src emacs-lisp
|
|
|
-(use-package! org
|
|
|
|
|
- :config
|
|
|
|
|
|
|
+(after! org
|
|
|
(setq chicken/dreamlog-file (concat org-directory "/Dreamlog.org"))
|
|
(setq chicken/dreamlog-file (concat org-directory "/Dreamlog.org"))
|
|
|
(setq
|
|
(setq
|
|
|
org-capture-templates
|
|
org-capture-templates
|
|
@@ -496,6 +514,13 @@ Here's some keybindings vaguely inspired from my experience with Spacemacs.
|
|
|
"* %U %?\n %i\n %a" :heading "Notes" :prepend t)
|
|
"* %U %?\n %i\n %a" :heading "Notes" :prepend t)
|
|
|
("oc" "Project changelog" entry #'+org-capture-central-project-changelog-file
|
|
("oc" "Project changelog" entry #'+org-capture-central-project-changelog-file
|
|
|
"* %U %?\n %i\n %a" :heading "Changelog" :prepend t))))
|
|
"* %U %?\n %i\n %a" :heading "Changelog" :prepend t))))
|
|
|
|
|
+ #+end_src
|
|
|
|
|
+** TODO Wikinfoorg
|
|
|
|
|
+#+begin_src emacs-lisp
|
|
|
|
|
+(use-package! wikinfo
|
|
|
|
|
+ :after org)
|
|
|
|
|
+(use-package! wikinforg
|
|
|
|
|
+ :after wikinfo)
|
|
|
#+end_src
|
|
#+end_src
|
|
|
* Pico-8
|
|
* Pico-8
|
|
|
Using that [[https://github.com/Kaali/pico8-mode][pico-8 mode]] for Emacs might be fun. It even includes an overlay to
|
|
Using that [[https://github.com/Kaali/pico8-mode][pico-8 mode]] for Emacs might be fun. It even includes an overlay to
|
|
@@ -508,10 +533,13 @@ light mode.
|
|
|
Mimicking Pico's decision to make tabs as short as spaces due to small screen
|
|
Mimicking Pico's decision to make tabs as short as spaces due to small screen
|
|
|
space.
|
|
space.
|
|
|
#+begin_src emacs-lisp
|
|
#+begin_src emacs-lisp
|
|
|
|
|
+(use-package! pico8-mode
|
|
|
|
|
+ :after lua
|
|
|
|
|
+ :config
|
|
|
(add-hook 'pico8-mode-hook
|
|
(add-hook 'pico8-mode-hook
|
|
|
(lambda ()
|
|
(lambda ()
|
|
|
(setq indent-tabs-mode t)
|
|
(setq indent-tabs-mode t)
|
|
|
- (setq tab-width 2)))
|
|
|
|
|
|
|
+ (setq tab-width 2))))
|
|
|
#+end_src
|
|
#+end_src
|
|
|
|
|
|
|
|
** Proper non-lua text color
|
|
** Proper non-lua text color
|
|
@@ -562,25 +590,25 @@ project folder. There is also a check to detect first the presence of a config
|
|
|
file before attmepting to invoke hugo to give a sensible message.
|
|
file before attmepting to invoke hugo to give a sensible message.
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
-;;;###autoload
|
|
|
|
|
-(defun chicken/hugo-goto-draft ()
|
|
|
|
|
- "Opens an ivy-powered search helper to quickly jump on a draft
|
|
|
|
|
|
|
+(after! org
|
|
|
|
|
+ (defun chicken/hugo-goto-draft ()
|
|
|
|
|
+ "Opens an ivy-powered search helper to quickly jump on a draft
|
|
|
if the current project is the root of a Hugo-powered site."
|
|
if the current project is the root of a Hugo-powered site."
|
|
|
- (interactive)
|
|
|
|
|
- (if (file-exists-p! "config.toml" (projectile-project-root))
|
|
|
|
|
- (ivy-read "Open a draft: " (chicken/list-hugo-drafts)
|
|
|
|
|
- :require-match t
|
|
|
|
|
- :history 'chicken/hugo-goto-history
|
|
|
|
|
- :action (lambda (file)
|
|
|
|
|
- (with-ivy-window
|
|
|
|
|
- (when file
|
|
|
|
|
- (let*
|
|
|
|
|
- ((root (projectile-project-root))
|
|
|
|
|
- (full-file (concat root file)))
|
|
|
|
|
- (find-file full-file)))))
|
|
|
|
|
- :unwind #'counsel-delete-process
|
|
|
|
|
- :caller 'chicken/hugo-goto-draft)
|
|
|
|
|
- (message "The current project doesn't have a config.toml in the root directory.")))
|
|
|
|
|
|
|
+ (interactive)
|
|
|
|
|
+ (if (file-exists-p! "config.toml" (projectile-project-root))
|
|
|
|
|
+ (ivy-read "Open a draft: " (chicken/list-hugo-drafts)
|
|
|
|
|
+ :require-match t
|
|
|
|
|
+ :history 'chicken/hugo-goto-history
|
|
|
|
|
+ :action (lambda (file)
|
|
|
|
|
+ (with-ivy-window
|
|
|
|
|
+ (when file
|
|
|
|
|
+ (let*
|
|
|
|
|
+ ((root (projectile-project-root))
|
|
|
|
|
+ (full-file (concat root file)))
|
|
|
|
|
+ (find-file full-file)))))
|
|
|
|
|
+ :unwind #'counsel-delete-process
|
|
|
|
|
+ :caller 'chicken/hugo-goto-draft)
|
|
|
|
|
+ (message "The current project doesn't have a config.toml in the root directory."))))
|
|
|
#+END_SRC
|
|
#+END_SRC
|
|
|
** PROJ Convert GIF to videos
|
|
** PROJ Convert GIF to videos
|
|
|
I like GIFs, that's a fact. But neither your bandwidth nor your CPU will
|
|
I like GIFs, that's a fact. But neither your bandwidth nor your CPU will
|
|
@@ -761,10 +789,10 @@ after giving an argument."""
|
|
|
Windows' emoji panel is great but not convenient enough when focusing on the
|
|
Windows' emoji panel is great but not convenient enough when focusing on the
|
|
|
keyboard. Let's add a mapping to quickly insert various kaomojis.
|
|
keyboard. Let's add a mapping to quickly insert various kaomojis.
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
-(map! (:leader ; Use leader key from now on
|
|
|
|
|
- :desc "Kaomoji" "iK" nil
|
|
|
|
|
- :desc "Shrug" "iKs" (lambda ()(interactive) (insert "¯\\_(ツ)_/¯"))
|
|
|
|
|
- :desc "Shrug (clip)" "iKS" (lambda ()(interactive) (kill-new "¯\\_(ツ)_/¯"))))
|
|
|
|
|
|
|
+(map! :leader
|
|
|
|
|
+ :desc "Kaomoji" "iK" nil
|
|
|
|
|
+ :desc "Shrug" "iKs" (lambda ()(interactive) (insert "¯\\_(ツ)_/¯"))
|
|
|
|
|
+ :desc "Shrug (clip)" "iKS" (lambda ()(interactive) (kill-new "¯\\_(ツ)_/¯")))
|
|
|
#+END_SRC
|
|
#+END_SRC
|
|
|
|
|
|
|
|
I have further questions adressed to myself regarding the mental sanity behind
|
|
I have further questions adressed to myself regarding the mental sanity behind
|
|
@@ -785,12 +813,11 @@ First, the function that will feed ~ivy-read~. It assumes ~es.exe~ is in your
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
(when (eq system-type 'windows-nt)
|
|
(when (eq system-type 'windows-nt)
|
|
|
(defun chicken/counsel-es-function (str)
|
|
(defun chicken/counsel-es-function (str)
|
|
|
- (or
|
|
|
|
|
- (ivy-more-chars)
|
|
|
|
|
- (progn
|
|
|
|
|
- (counsel--async-command
|
|
|
|
|
- (format "es.exe %s" str))
|
|
|
|
|
- '("" "working...")))))
|
|
|
|
|
|
|
+ (or (ivy-more-chars)
|
|
|
|
|
+ (progn
|
|
|
|
|
+ (counsel--async-command
|
|
|
|
|
+ (format "es.exe %s" str))
|
|
|
|
|
+ '("" "working...")))))
|
|
|
#+END_SRC
|
|
#+END_SRC
|
|
|
|
|
|
|
|
Then the search function. It is defined when the executable ~es.exe~ can be
|
|
Then the search function. It is defined when the executable ~es.exe~ can be
|