From 4402f8245ff7dbdf0becee3523041da6227d57e7 Mon Sep 17 00:00:00 2001 From: Kiana Sheibani Date: Wed, 4 Feb 2026 16:42:48 -0500 Subject: [PATCH] compat(emacs-everywhere): use new system config API --- config.org | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/config.org b/config.org index 4d25dbe..8f99129 100644 --- a/config.org +++ b/config.org @@ -2689,17 +2689,14 @@ The calendar's main purpose for me is to give a better view of the [[*Agenda][Or :app everywhere #+end_src -Emacs Everywhere is a great idea. Unfortunately, the default package on MELPA uses X-based window commands, while I use Hyprland, which is Wayland-based. To fix this issue, we need to override some of the package's variables and functions. +Emacs Everywhere is a great idea. Since I use Hyprland, which isn't supported by the package by default, we have to add the correct system config to its list. #+begin_src emacs-lisp (after! emacs-everywhere - ;; Shell commands for interacting with window system - (setq emacs-everywhere-paste-command - '("wtype" "-M" "shift" "-P" "Insert") - emacs-everywhere-copy-command - '("sh" "-c" "wl-copy < %f") - emacs-everywhere-window-focus-command - '("hyprctl" "dispatch" "focuswindow" "address:%w")) + (push '((wayland . Hyprland) + :focus-command ("hyprctl" "dispatch" "focuswindow" "address:%w") + :info-function emacs-everywhere--app-info-linux-hyprland) + emacs-everywhere-system-configs) ;; Function for accessing current window (defun emacs-everywhere--app-info-linux-hyprland () @@ -2707,27 +2704,15 @@ Emacs Everywhere is a great idea. Unfortunately, the default package on MELPA us (pcase-let* ((`(,window-id ,window-class ,window-title . ,window-dims-) (split-string (shell-command-to-string - "hyprctl activewindow -j | jaq -r \ + "hyprctl activewindow -j | jq -r \ '.address, .class, .title, .at[], .size[]'") - "\n")) - (window-dims (mapcar #'string-to-number (butlast window-dims-)))) + "[\n\r]+" t)) + (window-dims (mapcar #'string-to-number window-dims-))) (make-emacs-everywhere-app :id window-id :class window-class :title window-title :geometry window-dims)))) - -(defpatch! emacs-everywhere - (defun emacs-everywhere--app-info-linux) () - "Return information on the active window, on Linux." - (pcase emacs-everywhere--display-server - (`(x11 . ,_) (emacs-everywhere--app-info-linux-x11)) - (`(wayland . KDE) (emacs-everywhere--app-info-linux-kde)) - (`(wayland . sway) (emacs-everywhere--app-info-linux-sway)) - (el-patch-add - (`(wayland . Hyprland) (emacs-everywhere--app-info-linux-hyprland))) - (_ (user-error "Unable to fetch app info with display server %S" - emacs-everywhere--display-server)))) #+end_src ** Mail