This file was last updated at:
#+begin_src emacs-lisp :tangle no :exports results
- (format-time-string "%d-%m-%Y" (file-attribute-modification-time
- (file-attributes esy/source-path)))
+ (format-time-string
+ "%d-%m-%Y"
+ (file-attribute-modification-time
+ (file-attributes
+ esy/source-path)))
#+end_src
** Current source control revision
(put 'suspend-frame 'disabled t)
#+end_src
+** Variable pitch font
+:PROPERTIES:
+:CUSTOM_ID: variable-pitch-font
+:END:
+
+#+begin_src emacs-lisp
+ (set-face-font 'variable-pitch "Iosevka Etoile-13")
+#+end_src
+
** More display settings
:PROPERTIES:
:CUSTOM_ID: display-goodies
'(("P" (list project-current))))
#+end_src
+** Open files (with =C-c C-o=) in Emacs
+ :PROPERTIES:
+ :CUSTOM_ID: org-file-apps-t-emacs
+ :CreatedAt: <2022-06-10 Fri>
+ :CapturedAt:
+ :CapturedAs: Emacs configuration fragment
+ :END:
+
+#+begin_src emacs-lisp
+ (setq org-file-apps '((t . emacs)))
+#+end_src
+
* Email settings
:PROPERTIES:
:CUSTOM_ID: email
:END:
#+begin_src emacs-lisp
+ (with-eval-after-load 'dired
+ (setq dired-dwim-target t))
(add-hook 'dired-mode-hook #'all-the-icons-dired-mode)
#+end_src
(add-hook 'after-init-hook #'display-battery-mode)
#+end_src
+* Text mode and derivatives
+#+begin_src emacs-lisp
+ (add-hook 'text-mode-hook #'flyspell-mode)
+#+end_src
+
* Programming
:PROPERTIES:
:CUSTOM_ID: programming
(logos--mode 'flymake-mode -1))
(with-eval-after-load 'olivetti
- (setq olivetti-body-width 80))
+ (setq olivetti-body-width 90))
(with-eval-after-load 'logos
(setq-default logos-olivetti t
logos-hide-fringe t
logos-scroll-lock t
- logos-variable-pitch nil
+ logos-variable-pitch t
logos-buffer-read-only t
logos-hide-mode-line t
logos-hide-buffer-boundaries t)
(logos-focus-mode 'toggle))
#+end_src
+* =shell= customizations
+:PROPERTIES:
+:CUSTOM_ID: shell
+:END:
+
+** Kill =shell= buffers on exit
+Kill =M-x shell= buffers automatically when the shell process
+terminates, e.g. when pressing =C-d=.
+
+#+begin_src emacs-lisp
+ (setq shell-kill-buffer-on-exit t)
+#+end_src
+
+** Restart async shell process :cmd:kbd:
+:PROPERTIES:
+:CUSTOM_ID: shell-restart-process
+:CreatedAt: <2022-07-01 Fri>
+:CapturedAt:
+:CapturedAs: Emacs configuration fragment
+:END:
+
+#+begin_src emacs-lisp
+ (defun shell-restart-process ()
+ "Restart process of `shell-mode' buffer."
+ (interactive)
+ (let* ((proc (get-buffer-process (current-buffer)))
+ (pid (process-id proc))
+ (cmd (caddr (process-command proc))))
+ (message "%s" cmd)
+ (delete-process proc)
+ (async-shell-command cmd)))
+
+ (with-eval-after-load 'shell
+ (keymap-set shell-mode-map "C-c C-k" #'shell-restart-process))
+#+end_src
+
+
* Misc. settings
:PROPERTIES:
:CUSTOM_ID: misc
(add-to-list 'zoneinfo-style-world-list '("Europe/Amsterdam" "Amsterdam")))
#+end_src
-** =shell= customizations
+** Restart async shell process in =process-menu-mode= :cmd:kbd:
:PROPERTIES:
-:CUSTOM_ID: shell
-:CreatedAt: <2022-06-10 Fri>
-:CapturedAt: [[file:~/inbox.org::*Followup on this mail from Adam][Followup on this mail from Adam]]
+:CUSTOM_ID: process-menu-restart-process
+:CreatedAt: <2022-07-01 Fri>
+:CapturedAt:
:CapturedAs: Emacs configuration fragment
:END:
-Kill =M-x shell= buffers automatically when the shell process
-terminates, e.g. when pressing =C-d=.
-
#+begin_src emacs-lisp
- (setq shell-kill-buffer-on-exit t)
-#+end_src
-
-** Open files (with =C-c C-o=) in Emacs
- :PROPERTIES:
- :CUSTOM_ID: org-file-apps-t-emacs
- :CreatedAt: <2022-06-10 Fri>
- :CapturedAt:
- :CapturedAs: Emacs configuration fragment
- :END:
-
-#+begin_src emacs-lisp
- (setq org-file-apps '((t . emacs)))
+ (defun process-menu-restart-process ()
+ "Restart process at point in a `list-processes' buffer."
+ (interactive)
+ (let* ((pos (point))
+ (pid (tabulated-list-get-id))
+ (ent (tabulated-list-get-entry))
+ (cmd (combine-and-quote-strings
+ (seq-drop (split-string-shell-command (seq-elt ent 6))
+ 2))))
+ (delete-process pid)
+ (async-shell-command cmd)
+ (revert-buffer)))
+
+ (with-eval-after-load 'simple
+ (keymap-set process-menu-mode-map
+ "r"
+ #'process-menu-restart-process))
#+end_src
* Elisp Footer