When launching into a session, if the display server is not running then =startx= should be invoked, to run the window manager. Anything that needs to be included in the ~$PATH~ should occur before the end of this file.
#+begin_src sh :tangle ~/.local/source/dotfiles/config/profile
GOPATH="$HOME/.go/"
export GOPATH
if [ -d "$GOPATH/bin" ]; then
PATH="$GOPATH/bin:$PATH"
fi
if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
exec startx
fi
#+end_src
Define a method to run an external process, allowing us to launch any application on a new process without interferring with Emacs.
Define a method to run an external process, allowing us to launch any application on a new process without interferring with Emacs.
#+begin_src emacs-lisp
#+begin_src emacs-lisp
@ -1059,12 +1072,14 @@ Install the =gopls= language server.
GO111MODULE=on go get golang.org/x/tools/gopls@latest
GO111MODULE=on go get golang.org/x/tools/gopls@latest
#+end_src
#+end_src
Set the ~GOPATH~ environment variable prior to loading, this allows us to change the default value of ~$HOME/go~ to ~$HOME.go~.
Set the ~GOPATH~ environment variable prior to loading, this allows us to change the default value of ~$HOME/go~ to ~$HOME/.go~.