irc: add +irc/tracking-next-buffer

This way the user won't accidentally switch to the next unread buffer in
the wrong workspacee and end up in a weird state.
This commit is contained in:
Sean Farley 2019-01-21 17:20:22 -08:00
parent ffc9e0f48e
commit 274d9a6c0c
3 changed files with 21 additions and 14 deletions

View file

@ -138,13 +138,19 @@ playback.")
(persp-remove-buffer buf persp))))
(add-hook 'circe-mode-hook #'+irc|add-circe-buffer-to-persp)
(defun +irc/tracking-next-buffer ()
"Dissables switching to an unread buffer unless in the irc workspace."
(interactive)
(when (derived-mode-p 'circe-mode)
(tracking-next-buffer)))
(after! solaire-mode
;; distinguish chat/channel buffers from server buffers.
(add-hook 'circe-chat-mode-hook #'solaire-mode))
(map! :localleader
(:map circe-mode-map
"a" #'tracking-next-buffer
"a" #'+irc/tracking-next-buffer
"j" #'circe-command-JOIN
"m" #'+irc/send-message
"p" #'circe-command-PART