exwm stuffs
This commit is contained in:
parent
8b4af5d175
commit
6fed71e728
12
custom.el
12
custom.el
|
@ -169,6 +169,18 @@
|
|||
(with-keybinding selectrum-minibuffer-map (kbd "SPC") (lambda () (interactive (insert-char ?-)))
|
||||
(org-roam-insert))))
|
||||
|
||||
(setq x-mouse-on t)
|
||||
(setq x-mouse-value "13")
|
||||
(defun fez/toggle-x-mouse ()
|
||||
"Toggle the X mouse."
|
||||
(interactive)
|
||||
(setq x-mouse-on (not x-mouse-on))
|
||||
(shell-command (concat "xinput "
|
||||
(if x-mouse-on "--enable " "--disable ")
|
||||
x-mouse-value))
|
||||
(message (concat "Mouse "
|
||||
(if x-mouse-on "enabled." "disabled."))))
|
||||
|
||||
;; Eshell convinience commands.
|
||||
(defalias 'open 'find-file-other-window)
|
||||
(defalias 'clean 'eshell/clear-scrollback)
|
||||
|
|
3
init.el
3
init.el
|
@ -72,3 +72,6 @@
|
|||
;; (setq geiser-guile-binary "/usr/local/bin/guile-ncurses-shell")
|
||||
|
||||
(setq geiser-active-implementations '(chez guile))
|
||||
|
||||
;; I use emacs as my window manager.
|
||||
(exwm-config)
|
||||
|
|
72
packages.el
72
packages.el
|
@ -127,10 +127,10 @@
|
|||
|
||||
;; Instead of opening windows inside of Emacs, create new frames. This is great
|
||||
;; for tiling window managers.
|
||||
(use-package frames-only-mode
|
||||
:ensure t
|
||||
:config
|
||||
(frames-only-mode))
|
||||
;; (use-package frames-only-mode
|
||||
;; :ensure t
|
||||
;; :config
|
||||
;; (frames-only-mode))
|
||||
|
||||
;; Mode for browsing gemini/gopher sites.
|
||||
(use-package elpher
|
||||
|
@ -193,4 +193,68 @@
|
|||
(setq yas-snippet-dirs '("~/.emacs.d/snippets"))
|
||||
(yas-global-mode 1))
|
||||
|
||||
(use-package god-mode
|
||||
:init
|
||||
(global-set-key (kbd "<escape>") #'god-mode-all)
|
||||
(setq god-exempt-major-modes nil)
|
||||
(setq god-exempt-predicates nil)
|
||||
(setq god-mode-enable-function-key-translation nil))
|
||||
|
||||
(use-package exwm
|
||||
:init
|
||||
(defun exwm-config ()
|
||||
"EXWM configuration."
|
||||
;; Set the initial workspace number.
|
||||
(unless (get 'exwm-workspace-number 'saved-value)
|
||||
(setq exwm-workspace-number 4))
|
||||
;; Make class name the buffer name
|
||||
(add-hook 'exwm-update-class-hook
|
||||
(lambda ()
|
||||
(exwm-workspace-rename-buffer exwm-class-name)))
|
||||
;; Global keybindings.
|
||||
(unless (get 'exwm-input-global-keys 'saved-value)
|
||||
(setq exwm-input-global-keys
|
||||
`(
|
||||
;; 's-r': Reset (to line-mode, fullscreen).
|
||||
([?\s-r] . exwm-reset)
|
||||
;; 's-w': Switch workspace.
|
||||
([?\s-w] . exwm-workspace-switch)
|
||||
;; 's-&': Launch application.
|
||||
([?\s-&] . (lambda (command)
|
||||
(interactive (list (read-shell-command "$ ")))
|
||||
(start-process-shell-command command nil command)))
|
||||
;; 's-N': Switch to certain workspace.
|
||||
(\,@(mapcar (lambda (i)
|
||||
`(,(kbd (format "s-%d" i)) .
|
||||
(lambda ()
|
||||
(interactive)
|
||||
(exwm-workspace-switch-create ,i))))
|
||||
(number-sequence 0 9)))
|
||||
;; 's-a': Toggle X mouse
|
||||
([?\s-a] . fez/toggle-x-mouse)
|
||||
;; 's-l': Toggle line-mode and char-mode for the current window.
|
||||
([?\s-l] . exwm-input-toggle-keyboard)
|
||||
;; windmove movement commands
|
||||
([?\s-u] . windmove-left)
|
||||
([?\s-i] . windmove-down)
|
||||
([?\s-o] . windmove-up)
|
||||
([?\s-p] . windmove-right)))
|
||||
;; Line-editing shortcuts
|
||||
(unless (get 'exwm-input-simulation-keys 'saved-value)
|
||||
(setq exwm-input-simulation-keys
|
||||
'(([?\C-b] . [left])
|
||||
([?\C-f] . [right])
|
||||
([?\C-p] . [up])
|
||||
([?\C-n] . [down])
|
||||
([?\C-a] . [home])
|
||||
([?\C-e] . [end])
|
||||
([?\M-v] . [prior])
|
||||
([?\C-v] . [next])
|
||||
([?\C-d] . [delete])
|
||||
([?\C-k] . [S-end delete]))))
|
||||
;; Enable windmove keybinds
|
||||
(winner-mode t)
|
||||
;; Enable EXWM
|
||||
(exwm-enable))))
|
||||
|
||||
(provide 'packages)
|
||||
|
|
Loading…
Reference in New Issue