Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (setq on-laptop t) ; I set this based on an environment variable
- (when on-laptop
- (defun disable-trackpad (&optional frame)
- (interactive)
- (shell-command "SystemSettingsAdminFlows EnableTouchpad 0"))
- (defun enable-trackpad (&optional frame)
- (interactive)
- (shell-command "SystemSettingsAdminFlows EnableTouchpad 1"))
- (add-hook 'focus-in-hook #'disable-trackpad)
- (add-hook 'focus-out-hook #'enable-trackpad)
- (add-hook 'delete-frame-functions #'enable-trackpad)
- (add-hook 'kill-emacs-hook #'enable-trackpad)
- (global-set-key (kbd "C-<lwindow>") 'ignore) ; Unrelated but lets you use Ctrl-Windows hotkeys for virtual desktops
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement