summaryrefslogtreecommitdiffhomepage
path: root/init.el
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 /init.el
parent0ca6d5e1c8c7b6dd6b93f978dac69b1dc789c4c7 (diff)
downloadelibs-e871380bc072e1f3295320196c0bd4a726752169.tar.gz
elibs-e871380bc072e1f3295320196c0bd4a726752169.tar.bz2
afio: a workspace of chats' own
Diffstat (limited to 'init.el')
-rw-r--r--init.el37
1 files changed, 19 insertions, 18 deletions
diff --git a/init.el b/init.el
index 5f4a70e..8f1ae1e 100644
--- a/init.el
+++ b/init.el
@@ -540,9 +540,7 @@
(use-package jao-tracking
:demand t
- :init (setq jao-tracking-bkg
- (if (jao-colors-scheme-dark-p) "grey20" "grey93")
- jao-tracking-use-scratch t)
+ :init (setq jao-tracking-bkg (if (jao-colors-scheme-dark-p) "grey20" "grey93"))
:config (jao-tracking-setup))
;;;; tmr
@@ -1038,6 +1036,7 @@
("C-c g" . 'jao-afio-goto-mail)
("C-c w" . 'jao-afio-goto-www)
("C-c z" . 'jao-afio-goto-docs)
+ ("C-c t" . 'jao-afio-goto-chats)
("C-c 0" . 'jao-afio-goto-scratch)
("M-o" . 'jao-afio-toggle)))
(add-hook 'jao-afio-switch-hook 'jao-minibuffer-refresh t)
@@ -2546,7 +2545,7 @@
(defun jao-telega ()
(interactive)
- (when jao-tracking-use-scratch (jao-afio-goto-scratch))
+ (jao-tracking-go-to-chats)
(if (get-buffer telega-root-buffer-name)
(pop-to-buffer telega-root-buffer-name)
(telega)))
@@ -2584,18 +2583,19 @@
(setq mastodon-instance-url "https://mastodon.social"
mastodon-active-user "jao@gnu.org")
:config
- (defun jao-mastodon-toot-url ()
- (interactive)
- (when-let (url (jao-url-around-point t))
- (jao-afio-goto-scratch)
- (mastodon-toot--compose-buffer nil nil nil url)))
-
- (defun jao-mastodon ()
- (interactive)
- (jao-afio-goto-scratch)
- (mastodon))
:bind (:map eww-mode-map ("T" . jao-mastodon-toot-url)))
+(defun jao-mastodon-toot-url ()
+ (interactive)
+ (when-let (url (jao-url-around-point t))
+ (jao-tracking-go-to-chats)
+ (mastodon-toot--compose-buffer nil nil nil url)))
+
+(defun jao-mastodon ()
+ (interactive)
+ (jao-afio-goto-scratch)
+ (mastodon))
+
;;;; startup
(defun jao-chats (&optional p)
(interactive "P")
@@ -2613,7 +2613,7 @@
(defun jao-all-chats ()
(interactive)
(when jao-tracking-use-scratch
- (jao-afio-goto-scratch)
+ (jao-afio-goto-chats)
(delete-other-windows))
(jao-chats t))
@@ -2793,7 +2793,6 @@
(use-package jao-spt
:demand t
:config
- ;; (jao-spt-set-up)
(defun jao-spt-setup-aliases ()
(setq espotify-play-uri-function #'jao-spt-play-uri)
(defalias 'jao-streaming-list #'jao-term-spt)
@@ -2810,10 +2809,10 @@
(defalias 'jao-streaming-dislike #'jao-spt-dislike)
(defalias 'jao-streaming-toggle-shuffle #'jao-spt-toggle-shuffle)))
-(defvar jao-spt-on t)
+(defvar jao-spt-on nil)
(defun jao-spt-on-p () jao-spt-on)
-(jao-def-exec-in-term "spt" "spt" (jao-afio-goto-scratch t))
+(jao-def-exec-in-term "spt" "spt" (jao-afio-goto-scratch))
(defun jao-streaming-toggle-player ()
(interactive)
@@ -2826,6 +2825,8 @@
(message "%s activated "
(if (setq jao-spt-on (not jao-spt-on)) "spt" "mpris")))
+(jao-streaming-toggle-player)
+
;;;; music transients
(require 'jao-lyrics)
(setq jao-lyrics-info-function #'jao-player-info)