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