From de0dc1f72967fb9471f6a1ba8d140288e31f474a Mon Sep 17 00:00:00 2001 From: eriedaberrie Date: Tue, 30 Apr 2024 23:09:38 -0700 Subject: [PATCH] Switch to upstream emacs-everywhere from personal Hyprland fork Because upstream has been updated and is customizable enough to support Hyprland relatively easily without needing a fork now. --- init.el | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/init.el b/init.el index f7d1c43..e6d0c04 100644 --- a/init.el +++ b/init.el @@ -831,15 +831,29 @@ (org-msg-greeting-fmt "\nHi%s,\n\n")) (use-package emacs-everywhere - :ensure nil - :commands emacs-everywhere :custom - (emacs-everywhere-frame-parameters '((name . "emacs-everywhere") - (alpha-background . 1.0))) + (emacs-everywhere-app-info-function + (lambda () + (let* ((string-data (emacs-everywhere-call "hyprctl" "-j" "activewindow")) + (window-data (json-parse-string string-data + :object-type 'plist + :array-type 'list + :null-object nil + :false-object nil)) + (window-id (plist-get window-data :address)) + (app-id (plist-get window-data :class)) + (window-title (plist-get window-data :title)) + (window-geometry (append (plist-get window-data :at) + (plist-get window-data :size)))) + (make-emacs-everywhere-app + :id window-id + :class app-id + :title window-title + :geometry window-geometry)))) + (emacs-everywhere-window-focus-command '("hyprctl" "dispatch" "focuswindow" "address:%w")) :config - (setq emacs-everywhere-frame-parameters - (append '((alpha-background . 1.0) (width . 120) (height . 20)) - emacs-everywhere-frame-parameters))) + (dolist (f '((alpha-background . 1.0) (width . 120) (height . 20))) + (add-to-list 'emacs-everywhere-frame-parameters f))) (use-package prettify-symbols :ensure nil