diff options
| author | TCCQ <thomasmulmer02@gmail.com> | 2025-03-29 17:27:40 -0700 |
|---|---|---|
| committer | TCCQ <thomasmulmer02@gmail.com> | 2025-03-29 17:27:40 -0700 |
| commit | ddb6e57e50eb4c83050695d98c05aeb21df5fc1f (patch) | |
| tree | 520aacfc73d0a0a68fc944df3c4a853142f709f0 /emacs/site-lisp/exwm-pref.el | |
| parent | cc601aa470397e05f51464e9a66bef8c6469181a (diff) | |
| parent | f2e7dfcf2e9c606e47511701a8cff37c913b8b96 (diff) | |
Merge remote-tracking branch 'desktop/master'
Diffstat (limited to 'emacs/site-lisp/exwm-pref.el')
| -rw-r--r-- | emacs/site-lisp/exwm-pref.el | 107 |
1 files changed, 61 insertions, 46 deletions
diff --git a/emacs/site-lisp/exwm-pref.el b/emacs/site-lisp/exwm-pref.el index fee729f..f03711c 100644 --- a/emacs/site-lisp/exwm-pref.el +++ b/emacs/site-lisp/exwm-pref.el @@ -6,9 +6,10 @@ (require 'exwm-randr) (require 'exwm-xim) (require 'exwm-systemtray) +(require 'exwm-manage) -(setq exwm-workspace-number 1) -;; (setq exwm-randr-workspace-monitor-plist '(0 "DP-0" 1 "HDMI-0" 2 "DVI-I-1")) +(setq exwm-workspace-number 2) +(setq exwm-randr-workspace-monitor-plist '(0 "DP-0" 1 "HDMI-0")) (setq exwm-workspace-show-all-buffers t) (setq exwm-layout-show-all-buffers t) @@ -22,9 +23,9 @@ ;; (require 'exwm-firefox) ;; (exwm-firefox-mode) -(setq persp-auto-resume-time 0) +(setq exwm-title-length 50) -(setq exwm-title-length 70) +(setq exwm-manage-force-tiling t) (defun b3n-exwm-set-buffer-name () (if (and exwm-title (string-match "\\`http[^ ]+" exwm-title)) @@ -33,6 +34,10 @@ (setq-local exwm-title (replace-regexp-in-string (concat (regexp-quote url) " - ") "" + exwm-title)) + (setq-local exwm-title (replace-regexp-in-string + " - Mozilla Firefox" + "" exwm-title)))) (setq-local exwm-title @@ -41,7 +46,7 @@ "<" ;; (if (<= (length exwm-title) exwm-title-length) exwm-title - ;; (concat (substring exwm-title 0 exwm-title-length) "…")) + ;; (concat (substring exwm-title 0 exwm-title-length) "…")) ">")) (exwm-workspace-rename-buffer exwm-title)) @@ -75,7 +80,7 @@ ;; super hacky, assumes that there are only two active workspaces (exwm-workspace-switch-create (exwm-workspace--workspace-from-frame-or-index (let* ((workspace-list (seq-filter 'exwm-workspace--active-p exwm-workspace--list)) - (active-workspaces workspace-list)) + (active-workspaces workspace-list)) (while (not (eq (car active-workspaces) (selected-frame))) (setq active-workspaces (cdr active-workspaces))) (setq active-workspaces (cdr active-workspaces)) @@ -98,6 +103,7 @@ ;;(exwm-config-default) (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 ;; All buffers created in EXWM mode are named "*EXWM*". You may want to ;; change it in `exwm-update-class-hook' and `exwm-update-title-hook', which @@ -147,7 +153,7 @@ ;;fast workspace switch ([?\s-O] . exwm-other-assigned-workspace) - ;; ([?\M-O] . exwm-other-assigned-workspace) + ([?\M-O] . exwm-other-assigned-workspace) ;;quick calc switching ;; ([?\s-c] . switch-to-calc) @@ -179,42 +185,44 @@ (interactive (list (read-shell-command "$ "))) (start-process-shell-command command nil command))) ;; ([?\M-d] . (lambda (command) - ;; (interactive (list (read-shell-command "$ "))) - ;; (start-process-shell-command command nil command))) + ;; (interactive (list (read-shell-command "$ "))) + ;; (start-process-shell-command command nil command))) ;; browser ([?\s-e] . (lambda () (interactive) - (start-process-shell-command "vimb" nil "vimb"))) + (start-process-shell-command "firefox" nil "firefox"))) ;; ([?\M-e] . (lambda () - ;; (interactive) - ;; (start-process-shell-command "vimb" nil "vimb"))) + ;; (interactive) + ;; (start-process-shell-command "vimb" nil "vimb"))) ;;terminal - ([s-return] . 'eshell) - ;; ([M-return] . (lambda () - ;; (interactive) - ;;if we are already there, switch back - ;; (if (string= (buffer-name (current-buffer)) "*vterm*") - ;; (exwm-workspace-switch-to-buffer exwm-last-buffer) - ;; (progn - ;; (setq exwm-last-buffer (current-buffer)) - ;; (vterm))))) + ([s-return] . eshell) + ;; ((kbd "M-<return>") . eshell) + ;; ([?\M-return] . (lambda () + ;; (interactive) + ;;if we are already there, switch back + ;; (if (string= (buffer-name (current-buffer)) "*vterm*") + ;; (exwm-workspace-switch-to-buffer exwm-last-buffer) + ;; (progn + ;; (setq exwm-last-buffer (current-buffer)) + ;; (vterm))))) ;; return to the last window - ;; ([s-tab] . (lambda () + ;; ([?\s-tab] . (lambda () ;; (interactive) ;; (exwm-workspace-switch-to-buffer (other-buffer)))) ;; kill the current window and close the buffer if possible ([?\s-Q] . kill-buffer-and-window) + ([?\M-Q] . kill-buffer-and-window) ;; kill current buffer but leave window ([?\s-q] . (lambda () (interactive) (kill-buffer nil))) ;; suspend - ([?\s-`] . (lambda () - (interactive) - (start-process "" nil "loginctl" "suspend"))) + ;; ([?\s-`] . (lambda () + ;; (interactive) + ;; (start-process "" nil "loginctl" "suspend"))) )) ;; requires some custom shell scripts not included in my emacs config @@ -250,32 +258,39 @@ ;; list of cons cells (SRC . DEST), where SRC is the key sequence you press ;; and DEST is what EXWM actually sends to application. Note that both SRC ;; and DEST should be key sequences (vector or string). -;; (setq exwm-input-simulation-keys -;; '( -;; ;; movement -;; ([?\C-b] . [left]) -;; ([?\M-b] . [C-left]) -;; ([?\C-f] . [right]) -;; ([?\M-f] . [C-right]) -;; ([?\C-p] . [up]) -;; ([?\C-n] . [down]) -;; ([?\C-a] . [home]) -;; ([?\C-e] . [end]) -;; ([?\M-v] . [prior]) -;; ([?\C-v] . [next]) -;; ([?\C-d] . [delete]) -;; ([?\C-k] . [S-end delete]) -;; ;; cut/paste. -;; ;; ([?\C-w] . [?\C-x]) -;; ;; ([?\M-w] . [?\C-c]) -;; ;; ([?\C-y] . [?\C-v]) -;; ;; search -;; ([?\C-s] . [?\C-f]))) +(setq exwm-input-simulation-keys + '( + ;; movement + ([?\C-b] . [left]) + ([?\M-b] . [C-left]) + ([?\C-f] . [right]) + ([?\M-f] . [C-right]) + ([?\C-p] . [up]) + ([?\C-n] . [down]) + ([?\C-a] . [home]) + ([?\C-e] . [end]) + ([?\M-v] . [prior]) + ([?\C-v] . [next]) + ([?\C-d] . [delete]) + ([?\C-k] . [S-end delete]) + ;; cut/paste. + ;; ([?\C-w] . [?\C-x]) + ([?\M-w] . [?\C-c]) + ([?\C-y] . [?\C-v]) + ;; search + ([?\C-s] . [?\C-f]))) ;; You can hide the minibuffer and echo area when they're not used, by ;; uncommenting the following line. ;; (setq exwm-workspace-minibuffer-position 'bottom) + +;; specifically disable S-return in the minibuffer so you don't hit it on accident +;; This is here cause cause the other s-* bindings are here +(if vertico-mode + (define-key vertico-map (kbd "s-<return>") 'vertico-exit) + (define-key minibuffer-mode-map (kbd "s-<return>") 'minibuffer-complete-and-exit)) + ;; Do not forget to enable EXWM. It will start by itself when things are ;; ready. You can put it _anywhere_ in your configuration. (exwm-enable) |
