summaryrefslogtreecommitdiffhomepage
path: root/custom/jao-custom-exwm.el
diff options
context:
space:
mode:
Diffstat (limited to 'custom/jao-custom-exwm.el')
-rw-r--r--custom/jao-custom-exwm.el17
1 files changed, 10 insertions, 7 deletions
diff --git a/custom/jao-custom-exwm.el b/custom/jao-custom-exwm.el
index e5c67f8..5e4a354 100644
--- a/custom/jao-custom-exwm.el
+++ b/custom/jao-custom-exwm.el
@@ -154,10 +154,10 @@
(exwm-systemtray-mode 1)
(defun jao-exwm--watch-tray (sym newval op where)
- (setq jao-minibuffer-right-margin (* 2 (length newval)))
+ (setq jao-minibuffer-right-margin (/ newval (string-pixel-width "a")))
(jao-minibuffer-refresh))
-(add-variable-watcher 'exwm-systemtray--list #'jao-exwm--watch-tray)
+(add-variable-watcher 'exwm-systemtray-width #'jao-exwm--watch-tray)
;; Switch to buffer / app
(defvar-local jao-exwm--name nil)
@@ -194,7 +194,9 @@
(defun jao-exwm-switch-to-next-x ()
(interactive)
- (let ((bfs (seq-filter (lambda (b) (buffer-local-value 'exwm-class-name b))
+ (let ((bfs (seq-filter (lambda (b)
+ (with-current-buffer b
+ (derived-mode-p 'exwm-mode)))
(buffer-list (window-frame)))))
(when (car bfs) (switch-to-buffer (car (reverse bfs))))))
@@ -364,7 +366,7 @@
(defun jao-exwm-pdf-enable-zathura ()
(interactive)
(add-hook 'kill-emacs-query-functions #'jao-exwm-pdf-zathura-close-all t)
- (setq jao-browse-doc-use-emacs-p nil)
+ (setq jao-pdf-open-in-emacs nil)
(setq jao-org-open-pdf-fun #'jao-zathura-open-doc)
(setq jao-org-links-pdf-store-fun #'jao-exwm-org-store-zathura-link)
(setq jao-open-doc-fun #'jao-zathura-open-doc))
@@ -372,7 +374,7 @@
(defun jao-exwm-pdf-disable-zathura ()
(interactive)
(remove-hook 'kill-emacs-query-functions #'jao-exwm-pdf-zathura-close-all)
- (setq jao-browse-doc-use-emacs-p t)
+ (setq jao-pdf-open-in-emacs t)
(setq jao-org-open-pdf-fun #'jao-find-or-open)
(setq jao-org-links-pdf-store-fun nil)
(setq jao-open-doc-fun #'jao-find-or-open))
@@ -383,7 +385,7 @@
(defun jao-exwm-zathura-goto-pdf ()
(interactive)
- (if jao-browse-doc-use-emacs-p
+ (if jao-pdf-open-in-emacs
(jao-org-goto-pdf)
(when-let (pdf (jao-exwm-org-to-pdf-file))
(jao-zathura-open-doc pdf))))
@@ -391,7 +393,7 @@
(with-eval-after-load "org"
(define-key org-mode-map (kbd "C-c o") #'jao-exwm-zathura-goto-pdf))
-(when (not jao-browse-doc-use-emacs-p)
+(when (not jao-pdf-open-in-emacs)
(jao-exwm-pdf-enable-zathura))
(defun jao-exwm-select-pdf ()
@@ -530,6 +532,7 @@
([f9] . jao-bright-show)))
;; (customize-set-variable 'exwm-input-global-keys exwm-input-global-keys)
+(exwm-wm-mode)
;;; .
(provide 'jao-custom-exwm)