app/irc: clean up timer & notifications on quit
This commit is contained in:
parent
7f76dabfd0
commit
01dc170e5b
2 changed files with 8 additions and 1 deletions
|
@ -35,6 +35,9 @@
|
|||
(if (y-or-n-p "Really kill IRC session?")
|
||||
(let (circe-channel-killed-confirmation
|
||||
circe-server-killed-confirmation)
|
||||
(when +irc--defer-timer
|
||||
(cancel-timer +irc--defer-timer))
|
||||
(disable-circe-notifications)
|
||||
(mapcar #'kill-buffer (doom-buffers-in-mode 'circe-mode (buffer-list) t))
|
||||
(when (equal (+workspace-current-name) +irc--workspace-name)
|
||||
(+workspace/delete +irc--workspace-name)))
|
||||
|
|
|
@ -28,6 +28,8 @@ playback.")
|
|||
`(cl-pushnew (cons ,server ,letvars) +irc-connections
|
||||
:test #'equal :key #'car))
|
||||
|
||||
(defvar +irc--defer-timer nil)
|
||||
|
||||
|
||||
;;
|
||||
;; Plugins
|
||||
|
@ -141,7 +143,9 @@ playback.")
|
|||
:init
|
||||
(if +irc-defer-notifications
|
||||
(add-hook! 'circe-server-connected-hook
|
||||
(run-at-time +irc-defer-notifications nil #'enable-circe-notifications))
|
||||
(setq +irc--defer-timer
|
||||
(run-at-time +irc-defer-notifications nil
|
||||
#'enable-circe-notifications)))
|
||||
(add-hook 'circe-server-connected-hook #'enable-circe-notifications))
|
||||
:config
|
||||
(setq circe-notifications-watch-strings +irc-notifications-watch-strings
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue