From 8300912bb63fc3918385f9e6d2a9777f62f164a2 Mon Sep 17 00:00:00 2001 From: Thomas Ulmer Date: Wed, 12 Mar 2025 10:18:42 -0700 Subject: firefox files and new emacs stuff --- emacs/site-lisp/exwm-pref.el | 56 ++++++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 25 deletions(-) (limited to 'emacs/site-lisp/exwm-pref.el') diff --git a/emacs/site-lisp/exwm-pref.el b/emacs/site-lisp/exwm-pref.el index fee729f..6407e9e 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)) @@ -41,7 +42,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 +76,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)) @@ -147,7 +148,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) @@ -178,43 +179,48 @@ ([?\s-d] . (lambda (command) (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))) ;; ([?\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-") . 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 -- cgit v1.2.3 From d33a9964ecf98b0b5e14d1a3a237d9b23425081d Mon Sep 17 00:00:00 2001 From: Thomas Ulmer Date: Fri, 14 Mar 2025 09:20:56 -0700 Subject: s-ret in minibuffer --- emacs/site-lisp/exwm-pref.el | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'emacs/site-lisp/exwm-pref.el') diff --git a/emacs/site-lisp/exwm-pref.el b/emacs/site-lisp/exwm-pref.el index 6407e9e..a5b8875 100644 --- a/emacs/site-lisp/exwm-pref.el +++ b/emacs/site-lisp/exwm-pref.el @@ -282,6 +282,13 @@ ;; 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-") 'vertico-exit) + (define-key minibuffer-mode-map (kbd "s-") '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) -- cgit v1.2.3 From dade583159e78a0ba6a40acf8ae888ce6df1b32f Mon Sep 17 00:00:00 2001 From: Thomas Ulmer Date: Wed, 26 Mar 2025 10:37:22 -0700 Subject: pyenv and other --- emacs/init.el | 8 ++++---- emacs/site-lisp/coding-config.el | 3 +++ emacs/site-lisp/exwm-pref.el | 43 ++++++++++++++++++++-------------------- 3 files changed, 29 insertions(+), 25 deletions(-) (limited to 'emacs/site-lisp/exwm-pref.el') diff --git a/emacs/init.el b/emacs/init.el index e0975a3..832c35f 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -159,10 +159,10 @@ markdown-preview-mode minions nginx-mode oauth2 orderless pass password-store persp-mode-projectile-bridge popwin pyim-basedict - pyim-cangjiedict racket-mode rainbow-delimiters rustic - sdcv sideline-flycheck sideline-flymake sideline-lsp - simple-httpd spell-fu telephone-line tempel - tree-sitter-langs treemacs treemacs-evil + pyim-cangjiedict pyvenv racket-mode rainbow-delimiters + rustic sdcv sideline-flycheck sideline-flymake + sideline-lsp simple-httpd spell-fu telephone-line + tempel tree-sitter-langs treemacs treemacs-evil vertico-prescient vimgolf visible-mark volume which-key winum workgroups yaml-mode)) '(pyim-assistant-scheme 'cangjie) diff --git a/emacs/site-lisp/coding-config.el b/emacs/site-lisp/coding-config.el index a8f34a9..25dd372 100755 --- a/emacs/site-lisp/coding-config.el +++ b/emacs/site-lisp/coding-config.el @@ -24,6 +24,8 @@ (use-package lsp-haskell) +(use-package pyvenv) + (use-package sideline :init (setq sideline-backends-right '())) @@ -51,6 +53,7 @@ (global-set-key (kbd "M-I") 'xref-find-definitions) (setq imenu-auto-rescan t) +(setq imenu-flatten t) ;; make shells and whatnot slightly better (require 'comint) diff --git a/emacs/site-lisp/exwm-pref.el b/emacs/site-lisp/exwm-pref.el index a5b8875..75bf5a9 100644 --- a/emacs/site-lisp/exwm-pref.el +++ b/emacs/site-lisp/exwm-pref.el @@ -99,6 +99,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 @@ -256,27 +257,27 @@ ;; 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. -- cgit v1.2.3 From f2e7dfcf2e9c606e47511701a8cff37c913b8b96 Mon Sep 17 00:00:00 2001 From: Thomas Ulmer Date: Sat, 29 Mar 2025 17:12:10 -0700 Subject: new binds and stuff --- emacs/init.el | 2 +- emacs/site-lisp/exwm-pref.el | 15 ++++++++------- emacs/site-lisp/my-binds.el | 3 +++ 3 files changed, 12 insertions(+), 8 deletions(-) (limited to 'emacs/site-lisp/exwm-pref.el') diff --git a/emacs/init.el b/emacs/init.el index 832c35f..1c47a39 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -281,7 +281,7 @@ :init (corfu-terminal-mode 1) :custom - (corfu-terminal-disable-on-gui t)) + (corfu-terminal-disable-on-gui nil)) (use-package cape ;; extend completion frameworks diff --git a/emacs/site-lisp/exwm-pref.el b/emacs/site-lisp/exwm-pref.el index 75bf5a9..f03711c 100644 --- a/emacs/site-lisp/exwm-pref.el +++ b/emacs/site-lisp/exwm-pref.el @@ -8,8 +8,8 @@ (require 'exwm-systemtray) (require 'exwm-manage) -;; (setq exwm-workspace-number 2) -;; (setq exwm-randr-workspace-monitor-plist '(0 "DP-0" 1 "HDMI-0")) +(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) @@ -34,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 @@ -180,12 +184,9 @@ ([?\s-d] . (lambda (command) (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))) ;; ([?\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) diff --git a/emacs/site-lisp/my-binds.el b/emacs/site-lisp/my-binds.el index 0b85e66..bb80e62 100644 --- a/emacs/site-lisp/my-binds.el +++ b/emacs/site-lisp/my-binds.el @@ -17,3 +17,6 @@ (keymap-set dired-mode-map "C-o" 'dired-display-file) (keymap-set dired-mode-map "F" 'dired-do-find-marked-files) +;; searching +(global-set-key (kbd "M-s g") 'rgrep) +(global-set-key (kbd "M-s r") 'counsel-rg) -- cgit v1.2.3