summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--init.el44
1 files changed, 32 insertions, 12 deletions
diff --git a/init.el b/init.el
index 213ad94..92495d8 100644
--- a/init.el
+++ b/init.el
@@ -738,6 +738,22 @@
;;;; jao-notify
(require 'jao-notify)
;;;; tracking
+(defvar jao-tracking-use-scratch (not window-system))
+(defvar jao-tracking--start-frame nil)
+
+(defun jao-tracking-next-buffer ()
+ (interactive)
+ (when jao-tracking-use-scratch
+ (let ((n (jao-afio-frame-no)))
+ (unless (eq 0 n) (setq jao-tracking--start-frame n))
+ (cond (tracking-buffers
+ (jao-afio--goto-scratch))
+ (jao-tracking--start-frame
+ (jao-afio-goto-nth jao-tracking--start-frame)
+ (setq jao-tracking--start-frame nil)))))
+ (tracking-next-buffer)
+ (jao-tracking-update-minibuffer))
+
(use-package tracking
:demand t
:init (setq tracking-position 'before-modes
@@ -749,11 +765,6 @@
:config
(setq erc-track-enable-keybindings nil)
- (defun jao-tracking-next-buffer ()
- (interactive)
- (tracking-next-buffer)
- (jao-tracking-update-minibuffer))
-
:bind (("C-c C-SPC" . jao-tracking-next-buffer)))
(use-package jao-tracking
@@ -2946,9 +2957,15 @@
(jao-shorten-modes 'telega-chat-mode)
(jao-tracking-faces 'telega-tracking))
(telega-mode-line-mode 1))
-;; telegram:1 ends here
-;; [[file:init.org::*startup][startup:1]]
+(defun jao-telega ()
+ (interactive)
+ (when jao-tracking-use-scratch (jao-afio--goto-scratch))
+ (if (get-buffer telega-root-buffer-name)
+ (pop-to-buffer telega-root-buffer-name)
+ (telega)))
+
+;;;; startup
(defun jao-chats (&optional p)
(interactive "P")
(when (or p (y-or-n-p "Connect to slack? "))
@@ -2959,7 +2976,12 @@
(unless (get-buffer "irc.libera.chat:6697")
(circe "Libera Chat"))))
-(defun jao-all-chats () (interactive) (jao-chats t))
+(defun jao-all-chats ()
+ (interactive)
+ (when jao-tracking-use-scratch
+ (jao-afio--goto-scratch)
+ (delete-other-windows))
+ (jao-chats t))
(defun jao-chats-telega ()
(interactive)
@@ -3194,9 +3216,7 @@
(format "Master %s%%" (jao-mixer-get-level nil t)))
("d" "down" jao-mixer-master-down :transient t)
("u" "up" jao-mixer-master-up :transient t)
- ("M" "toggle" jao-mixer-master-toggle)
- ;; ("v" "show" jao-mixer-get-level)
- ]
+ ("M" "toggle" jao-mixer-master-toggle)]
[:description
(lambda () (format "Capture %s%%" (jao-mixer-get-level "Capture" t)))
("D" "down" jao-mixer-capture-down :transient t)
@@ -3254,7 +3274,7 @@
("t" "telegram" jao-chats-telega)
("s" "slack" jao-chats-slack)
("i" "irc" jao-chats-irc)
- ("T" "telegram rooster" telega)]
+ ("T" "telegram rooster" jao-telega)]
["Window system" :if jao-window-system-p
("w" "set wallpaper" jao-set-wallpaper)
("W" "set radom wallpaper" jao-set-random-wallpaper)