From 0a53d2ac405913a0d6e9b7ae3ff152498898df88 Mon Sep 17 00:00:00 2001 From: Sravan Balaji Date: Sun, 10 Mar 2024 14:33:01 -0400 Subject: [PATCH] Switch from Emacs to Emacs Server/Client - Make main editor for everything `emacsclient` which connects to the emacs daemon which gets started on system startup - This makes it so every emacs instance is connecting to the same daemon, so loading times are a lot faster than creating a new instance of emacs everytime --- .bashrc | 2 +- .gitconfig | 2 +- .scripts/startup.sh | 2 ++ .xinitrc | 4 ++-- README.org | 10 ++++++---- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.bashrc b/.bashrc index 8ce9027..f0f5dc2 100644 --- a/.bashrc +++ b/.bashrc @@ -117,7 +117,7 @@ if ! shopt -oq posix; then fi # ENVIRONMENT VARIABLES -export EDITOR="emacs" +export EDITOR="emacsclient -c" export TERM=xterm-256color export QT_STYLE_OVERRIDE=kvantum export XDG_CONFIG_HOME=$HOME/.config diff --git a/.gitconfig b/.gitconfig index 2ef9d37..3084c93 100644 --- a/.gitconfig +++ b/.gitconfig @@ -38,7 +38,7 @@ untrack = rm --cache -- [core] # Emacs - editor = "emacs" + editor = "emacsclient -c" # Don't consider trailing space change as a cause for merge conflicts whitespace = -trailing-space [diff] diff --git a/.scripts/startup.sh b/.scripts/startup.sh index ec7f458..747844a 100755 --- a/.scripts/startup.sh +++ b/.scripts/startup.sh @@ -10,6 +10,7 @@ declare -a startup_array=(\ "/usr/bin/redshift -x" \ # Redshift Blue Light Filter "/usr/bin/unclutter" \ # Hide Mouse Cursor "/usr/bin/easyeffects --gapplication-service" \ # Easy Effects PipeWire Plugins + "/usr/bin/emacs --daemon" \ # Emacs Daemon ) declare -a kill_startup_array=(\ @@ -23,6 +24,7 @@ declare -a kill_startup_array=(\ "pkill redshift" \ # Redshift Blue Light Filter "pkill unclutter" \ # Hide Mouse Cursor "pkill easyeffects" \ # Easy Effects PipeWire Plugins + "pkill emacs" \ # Emacs Daemon ) declare -a delay_array=(\ diff --git a/.xinitrc b/.xinitrc index a16b138..c14bd5c 100755 --- a/.xinitrc +++ b/.xinitrc @@ -1,8 +1,8 @@ #!/bin/sh export TERM=xterm-256color # Sets the terminal type export SHELL=/usr/bin/fish # Preferred shell -export EDITOR="emacs" # Default editor -export GIT_EDITOR="emacs" # Default git editor +export EDITOR="emacsclient -c" # Default editor +export GIT_EDITOR="emacsclient -c" # Default git editor export BROWSER=vivaldi-stable # Web Browser export XDG_CONFIG_HOME=$HOME/.config # Set Config directory export QT_QPA_PLATFORMTHEME=qt5ct # QGtkStyle diff --git a/README.org b/README.org index 10e0e16..53de0d6 100644 --- a/README.org +++ b/README.org @@ -333,7 +333,7 @@ Things to ignore in dotfiles git repo. untrack = rm --cache -- [core] # Emacs - editor = "emacs" + editor = "emacsclient -c" # Don't consider trailing space change as a cause for merge conflicts whitespace = -trailing-space [diff] @@ -4999,7 +4999,7 @@ if ! shopt -oq posix; then fi # ENVIRONMENT VARIABLES -export EDITOR="emacs" +export EDITOR="emacsclient -c" export TERM=xterm-256color export QT_STYLE_OVERRIDE=kvantum export XDG_CONFIG_HOME=$HOME/.config @@ -9489,8 +9489,8 @@ Host gitea.sravanbalaji.com #+BEGIN_SRC shell :shebang #!/bin/sh :tangle .xinitrc export TERM=xterm-256color # Sets the terminal type export SHELL=/usr/bin/fish # Preferred shell -export EDITOR="emacs" # Default editor -export GIT_EDITOR="emacs" # Default git editor +export EDITOR="emacsclient -c" # Default editor +export GIT_EDITOR="emacsclient -c" # Default git editor export BROWSER=vivaldi-stable # Web Browser export XDG_CONFIG_HOME=$HOME/.config # Set Config directory export QT_QPA_PLATFORMTHEME=qt5ct # QGtkStyle @@ -9698,6 +9698,7 @@ declare -a startup_array=(\ "/usr/bin/redshift -x" \ # Redshift Blue Light Filter "/usr/bin/unclutter" \ # Hide Mouse Cursor "/usr/bin/easyeffects --gapplication-service" \ # Easy Effects PipeWire Plugins + "/usr/bin/emacs --daemon" \ # Emacs Daemon ) declare -a kill_startup_array=(\ @@ -9711,6 +9712,7 @@ declare -a kill_startup_array=(\ "pkill redshift" \ # Redshift Blue Light Filter "pkill unclutter" \ # Hide Mouse Cursor "pkill easyeffects" \ # Easy Effects PipeWire Plugins + "pkill emacs" \ # Emacs Daemon ) declare -a delay_array=(\