diff --git a/modules/app/irc/README.org b/modules/app/irc/README.org index 7eb017008..d4cb00367 100644 --- a/modules/app/irc/README.org +++ b/modules/app/irc/README.org @@ -43,15 +43,15 @@ custom keybinding. When in a circe buffer these keybindings will be available. -| command | key | description | -|------------------------+-----------+----------------------------------------------| -| ~tracking-next-buffer~ | =SPC m a= | Switch to the next active buffer | -| ~circe-command-JOIN~ | =SPC m j= | Join a channel | -| ~+irc/send-message~ | =SPC m m= | Send a private message | -| ~circe-command-NAMES~ | =SPC m n= | List the names of the current channel | -| ~circe-command-PART~ | =SPC m p= | Part the current channel | -| ~+irc/quit~ | =SPC m Q= | Kill the current circe session and workgroup | -| ~circe-reconnect~ | =SPC m R= | Reconnect the current server | +| command | key | description | +|-----------------------------+-----------+----------------------------------------------| +| ~+irc/tracking-next-buffer~ | =SPC m a= | Switch to the next active buffer | +| ~circe-command-JOIN~ | =SPC m j= | Join a channel | +| ~+irc/send-message~ | =SPC m m= | Send a private message | +| ~circe-command-NAMES~ | =SPC m n= | List the names of the current channel | +| ~circe-command-PART~ | =SPC m p= | Part the current channel | +| ~+irc/quit~ | =SPC m Q= | Kill the current circe session and workgroup | +| ~circe-reconnect~ | =SPC m R= | Reconnect the current server | * Configuration Use ~set-irc-server!~ to configure IRC servers. Its second argument (a plist) diff --git a/modules/app/irc/config.el b/modules/app/irc/config.el index 53b68fedc..108faa9cc 100644 --- a/modules/app/irc/config.el +++ b/modules/app/irc/config.el @@ -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 diff --git a/modules/config/default/+emacs-bindings.el b/modules/config/default/+emacs-bindings.el index 5886b3a91..eecc03708 100644 --- a/modules/config/default/+emacs-bindings.el +++ b/modules/config/default/+emacs-bindings.el @@ -172,10 +172,11 @@ ;; IRC (:when (featurep! :app irc) (:prefix ("I" . "irc") - :desc "Open irc app" "i" #'=irc - :desc "Quit irc" "q" #'+irc/quit - :desc "Reconnect all" "r" #'circe-reconnect-all - :desc "Send message" "s" #'+irc/send-message + :desc "Open irc app" "i" #'=irc + :desc "Next unread buffer" "a" #'+irc/tracking-next-buffer + :desc "Quit irc" "q" #'+irc/quit + :desc "Reconnect all" "r" #'circe-reconnect-all + :desc "Send message" "s" #'+irc/send-message (:when (featurep! :completion ivy) :desc "Jump to channel" "j" #'irc/ivy-jump-to-channel))) ;; Twitter