From 36a2336a251ddd756f0d76c3a26749b2806d45c5 Mon Sep 17 00:00:00 2001 From: jao Date: Wed, 7 Apr 2021 04:31:41 +0100 Subject: keybindings --- exwm.org | 32 +++++++++++++++++--------------- init.org | 13 ++++++++----- 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/exwm.org b/exwm.org index 593ccd2..5b4df6c 100644 --- a/exwm.org +++ b/exwm.org @@ -414,27 +414,29 @@ (global-map "s-w" :color blue :quit-key "q") ("Notes" (("n" jao-org-notes-open-or-create "capture note") - ("N" jao-org-notes-open "go to note")) + ("N" jao-org-notes-open "go to note") + ("d" (jao-buffer-same-mode 'doc-view-mode #'jao-afio--goto-docs) + "go to doc")) "Packages" (("a" jao-vterm-aptitude "aptitude") - ("l" jao-exwm-paradox "package list") + ("l" jao-exwm-paradox "packages") ("s-w" jao-hydra-exwm/body nil)) "Network" - (("s" jao-ssh "ssh") - ("b" jao-exwm-bluetooth "bluetooth") - ;; ("N" jao-exwm-enwc "networks") - ) - "Proton" - (("v" jao-exwm-proton-vpn "proton vpn") - ("m" run-proton-bridge "proton bridge")) + (("S" jao-ssh "ssh") + ;; ("b" jao-exwm-bluetooth "bluetooth") + ;; ("m" run-proton-bridge "proton bridge") + ("v" jao-exwm-proton-vpn "proton vpn")) "Monitors" (("p" jao-vterm-htop "htop") - ("P" jao-exwm-proced "proced") - ("t" jao-time-echo-times "current time")) - "Apps" - (("f" jao-exwm-firefox-1 "firefox") + ;; ("P" jao-exwm-proced "proced") ("x" jao-exwm-xmobar "restart xmobar") - ("X" jao-exwm-kill-xmobar "kill xmobar")) + ("X" jao-exwm-kill-xmobar "kill xmobar") + ;; ("t" jao-time-echo-times "current time") + ) + "Chats" + (("t" telega "telegram rooster") + ("s" (jao-buffer-same-mode 'slack-message-buffer-mode) "slack buffers") + ("i" (jao-buffer-same-mode 'circe-channel-mode) "irc channels")) "Looks" (("T" jao-toggle-transparency "toggle transparency" :toggle (jao-transparent-p) :color red) @@ -487,8 +489,8 @@ ([?\s-\`] . jao-exwm-switch-to-next-x) ([s-tab] . jao-exwm-switch-to-next-class) ([print] . jao-exwm-import-screen) - ([f4] . jao-toggle-audio-applet) ([f5] . jao-weather) + ([f6] . jao-toggle-audio-applet) ([f8] . jao-toggle-nm-applet) ([f9] . jao-bright-show))) diff --git a/init.org b/init.org index d202e2b..bdfb40a 100644 --- a/init.org +++ b/init.org @@ -1181,14 +1181,16 @@ #+end_src *** same mode #+begin_src emacs-lisp - (defun jao-buffer-same-mode (&optional mode) + (defun jao-buffer-same-mode (&optional mode pre-fn) (interactive) (let* ((mode (or mode major-mode)) (pred `(lambda (b) (let ((b (get-buffer (if (consp b) (car b) b)))) (and ;; (not (eq b ,(current-buffer))) - (eq ',mode (buffer-local-value 'major-mode b))))))) - (pop-to-buffer (read-buffer "Buffer: " nil t pred)))) + (eq ',mode (buffer-local-value 'major-mode b)))))) + (buff (read-buffer "Buffer: " nil t pred))) + (when pre-fn (funcall pre-fn)) + (pop-to-buffer buff))) (global-set-key (kbd "C-c C-b") #'jao-buffer-same-mode) #+end_src *** buffer quit function (the triple ESC) @@ -1540,7 +1542,8 @@ ("O" (jao-org-pdf-goto-org 4) "notes file, linking")) "Navigation" (("b" jao-doc-view-back "back jump") - ("B" jao-doc-view-back "forward jump")) + ("B" jao-doc-view-back "forward jump") + ("u" jao-doc-view-visit-url "visit URL")) "Slices" (("cb" doc-view-set-slice-from-bounding-box "bounding box") ("cm" doc-view-set-slice-using-mouse "using mouse")) @@ -2229,7 +2232,7 @@ *** Web browsers #+begin_src emacs-lisp (jao-load-org "eww") - (jao-load-org "w3m") + ;; (jao-load-org "w3m") #+end_src * Shells *** shell modes -- cgit v1.2.3