Browse Source

Include generic profile

main
parent
commit
898fe1e646
  1. 23
      README.org
  2. 10
      config/profile

23
README.org

@ -14,9 +14,7 @@
~ ~~ ~~ ~~ ~~ ~~~~~~~~~~~~~ ~~~~ ~ ~~~ ~ ~~~ ~ ~~ ~ ~~ ~~ ~~ ~~ ~~~~~~~~~~~~~ ~~~~ ~ ~~~ ~ ~~~ ~ ~~
~ ~~ ~ ~ ~~~~~~ ~~ ~~~ ~~ ~ ~~ ~~ ~ ~ ~~ ~ ~ ~~~~~~ ~~ ~~~ ~~ ~ ~~ ~~ ~
~ ~ ~ ~ ~ ~~ ~~~~~~ ~ ~~ ~ ~~ ~ ~ ~ ~ ~ ~~ ~~~~~~ ~ ~~ ~ ~~
~ ~ ~ ~ ~~ ~ ~
#+end_example
~ ~ ~ ~ ~~ ~ ~ #+end_example
Immutable GNU Emacs dotfiles, inspired by Doom, built for Liberty. Immutable GNU Emacs dotfiles, inspired by Doom, built for Liberty.
+ 100% Literate + 100% Literate
+ 100% Immutable + 100% Immutable
@ -494,6 +492,21 @@ I use Emacs as a Desktop Environment with the [[https://github.com/ch11ng/exwm][
exec dbus-launch --exit-with-session emacs -mm --debug-init exec dbus-launch --exit-with-session emacs -mm --debug-init
#+end_src #+end_src
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~.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setenv "GOPATH" (concat (getenv "HOME") "/.go/")) (setenv "GOPATH" (concat (getenv "HOME") "/.go/"))
#+end_src #+end_src
Additionally, include the =bin= subdirectory of the ~$GOPATH~ in the ~$PATH~ variable, adding compiled golang programs.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package go-mode (use-package go-mode
:hook (go-mode . lsp)) :hook (go-mode . lsp))

10
config/profile

@ -0,0 +1,10 @@
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
Loading…
Cancel
Save