diff options
| author | TCCQ <thomasmulmer02@gmail.com> | 2025-07-09 10:46:51 -0700 |
|---|---|---|
| committer | TCCQ <thomasmulmer02@gmail.com> | 2025-07-09 10:46:51 -0700 |
| commit | c78804211171e93be10322f2e5f10e49659c1606 (patch) | |
| tree | db095b2915634d1ab12e5b99134a455f241407a1 /emacs/init.el | |
| parent | 8612715fe2afe77c48cbf4d4a1273a3bd1a08c26 (diff) | |
eshell, remove range, remove old exwm fast switch variable
Diffstat (limited to 'emacs/init.el')
| -rw-r--r-- | emacs/init.el | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/emacs/init.el b/emacs/init.el index eaec53b..491c9a8 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -126,17 +126,16 @@ dedicated." (with-selected-window cw (switch-to-buffer ob))))))) -(require 'range) (defun my/c-x-n-to-m-n (&optional keymap) "Rebind the keys starting with C-x [number] to M-[number] in the given keymap or in the global keymap." (unless keymap (setq keymap global-map)) - (range-map (lambda (n) + (mapc (lambda (n) (let* ((from (concat "C-x " (format "%d" n))) (to (concat "M-" (format "%d" n))) (bind (keymap-lookup keymap from))) (keymap-set keymap to bind))) - '((0 . 9)))) + '(0 1 2 3 4 5 6 7 8 9))) (my/c-x-n-to-m-n) (use-package server ; allow emacsclient @@ -724,12 +723,18 @@ changes." (interactive) (start-process-shell-command "firefox" nil "firefox")) + (defun my/eshell (&optional arg) + (interactive "P") + (if (eq major-mode 'eshell-mode) + ;; switch back + (switch-to-prev-buffer) + (eshell arg))) + (exwm-randr-mode) (exwm-systemtray-mode) (push ?\C-\\ exwm-input-prefix-keys) ;;C-\ to switch input method (push ?\C-u exwm-input-prefix-keys) ;; send C-u to all windows too (push ?\M-L exwm-input-prefix-keys) - (setq exwm-marked-buffer "*scratch*") ;; store the buffer we were at before a jump (when (equal window-system 'x) (exwm-enable)) :hook @@ -756,7 +761,7 @@ changes." ([?\M-D] . my/dmenu) ([?\M-E] . my/browser) - ([M-return] . eshell) + ([M-return] . my/eshell) ,@(mapcar (lambda (n) (let* ((from (concat "C-x " (format "%d" n))) |
