From 401552a4658b765410e2aceb3ad867e037934a53 Mon Sep 17 00:00:00 2001 From: jao Date: Mon, 18 Jul 2022 02:40:00 +0100 Subject: nits --- custom/jao-custom-completion.el | 3 +- data/kitty.conf | 5 ++- init.el | 73 +++++++++++++++++++++-------------------- lib/eos/jao-sleep.el | 12 +++---- 4 files changed, 47 insertions(+), 46 deletions(-) diff --git a/custom/jao-custom-completion.el b/custom/jao-custom-completion.el index 47ada77..9174701 100644 --- a/custom/jao-custom-completion.el +++ b/custom/jao-custom-completion.el @@ -6,7 +6,8 @@ :config (defun jao-imenu-hook () (cond ((derived-mode-p 'org-mode) (org-reveal t)) - (outline-minor-mode (outline-show-entry)))) + (outline-minor-mode (outline-show-entry)) + ((derived-mode-p 'outline-mode) (outline-show-entry)))) (add-hook 'imenu-after-jump-hook #'jao-imenu-hook)) ;;; completion styles diff --git a/data/kitty.conf b/data/kitty.conf index fd8d405..5440de5 100644 --- a/data/kitty.conf +++ b/data/kitty.conf @@ -3,10 +3,9 @@ font_size 9.0 # bold_font Fira Code SemiBold # italic_font Fira Code Italic -font_family DejaVu Sands Mono -bold_font DejaVu Sans Mono SemiBold -disable_ligatures always +font_family DejaVu Sans Mono +disable_ligatures always box_drawing_scale 0.1, 0.5, 1, 1 cursor orangered2 diff --git a/init.el b/init.el index c558d7f..8493265 100644 --- a/init.el +++ b/init.el @@ -1064,7 +1064,7 @@ ;;;; redisplay escape hatch -(setq max-redisplay-ticks 1250000) +(setq max-redisplay-ticks 2250000) ;;;; scrolling (setq scroll-preserve-screen-position 'always scroll-conservatively most-positive-fixnum @@ -1148,41 +1148,42 @@ (define-key ctl-x-4-map (kbd "t") 'transpose-windows) ;;;; switch window -(use-package switch-window - :ensure t - :custom ((switch-window-minibuffer-shortcut ?z) - (switch-window-background t) - (switch-window-shortcut-style 'qwerty) - (switch-window-shortcut-appearance 'text) - (switch-window-timeout 7) - (switch-window-threshold 2)) - :init (defalias 'jao-other-window 'switch-window) - :config - (defun jao-switch-window--then (prompt cmd) - (let ((f `(lambda () - (let ((default-directory ,default-directory)) - (call-interactively ',cmd))))) - (switch-window--then prompt f f))) - - (defun jao-switch-window-then-dired () - (interactive) - (jao-switch-window--then "Find directory" 'dired)) - - (defun jao-switch-window-then-find-file () - (interactive) - (jao-switch-window--then "Find file" 'find-file)) - - (defun jao-switch-window-then-consult-buffer () - (interactive) - (jao-switch-window--then "Switch to buffer" 'consult-buffer)) - - :bind (("M-o" . switch-window) - ("M-O" . switch-window-then-swap-buffer) - ("s-o" . switch-window) - ("s-O" . switch-window-then-swap-buffer) - ("C-x 4 d" . jao-switch-window-then-dired) - ("C-x 4 f" . jao-switch-window-then-find-file) - ("C-x 4 b" . jao-switch-window-then-consult-buffer))) +(when window-system + (use-package switch-window + :ensure t + :custom ((switch-window-minibuffer-shortcut ?z) + (switch-window-background t) + (switch-window-shortcut-style 'qwerty) + (switch-window-shortcut-appearance 'text) + (switch-window-timeout 7) + (switch-window-threshold 2)) + :init (defalias 'jao-other-window 'switch-window) + :config + (defun jao-switch-window--then (prompt cmd) + (let ((f `(lambda () + (let ((default-directory ,default-directory)) + (call-interactively ',cmd))))) + (switch-window--then prompt f f))) + + (defun jao-switch-window-then-dired () + (interactive) + (jao-switch-window--then "Find directory" 'dired)) + + (defun jao-switch-window-then-find-file () + (interactive) + (jao-switch-window--then "Find file" 'find-file)) + + (defun jao-switch-window-then-consult-buffer () + (interactive) + (jao-switch-window--then "Switch to buffer" 'consult-buffer)) + + :bind (("M-o" . switch-window) + ("M-O" . switch-window-then-swap-buffer) + ("s-o" . switch-window) + ("s-O" . switch-window-then-swap-buffer) + ("C-x 4 d" . jao-switch-window-then-dired) + ("C-x 4 f" . jao-switch-window-then-find-file) + ("C-x 4 b" . jao-switch-window-then-consult-buffer)))) ;;;; winner mode (winner-mode 1) diff --git a/lib/eos/jao-sleep.el b/lib/eos/jao-sleep.el index 93da0e7..b047373 100644 --- a/lib/eos/jao-sleep.el +++ b/lib/eos/jao-sleep.el @@ -41,12 +41,12 @@ "Register actions to take on sleep and on awake, using the system D-BUS." (when (featurep 'dbusbind) (setq jao-sleep--dbus-sleep-registration-object - (dbus-register-signal (if session-dbus :session :system) - "org.freedesktop.login1" - "/org/freedesktop/login1" - "org.freedesktop.login1.Manager" - "PrepareForSleep" - #'jao-sleep--dbus-sleep-handler)))) + (dbus-register-signal (if session-dbus :session :system) + "org.freedesktop.login1" + "/org/freedesktop/login1" + "org.freedesktop.login1.Manager" + "PrepareForSleep" + #'jao-sleep--dbus-sleep-handler)))) ;;;###autoload (defun jao-sleep-dbus-unregister () -- cgit v1.2.3