diff options
-rw-r--r-- | init.el | 8 | ||||
-rw-r--r-- | lib/eos/jao-afio.el | 8 |
2 files changed, 10 insertions, 6 deletions
@@ -1370,7 +1370,13 @@ ;;;; afio (use-package jao-afio :demand t - :config (jao-afio-setup (not window-system))) + :config (jao-afio-setup (not window-system)) + :bind (("C-c f" . 'jao-afio-goto-main) + ("C-c g" . 'jao-afio-goto-mail) + ("C-c w" . 'jao-afio-goto-www) + ("C-c z" . 'jao-afio-goto-docs) + ("M-o" . 'jao-afio-toggle))) +(add-hook 'jao-afio-switch-hook 'jao-minibuffer-refresh t) (defun jao-current--frame-id () (propertize (cond ((and (jao-exwm-enabled-p) diff --git a/lib/eos/jao-afio.el b/lib/eos/jao-afio.el index 627630e..6369697 100644 --- a/lib/eos/jao-afio.el +++ b/lib/eos/jao-afio.el @@ -27,6 +27,7 @@ (defvar jao-open-doc-fun 'find-file) (defvar jao-afio-mail-function 'gnus) (defvar jao-afio-use-w3m nil) +(defvar jao-afio-auto-toggle nil) (defvar jao-afio-switch-hook nil) (defvar jao-afio--configs '(?c ?w ?g ?p ?s)) @@ -169,7 +170,8 @@ (defun jao-afio--goto-frame (next &optional reset) (jao-afio--check-frame) (let ((current (jao-afio--current-config))) - (if (and (eq next current) + (if (and jao-afio-auto-toggle + (eq next current) (not reset) (not (eq current jao-afio--previous-config))) (jao-afio--goto-frame jao-afio--previous-config) @@ -224,10 +226,6 @@ ;;; setup ;;;###autoload (defun jao-afio-setup (&optional use-frames) - (global-set-key "\C-cf" 'jao-afio-goto-main) - (global-set-key "\C-cg" 'jao-afio-goto-mail) - (global-set-key "\C-cw" 'jao-afio-goto-www) - (global-set-key "\C-cz" 'jao-afio-goto-docs) (setq jao-afio-use-frames use-frames) (jao-afio--init)) |