fixing cosmic not working in emacs for iced apps
This commit is contained in:
parent
3cd0e52906
commit
68691811df
2 changed files with 11 additions and 6 deletions
10
README.org
10
README.org
|
@ -417,6 +417,9 @@ Let's make xref use ripgrep instead of grep for speed.
|
|||
#+end_src
|
||||
|
||||
** Fix NixOS
|
||||
:PROPERTIES:
|
||||
:ID: 20241114T164653.192420
|
||||
:END:
|
||||
I am currently using NixOS. In order for emacs to have access to certain programs, we need to set some environment variables
|
||||
#+begin_src emacs-lisp
|
||||
(add-to-list 'exec-path "/usr/bin")
|
||||
|
@ -428,7 +431,6 @@ I am currently using NixOS. In order for emacs to have access to certain program
|
|||
(setenv "CLUTTER_BACKEND" "wayland")
|
||||
(setenv "GDK_BACKEND" "wayland,x11")
|
||||
(setenv "SDL_VIDEODRIVER" "wayland")
|
||||
(setenv "WAYLAND_DISPLAY" "wayland-1")
|
||||
(setenv "XDG_SESSION_TYPE" "wayland")
|
||||
|
||||
(defun chris/nix-reload ()
|
||||
|
@ -442,9 +444,11 @@ I am currently using NixOS. In order for emacs to have access to certain program
|
|||
|
||||
Also due to using greetd, emacs isn't started with the environment from the system, so let's make sure it knows which wayland display we are using
|
||||
#+begin_src emacs-lisp
|
||||
(setenv "WAYLAND_DISPLAY" (if (string= (getenv "XDG_CURRENT_DESKTOP") "Hyprland")
|
||||
(let ((desktop (getenv "XDG_CURRENT_DESKTOP")))
|
||||
(setenv "WAYLAND_DISPLAY" (if (or (string= desktop "COSMIC")
|
||||
(string= desktop "Hyprland"))
|
||||
"wayland-1"
|
||||
"wayland-0"))
|
||||
"wayland-0")))
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
|
|
7
init.el
7
init.el
|
@ -214,7 +214,6 @@
|
|||
(setenv "CLUTTER_BACKEND" "wayland")
|
||||
(setenv "GDK_BACKEND" "wayland,x11")
|
||||
(setenv "SDL_VIDEODRIVER" "wayland")
|
||||
(setenv "WAYLAND_DISPLAY" "wayland-1")
|
||||
(setenv "XDG_SESSION_TYPE" "wayland")
|
||||
|
||||
(defun chris/nix-reload ()
|
||||
|
@ -225,9 +224,11 @@
|
|||
(when (boundp 'native-comp-eln-load-path)
|
||||
(add-to-list 'native-comp-eln-load-path (expand-file-name "native-lisp/" store-path)))))
|
||||
|
||||
(setenv "WAYLAND_DISPLAY" (if (string= (getenv "XDG_CURRENT_DESKTOP") "Hyprland")
|
||||
(let ((desktop (getenv "XDG_CURRENT_DESKTOP")))
|
||||
(setenv "WAYLAND_DISPLAY" (if (or (string= desktop "COSMIC")
|
||||
(string= desktop "Hyprland"))
|
||||
"wayland-1"
|
||||
"wayland-0"))
|
||||
"wayland-0")))
|
||||
|
||||
(executable-find "ssh")
|
||||
(setq ispell-program-name "hunspell"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue