Compare commits

...

8 Commits

13 changed files with 212 additions and 39 deletions

View File

@ -8,8 +8,9 @@ alias td=termdown
alias hdi=howdoi
alias bom=bombadillo
alias syscu='systemctl --user'
alias edoom='emacs --with-profile=doom'
alias emacspure='emacs --with-profile=vanilla'
alias g=git
alias acme='acme -f /mnt/font/FiraCode-Regular/15/font'
# Shortcuts
alias newvenv='python3 -m virtualenv venv && source ./venv/bin/activate.fish'

View File

@ -14,11 +14,17 @@
;; font string. You generally only need these two:
;; (setq doom-font (font-spec :family "monospace" :size 12 :weight 'semi-light)
;; doom-variable-pitch-font (font-spec :family "sans" :size 13))
(setq doom-font (font-spec :family "Fira Code" :size 16 :weight 'normal)
doom-variable-pitch-font (font-spec :family "Open Sans" :size 18 :weight 'light))
;; Elfeed: Use sans for articles
(add-hook 'elfeed-show-mode-hook
(lambda () (buffer-face-set 'variable-pitch)))
;; There are two ways to load a theme. Both assume the theme is installed and
;; available. You can either set `doom-theme' or manually load a theme with the
;; `load-theme' function. This is the default:
(setq doom-theme 'doom-vibrant)
(setq doom-theme 'doom-vibrant) ;; Doom's dracula is a bit funny
;; If you use `org' and don't want your org files in the default location below,
;; change `org-directory'. It must be set before org loads!
(setq org-directory "~/org/")
@ -38,6 +44,25 @@
(setq evil-split-window-below t
evil-vsplit-window-right t)
;; FIXING EVIL DON"T USE CLIPBOARD::
;;(fset 'evil-visual-update-x-selection 'ignore)
;; FIXME DOES NOT WORK!
(setq evil-visual-update-x-selection-p nil)
;;(setq evil-kill-on-visual-paste nil)
;;
;; XXX: Workaround from: https://discourse.doomemacs.org/t/how-to-set-up-clipboard/3742
;; don't put deleted strings to X11 clipboard
(setq select-enable-clipboard nil)
;; copying and pasting selected blocks in visual mode to and from X11 clipboard
(map! "S-C-c" #'clipboard-kill-ring-save)
(map! "S-C-v" #'clipboard-yank)
;; How to use yank/paste and system clipboard:
;; - Anything copied outside of emacs, paste in emacs with S-C-v
;; - Yank within emacs, will not override clipboard outside emacs
;; - To paste yanks within emacs, use default paste bind or use p
;; - Copy sth to clipboard from emacs: Use S-C-c, paste outside with normal
;; system bind
;; Seriously? I just want to quit. Damn. Why confirm lol
(setq confirm-kill-emacs nil)
@ -60,4 +85,92 @@
;; Scroll margin like scrolloff in vim
(setq scroll-margin 6)
(setq doom-themes-treemacs-variable-pitch-face nil)
;;(setq doom-themes-treemacs-variable-pitch-face nil)
;; Horizontal scrolling is pain
(global-visual-line-mode t)
;; Give it the IDE vibes
; (run-with-timer 1 nil (lambda () (save-selected-window (treemacs))))
;;org-todo
(setq org-todo-keyword-faces
'(("NOW" . "labelColor") ("CANCELED" . "systemRedColor") ("DONE" . "selectedControlColor") ("FINISH" . "selectedControlColor") ("PAST" . "controlTextColor")
("RECUR" . "systemYellowColor") ("MARK" . "systemOrangeColor") ("PLAN" . "systemBrownColor")
("OVERDUE". "systemRedColor") ("DUE" . "systemYellowColor") ("STARTED" . "labelColor")))
(setq diary-file "~/Documents/diary/diary")
(org-babel-do-load-languages
'org-babel-load-languages
'((emacs-lisp . t)
(python . t)
(jupyter . t)))
;; centaur tabs
(defun centaur-tabs-buffer-groups ()
"`centaur-tabs-buffer-groups' control buffers' group rules.
Group centaur-tabs with mode if buffer is derived from `eshell-mode'
`emacs-lisp-mode' `dired-mode' `org-mode' `magit-mode'. All buffer name start
with * will group to \"Emacs\". Other buffer group by
`centaur-tabs-get-group-name' with project name."
(list
(cond
;; ((not (eq (file-remote-p (buffer-file-name)) nil))
;; "Remote")
;; Put org mode first since some of these begin with "*"
;; elisp seems to short-circuit "or"
((memq major-mode '(org-mode
org-agenda-clockreport-mode
org-src-mode
org-agenda-mode
org-beamer-mode
org-indent-mode
org-bullets-mode
org-cdlatex-mode
org-agenda-log-mode
diary-mode))
"OrgMode") ;; Org Agenda next to org files is useful
((derived-mode-p 'vterm-mode)
"VTerm")
((or (derived-mode-p 'prog-mode) ;; Put magit along with program files
(memq major-mode '(magit-process-mode
magit-status-mode
magit-diff-mode
magit-log-mode
magit-file-mode
magit-blob-mode
magit-blame-mode))
(derived-mode-p 'dired-mode))
"Dev")
((memq major-mode '(helpful-mode
help-mode))
"Help")
((or (string-equal "elfeed" (substring (buffer-name) 1 7))
(string-equal "eww" (substring (buffer-name) 1 4))
(string-equal "elpher" (substring (buffer-name) 1 7)))
"E-apps")
((string-equal "*" (substring (buffer-name) 0 1))
"Emacs") ;; This should be at the very end to match ones where none of the
;; previous mode matches failed
(t
(centaur-tabs-get-group-name (current-buffer))))))
(defun set-exec-path-from-shell-PATH ()
"Set up Emacs' `exec-path' and PATH environment variable to match
that used by the user's shell.
This is particularly useful under Mac OS X and macOS, where GUI
apps are not started from a shell."
(interactive)
(let ((path-from-shell (replace-regexp-in-string
"[ \t\n]*$" "" (shell-command-to-string ;;SHELL = fish
"$SHELL --login -c 'string join : $PATH'"
))))
(setenv "PATH" path-from-shell)
(setq exec-path (split-string path-from-shell path-separator))))
(set-exec-path-from-shell-PATH)
(add-hook 'vterm-mode-hook
(lambda () (visual-line-mode) (centaur-tabs-local-mode) (turn-off-evil-mode)))

View File

@ -1,10 +1,25 @@
;;; init.el -*- lexical-binding: t; -*-
;; Run doom sync after modifying this file
;; Go to docs for module index, press K for a module's docs
;; 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
@ -15,7 +30,8 @@
:ui
;;deft ; notational velocity for Emacs
doom ; what makes DOOM look the way it does
doom-dashboard ; a nifty splash screen for Emacs
;;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
@ -27,21 +43,22 @@
;;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
tabs ; a tab bar for Emacs
treemacs ; a project drawer, like neotree but cooler
;;unicode ; extended unicode support for various languages
vc-gutter ; vcs diff in the fringe
;;vi-tilde-fringe ; fringe tildes to mark beyond EOB
;;window-select ; visually switch windows
(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
;; (evil +everywhere)
(evil); come to the dark side, we have cookies
file-templates ; auto-snippets for empty files
fold ; (nigh) universal code folding
;;(format +onsave) ; automated prettiness
format
format ; 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
@ -49,24 +66,24 @@
;;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
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
;;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
;;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
(spell +flyspell) ; tasing you for misspelling mispelling
;;grammar ; tasing grammar mistake every you make
:tools
@ -75,21 +92,22 @@
;;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)
;;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
(lookup +dictionary +offline) ; 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
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
@ -99,7 +117,7 @@
:lang
;;agda ; types of types of types of types...
;;beancount ; mind the GAAP
;;cc ; C > C++ == 1
(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
@ -115,15 +133,17 @@
;;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
;;(haskell +dante) ; a language that's lazier than I am
;;(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 +meghanada) ; the poster child for carpal tunnel syndrome
;;(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)
@ -146,11 +166,10 @@
;;rest ; Emacs as a REST client
rst ; ReST in peace
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;(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
(sh +fish)
(sh +fish) ; 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?
@ -168,8 +187,8 @@
;;calendar
;;emms
;;everywhere ; *leave* Emacs!? You must be joking
;;irc ; how neckbeards socialize
;;(rss +org) ; emacs as an RSS reader
irc ; how neckbeards socialize
(rss +org) ; emacs as an RSS reader
;;twitter ; twitter client https://twitter.com/vnought
:config

View File

@ -37,3 +37,16 @@
(load (expand-file-name "packages.el" user-emacs-directory))
;; Customize shits in separate file, thanks
(load (expand-file-name "custom.el" user-emacs-directory))
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(safe-local-variable-values '((git-commit-major-mode . git-commit-elisp-text-mode)))
'(warning-suppress-types '((comp) (comp))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)

View File

@ -1,4 +1,4 @@
(("default" . ((user-emacs-directory . "~/.config/emacsd")))
("doom" . ((user-emacs-directory . "~/.doomemacs")
(("vanilla" . ((user-emacs-directory . "~/.config/emacsd")))
("default" . ((user-emacs-directory . "~/.doomemacs")
(env . (("EMACSDIR" . "~/.doomemacs")
("DOOMDIR" . "~/.config/doom"))))))

View File

@ -6,7 +6,7 @@ export EMACSDIR=~/.doomemacs/
export BROWSER=w3m
export FILEMAN=ranger
export TERM=xterm-256color
export GPG_TTY=$(tty)
export GPG_TTY=/dev/tty
# telemetry shit
export DO_NOT_TRACK=1 # https://consoledonottrack.com
@ -29,7 +29,8 @@ export XDG_CACHE_HOME="$HOME/.cache"
export XDG_USER_CONFIG_DIR="$XDG_CONFIG_HOME"
# Paths
export LD_LIBRARY_PATH="$HOME/local/lib/x86_64-linux-gnu/:$HOME/local/lib"
export LD_LIBRARY_PATH="$HOME/local/lib/x86_64-linux-gnu/:$HOME/local/lib:/opt/pkgsrc/opt/pkg/lib"
export DYLD_LIBRARY_PATH="/opt/pkgsrc/opt/pkg/lib"
export PKG_CONFIG_PATH="$HOME/local/lib/x86_64-linux-gnu/pkgconfig:$HOME/local/lib/pkgconfig"
export NVM_DIR="$HOME/.config/nvm"

View File

@ -2,3 +2,4 @@
# vim-obsession
Session.vim
.DS_Store
*.tags

View File

@ -35,3 +35,4 @@ fi
# ^ Above is commented because it's already in ~/.exportenvs
# Load (the) nvm
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$HOME/.exportenvs" ] && \. "$HOME/.exportenvs"

2
.vimrc
View File

@ -38,6 +38,8 @@ if has('termguicolors')
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
colorscheme dracula
else
colorscheme darkblue " Looks like dracula but BLUEEEE
endif
let mapleader=";" " setting leader key to ';'

View File

@ -5,9 +5,13 @@
# This script is horrible right now. TODO
if [[ -z "$2" ]]; then
~/dotscripts/bin/"$1"
exit
fi
type="$1"
target="$2"
# TODO: run all scripts if target not given
~/dotscripts/"$1"/"$2"
~/dotscripts/"$type"/"$target"

View File

@ -1,2 +0,0 @@
#!/bin/bash
echo hi

14
dotscripts/bin/copy Executable file
View File

@ -0,0 +1,14 @@
#!/usr/bin/env bash
while read line; do
IFS=':' read -ra parts <<< "$line"
sourcefile="${parts[0]% }"
destdir=$(sed "s#^~#$HOME#" <<<"${parts[1]# }")
dest="$destdir/"$(basename "$sourcefile")
echo mkdir -p "$destdir"
mkdir -p "$destdir"
cp -v "$sourcefile" "$dest"
done < ~/.config/doftcopy.txt

6
dotscripts/maint/doompkgs.sh Executable file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
cd ~/.config/doom/
wget https://raw.githubusercontent.com/doomemacs/doomemacs/master/templates/init.example.el
nv init.el "+vsp init.example.el"