Browse Source

Merge branch 'master' of github.com:WolfeCub/dotfiles

master
Josh Wolfe 2 years ago
parent
commit
c1abbd770a
2 changed files with 54 additions and 0 deletions
  1. 10
    0
      emacs/.emacs.d/README.org
  2. 44
    0
      exwm/.exwm.el

+ 10
- 0
emacs/.emacs.d/README.org View File

@@ -130,6 +130,15 @@ If you don't care about these *[[Startup][click here to skip over them]]*.
My graphical settings change depending on whether I'm in terminal
and if a command line flag (=-light=) was specified.

** WM

Start load emacs window manager config if it exists.

#+BEGIN_SRC emacs-lisp :tangle yes
(when (file-exists-p "~/.exwm.el")
(load-file "~/.exwm.el"))
#+END_SRC

** Theme Setup

This should be run regardless of whether I'm in terminal vs gui or dark vs light.
@@ -1541,6 +1550,7 @@ Shows hex colors inline.
:init
(use-package smex)
(use-package counsel)
(use-package doom-todo-ivy :ensure nil)
:config
(setq ivy-re-builders-alist
'((t . ivy--regex-ignore-order)))

+ 44
- 0
exwm/.exwm.el View File

@@ -0,0 +1,44 @@
(use-package exwm
:config
(require 'exwm-config))

;; Set the initial workspace number.
(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)))
;; 's-r': Reset
(exwm-input-set-key (kbd "s-r") #'exwm-reset)
;; 's-w': Switch workspace
(exwm-input-set-key (kbd "s-w") #'exwm-workspace-switch)
;; 's-N': Switch to certain workspace
(let ((workspace-list '("&" "[" "{" "}" "(" "=" "*" ")" "+" "]")))
(dotimes (i 10)
(exwm-input-set-key (kbd (format "s-%s" (nth i workspace-list)))
`(lambda ()
(interactive)
(exwm-workspace-switch-create ,i)))))

;; 's-&': Launch application
(exwm-input-set-key (kbd "s-SPC")
(lambda (command)
(interactive (list (read-shell-command "$ ")))
(start-process-shell-command command nil command)))
;; Line-editing shortcuts
(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 EXWM
(exwm-enable)
;; Other configurations
(fringe-mode 1)

Loading…
Cancel
Save