Move to the dark side (doom emacs)

This commit is contained in:
agryphus 2023-12-05 22:05:43 -05:00
parent 30eb74c08c
commit 540de6cace
5 changed files with 598 additions and 6 deletions

321
.config/doom/config.org Normal file
View file

@ -0,0 +1,321 @@
#+TITLE: Agryphus' Emacs Config
#+AUTHOR: agryphus
# Unfold all org headings
#+STARTUP: showeverything
# Show toc up to two headers
#+OPTIONS: toc:2
* TABLE OF CONTENTS :toc:
- [[#quick-find-files][Quick Find Files]]
- [[#org-agenda][Org Agenda]]
- [[#eat-terminal][Eat Terminal]]
- [[#vterm][Vterm]]
- [[#languages][Languages]]
- [[#lsp-config][LSP Config]]
- [[#python][Python]]
- [[#typst][Typst]]
- [[#tweaksfixes][Tweaks/Fixes]]
- [[#block-cursor-not-showing-up-in-terminal-mode][Block cursor not showing up in terminal mode]]
- [[#disable-really-quit-emacs-prompt][Disable "Really Quit Emacs" Prompt]]
- [[#fontify-natively][Fontify natively]]
- [[#evil][Evil]]
- [[#fonts][Fonts]]
- [[#swap-evil-gkj-and-kj][Swap evil g[k/j] and k/j]]
- [[#scrolloff][Scrolloff]]
- [[#scratch-buffer-mode][Scratch Buffer Mode]]
- [[#elisp-evaluation][Elisp Evaluation]]
- [[#exwm][EXWM]]
- [[#window-transparency][Window transparency]]
* Quick Find Files
#+begin_src emacs-lisp
(map! :leader
(:prefix ("=" . "open file")
:desc "Edit doom config.org" "c" #'(lambda () (interactive) (find-file "~/.config/doom/config.org"))
:desc "Edit doom init.el" "i" #'(lambda () (interactive) (find-file "~/.config/doom/init.el"))
:desc "Edit doom packages.el" "p" #'(lambda () (interactive) (find-file "~/.config/doom/packages.el"))))
(map! "C-/" #'comment-line)
#+end_src
* Org Agenda
#+begin_src emacs-lisp
(setq org-agenda-files
'("~/.local/share/org-agenda"))
(map! :leader :desc "Open org calendar" "o c" #'cfw:open-org-calendar)
(add-hook 'calendar-after-frame-setup-hook 'cfw:refresh-calendar-buffer)
#+end_src
* Eat Terminal
#+begin_src emacs-lisp
#+end_src
* Vterm
#+begin_src emacs-lisp
(use-package! vterm
:config
(setq vterm-timer-delay 0.01))
(map! :after vterm
:map vterm-mode-map
;; Send special keys to vterm
:ni "C-c" #'vterm--self-insert
:ni "C-x" #'vterm--self-insert
:ni [escape] #'vterm--self-insert
:ni "M-:" #'eval-expression
;; Text size controls
:ni "C-=" #'text-scale-increase
:ni "C--" #'text-scale-decrease
:ni "C-M-=" #'doom/increase-font-size
:ni "C-M--" #'doom/decrease-font-size)
(setq vterm-min-window-width 1)
(setq ansi-color-bold-is-bright t)
(setq vterm-set-bold-hightbright t)
(setq confirm-kill-processes nil)
;; (setq kill-buffer-query-functions nil)
#+end_src
Making a function to open vterm in a new frame. Vterm needs to be attached to some buffer,
so this function generates a new one, and then a hook is needed to clear the buffer upon exit
from the terminal.
#+begin_src emacs-lisp
;; (defun vterm-frame (&optional new-t)
;; "Open a new terminal frame.
;; If `new-t` is t, a new frame is created.
;; If `new-t` is nil, use the selected frame."
;; (interactive)
;; (let ((frame (if new-t (make-frame) (selected-frame))))
;; (with-selected-frame frame
;; (let ((default-directory "~"))
;; (let ((buffer (generate-new-buffer "*vterm*")))
;; (switch-to-buffer buffer)
;; (vterm-mode))))))
(defun vterm-frame (&optional new-t)
"Open a new terminal frame.
If `new-t` is t, a new frame is created.
If `new-t` is nil, use the selected frame.
If a buffer with vterm-mode is not visible, switch to it."
(interactive)
(let* ((buffers-with-vterm (cl-remove-if-not (lambda (buf)
(with-current-buffer buf
(and (derived-mode-p 'vterm-mode)
(not (get-buffer-window buf t)))))
(buffer-list)))
(buffer (car buffers-with-vterm)))
(if buffer
(switch-to-buffer buffer)
(let ((frame (if new-t (make-frame) (selected-frame))))
(with-selected-frame frame
(let ((default-directory "~"))
(let ((buffer (generate-new-buffer "*vterm*")))
(switch-to-buffer buffer)
(vterm-mode))))))))
(add-hook 'vterm-exit-functions #'(lambda (buffer str)
(kill-buffer buffer)
(if (one-window-p)
(delete-frame (selected-frame) t)
(delete-window (selected-window)))))
(defun vterm-send-escape ()
(vterm-send-key "<escape>")
)
#+end_src
* Languages
** LSP Config
*** Change suggestion rate
#+begin_src emacs-lisp
(setq company-minimum-prefix-length 1)
(setq company-idle-delay 0.0) ;; Give completion suggestions immediately
#+end_src
*** Make lsp-ui sideline suggestions the same size as buffer text
#+begin_src emacs-lisp
(use-package lsp-ui :commands lsp-ui-mode
:config (progn
;;
;; 2022-03-28 - fix sideline height computation
;;
(defun lsp-ui-sideline--compute-height nil
"Return a fixed size for text in sideline."
(let ((fontHeight (face-attribute 'lsp-ui-sideline-global :height)))
(if (null text-scale-mode-remapping)
'(height
(if (floatp fontHeight) fontHeight
(/ (face-attribute 'lsp-ui-sideline-global :height) 100.0)
)
;; Readjust height when text-scale-mode is used
(list 'height
(/ 1 (or (plist-get (cdr text-scale-mode-remapping) :height)
1)))))))
;;
;; 2022-03-28 - fix sideline alignment
;;
(defun lsp-ui-sideline--align (&rest lengths)
"Align sideline string by LENGTHS from the right of the window."
(list (* (window-font-width nil 'lsp-ui-sideline-global)
(+ (apply '+ lengths) (if (display-graphic-p) 1 2)))))
))
#+end_src
** Python
#+begin_src emacs-lisp
(use-package lsp-pyright
:ensure t
:hook (python-mode . (lambda ()
(require 'lsp-pyright)
(tree-sitter-hl-mode)
(lsp)))) ; or lsp-deferred
#+end_src
** Typst
Automatically compile typst documents upon save
#+begin_src emacs-lisp
(add-hook 'after-save-hook (lambda ()
(when (and (buffer-file-name)
(string= (file-name-extension (buffer-file-name)) "typ"))
(let ((filename (shell-quote-argument (buffer-file-name))))
(shell-command (format "typst compile %s" filename))))))
#+end_src
* Tweaks/Fixes
** Block cursor not showing up in terminal mode
Corresponding package in package.el
#+begin_src emacs-lisp
(use-package! evil-terminal-cursor-changer
:hook (tty-setup . evil-terminal-cursor-changer-activate))
#+end_src
*** TODO : Figure out how to tangle package.el inside config.org
** Disable "Really Quit Emacs" Prompt
#+begin_src emacs-lisp
(setq confirm-kill-emacs nil)
#+end_src
** Fontify natively
By default, if you enter into an org buffer with part of a code block showing, it will
not have syntax highlighting until scrolling up to the begin_src declaration. This variable
fixes that and disables the previous lazy-loading behavior.
#+begin_src emacs-lisp
(setq org-src-fontify-natively t)
#+end_src
** Evil
Quit insert/visual modes using C-c
#+begin_src emacs-lisp
(define-key evil-insert-state-map (kbd "C-c") 'evil-normal-state)
(define-key evil-visual-state-map (kbd "C-c") 'evil-normal-state)
#+end_src
Clear all highlighting using C-l. Mimics the "redraw" signal sent to terminals for vim.
#+begin_src emacs-lisp
(define-key evil-normal-state-map (kbd "C-l") 'evil-ex-nohighlight)
#+end_src
** Fonts
#+begin_src emacs-lisp
(add-to-list 'default-frame-alist '(font . "FiraCode Nerd Font 15"))
#+end_src
** Swap evil g[k/j] and k/j
#+begin_src emacs-lisp
(define-key evil-normal-state-map (kbd "gj") 'evil-next-line)
(define-key evil-normal-state-map (kbd "gk") 'evil-previous-line)
(define-key evil-normal-state-map (kbd "j") 'evil-next-visual-line)
(define-key evil-normal-state-map (kbd "k") 'evil-previous-visual-line)
#+end_src
** Scrolloff
#+begin_src emacs-lisp
(setq default-scroll-margin 8) ;; Custom var
(setq scroll-margin default-scroll-margin)
;; Scrolloff causes ncurses applications to run off the frame
(add-hook 'eat-mode-hook (lambda () (setq-local scroll-margin 0)))
(add-hook 'eat-exit-hook (lambda () (setq-local scroll-margin default-scroll-margin)))
#+end_src
** Scratch Buffer Mode
Scratch buffer is, by default, in interactive lisp mode. Default to just plaintext.
#+begin_src emacs-lisp
(setq initial-major-mode 'text-mode)
#+end_src
* Elisp Evaluation
#+begin_src emacs-lisp
(map! :leader
(:prefix ("e". "evaluate")
:desc "Evaluate elisp in buffer" "b" #'eval-buffer
:desc "Evaluate defun" "d" #'eval-defun
:desc "Evaluate elisp expression" "e" #'eval-expression
:desc "Evaluate last sexpression" "l" #'eval-last-sexp
:desc "Evaluate elisp in region" "r" #'eval-region))
#+end_src
* EXWM
#+begin_src emacs-lisp
#+end_src
* Window transparency
There are four principle ways to start emacs with the combinations of GUI/TUI and standalone/daemon.
Unfortunately, each of these four methods requires a slightly different way to set window transparency.
#+begin_src emacs-lisp
(defun make-terminal-transparent (frame)
(custom-set-faces!
'(default :background "unspecified-bg" frame)
'(org-block :background "unspecified-bg" frame)
;; For some reason, despite setting all dashboard faces, the dashboard does not want to turn transparent.
;; '(doom-dashboard-banner :background "unspecified-bg")
;; '(doom-dashboard-footer :background "unspecified-bg")
;; '(doom-dashboard-loaded :background "unspecified-bg")
;; '(doom-dashboard-footer-icon :background "unspecified-bg")
;; '(doom-dashboard-menu-title :background "unspecified-bg")
;; '(doom-dashboard-menu-desc :background "unspecified-bg")
'(hl-line :background "unspecified-bg" frame)))
(defun window-transparency ()
(if (display-graphic-p (selected-frame))
(progn ;; $ emacs
;; Transparency for graphical session
(set-frame-parameter nil 'alpha-background 90))
(progn ;; $ emacs -nw
;; Transparency for terminal session
(make-terminal-transparent (selected-frame)))))
(unless (daemonp)
(add-hook 'window-setup-hook 'window-transparency))
(defun ag/make-client-frame (frame)
;; Called at the creation of each emacsclient frame
(if (display-graphic-p frame)
(progn ;; $ emacsclient -c
;; Transparency for specific graphical frame
(set-frame-parameter frame 'alpha-background 90))
(progn ;; $ emacsclient -nw
;; Transparency for specific terminal frame
(make-terminal-transparent frame))))
(add-hook 'after-make-frame-functions 'ag/make-client-frame)
#+end_src
Keybinds in order to increase/decrease the transparency of emacs windows in GUI mode. I try to keep these
bindings in sync with the terminal that I use, as to make the experiences of GUI and TUI emacs relatively similar.
#+begin_src emacs-lisp
(defun ag/adjust-alpha-background (delta)
"Increase or decrease the alpha-background by DELTA, not exceeding 100 or going below 0."
(interactive "p")
;; let* macro instead of let, since new-alpha relies on alpha
(let* ((current-alpha (or (frame-parameter (selected-frame) 'alpha-background) 0))
(new-alpha (+ current-alpha delta)))
(when (and (<= new-alpha 100) (>= new-alpha 0))
(set-frame-parameter (selected-frame) 'alpha-background new-alpha))))
(global-set-key (kbd "M-a") (lambda () (interactive) (ag/adjust-alpha-background 5)))
(global-set-key (kbd "M-s") (lambda () (interactive) (ag/adjust-alpha-background -5)))
#+end_src

195
.config/doom/init.el Normal file
View file

@ -0,0 +1,195 @@
;;; init.el -*- lexical-binding: t; -*-
;; This file controls what Doom modules are enabled and what order they load
;; in. Remember to run 'doom sync' after modifying it!
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
;; documentation. There you'll find a link to Doom's Module Index where all
;; of our modules are listed, including what flags they support.
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
;; 'C-c c k' for non-vim users) to view its documentation. This works on
;; flags as well (those symbols that start with a plus).
;;
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
;; directory (for easy access to its source code).
(doom! :input
;;bidi ; (tfel ot) thgir etirw uoy gnipleh
;;chinese
;;japanese
;;layout ; auie,ctsrnm is the superior home row
:completion
company ; the ultimate code completion backend
;;helm ; the *other* search engine for love and life
;;ido ; the other *other* search engine...
;;ivy ; a search engine for love and life
vertico ; the search engine of the future
:ui
;;deft ; notational velocity for Emacs
doom ; what makes DOOM look the way it does
doom-dashboard ; a nifty splash screen for Emacs
;;doom-quit ; DOOM quit-message prompts when you quit Emacs
;;(emoji +unicode) ; 🙂
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;;hydra
;;indent-guides ; highlighted indent columns
ligatures ; ligatures and symbols to make your code pretty again
minimap ; show a map of the code on the side
modeline ; snazzy, Atom-inspired modeline, plus API
;;nav-flash ; blink cursor line after big motions
neotree ; a project drawer, like NERDTree for vim
ophints ; highlight the region an operation acts on
(popup +defaults) ; tame sudden yet inevitable temporary windows
;;tabs ; a tab bar for Emacs
;;treemacs ; a project drawer, like neotree but cooler
;;unicode ; extended unicode support for various languages
(vc-gutter +pretty) ; vcs diff in the fringe
vi-tilde-fringe ; fringe tildes to mark beyond EOB
;;window-select ; visually switch windows
workspaces ; tab emulation, persistence & separate workspaces
;;zen ; distraction-free coding or writing
:editor
(evil +everywhere) ; come to the dark side, we have cookies
file-templates ; auto-snippets for empty files
fold ; (nigh) universal code folding
;;(format +onsave) ; automated prettiness
;;god ; run Emacs commands without modifier keys
;;lispy ; vim for lisp, for people who don't like vim
;;multiple-cursors ; editing in many places at once
;;objed ; text object editing for the innocent
;;parinfer ; turn lisp into python, sort of
;;rotate-text ; cycle region at point between text candidates
snippets ; my elves. They type so I don't have to
;;word-wrap ; soft wrapping with language-aware indent
:emacs
dired ; making dired pretty [functional]
electric ; smarter, keyword-based electric-indent
;;ibuffer ; interactive buffer management
undo ; persistent, smarter undo for your inevitable mistakes
vc ; version-control and Emacs, sitting in a tree
:term
;;eshell ; the elisp shell that works everywhere
;;shell ; simple shell REPL for Emacs
;;term ; basic terminal emulator for Emacs
vterm ; the best terminal emulation in Emacs
:checkers
syntax ; tasing you for every semicolon you forget
(spell +flyspell) ; tasing you for misspelling mispelling
;;grammar ; tasing grammar mistake every you make
:tools
;;ansible
;;biblio ; Writes a PhD for you (citation needed)
;;collab ; buffers with friends
;;debugger ; FIXME stepping through code, to help you add bugs
;;direnv
;;docker
;;editorconfig ; let someone else argue about tabs vs spaces
;;ein ; tame Jupyter notebooks with emacs
(eval +overlay) ; run code, run (also, repls)
;;gist ; interacting with github gists
lookup ; navigate your code and its documentation
lsp ; M-x vscode
magit ; a git porcelain for Emacs
;;make ; run make tasks from Emacs
;;pass ; password manager for nerds
;;pdf ; pdf enhancements
;;prodigy ; FIXME managing external services & code builders
rgb ; creating color strings
;;taskrunner ; taskrunner for all your projects
;;terraform ; infrastructure as code
;;tmux ; an API for interacting with tmux
tree-sitter ; syntax and parsing, sitting in a tree...
;;upload ; map local to remote projects via ssh/ftp
:os
(:if IS-MAC macos) ; improve compatibility with macOS
;;tty ; improve the terminal Emacs experience
:lang
;;agda ; types of types of types of types...
;;beancount ; mind the GAAP
(cc +lsp) ; C > C++ == 1
;;clojure ; java with a lisp
;;common-lisp ; if you've seen one lisp, you've seen them all
;;coq ; proofs-as-programs
;;crystal ; ruby at the speed of c
;;csharp ; unity, .NET, and mono shenanigans
;;data ; config/data formats
;;(dart +flutter) ; paint ui and not much else
;;dhall
;;elixir ; erlang done right
;;elm ; care for a cup of TEA?
emacs-lisp ; drown in parentheses
;;erlang ; an elegant language for a more civilized age
;;ess ; emacs speaks statistics
;;factor
;;faust ; dsp, but you get to keep your soul
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
;;fsharp ; ML stands for Microsoft's Language
;;fstar ; (dependent) types and (monadic) effects and Z3
;;gdscript ; the language you waited for
;;(go +lsp) ; the hipster dialect
;;(graphql +lsp) ; Give queries a REST
;;(haskell +lsp) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python
;;idris ; a language you can depend on
;;json ; At least it ain't XML
;;(java +lsp) ; the poster child for carpal tunnel syndrome
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
;;julia ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script)
;;latex ; writing papers in Emacs has never been so fun
;;lean ; for folks with too much to prove
;;ledger ; be audit you can be
;;lua ; one-based indices? one-based indices
markdown ; writing docs for people to ignore
;;nim ; python + lisp at the speed of c
nix ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel
org ; organize your plain life in plain text
;;php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional
python ; beautiful is better than ugly
;;qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs
;;raku ; the artist formerly known as perl6
;;rest ; Emacs as a REST client
;;rst ; ReST in peace
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
;;(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;scala ; java, but good
;;(scheme +guile) ; a fully conniving family of lisps
sh ; she sells {ba,z,fi}sh shells on the C xor
;;sml
;;solidity ; do you need a blockchain? No.
;;swift ; who asked for emoji variables?
;;terra ; Earth and Moon in alignment for performance.
;;web ; the tubes
;;yaml ; JSON, but readable
;;zig ; C, but simpler
:email
;;(mu4e +org +gmail)
;;notmuch
;;(wanderlust +gmail)
:app
calendar
;;emms
;;everywhere ; *leave* Emacs!? You must be joking
;;irc ; how neckbeards socialize
;;(rss +org) ; emacs as an RSS reader
;;twitter ; twitter client https://twitter.com/vnought
:config
literate
(default +bindings +smartparens))

63
.config/doom/packages.el Normal file
View file

@ -0,0 +1,63 @@
;; -*- no-byte-compile: t; -*-
;;; $DOOMDIR/packages.el
;; To install a package with Doom you must declare them here and run 'doom sync'
;; on the command line, then restart Emacs for the changes to take effect -- or
;; use 'M-x doom/reload'.
;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror:
;(package! some-package)
;; To install a package directly from a remote git repo, you must specify a
;; `:recipe'. You'll find documentation on what `:recipe' accepts here:
;; https://github.com/radian-software/straight.el#the-recipe-format
;(package! another-package
; :recipe (:host github :repo "username/repo"))
;; If the package you are trying to install does not contain a PACKAGENAME.el
;; file, or is located in a subdirectory of the repo, you'll need to specify
;; `:files' in the `:recipe':
;(package! this-package
; :recipe (:host github :repo "username/repo"
; :files ("some-file.el" "src/lisp/*.el")))
;; If you'd like to disable a package included with Doom, you can do so here
;; with the `:disable' property:
;(package! builtin-package :disable t)
;; You can override the recipe of a built in package without having to specify
;; all the properties for `:recipe'. These will inherit the rest of its recipe
;; from Doom or MELPA/ELPA/Emacsmirror:
;(package! builtin-package :recipe (:nonrecursive t))
;(package! builtin-package-2 :recipe (:repo "myfork/package"))
;; Specify a `:branch' to install a package from a particular branch or tag.
;; This is required for some packages whose default branch isn't 'master' (which
;; our package manager can't deal with; see radian-software/straight.el#279)
;(package! builtin-package :recipe (:branch "develop"))
;; Use `:pin' to specify a particular commit to install.
;(package! builtin-package :pin "1a2b3c4d5e")
;; Doom's packages are pinned to a specific commit and updated from release to
;; release. The `unpin!' macro allows you to unpin single packages...
;(unpin! pinned-package)
;; ...or multiple packages
;(unpin! pinned-package another-pinned-package)
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
;(unpin! t)
; Fixes lack of block cursor in terminal emacs
(package! evil-terminal-cursor-changer)
(package! face-explorer)
(package! emacs-eat
:recipe (:host codeberg :repo "akib/emacs-eat"
:files ("*.el" ("term" "term/*.el") "*.texi"
"*.ti" ("terminfo/e" "terminfo/e/*")
("terminfo/65" "terminfo/65/*")
("integration" "integration/*")
(:exclude ".dir-locals.el" "*-tests.el"))))
(package! exwm)
(package! lsp-pyright)

View file

@ -1,7 +1,7 @@
# Start gpg agent # Start gpg agent
unset SSH_AGENT_PID unset SSH_AGENT_PID
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
killall gpg-agent killall gpg-agent 2>/dev/null
eval $(gpg-agent --daemon) eval $(gpg-agent --daemon)
export PATH="$PATH:~/.local/share/cargo/bin/" export PATH="$PATH:~/.local/share/cargo/bin/"
@ -13,8 +13,9 @@ if [ ! -z "$(grep nixos /etc/os-release)" ]; then
export PATH=/usr/local/bin:$PATH export PATH=/usr/local/bin:$PATH
fi fi
export PATH=sourced:$PATH # Flag to prevent setting PATH multiple times
export PATH=~/.local/bin/layouts/:$PATH # Overriding /usr/bin/* export PATH=~/.config/emacs/bin:$PATH
export PATH=~/.local/bin/overrides:$PATH # Overriding /usr/bin/* export PATH=~/.local/bin/overrides:$PATH # Overriding /usr/bin/*
export PATH=~/.local/bin:$PATH # Highest precedence to local bin export PATH=~/.local/bin:$PATH # Highest precedence to local bin
export PATH=sourced:$PATH # Flag to prevent setting PATH multiple times

View file

@ -9,9 +9,19 @@ if [ -z "$(printf $PATH | grep :sourced:)" ] && [ "$DISPLAY" = ":10.0" ]; then
source ~/.config/zsh/.zprofile source ~/.config/zsh/.zprofile
fi fi
# Below causes discord to not launch
# export LIBVA_DRIVER_NAME=nvidia
# export GBM_BACKEND=nvidia-drm
# export __GLX_VENDOR_LIBRARY_NAME=nvidia
export WLR_NO_HARDWARE_CURSORS=1
export BROWSER="$(which firefox)" export BROWSER="$(which firefox)"
export EDITOR="$(which nvim)" export EDITOR="$(which nvim)"
export TERMINAL="$(which st)" export TERMINAL="$(which foot)"
export MANPAGER='nvim +Man! -c "ZenMode" -c "map q :qa!<CR>"'
export PAGER=
# Configuring input method # Configuring input method
export GTK_IM_MODULE='fcitx' export GTK_IM_MODULE='fcitx'
@ -41,17 +51,19 @@ export PYTHONUSERBASE="$XDG_DATA_HOME/python"
export RUSTUP_HOME="$XDG_DATA_HOME/rustup" export RUSTUP_HOME="$XDG_DATA_HOME/rustup"
export SSB_HOME="$XDG_DATA_HOME/zoom" export SSB_HOME="$XDG_DATA_HOME/zoom"
export TEXMFVAR="$XDG_CACHE_HOME/texlive/texmf-var" export TEXMFVAR="$XDG_CACHE_HOME/texlive/texmf-var"
export TLDR_CACHE_DIR="$XDG_CACHE_HOME/tldr"
export TMUX_TMPDIR="$XDG_RUNTIME_DIR" export TMUX_TMPDIR="$XDG_RUNTIME_DIR"
export VIMINIT='let $MYVIMRC = !has("nvim") ? "$XDG_CONFIG_HOME/vim/vimrc" : "$XDG_CONFIG_HOME/nvim/init.lua" | so $MYVIMRC' export VIMINIT='let $MYVIMRC = !has("nvim") ? "$XDG_CONFIG_HOME/vim/vimrc" : "$XDG_CONFIG_HOME/nvim/init.lua" | so $MYVIMRC'
export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority"
export XINITRC="$XDG_CONFIG_HOME/X11/xinitrc" export XINITRC="$XDG_CONFIG_HOME/X11/xinitrc"
export XSERVERRC="$XDG_CONFIG_HOME/X11/xserverrc" export XSERVERRC="$XDG_CONFIG_HOME/X11/xserverrc"
export JAVA_HOME="/usr/lib/jvm/default/" export JAVA_HOME="/usr/lib/jvm/default"
export XSECURELOCK_PASSWORD_PROMPT='kaomoji' export XSECURELOCK_PASSWORD_PROMPT='kaomoji'
export DOOMDIR="$HOME/.config/doom"
export WALLPAPER=~/.config/wallpaper export WALLPAPER=~/.config/wallpaper
export SUDO_PROMPT="$(cowsay --random $(fortune)) export SUDO_PROMPT="$(cowsay $(fortune))
Sudo password: " Sudo password: "