From 6a7dde6d08ee9d799dea68d35a2400c3172e8d3e Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Wed, 11 Jan 2023 06:53:35 +0200 Subject: holyK:Update keys, add exwm-mode hook --- .emacs.d/snippets/exwm-holyK-firefox.el | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to '.emacs.d/snippets') diff --git a/.emacs.d/snippets/exwm-holyK-firefox.el b/.emacs.d/snippets/exwm-holyK-firefox.el index 519f8c1..61a0398 100644 --- a/.emacs.d/snippets/exwm-holyK-firefox.el +++ b/.emacs.d/snippets/exwm-holyK-firefox.el @@ -12,7 +12,7 @@ ;;; Code: -(require 'exwm-firefox-core) +;(require 'exwm-firefox-core) (defvar exwm-firefox-class-names '("firefox-default" "firefox" "Firefox" "Nightly" "Icecat" "Iceweasel") @@ -21,20 +21,26 @@ (define-minor-mode exwm-firefox-holyK-mode "Get Emacs keybindings in Firefox with EXWM." :lighter " Firefox/EXWM" - :keymap (let ((map (make-sparse-keymap))) + :keymap (let + ((map (make-sparse-keymap))) (define-key map (kbd "C-n") 'exwm-firefox-core-down) (define-key map (kbd "C-p") 'exwm-firefox-core-up) - (define-key map (kbd "C-f") 'exwm-firefox-core-tab-next) - (define-key map (kbd "C-b") 'exwm-firefox-core-tab-previous) + (define-key map (kbd "C-f") 'exwm-firefox-core-right) + (define-key map (kbd "C-b") 'exwm-firefox-core-left) (define-key map (kbd "C-y") 'exwm-firefox-core-paste) (define-key map (kbd "C-s") 'exwm-firefox-core-quick-find) + (define-key map (kbd "M-f") 'exwm-firefox-core-tab-next) + (define-key map (kbd "M-b") 'exwm-firefox-core-tab-previous) (define-key map (kbd "C-c C-c") 'exwm-firefox-core-copy) - (define-key map (kbd "C-c C-n") 'exwm-firefox-core-tab-new) - (define-key map (kbd "C-c C-k") 'exwm-firefox-core-tab-close) - (define-key map (kbd "C-c C-d") 'exwm-firefox-core-tab-close) - (define-key map (kbd "C-c C-b") 'exwm-firefox-core-history-back) - (define-key map (kbd "C-c C-f") 'exwm-firefox-core-history-forward) - (define-key map (kbd "C-l")'exwm-firefox-core-focus-search-bar) + (define-key map (kbd "C-c n") 'exwm-firefox-core-tab-new) + (define-key map (kbd "C-c d") 'exwm-firefox-core-tab-close) + (define-key map (kbd "C-c b") 'exwm-firefox-core-history-back) + (define-key map (kbd "C-c f") 'exwm-firefox-core-history-forward) + (define-key map (kbd "C-l") 'exwm-firefox-core-focus-search-bar) + (define-key map (kbd "C-/") 'exwm-firefox-core-undo) + (define-key map (kbd "M-<") 'exwm-firefox-core-top) + (define-key map (kbd "M->") 'exwm-firefox-core-bottom) + (define-key map (kbd "C-c C-b") 'exwm-firefox-core-bookmark-new) map)) (defun holyK-activate-if-firefox () @@ -47,3 +53,4 @@ Firefox variant can be assigned in 'exwm-firefox-class-names`" ;;if exwm-input-line-mode-passthroug t mouse will stop working properly ))) +(add-hook 'exwm-mode 'holyK-activate-if-firefox) -- cgit v1.2.3