Clean up own utilities collection
Properly separate interactive commands from simple functions in use-package declaration, and remove two unused functions.
This commit is contained in:
parent
40e98e5bfa
commit
0fe7ec5c1b
21
init.el
21
init.el
@ -357,7 +357,6 @@
|
|||||||
|
|
||||||
(use-package db-utils
|
(use-package db-utils
|
||||||
:commands (endless/fill-or-unfill
|
:commands (endless/fill-or-unfill
|
||||||
db/delete-trailing-whitespace-maybe
|
|
||||||
db/run-or-hide-shell
|
db/run-or-hide-shell
|
||||||
db/gnus
|
db/gnus
|
||||||
db/org-agenda
|
db/org-agenda
|
||||||
@ -368,33 +367,33 @@
|
|||||||
db/hex-to-ascii
|
db/hex-to-ascii
|
||||||
db/text-to-hex
|
db/text-to-hex
|
||||||
turn-on-lispy-when-available
|
turn-on-lispy-when-available
|
||||||
turn-on-flycheck-when-file
|
|
||||||
db/sort-nsm-permanent-settings
|
|
||||||
endless/colorize-compilation
|
|
||||||
db/turn-off-local-electric-pair-mode
|
|
||||||
db/two-monitors-xrandr
|
db/two-monitors-xrandr
|
||||||
db/one-monitor-xrandr
|
db/one-monitor-xrandr
|
||||||
db/pretty-print-xml
|
db/pretty-print-xml
|
||||||
db/bookmark-add-external
|
db/bookmark-add-external
|
||||||
db/bookmark-add-url
|
db/bookmark-add-url
|
||||||
|
db/bookmark-add-eww
|
||||||
db/bookmark-relocate
|
db/bookmark-relocate
|
||||||
db/bookmark-bmenu-relocate
|
db/bookmark-bmenu-relocate
|
||||||
db/lookup-smime-key
|
db/lookup-smime-key
|
||||||
db/dired-from-shell-command
|
db/dired-from-shell-command
|
||||||
db/system-open
|
|
||||||
db/switch-to-dark-theme
|
db/switch-to-dark-theme
|
||||||
db/switch-to-light-theme
|
db/switch-to-light-theme
|
||||||
keyboard-quit-context+
|
keyboard-quit-context+
|
||||||
|
db/dired-ediff-files
|
||||||
|
db/dired-back-to-top
|
||||||
|
db/dired-jump-to-bottom
|
||||||
|
db/dired-get-size)
|
||||||
|
:autoload (turn-on-flycheck-when-file
|
||||||
|
db/sort-nsm-permanent-settings
|
||||||
|
endless/colorize-compilation
|
||||||
|
db/system-open
|
||||||
db/convert-lf-to-crlf-in-buffer
|
db/convert-lf-to-crlf-in-buffer
|
||||||
db/convert-crlf-to-lf-in-buffer
|
db/convert-crlf-to-lf-in-buffer
|
||||||
db/replace-variables-in-string
|
db/replace-variables-in-string
|
||||||
db/dired-ediff-files
|
|
||||||
db/grep-read-files
|
db/grep-read-files
|
||||||
db/make-selector-from-table-header
|
db/make-selector-from-table-header
|
||||||
db/get-library-version
|
db/get-library-version))
|
||||||
db/dired-back-to-top
|
|
||||||
db/dired-jump-to-bottom
|
|
||||||
db/dired-get-size))
|
|
||||||
|
|
||||||
(use-package db-hydras
|
(use-package db-hydras
|
||||||
:commands (hydra-toggle/body
|
:commands (hydra-toggle/body
|
||||||
|
|||||||
@ -173,11 +173,6 @@ With a prefix argument P, isearch for the symbol at point."
|
|||||||
fill-column)))
|
fill-column)))
|
||||||
(call-interactively #'fill-paragraph)))
|
(call-interactively #'fill-paragraph)))
|
||||||
|
|
||||||
(defun db/delete-trailing-whitespace-maybe ()
|
|
||||||
"Call `delete-trailing-whitespace', but not in `message-mode'."
|
|
||||||
(unless (derived-mode-p 'message-mode)
|
|
||||||
(delete-trailing-whitespace)))
|
|
||||||
|
|
||||||
(defun db/find-window-by-buffer-mode (mode)
|
(defun db/find-window-by-buffer-mode (mode)
|
||||||
"Return first window in current frame displaying a buffer with major mode MODE."
|
"Return first window in current frame displaying a buffer with major mode MODE."
|
||||||
(cl-find-if (lambda (window)
|
(cl-find-if (lambda (window)
|
||||||
@ -291,11 +286,6 @@ Will print a warning in case of failure."
|
|||||||
(let ((inhibit-read-only t))
|
(let ((inhibit-read-only t))
|
||||||
(ansi-color-apply-on-region compilation-filter-start (point))))
|
(ansi-color-apply-on-region compilation-filter-start (point))))
|
||||||
|
|
||||||
(defun db/turn-off-local-electric-pair-mode ()
|
|
||||||
"Locally turn off electric pair mode."
|
|
||||||
(interactive)
|
|
||||||
(electric-pair-local-mode -1))
|
|
||||||
|
|
||||||
(defun db/pretty-print-xml ()
|
(defun db/pretty-print-xml ()
|
||||||
"Stupid function to pretty print XML content in current buffer."
|
"Stupid function to pretty print XML content in current buffer."
|
||||||
;; We assume that < and > only occur as XML tag delimiters, not in strings;
|
;; We assume that < and > only occur as XML tag delimiters, not in strings;
|
||||||
@ -794,11 +784,13 @@ number of bytes has been inserted."
|
|||||||
|
|
||||||
(defun db/two-monitors-xrandr ()
|
(defun db/two-monitors-xrandr ()
|
||||||
"Activate second monitor using xrandr."
|
"Activate second monitor using xrandr."
|
||||||
|
(interactive)
|
||||||
(call-process "xrandr" nil nil nil
|
(call-process "xrandr" nil nil nil
|
||||||
"--output" "HDMI-3" "--primary" "--right-of" "LVDS-1" "--auto"))
|
"--output" "HDMI-3" "--primary" "--right-of" "LVDS-1" "--auto"))
|
||||||
|
|
||||||
(defun db/one-monitor-xrandr ()
|
(defun db/one-monitor-xrandr ()
|
||||||
"Deactivate all additional monitors."
|
"Deactivate all additional monitors."
|
||||||
|
(interactive)
|
||||||
(call-process "xrandr" nil nil nil
|
(call-process "xrandr" nil nil nil
|
||||||
"--output" "HDMI-3" "--off"))
|
"--output" "HDMI-3" "--off"))
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user