Open ejb-11 opened 4 months ago
I do not know if this can help you, but I remember that some programs like n³ need environment variables to work as intended and launching them from keybinds makes them ignore/forget those variables. This has happened on i3, sway, niri, river and Hyprland. So I set those variables with the compositor or somewhere like ~/.zshenv or else. May be something else altogether.... good luck anyway,
As a workaround, I recommend simply binding this command to open emacs: emacsclient -c --alternate-editor=""
What this does is that is starts a new emacs client, and if there's no server running, it'll automatically start one. It's preferable to starting the daemon separately.
Hey, I dont have the issue. I have been using emacs daemon from hyprland exec-once
with no problem.
I also use nixos.
Are you using Pgtk build or normal emacs29
? Do mention which build you are using or how you installed emacs
Regression?
No
System Info and Version
System/Version info
```sh Hyprland, built from branch main at commit 918d8340afd652b011b937d29d5eea0be08467f5 (flake.lock: update). Date: 2024-06-25 Tag: v0.41.2, commits: 918d8340afd652b011b937d29d5eea0be08467f5 flags: (if any) System Information: System name: Linux Node name: ejb-dell Release: 6.9.7-zen1 Version: #1-NixOS ZEN SMP PREEMPT_DYNAMIC Tue Jan 1 00:00:00 UTC 1980 GPU information: 00:02.0 VGA compatible controller [0300]: Intel Corporation Alder Lake-P GT2 [Iris Xe Graphics] [8086:46a6] (rev 0c) (prog-if 00 [VGA controller]) 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q] [10de:2560] (rev a1) (prog-if 00 [VGA controller]) os-release: ANSI_COLOR="1;34" BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues" BUILD_ID="24.05.20240707.1948467" DOCUMENTATION_URL="https://nixos.org/learn.html" HOME_URL="https://nixos.org/" ID=nixos IMAGE_ID="" IMAGE_VERSION="" LOGO="nix-snowflake" NAME=NixOS PRETTY_NAME="NixOS 24.05 (Uakari)" SUPPORT_END="2024-12-31" SUPPORT_URL="https://nixos.org/community.html" VERSION="24.05 (Uakari)" VERSION_CODENAME=uakari VERSION_ID="24.05" plugins: ======Config-Start====== Config File: /home/ejb/.config/hypr/hyprland.conf: Read Succeeded # # Please note not all available settings / options are set here. # For a full list, see the wiki # # See https://wiki.hyprland.org/Configuring/Monitors/ # monitor=port,res@rr,posHorxposVer,scale monitor=DP-1,2560x1440@170,0x0,1,vrr,1 monitor=eDP-1,1920x1080@165,2560x0,1,vrr,1 monitor=,preferred,auto,1 #laptop lid switch turns off monitor upon close and turns on upon open bindl=,switch:off:Lid Switch,exec,hyprctl keyword monitor "eDP-1,1920x1080@165,0x1440,1,vrr,1" bindl=,switch:on:Lid Switch,exec,hyprctl keyword monitor "eDP-1, disable" env = WLR_DRM_DEVICES,/dev/dri/card0 env = QT_QPA_PLATFORM,wayland # Execute your favorite apps at launch exec-once = waybar exec-once = dunst exec-once = hyprpaper # The following doesn't work: exec-once = emacs --daemon # Source a file (multi-file configs) # source = ~/.config/hypr/myColors.conf # Some default env vars. env = XCURSOR_SIZE,24 # For all categories, see https://wiki.hyprland.org/Configuring/Variables/ input { kb_layout = gb kb_variant = kb_model = kb_options = kb_rules = follow_mouse = 1 touchpad { natural_scroll = true disable_while_typing = false tap-to-click = true clickfinger_behavior = true } sensitivity = 0 # -1.0 - 1.0, 0 means no modification. } general { # See https://wiki.hyprland.org/Configuring/Variables/ for more gaps_in = 5 gaps_out = 20 border_size = 2 col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg col.inactive_border = rgba(595959aa) layout = dwindle # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on allow_tearing = false } decoration { # See https://wiki.hyprland.org/Configuring/Variables/ for more rounding = 10 blur { enabled = true size = 3 passes = 1 } drop_shadow = yes shadow_range = 4 shadow_render_power = 3 col.shadow = rgba(1a1a1aee) } animations { enabled = yes # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more bezier = myBezier, 0.05, 0.9, 0.1, 1.05 animation = windows, 1, 7, myBezier animation = windowsOut, 1, 7, default, popin 80% animation = border, 1, 10, default animation = borderangle, 1, 8, default animation = fade, 1, 7, default animation = workspaces, 1, 6, default } dwindle { # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below preserve_split = yes # you probably want this } master { # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more new_status = master } gestures { # See https://wiki.hyprland.org/Configuring/Variables/ for more workspace_swipe = on } misc { # See https://wiki.hyprland.org/Configuring/Variables/ for more vrr = 1 vfr = true } # Example per-device config # See https://wiki.hyprland.org/Configuring/Keywords/#executing for more device { name = razer-orochi-v2 accel_profile = flat } # Example windowrule v1 windowrule = float, ^(kitty)$ windowrule = float, title:^(Pipewire Volume Control)$ # Example windowrule v2 # windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more # See https://wiki.hyprland.org/Configuring/Keywords/ for more $mainMod = SUPER $mainmod = SUPER_L # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more bind = $mainMod, Return, exec, kitty bind = $mainMod, C, killactive, bind = $mainMod, M, exit, bind = $mainMod, E, exec, emacsclient -c -a "emacs" bind = $mainMod, V, togglefloating, bindr = $mainMod, $mainmod, exec, pkill wofi || wofi --show drun bind = $mainMod, P, pseudo, # dwindle bind = $mainMod, J, togglesplit, # dwindle bind = $mainMod, F, togglefloating bind = $mainMod, B, exec, librewolf bind = $mainMod, F12, exec, grimblast copy area binde = , XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ bindel = , XF86AudioLowerVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%- binde = , XF86MonBrightnessUp, exec, brightnessctl set -e 3%+ -d nvidia_wmi_ec_backlight binde = , XF86MonBrightnessDown, exec, brightnessctl set -e 3%- -d nvidia_wmi_ec_backlight bind = , f11, fullscreen, 0 bind = $mainMod, L, exec, pidof hyprlock || hyprlock # Move focus with mainMod + arrow keys bind = $mainMod, left, movefocus, l bind = $mainMod, right, movefocus, r bind = $mainMod, up, movefocus, u bind = $mainMod, down, movefocus, d # Switch workspaces with mainMod + [0-9] bind = $mainMod, 1, workspace, 1 bind = $mainMod, 2, workspace, 2 bind = $mainMod, 3, workspace, 3 bind = $mainMod, 4, workspace, 4 bind = $mainMod, 5, workspace, 5 bind = $mainMod, 6, workspace, 6 bind = $mainMod, 7, workspace, 7 bind = $mainMod, 8, workspace, 8 bind = $mainMod, 9, workspace, 9 bind = $mainMod, 0, workspace, 10 # Move active window to a workspace with mainMod + SHIFT + [0-9] bind = $mainMod SHIFT, 1, movetoworkspace, 1 bind = $mainMod SHIFT, 2, movetoworkspace, 2 bind = $mainMod SHIFT, 3, movetoworkspace, 3 bind = $mainMod SHIFT, 4, movetoworkspace, 4 bind = $mainMod SHIFT, 5, movetoworkspace, 5 bind = $mainMod SHIFT, 6, movetoworkspace, 6 bind = $mainMod SHIFT, 7, movetoworkspace, 7 bind = $mainMod SHIFT, 8, movetoworkspace, 8 bind = $mainMod SHIFT, 9, movetoworkspace, 9 bind = $mainMod SHIFT, 0, movetoworkspace, 10 # Example special workspace (scratchpad) bind = $mainMod, S, togglespecialworkspace, magic bind = $mainMod SHIFT, S, movetoworkspace, special:magic # Scroll through existing workspaces with mainMod + scroll bind = $mainMod, mouse_down, workspace, e+1 bind = $mainMod, mouse_up, workspace, e-1 # Move/resize windows with mainMod + LMB/RMB and dragging bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow ======Config-End======== ```Description
Hyprland should start an EMACS background daemon process so windows can open faster by using the same EMACS server. I think what is happening is that the process starts in the wrong way so it is not accessible to clients started by the user, but I am not sure about this. It might be something to do with XWayland, but I am not sure. (Does the X display/monitor/whatever exist when Hyprland is starting, or get initialised mid-way through the process?)
Sorry if this is a known issue or something obvious, but I am new to Hyprland and I couldn't find anything online to do with both Hyprland and the EMACS daemon.
How to reproduce
Put
exec-once = emacs --daemon
in yourhyprland.conf
, then try and runemacsclient -c
either with a command or keybinding.Crash reports, logs, images, videos
No response