parent
508f0f72a8
commit
86b08ef9ea
1 changed files with 15 additions and 18 deletions
|
@ -1087,27 +1087,24 @@ the feds are watching
|
||||||
(setq elcord-quiet t)
|
(setq elcord-quiet t)
|
||||||
(setq elcord-display-elapsed nil)
|
(setq elcord-display-elapsed nil)
|
||||||
:config
|
:config
|
||||||
(elcord-mode))
|
|
||||||
|
|
||||||
(defun elcord--disable-elcord-if-no-frames (f)
|
(defun elcord--disable-elcord-if-no-frames (f)
|
||||||
(declare (ignore f))
|
(ignore f)
|
||||||
(when (let ((frames (delete f (visible-frame-list))))
|
(when (let ((frames (delete f (visible-frame-list))))
|
||||||
(or (null frames)
|
(or (null frames)
|
||||||
(and (null (cdr frames))
|
(elcord-mode -1)))))
|
||||||
(eq (car frames) terminal-frame))))
|
|
||||||
(elcord-mode -1)
|
|
||||||
(add-hook 'after-make-frame-functions 'elcord--enable-on-frame-created)))
|
|
||||||
|
|
||||||
(defun elcord--enable-on-frame-created (f)
|
(defun elcord--enable-on-frame-created (f)
|
||||||
(declare (ignore f))
|
|
||||||
(elcord-mode +1))
|
(elcord-mode +1))
|
||||||
|
|
||||||
|
(add-hook 'after-make-frame-functions 'elcord--enable-on-frame-created)
|
||||||
|
|
||||||
(defun sakomacs/elcord-mode-hook ()
|
(defun sakomacs/elcord-mode-hook ()
|
||||||
(if elcord-mode
|
(if elcord-mode
|
||||||
(add-hook 'delete-frame-functions 'elcord--disable-elcord-if-no-frames)
|
(add-hook 'delete-frame-functions 'elcord--disable-elcord-if-no-frames)
|
||||||
(remove-hook 'delete-frame-functions 'elcord--disable-elcord-if-no-frames)))
|
(remove-hook 'delete-frame-functions 'elcord--disable-elcord-if-no-frames)))
|
||||||
|
(elcord-mode)
|
||||||
(add-hook 'elcord-mode-hook 'sakomacs/elcord-mode-hook)
|
(add-hook 'elcord-mode-hook 'sakomacs/elcord-mode-hook)
|
||||||
|
)
|
||||||
#+end_src
|
#+end_src
|
||||||
** Telegram
|
** Telegram
|
||||||
does NOT WORK ON WINDOWS
|
does NOT WORK ON WINDOWS
|
||||||
|
|
Loading…
Reference in a new issue