From ba480ea00818804473023691e70fa11453d869ad Mon Sep 17 00:00:00 2001 From: Ohad Livne Date: Wed, 4 Jun 2025 22:47:19 +0300 Subject: [PATCH] Use Emacs in daemon mode --- .config/sway/config | 8 +++++++- .profile | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.config/sway/config b/.config/sway/config index b7b0700..aece003 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -70,7 +70,7 @@ input type:touchpad { bindsym $launch+t exec $term zellij attach --create main # Start Emacs - bindsym $launch+e exec emacs + bindsym $launch+e exec emacsclient --create-frame # Start a browser bindsym $launch+f exec firefox --private-window @@ -253,6 +253,12 @@ bindsym Print exec take-screenshot everything bindsym Shift+Print exec take-screenshot bindsym Pause exec kill -s INT $(pgrep wf-recorder) +# +# Start an emacs daemon +# + +exec emacs --bg-daemon + # # Start a password manager in the scratchpad # diff --git a/.profile b/.profile index a5cdbc0..4c93a3e 100644 --- a/.profile +++ b/.profile @@ -36,8 +36,8 @@ if [ -d "$(systemd-path user-state-private)"/git-sync ] ; then fi umask 0007 -export EDITOR="/usr/local/bin/emacs --no-init-file --no-splash --no-window-system" -export VISUAL="/usr/local/bin/emacs --no-init-file --no-splash --no-window-system" +export EDITOR="emacsclient" +export VISUAL="emacsclient" export GTK_IM_MODULE="fcitx" export QT_IM_MODULE="fcitx" export XMODIFIERS="@im=fcitx"