EXWM: Use desktop-environment.el
parent
5f28d09a3b
commit
ca905fc408
|
@ -12,9 +12,6 @@
|
|||
;;; See https://github.com/ch11ng/exwm/issues/285
|
||||
;;; and https://gitlab.com/interception/linux/plugins/caps2esc/issues/2.
|
||||
|
||||
;;; REVIEW: helm-mini with follow-mode hangs when using EXWM.
|
||||
;;; https://github.com/emacs-helm/helm/issues/1889
|
||||
|
||||
;;; Rename buffer to window title.
|
||||
(defun ambrevar/exwm-rename-buffer-to-title () (exwm-workspace-rename-buffer exwm-title))
|
||||
(add-hook 'exwm-update-title-hook 'ambrevar/exwm-rename-buffer-to-title)
|
||||
|
@ -70,7 +67,9 @@
|
|||
(when (fboundp 'ambrevar/helm-locate-meta)
|
||||
(exwm-input-set-key (kbd "s-F") #'ambrevar/helm-locate-meta))
|
||||
(exwm-input-set-key (kbd "s-g") 'ambrevar/helm-grep-git-or-ag)
|
||||
(exwm-input-set-key (kbd "s-G") 'ambrevar/helm-grep-git-all-or-ag))
|
||||
(exwm-input-set-key (kbd "s-G") 'ambrevar/helm-grep-git-all-or-ag)
|
||||
;; Launcher
|
||||
(exwm-input-set-key (kbd "s-r") 'helm-run-external-command))
|
||||
|
||||
(require 'functions)
|
||||
(exwm-input-set-key (kbd "s-<tab>") #'ambrevar/switch-to-last-buffer)
|
||||
|
@ -101,7 +100,7 @@
|
|||
(exwm-input-set-key (kbd "s-E") #'eww)
|
||||
|
||||
(when (fboundp 'helm-pass)
|
||||
(defun ambrevar/helm-pass-for-page ()
|
||||
(defun ambrevar/helm-pass-for-page () ; TODO: Share with upstream.
|
||||
"Default prompt to current exwm-title"
|
||||
(interactive)
|
||||
(require 'helm-pass)
|
||||
|
@ -140,7 +139,6 @@
|
|||
(interactive (list (read-shell-command "$ ")))
|
||||
(start-process-shell-command command nil command))
|
||||
(exwm-input-set-key (kbd "s-&") #'ambrevar/exwm-start)
|
||||
(exwm-input-set-key (kbd "s-r") #'ambrevar/exwm-start)
|
||||
|
||||
(when (require 'helm-exwm nil t)
|
||||
(add-to-list 'helm-source-names-using-follow "EXWM buffers")
|
||||
|
@ -157,19 +155,16 @@
|
|||
helm-exwm-map
|
||||
"M-d" 'helm-buffer-run-kill-persistent
|
||||
"S-<return>" 'helm-buffer-switch-other-window)
|
||||
;; Launcher
|
||||
(exwm-input-set-key (kbd "s-r") 'helm-run-external-command)
|
||||
;; Web browser
|
||||
(exwm-input-set-key (kbd "s-w") #'helm-exwm-switch-browser)
|
||||
(exwm-input-set-key (kbd "s-W") #'helm-exwm-switch-browser-other-window))
|
||||
|
||||
;;; Lock screen
|
||||
(defun ambrevar/exwm-start-lock () (interactive) (start-process "slock" nil "slock"))
|
||||
(exwm-input-set-key (kbd "s-z") #'ambrevar/exwm-start-lock)
|
||||
|
||||
;;; Screenshot
|
||||
(defun ambrevar/exwm-start-screenshot () (interactive) (start-process-shell-command "scrot" nil "scrot ~/temp/screen-%F-%T.png"))
|
||||
(exwm-input-set-key (kbd "<print>") #'ambrevar/exwm-start-screenshot)
|
||||
(when (require 'desktop-environment nil 'noerror)
|
||||
(setq desktop-environment-screenshot-directory "~/temp")
|
||||
;; Use s-l to navigate windows.
|
||||
(define-key desktop-environment-mode-map (kbd "s-z") #'desktop-environment-lock-screen)
|
||||
(desktop-environment-mode)
|
||||
(exwm-input-set-key (kbd "s-l") #'windmove-right))
|
||||
|
||||
;;; Volume control
|
||||
(when (require 'pulseaudio-control nil t)
|
||||
|
|
Loading…
Reference in New Issue