Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable mode for Tramp sessions #16

Open
bkaczynski opened this issue Aug 28, 2020 · 1 comment
Open

Disable mode for Tramp sessions #16

bkaczynski opened this issue Aug 28, 2020 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers question Further information is requested

Comments

@bkaczynski
Copy link

bkaczynski commented Aug 28, 2020

Is it possible to have enabled global-activity-watch-mode and disable it only for tramp sessions?

I have something like this, but it's doesn't work:
(use-package activity-watch-mode
:load-path (lambda () (when (file-remote-p default-directory) (global-activity-watch-mode nil))))
:config (global-activity-watch-mode t))

@pauldub pauldub added enhancement New feature or request good first issue Good for newcomers question Further information is requested labels Aug 28, 2020
@pauldub
Copy link
Owner

pauldub commented Sep 7, 2020

Hi, I think it should be possible by hooking into find-file-hook and disabling activity watch:

(defun disable-activity-watch-tramp ()
  (when (and (buffer-file-name) (file-remote-p (buffer-file-name)))
    (activity-watch-mode nil)))

(add-hook 'find-file-hook 'disable-activity-watch-tramp)

Note that I have not tested this snippet but it can be a starting point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants