emacs: fix EXWM issues

This commit is contained in:
Pavel Korytov 2025-11-12 17:50:23 +03:00
parent 9de8219520
commit aa17540532
6 changed files with 17 additions and 7 deletions

View file

@ -6,7 +6,8 @@
(call-process-shell-command "feh --bg-fill ~/Pictures/wallpaper.jpg")) (call-process-shell-command "feh --bg-fill ~/Pictures/wallpaper.jpg"))
(defun my/exwm-run-shepherd () (defun my/exwm-run-shepherd ()
(when (string-empty-p (shell-command-to-string "pgrep -u pavel shepherd")) (when (and (string-empty-p (shell-command-to-string "pgrep -u pavel shepherd"))
(executable-find "shepherd"))
(call-process "shepherd"))) (call-process "shepherd")))
(use-package pinentry (use-package pinentry

View file

@ -1,6 +1,7 @@
;;; -*- lexical-binding: t -*- ;;; -*- lexical-binding: t -*-
(unless (or my/remote-server my/nested-emacs) (unless (or my/remote-server my/nested-emacs)
(add-hook 'after-init-hook #'server-start)) ;; (add-hook 'after-init-hook #'server-start)
)
(defmacro i3-msg (&rest args) (defmacro i3-msg (&rest args)
`(start-process "emacs-i3-windmove" nil "i3-msg" ,@args)) `(start-process "emacs-i3-windmove" nil "i3-msg" ,@args))

View file

@ -3,5 +3,5 @@ default-cache-ttl 3600
max-cache-ttl 3600 max-cache-ttl 3600
allow-emacs-pinentry allow-emacs-pinentry
allow-loopback-pinentry allow-loopback-pinentry
pinentry-program /home/pavel/.guix-profile/bin/pinentry pinentry-program /usr/bin/pinentry
# Pinentry:3 ends here # Pinentry:3 ends here

View file

@ -77,7 +77,6 @@ git clone git@github.com:SqrtMinusOne/dotfiles.git "/home/pavel/30-39 Life/32 or
#+end_src #+end_src
Install wakatime: Install wakatime:
#+begin_src bash #+begin_src bash
cd ~/00-Scratch/ cd ~/00-Scratch/
git clone https://github.com/wakatime/wakatime-cli.git git clone https://github.com/wakatime/wakatime-cli.git
@ -92,7 +91,11 @@ And create the =~/.wakatime.cfg= file with the following contents:
api_key = <api-key> api_key = <api-key>
#+end_src #+end_src
Then run =emacs= and make sure it starts. Then run =emacs= and make sure it starts. Run:
- =M-x nerd-icons-install-fonts=
- =M-x all-the-icons-install-fonts=
If everything works, login into EXWM.
* Metapac configuration * Metapac configuration
[[https://github.com/ripytide/metapac][metapac]] is a declarative wrapper around different package managers, including [[https://wiki.archlinux.org/title/Pacman][pacman]] and [[https://github.com/Morganamilo/paru][paru]]. This means the required packages can be listed in configuration files and checked into version control. [[https://github.com/ripytide/metapac][metapac]] is a declarative wrapper around different package managers, including [[https://wiki.archlinux.org/title/Pacman][pacman]] and [[https://github.com/Morganamilo/paru][paru]]. This means the required packages can be listed in configuration files and checked into version control.

View file

@ -31,6 +31,7 @@ I used to define color codes here (see [[https://github.com/SqrtMinusOne/dotfile
To use them, let's define a noweb block: To use them, let's define a noweb block:
#+NAME: get-color #+NAME: get-color
#+begin_src emacs-lisp :var name="black" quote=0 #+begin_src emacs-lisp :var name="black" quote=0
(let ((color (or (my/color-value name)))) (let ((color (or (my/color-value name))))
(if (> quote 0) (if (> quote 0)
@ -267,7 +268,8 @@ As of now, these are polybar, feh and, shepherd:
(call-process-shell-command "feh --bg-fill ~/Pictures/wallpaper.jpg")) (call-process-shell-command "feh --bg-fill ~/Pictures/wallpaper.jpg"))
(defun my/exwm-run-shepherd () (defun my/exwm-run-shepherd ()
(when (string-empty-p (shell-command-to-string "pgrep -u pavel shepherd")) (when (and (string-empty-p (shell-command-to-string "pgrep -u pavel shepherd"))
(executable-find "shepherd"))
(call-process "shepherd"))) (call-process "shepherd")))
#+end_src #+end_src
*** Pinentry *** Pinentry
@ -1709,6 +1711,7 @@ bindsym XF86MonBrightnessUp exec light -A 5
bindsym XF86MonBrightnessDown exec light -U 5 bindsym XF86MonBrightnessDown exec light -U 5
#+end_src #+end_src
*** Screenshots *** Screenshots
#+begin_src conf-space #+begin_src conf-space
# Screenshots # Screenshots
bindsym --release Print exec "flameshot gui" bindsym --release Print exec "flameshot gui"

View file

@ -1116,8 +1116,10 @@ This script is being run from the [[file:Desktop.org::*i3wm][i3 configuration]].
For this to work, we need to make sure that Emacs starts a server, so here is an expression to do just that: For this to work, we need to make sure that Emacs starts a server, so here is an expression to do just that:
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(unless (or my/remote-server my/nested-emacs) (unless (or my/remote-server my/nested-emacs)
(add-hook 'after-init-hook #'server-start)) ;; (add-hook 'after-init-hook #'server-start)
)
#+END_SRC #+END_SRC
Edit [2025-11-12 Wed]: This has stopped working with EXWM.
And here is a simple macro to do the Emacs -> i3 part: And here is a simple macro to do the Emacs -> i3 part:
#+begin_src emacs-lisp #+begin_src emacs-lisp