diff options
Diffstat (limited to 'attic/elisp')
| -rw-r--r-- | attic/elisp/misc.el | 63 |
1 files changed, 56 insertions, 7 deletions
diff --git a/attic/elisp/misc.el b/attic/elisp/misc.el index 7e15ee9..36c39d3 100644 --- a/attic/elisp/misc.el +++ b/attic/elisp/misc.el @@ -298,17 +298,13 @@ mu4e-user-mail-address-list jao-mails mu4e-view-show-addresses t mu4e-view-show-images t - mu4e-maildir-shortcuts '((:maildir "/jao/inbox" :key ?j)) + mu4e-maildir-shortcuts '((:maildir "/jao.inbox" :key ?j)) jao-mu4e-uninteresting-mail-query (concat "flag:unread AND NOT flag:trashed" - " AND NOT (maildir:/bigml/inbox OR maildir:/bigml/bugs OR" - " maildir:/bigml/support OR maildir:/jao/inbox)") + " AND NOT (" " maildir:/jao.inbox)") jao-mu4e-interesting-mail-query - (concat - "flag:unread AND NOT flag:trashed" - " AND (maildir:/bigml/inbox OR maildir:/bigml/bugs OR" - " maildir:/bigml/support OR maildir:/jao/inbox)") + "flag:unread AND NOT flag:trashed AND maildir:/jao.inbox" mu4e-bookmarks `((:name "Inbox" :query ,jao-mu4e-interesting-mail-query :key ?i) (:name "Other messages" @@ -1312,3 +1308,56 @@ It should be the title of the web page as returned by `rdrview'" (let ((cnts (notmuch-hello-query-counts jao-notmuch-xbar-queries))) (jao-shell-exec (format "echo '%s | color=#8b3626 | size=11' >/tmp/xbar" (mapconcat 'jao-notmuch--qstr cnts " "))))) +;;; afio frame(s) as workspaces +(defun jao-exwm--new-frame-p () + (not (frame-parameter nil 'jao-frames-initialized))) + +(defun jao-exwm--mark-frame (force) + (prog1 (or force (jao-exwm--new-frame-p)) + (set-frame-parameter nil 'jao-frames-initialized t))) + +(defun jao-exwm--goto-main (&optional init) + (interactive "P") + (exwm-workspace-switch-create 1) + (when (jao-exwm--mark-frame init) (jao-trisect))) + +(defun jao-exwm--goto-mail (&optional init) + (interactive "P") + (exwm-workspace-switch-create 2) + (when (jao-exwm--mark-frame init) + (jao-afio-open-gnus))) + +(defun jao-exwm--goto-www (&optional init) + (interactive "P") + (exwm-workspace-switch-create 5) + (when (jao-exwm--mark-frame init) + (jao-afio-open-www) + (let ((scroll-bar-mode 'left)) + (toggle-scroll-bar 1) + (set-frame-parameter (window-frame) 'scroll-bar-width 12)) + (jao-toggle-inactive-mode-line))) + +(defun jao-exwm--goto-docs (&optional init) + (interactive "P") + (exwm-workspace-switch-create 4) + (when (jao-exwm--mark-frame init) + (jao-afio-open-doc))) + +(defun jao-exwm-open-doc (file) + (jao-exwm--goto-docs) + (jao-find-or-open file)) + +(defun jao-exwm-no-afio-setup () + (interactive) + (defalias 'jao-open-gnus-frame 'jao-exwm--goto-mail) + (defalias 'jao-goto-www-frame 'jao-exwm--goto-www) + (setq jao-open-doc-fun #'jao-exwm-open-doc) + (setq minibuffer-follows-selected-frame t) + (global-set-key "\C-cf" 'jao-exwm--goto-main) + (global-set-key "\C-cg" 'jao-exwm--goto-mail) + (global-set-key "\C-cw" 'jao-exwm--goto-www) + (global-set-key "\C-cz" 'jao-exwm--goto-docs)) + +(if jao-exwm-use-afio + (setq minibuffer-follows-selected-frame nil) + (jao-exwm-no-afio-setup)) |
