summaryrefslogtreecommitdiffhomepage
path: root/lib/eos
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-11-10 22:48:59 +0000
committerjao <jao@gnu.org>2022-11-10 22:48:59 +0000
commite871380bc072e1f3295320196c0bd4a726752169 (patch)
treef5c49314255b1019fb6610443d7f7927964d5d1b /lib/eos
parent0ca6d5e1c8c7b6dd6b93f978dac69b1dc789c4c7 (diff)
downloadelibs-e871380bc072e1f3295320196c0bd4a726752169.tar.gz
elibs-e871380bc072e1f3295320196c0bd4a726752169.tar.bz2
afio: a workspace of chats' own
Diffstat (limited to 'lib/eos')
-rw-r--r--lib/eos/jao-afio.el16
-rw-r--r--lib/eos/jao-tracking.el8
2 files changed, 17 insertions, 7 deletions
diff --git a/lib/eos/jao-afio.el b/lib/eos/jao-afio.el
index dcaa833..304ee64 100644
--- a/lib/eos/jao-afio.el
+++ b/lib/eos/jao-afio.el
@@ -30,7 +30,7 @@
(defvar jao-afio-auto-toggle nil)
(defvar jao-afio-switch-hook nil)
-(defvar jao-afio--configs '(?c ?w ?g ?p ?s))
+(defvar jao-afio--configs '(?c ?w ?g ?p ?s ?t))
(defvar jao-afio--previous-config (car jao-afio--configs))
(defun jao-afio--current-config (&optional c f)
@@ -163,7 +163,7 @@
(?w (jao-afio-open-www))
(?g (jao-afio-open-mail))
(?p (jao-afio-open-doc))
- (?s (jao-afio-trisect))))
+ (t (jao-afio-trisect))))
;;; go to frame
(defsubst jao-afio--find-frame (c)
@@ -172,11 +172,11 @@
(defun jao-afio-frame-name (&optional c)
(alist-get (or c (jao-afio--current-config))
'((?c . "main") (?s . "scratch") (?g . "mail")
- (?p . "docs") (?w . "web"))))
+ (?p . "docs") (?w . "web") (?t . "chats"))))
(defun jao-afio-frame-no (&optional c)
(alist-get (or c (jao-afio--current-config))
- '((?s . 0) (?c . 1) (?g . 2) (?w . 3) (?p . 4))))
+ '((?s . 0) (?c . 1) (?g . 2) (?w . 3) (?p . 4) (?t . 5))))
(defun jao-afio--goto-frame (next &optional reset)
(jao-afio--check-frame)
@@ -227,15 +227,19 @@
(jao-afio--goto-frame ?s nil)
(when one-win (delete-other-windows)))
+(defun jao-afio-goto-chats (&optional reset)
+ (interactive "P")
+ (jao-afio--goto-frame ?t reset))
+
;;;###autoload
(defun jao-afio-goto-nth (n)
(cl-case n
+ ((0) (jao-afio-goto-scratch))
((1) (jao-afio-goto-main))
((2) (jao-afio-goto-mail))
((3) (jao-afio-goto-www))
((4) (jao-afio-goto-docs))
- ((5) (jao-afio-goto-scratch t))
- ((0) (jao-afio-goto-scratch))))
+ ((5) (jao-afio-goto-chats))))
;;;###autoload
(defun jao-afio-pop-to-buffer (n buff)
diff --git a/lib/eos/jao-tracking.el b/lib/eos/jao-tracking.el
index fdb156b..5158fd6 100644
--- a/lib/eos/jao-tracking.el
+++ b/lib/eos/jao-tracking.el
@@ -126,7 +126,7 @@
(setq jao-tracking-string (jao-tracking-build-str new-val))
(jao-minibuffer-refresh))
-(defvar jao-tracking-use-scratch nil)
+(defvar jao-tracking-use-scratch 5)
(defvar jao-tracking--start-frame nil)
(defun jao-tracking--remove-visible-buffers ()
@@ -134,6 +134,12 @@
(tracking-remove-visible-buffers)))
;;;###autoload
+(defun jao-tracking-go-to-chats ()
+ (interactive)
+ (when jao-tracking-use-scratch
+ (jao-afio-goto-nth jao-tracking-use-scratch)))
+
+;;;###autoload
(defun jao-tracking-next-buffer ()
(interactive)
(if jao-tracking-use-scratch