mirror of
https://github.com/correl/dotfiles.git
synced 2025-02-16 15:54:36 +00:00
[emacs] Add EXWM configuration
This commit is contained in:
parent
ec14807d8c
commit
5b25978aef
5 changed files with 89 additions and 2 deletions
1
.doom.d/.gitignore
vendored
1
.doom.d/.gitignore
vendored
|
@ -1 +1,2 @@
|
||||||
config.el
|
config.el
|
||||||
|
exwm.el
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#+TITLE: DOOM Emacs Configuration
|
#+TITLE: DOOM Emacs Configuration
|
||||||
#+STARTUP: indent
|
#+STARTUP: indent overview
|
||||||
#+PROPERTY: header-args :tangle yes
|
#+PROPERTY: header-args :tangle config.el
|
||||||
|
|
||||||
* Custom settings
|
* Custom settings
|
||||||
Store options set via =customize-*= in a separate file (Emacs stores
|
Store options set via =customize-*= in a separate file (Emacs stores
|
||||||
|
@ -46,6 +46,77 @@ https://dtinth.github.io/comic-mono-font/
|
||||||
(after! php-mode
|
(after! php-mode
|
||||||
(add-hook 'php-mode-hook #'my/buffer-face-comic-mono))
|
(add-hook 'php-mode-hook #'my/buffer-face-comic-mono))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
** Frame transparency
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(set-frame-parameter (selected-frame) 'alpha '(90 . 90))
|
||||||
|
(add-to-list 'default-frame-alist '(alpha . (90 . 90)))
|
||||||
|
#+end_src
|
||||||
|
* Counsel
|
||||||
|
** Linux application launcher
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package! counsel
|
||||||
|
:custom (counsel-linux-app-format-function #'counsel-linux-app-format-function-name-only)
|
||||||
|
:config (counsel-mode 1))
|
||||||
|
#+end_src
|
||||||
|
* EXWM
|
||||||
|
|
||||||
|
#+begin_src sh :tangle ~/.dmrc
|
||||||
|
[Desktop]
|
||||||
|
session=~/.doom.d/start-exwm.sh
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src sh :tangle start-exwm.sh :shebang #!/bin/sh
|
||||||
|
emacs -mm --debug-init -l ~/.doom.d/exwm.el
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp :tangle exwm.el
|
||||||
|
(defun my/exwm-update-class ()
|
||||||
|
(exwm-workspace-rename-buffer exwm-class-name))
|
||||||
|
(defun my/run-in-background (command)
|
||||||
|
(let ((command-parts (split-string command "[ ]+")))
|
||||||
|
(apply #'call-process `(,(car command-parts) nil 0 nil ,@(cdr command-parts)))))
|
||||||
|
(defun my/set-desktop-background ()
|
||||||
|
(interactive)
|
||||||
|
(start-process-shell-command "feh" nil "feh --bg-scale ~/Pictures/Wallpapers/1520742811045.png"))
|
||||||
|
(defun my/exwm-init-hook ()
|
||||||
|
;; Start on workspace1
|
||||||
|
(exwm-workspace-switch-create 1)
|
||||||
|
(my/run-in-background "nm-applet")
|
||||||
|
(my/run-in-background "pasystray")
|
||||||
|
(my/run-in-background "blueman-applet")
|
||||||
|
(my/run-in-background "nextcloud --background")
|
||||||
|
(my/run-in-background "compton"))
|
||||||
|
(use-package! exwm
|
||||||
|
:config
|
||||||
|
(require 'exwm-systemtray)
|
||||||
|
;; (setq exwm-systemtray-height 32)
|
||||||
|
(exwm-systemtray-enable)
|
||||||
|
(display-time-mode +1)
|
||||||
|
(display-battery-mode +1)
|
||||||
|
(setq exwm-input-global-keys
|
||||||
|
`(([?\s-r] . exwm-reset)
|
||||||
|
([?\s-w] . exwm-workspace-switch)
|
||||||
|
,@(mapcar (lambda (i)
|
||||||
|
`(,(kbd (format "s-%d" i)) .
|
||||||
|
(lambda ()
|
||||||
|
(interactive)
|
||||||
|
(exwm-workspace-switch-create ,i))))
|
||||||
|
(number-sequence 0 9))
|
||||||
|
([?\s-&] . (lambda (command)
|
||||||
|
(interactive (list (read-shell-command "$ ")))
|
||||||
|
(start-process-shell-command command nil command)))))
|
||||||
|
(exwm-input-set-key (kbd "s-SPC") #'counsel-linux-app)
|
||||||
|
(add-hook! 'exwm-update-class-hook #'my/exwm-update-class)
|
||||||
|
(add-hook! 'exwm-init-hook #'my/exwm-init-hook)
|
||||||
|
(my/set-desktop-background)
|
||||||
|
(exwm-enable))
|
||||||
|
(use-package! exwm-config
|
||||||
|
:after exwm)
|
||||||
|
(use-package! desktop-environment
|
||||||
|
:after exwm
|
||||||
|
:config
|
||||||
|
(desktop-environment-mode))
|
||||||
|
#+end_src
|
||||||
* Dashboard
|
* Dashboard
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(defun my/choice (&rest things)
|
(defun my/choice (&rest things)
|
||||||
|
|
|
@ -35,6 +35,9 @@
|
||||||
(package! yapfify)
|
(package! yapfify)
|
||||||
(package! weechat)
|
(package! weechat)
|
||||||
(package! weechat-alert)
|
(package! weechat-alert)
|
||||||
|
(package! exwm)
|
||||||
|
(package! desktop-environment)
|
||||||
|
(package! counsel)
|
||||||
|
|
||||||
(package! org-roam-bibtex
|
(package! org-roam-bibtex
|
||||||
:recipe (:host github :repo "org-roam/org-roam-bibtex"))
|
:recipe (:host github :repo "org-roam/org-roam-bibtex"))
|
||||||
|
|
2
.doom.d/start-exwm.sh
Executable file
2
.doom.d/start-exwm.sh
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
emacs -mm --debug-init -l ~/.doom.d/exwm.el
|
10
recipes/exwm
Normal file
10
recipes/exwm
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Description: Emacs X Window Manager
|
||||||
|
set -e
|
||||||
|
|
||||||
|
_recipe _apt
|
||||||
|
_recipe emacs
|
||||||
|
|
||||||
|
_apt brightnessctl
|
||||||
|
_apt fonts-font-awesome
|
||||||
|
_apt fonts-material-design-icons-iconfont
|
Loading…
Reference in a new issue