From 009174919698505e35100f621b9015f779de5e96 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Sun, 8 Mar 2020 18:29:16 +0000 Subject: Add emacs support for mac --- emacs/loader.org | 89 +++++++++++++++++++------------------------------------- zsh/.zshrc | 20 +++++++------ 2 files changed, 41 insertions(+), 68 deletions(-) diff --git a/emacs/loader.org b/emacs/loader.org index bd14c7e..e879d2f 100644 --- a/emacs/loader.org +++ b/emacs/loader.org @@ -40,12 +40,10 @@ be manually set inside emacs. "/home/ymherklotz/.local/bin" ":" "/home/ymherklotz/.yarn/bin" ":" "/usr/bin/vendor_perl" ":" - "/home/ymherklotz/.opam/ocaml-base-compiler.4.09.0/bin" ":" "/home/ymherklotz/.nix-profile/bin" ":" (getenv "PATH"))) (setq exec-path (append - '("/home/ymherklotz/.opam/ocaml-base-compiler.4.09.0/bin" - "/home/ymherklotz/.local/bin" + '("/home/ymherklotz/.local/bin" "/home/ymherklotz/.yarn/bin" "/home/ymherklotz/.nix-profile/bin") exec-path)) @@ -107,7 +105,7 @@ threshold at which it will start cleaning, so that it is not triggered during startup. #+BEGIN_SRC emacs-lisp - (setq gc-cons-threshold 500000000) + (setq gc-cons-threshold (* 1024 1024 1024)) #+END_SRC #+RESULTS: @@ -123,15 +121,20 @@ yes or no. Also stop the start up message from popping up and enter the scratch buffer instead. #+BEGIN_SRC emacs-lisp + ;;(setq warning-minimum-level :emergency) (setq inhibit-startup-message t - confirm-nonexistent-file-or-buffer nil) + confirm-nonexistent-file-or-buffer nil + default-directory "~/") (setq-default fill-column 80) (setq-default truncate-lines t) (tool-bar-mode 0) - (menu-bar-mode 0) + (unless (string= system-type "darwin") + (menu-bar-mode 0)) (fset 'yes-or-no-p 'y-or-n-p) (global-hl-line-mode 1) (add-to-list 'custom-theme-load-path "~/.emacs.d/themes/") + (when (string= system-type "darwin") + (setq dired-use-ls-dired nil)) #+END_SRC #+RESULTS: @@ -355,8 +358,12 @@ programming and looking at source code. #+END_SRC #+BEGIN_SRC emacs-lisp - (set-default-font "Iosevka Medium-14") - (setq default-frame-alist '((font . "Iosevka Medium-14"))) + (if (string= system-type "darwin") + (set-face-attribute 'default nil + :family "Iosevka" :height 145 :weight 'normal) + (progn + (set-default-font "Iosevka Medium-16") + (setq default-frame-alist '((font . "Iosevka Medium-16"))))) #+END_SRC #+RESULTS: @@ -433,7 +440,7 @@ the ~-a~ flag. Finally, remove buffers when an email has been sent. -#+BEGIN_SRC emacs-lisp +#+BEGIN_SRC text (load-user-file "personal.el") #+END_SRC @@ -708,10 +715,10 @@ incrementally selecting more and more of the text. ** Latex #+BEGIN_SRC emacs-lisp - (use-package latex + (use-package tex-site :ensure auctex + :mode (".tex'" . latex-mode) :config - (require 'tex-site) ;; to use pdfview with auctex (setq TeX-view-program-selection '((output-pdf "PDF Tools")) TeX-view-program-list '(("PDF Tools" TeX-pdf-tools-sync-view)) @@ -719,10 +726,10 @@ incrementally selecting more and more of the text. ;; to have the buffer refresh after compilation (add-hook 'TeX-after-compilation-finished-functions #'TeX-revert-document-buffer) - (setq TeX-engine 'xetex) + (setq TeX-engine 'luatex) (setq TeX-auto-save t) (setq TeX-parse-self t) - (setq TeX-command-extra-options "-shell-escape") + ; (setq TeX-command-extra-options "-shell-escape") (setq TeX-save-query nil) (setq-default TeX-master nil) (setq TeX-PDF-mode t) @@ -739,12 +746,13 @@ incrementally selecting more and more of the text. (add-hook 'LaTeX-mode-hook 'turn-on-reftex) (setq reftex-bibliography-commands '("bibliography" "nobibliography" "addbibresource")) (setq org-latex-listings 'minted) - (require 'ox-latex) - (add-to-list 'org-latex-packages-alist '("" "minted"))) ; with Emacs latex mode + (add-to-list 'org-latex-packages-alist '("" "minted")) ; with Emacs latex mode + + (require 'ox-latex)) #+END_SRC #+RESULTS: -: t +: ((\.json\' . js-mode) (\.flex\' . c-mode) (\.h\' . c++-mode) (\.odc\' . archive-mode) (\.odf\' . archive-mode) (\.odi\' . archive-mode) (\.otp\' . archive-mode) (\.odp\' . archive-mode) (\.otg\' . archive-mode) (\.odg\' . archive-mode) (\.ots\' . archive-mode) (\.ods\' . archive-mode) (\.odm\' . archive-mode) (\.ott\' . archive-mode) (\.odt\' . archive-mode) (README\.md\' . gfm-mode) (.tex' . latex-mode) (\.gpg\(~\|\.~[0-9]+~\)?\' nil epa-file) (\.hva\' . latex-mode) (\.drv\' . latex-mode) (\(?:build\|profile\)\.boot\' . clojure-mode) (\.cljs\' . clojurescript-mode) (\.cljc\' . clojurec-mode) (\.\(clj\|dtm\|edn\)\' . clojure-mode) (\.cmake\' . cmake-mode) (CMakeLists\.txt\' . cmake-mode) (\.envrc\' . direnv-envrc-mode) (\.elm\' . elm-mode) (\.fs[iylx]?\' . fsharp-mode) (\.hsc\' . haskell-mode) (\.l[gh]s\' . literate-haskell-mode) (\.hsig\' . haskell-mode) (\.[gh]s\' . haskell-mode) (\.cabal\'\|/cabal\.project\|/\.cabal/config\' . haskell-cabal-mode) (\.chs\' . haskell-c2hs-mode) (\.ghci\' . ghci-script-mode) (\.dump-simpl\' . ghc-core-mode) (\.hcr\' . ghc-core-mode) (/git-rebase-todo\' . git-rebase-mode) (\.md\' . markdown-mode) (\.markdown\' . markdown-mode) (\.nix\' . nix-mode) (\.pghci\' . pghaskell-mode) (\.pgml\' . pgocaml-mode) (\.pgsh\' . pgshell-mode) (\.phx\' . phox-mode) (\.eca?\' . easycrypt-mode) (\.v\' . coq-mode) (\.\(scala\|sbt\)\' . scala-mode) (\.elc\' . elisp-byte-code-mode) (\.zst\' nil jka-compr) (\.dz\' nil jka-compr) (\.xz\' nil jka-compr) (\.lzma\' nil jka-compr) (\.lz\' nil jka-compr) (\.g?z\' nil jka-compr) (\.bz2\' nil jka-compr) (\.Z\' nil jka-compr) (\.vr[hi]?\' . vera-mode) (\(?:\.\(?:rbw?\|ru\|rake\|thor\|jbuilder\|rabl\|gemspec\|podspec\)\|/\(?:Gem\|Rake\|Cap\|Thor\|Puppet\|Berks\|Vagrant\|Guard\|Pod\)file\)\' . ruby-mode) (\.re?st\' . rst-mode) (\.py[iw]?\' . python-mode) (\.m\' . octave-maybe-mode) (\.less\' . less-css-mode) (\.scss\' . scss-mode) (\.awk\' . awk-mode) (\.\(u?lpc\|pike\|pmod\(\.in\)?\)\' . pike-mode) (\.idl\' . idl-mode) (\.java\' . java-mode) (\.m\' . objc-mode) (\.ii\' . c++-mode) (\.i\' . c-mode) (\.lex\' . c-mode) (\.y\(acc\)?\' . c-mode) (\.h\' . c-or-c++-mode) (\.c\' . c-mode) (\.\(CC?\|HH?\)\' . c++-mode) (\.[ch]\(pp\|xx\|\+\+\)\' . c++-mode) (\.\(cc\|hh\)\' . c++-mode) (\.\(bat\|cmd\)\' . bat-mode) (\.[sx]?html?\(\.[a-zA-Z_]+\)?\' . mhtml-mode) (\.svgz?\' . image-mode) (\.svgz?\' . xml-mode) (\.x[bp]m\' . image-mode) (\.x[bp]m\' . c-mode) (\.p[bpgn]m\' . image-mode) (\.tiff?\' . image-mode) (\.gif\' . image-mode) (\.png\' . image-mode) (\.jpe?g\' . image-mode) (\.te?xt\' . text-mode) (\.[tT]e[xX]\' . tex-mode) (\.ins\' . tex-mode) (\.ltx\' . latex-mode) (\.dtx\' . doctex-mode) (\.org\' . org-mode) (\.el\' . emacs-lisp-mode) (Project\.ede\' . emacs-lisp-mode) (\.\(scm\|stk\|ss\|sch\)\' . scheme-mode) (\.l\' . lisp-mode) (\.li?sp\' . lisp-mode) (\.[fF]\' . fortran-mode) (\.for\' . fortran-mode) (\.p\' . pascal-mode) (\.pas\' . pascal-mode) (\.\(dpr\|DPR\)\' . delphi-mode) (\.ad[abs]\' . ada-mode) (\.ad[bs].dg\' . ada-mode) (\.\([pP]\([Llm]\|erl\|od\)\|al\)\' . perl-mode) (Imakefile\' . makefile-imake-mode) (Makeppfile\(?:\.mk\)?\' . makefile-makepp-mode) (\.makepp\' . makefile-makepp-mode) (\.mk\' . makefile-bsdmake-mode) (\.make\' . makefile-bsdmake-mode) (GNUmakefile\' . makefile-gmake-mode) ([Mm]akefile\' . makefile-bsdmake-mode) (\.am\' . makefile-automake-mode) (\.texinfo\' . texinfo-mode) (\.te?xi\' . texinfo-mode) (\.[sS]\' . asm-mode) (\.asm\' . asm-mode) (\.css\' . css-mode) (\.mixal\' . mixal-mode) (\.gcov\' . compilation-mode) (/\.[a-z0-9-]*gdbinit . gdb-script-mode) (-gdb\.gdb . gdb-script-mode) ([cC]hange\.?[lL]og?\' . change-log-mode) ([cC]hange[lL]og[-.][0-9]+\' . change-log-mode) (\$CHANGE_LOG\$\.TXT . change-log-mode) (\.scm\.[0-9]*\' . scheme-mode) (\.[ckz]?sh\'\|\.shar\'\|/\.z?profile\' . sh-mode) (\.bash\' . sh-mode) (\(/\|\`\)\.\(bash_\(profile\|history\|log\(in\|out\)\)\|z?log\(in\|out\)\)\' . sh-mode) (\(/\|\`\)\.\(shrc\|zshrc\|m?kshrc\|bashrc\|t?cshrc\|esrc\)\' . sh-mode) (\(/\|\`\)\.\([kz]shenv\|xinitrc\|startxrc\|xsession\)\' . sh-mode) (\.m?spec\' . sh-mode) (\.m[mes]\' . nroff-mode) (\.man\' . nroff-mode) (\.sty\' . latex-mode) (\.cl[so]\' . latex-mode) (\.bbl\' . latex-mode) (\.bib\' . bibtex-mode) (\.bst\' . bibtex-style-mode) (\.sql\' . sql-mode) (\(acinclude\|aclocal\|acsite\)\.m4\' . autoconf-mode) (\.m[4c]\' . m4-mode) (\.mf\' . metafont-mode) (\.mp\' . metapost-mode) (\.vhdl?\' . vhdl-mode) (\.article\' . text-mode) (\.letter\' . text-mode) (\.i?tcl\' . tcl-mode) (\.exp\' . tcl-mode) (\.itk\' . tcl-mode) (\.icn\' . icon-mode) (\.sim\' . simula-mode) (\.mss\' . scribe-mode) (\.f9[05]\' . f90-mode) (\.f0[38]\' . f90-mode) (\.indent\.pro\' . fundamental-mode) (\.\(pro\|PRO\)\' . idlwave-mode) (\.srt\' . srecode-template-mode) (\.prolog\' . prolog-mode) (\.tar\' . tar-mode) (\.\(arc\|zip\|lzh\|lha\|zoo\|[jew]ar\|xpi\|rar\|cbr\|7z\|ARC\|ZIP\|LZH\|LHA\|ZOO\|[JEW]AR\|XPI\|RAR\|CBR\|7Z\)\' . archive-mode) (\.oxt\' . archive-mode) (\.\(deb\|[oi]pk\)\' . archive-mode) (\`/tmp/Re . text-mode) (/Message[0-9]*\' . text-mode) (\`/tmp/fol/ . text-mode) (\.oak\' . scheme-mode) (\.sgml?\' . sgml-mode) (\.x[ms]l\' . xml-mode) (\.dbk\' . xml-mode) (\.dtd\' . sgml-mode) (\.ds\(ss\)?l\' . dsssl-mode) (\.js[mx]?\' . javascript-mode) (\.har\' . javascript-mode) (\.json\' . javascript-mode) (\.[ds]?va?h?\' . verilog-mode) (\.by\' . bovine-grammar-mode) (\.wy\' . wisent-grammar-mode) ([:/\]\..*\(emacs\|gnus\|viper\)\' . emacs-lisp-mode) (\`\..*emacs\' . emacs-lisp-mode) ([:/]_emacs\' . emacs-lisp-mode) (/crontab\.X*[0-9]+\' . shell-script-mode) (\.ml\' . lisp-mode) (\.ld[si]?\' . ld-script-mode) (ld\.?script\' . ld-script-mode) (\.xs\' . c-mode) (\.x[abdsru]?[cnw]?\' . ld-script-mode) (\.zone\' . dns-mode) (\.soa\' . dns-mode) (\.asd\' . lisp-mode) (\.\(asn\|mib\|smi\)\' . snmp-mode) (\.\(as\|mi\|sm\)2\' . snmpv2-mode) (\.\(diffs?\|patch\|rej\)\' . diff-mode) (\.\(dif\|pat\)\' . diff-mode) (\.[eE]?[pP][sS]\' . ps-mode) (\.\(?:PDF\|DVI\|OD[FGPST]\|DOCX\|XLSX?\|PPTX?\|pdf\|djvu\|dvi\|od[fgpst]\|docx\|xlsx?\|pptx?\)\' . doc-view-mode-maybe) (configure\.\(ac\|in\)\' . autoconf-mode) (\.s\(v\|iv\|ieve\)\' . sieve-mode) (BROWSE\' . ebrowse-tree-mode) (\.ebrowse\' . ebrowse-tree-mode) (#\*mail\* . mail-mode) (\.g\' . antlr-mode) (\.mod\' . m2-mode) (\.ses\' . ses-mode) (\.docbook\' . sgml-mode) (\.com\' . dcl-mode) (/config\.\(?:bat\|log\)\' . fundamental-mode) (/\.\(authinfo\|netrc\)\' . authinfo-mode) (\.\(?:[iI][nN][iI]\|[lL][sS][tT]\|[rR][eE][gG]\|[sS][yY][sS]\)\' . conf-mode) (\.la\' . conf-unix-mode) (\.ppd\' . conf-ppd-mode) (java.+\.conf\' . conf-javaprop-mode) (\.properties\(?:\.[a-zA-Z0-9._-]+\)?\' . conf-javaprop-mode) (\.toml\' . conf-toml-mode) (\.desktop\' . conf-desktop-mode) (/\.redshift.conf\' . conf-windows-mode) (\`/etc/\(?:DIR_COLORS\|ethers\|.?fstab\|.*hosts\|lesskey\|login\.?de\(?:fs\|vperm\)\|magic\|mtab\|pam\.d/.*\|permissions\(?:\.d/.+\)?\|protocols\|rpc\|services\)\' . conf-space-mode) (\`/etc/\(?:acpid?/.+\|aliases\(?:\.d/.+\)?\|default/.+\|group-?\|hosts\..+\|inittab\|ksysguarddrc\|opera6rc\|passwd-?\|shadow-?\|sysconfig/.+\)\' . conf-mode) ([cC]hange[lL]og[-.][-0-9a-z]+\' . change-log-mode) (/\.?\(?:gitconfig\|gnokiirc\|hgrc\|kde.*rc\|mime\.types\|wgetrc\)\' . conf-mode) (/\.\(?:asound\|enigma\|fetchmail\|gltron\|gtk\|hxplayer\|mairix\|mbsync\|msmtp\|net\|neverball\|nvidia-settings-\|offlineimap\|qt/.+\|realplayer\|reportbug\|rtorrent\.\|screen\|scummvm\|sversion\|sylpheed/.+\|xmp\)rc\' . conf-mode) (/\.\(?:gdbtkinit\|grip\|mpdconf\|notmuch-config\|orbital/.+txt\|rhosts\|tuxracer/options\)\' . conf-mode) (/\.?X\(?:default\|resource\|re\)s\> . conf-xdefaults-mode) (/X11.+app-defaults/\|\.ad\' . conf-xdefaults-mode) (/X11.+locale/.+/Compose\' . conf-colon-mode) (/X11.+locale/compose\.dir\' . conf-javaprop-mode) (\.~?[0-9]+\.[0-9][-.0-9]*~?\' nil t) (\.\(?:orig\|in\|[bB][aA][kK]\)\' nil t) ([/.]c\(?:on\)?f\(?:i?g\)?\(?:\.[a-zA-Z0-9._-]+\)?\' . conf-mode-maybe) (\.[1-9]\' . nroff-mode) (\.art\' . image-mode) (\.avs\' . image-mode) (\.bmp\' . image-mode) (\.cmyk\' . image-mode) (\.cmyka\' . image-mode) (\.crw\' . image-mode) (\.dcr\' . image-mode) (\.dcx\' . image-mode) (\.dng\' . image-mode) (\.dpx\' . image-mode) (\.fax\' . image-mode) (\.hrz\' . image-mode) (\.icb\' . image-mode) (\.icc\' . image-mode) (\.icm\' . image-mode) (\.ico\' . image-mode) (\.icon\' . image-mode) (\.jbg\' . image-mode) (\.jbig\' . image-mode) (\.jng\' . image-mode) (\.jnx\' . image-mode) (\.miff\' . image-mode) (\.mng\' . image-mode) (\.mvg\' . image-mode) (\.otb\' . image-mode) (\.p7\' . image-mode) (\.pcx\' . image-mode) (\.pdb\' . image-mode) (\.pfa\' . image-mode) (\.pfb\' . image-mode) (\.picon\' . image-mode) (\.pict\' . image-mode) (\.rgb\' . image-mode) (\.rgba\' . image-mode) (\.tga\' . image-mode) (\.wbmp\' . image-mode) (\.webp\' . image-mode) (\.wmf\' . image-mode) (\.wpg\' . image-mode) (\.xcf\' . image-mode) (\.xmp\' . image-mode) (\.xwd\' . image-mode) (\.yuv\' . image-mode) (\.tgz\' . tar-mode) (\.tbz2?\' . tar-mode) (\.txz\' . tar-mode) (\.tzst\' . tar-mode)) ** Markdown Markdown is the standard for writing documentation. This snippet loads GFM @@ -878,7 +886,7 @@ Add org noter (,(format-time-string "~/Dropbox/org/journals/%Y-%m.org") :maxlevel . 2)) org-todo-keywords '((sequence "TODO(t)" "WAITING(w)" "|" "DONE(d)" "CANCELLED(c)"))) - (setq org-agenda-custom-commands + (setq org-agenda-custom-commands '(("w" "At work" tags-todo "@work" ((org-agenda-overriding-header "Work"))) ("h" "At home" tags-todo "@home" @@ -1180,7 +1188,7 @@ Haskell mode with company mode completion. *** LLVM IR -#+begin_src emacs-lisp +#+begin_src text (require 'llvm-mode) #+end_src @@ -1329,43 +1337,6 @@ Shamelessly taken from https://github.com/alphapapa/unpackaged.el#hydra. * Look and Feel -Keybindings - -#+BEGIN_SRC emacs-lisp - (defun y/set-theme (theme) - (load-theme theme t) - (toggle-scroll-bar -1)) - - (defun y/sanityinc-tomorrow-bright () - (interactive) - (y/set-theme 'sanityinc-tomorrow-bright)) - - (defun y/inkpot () - (interactive) - (y/set-theme 'inkpot)) - - (defun y/zenburn () - (interactive) - (y/set-theme 'zenburn)) - - (defun y/solarized-light () - (interactive) - (y/set-theme 'solarized-light)) - - (defun y/gruvbox () - (interactive) - (y/set-theme 'gruvbox)) - - (define-key y-map (kbd "1") 'y/sanityinc-tomorrow-bright) - (define-key y-map (kbd "2") 'y/zenburn) - (define-key y-map (kbd "3") 'y/solarized-light) - (define-key y-map (kbd "4") 'y/gruvbox) - (define-key y-map (kbd "5") 'y/inkpot) -#+END_SRC - -#+RESULTS: -: y/inkpot - #+BEGIN_SRC emacs-lisp (defadvice load-theme (before theme-dont-propagate activate) @@ -1376,9 +1347,9 @@ Keybindings (select-frame frame) (toggle-scroll-bar -1))) - (unless (boundp 'server-process) - (progn (load-theme 'sanityinc-tomorrow-night t) - (toggle-scroll-bar -1))) + ;(unless (boundp 'server-process) + ; (progn (load-theme 'sanityinc-solarized-light t) + ; (toggle-scroll-bar -1))) #+END_SRC #+RESULTS: @@ -1389,5 +1360,5 @@ Setting the gc-cons threshold back to what it was at the beginning. #+BEGIN_SRC emacs-lisp (server-start) - (setq gc-cons-threshold 10000000) + (setq gc-cons-threshold (* 1024 1024 10)) #+END_SRC diff --git a/zsh/.zshrc b/zsh/.zshrc index 9c02e6a..b854793 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -23,17 +23,19 @@ setopt HIST_IGNORE_DUPS setopt HIST_IGNORE_SPACE setopt HIST_FIND_NO_DUPS -(cat ~/.cache/wal/sequences &) +if [ -d ~/.cache/wal ]; then + (cat ~/.cache/wal/sequences &) +fi # Sourcing everything -source /usr/share/fzf/key-bindings.zsh -source /usr/share/fzf/completion.zsh -source $HOME/.zsh/export.zsh -source $HOME/.zsh/minimal.zsh -source $HOME/.zsh/function.zsh -source $HOME/.zsh/startup.zsh -source $HOME/.zsh/zsh-history-substring-search/zsh-history-substring-search.zsh -source $HOME/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh +if [ -e /usr/share/fzf/key-bindings.zsh ]; then source /usr/share/fzf/key-bindings.zsh; fi +if [ -e /usr/share/fzf/completion.zsh ]; then source /usr/share/fzf/completion.zsh; fi +if [ -e $HOME/.zsh/export.zsh ]; then source $HOME/.zsh/export.zsh; fi +if [ -e $HOME/.zsh/minimal.zsh ]; then source $HOME/.zsh/minimal.zsh; fi +if [ -e $HOME/.zsh/function.zsh ]; then source $HOME/.zsh/function.zsh; fi +if [ -e $HOME/.zsh/startup.zsh ]; then source $HOME/.zsh/startup.zsh; fi +if [ -e $HOME/.zsh/zsh-history-substring-search/zsh-history-substring-search.zsh ]; then source $HOME/.zsh/zsh-history-substring-search/zsh-history-substring-search.zsh; fi +if [ -e $HOME/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh ]; then source $HOME/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh; fi bindkey '^[[A' history-substring-search-up bindkey '^[[B' history-substring-search-down bindkey -M emacs '^P' history-substring-search-up -- cgit From f763fb20585973b1c7cd5691607fdfd984ce27f9 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Sun, 8 Mar 2020 18:54:18 +0000 Subject: Remove all results --- emacs/loader.org | 145 ++----------------------------------------------------- 1 file changed, 3 insertions(+), 142 deletions(-) diff --git a/emacs/loader.org b/emacs/loader.org index e879d2f..1183215 100644 --- a/emacs/loader.org +++ b/emacs/loader.org @@ -25,9 +25,6 @@ for that can be found in the [[#Writing][Writing]] section. (setq user-mail-address "yann@yannherklotz.com") #+END_SRC -#+RESULTS: -: yann@yannherklotz.com - * Setup Set path so that it picks up some executables that I use. This is done because @@ -49,9 +46,6 @@ be manually set inside emacs. exec-path)) #+END_SRC -#+RESULTS: -| /home/ymherklotz/.opam/ocaml-base-compiler.4.09.0/bin | /home/ymherklotz/.local/bin | /home/ymherklotz/.yarn/bin | /home/ymherklotz/.nix-profile/bin | /home/ymherklotz/.opam/ocaml-base-compiler.4.09.0/bin | /home/ymherklotz/.local/bin | /home/ymherklotz/.yarn/bin | /home/ymherklotz/.nix-profile/bin | /home/yannherklotz/.opam/4.09.0/bin | /home/yannherklotz/.local/bin | /home/yannherklotz/.yarn/bin | /home/ymherklotz/.cargo/bin | /home/ymherklotz/.local/bin | /home/ymherklotz/.yarn/bin | /usr/bin | /home/ymherklotz/.gem/ruby/2.6.0/bin | /usr/local/bin | /usr/local/sbin | /usr/local/bin | /usr/bin | /usr/bin/site_perl | /usr/bin/vendor_perl | /usr/bin/core_perl | /opt/Xilinx/Vivado/2019.1/bin | /opt/intelFPGA_lite/18.1/quartus/bin | /usr/lib/emacs/26.3/x86_64-pc-linux-gnu | - Define a function to load a user file whenever I want to add configurations that are not pushed as part of this configuration file. This includes a private file containing email configurations for [[https://www.emacswiki.org/emacs/mu4e][mu4e]]. In this case, ~user-init-dir~ is used @@ -95,9 +89,6 @@ Use ~use-package~ to manage other packages, and improve load times. (setq use-package-always-ensure t) #+END_SRC -#+RESULTS: -: t - ** GC Threshold Threshold for faster startup. This should increase the garbage collector's @@ -108,9 +99,6 @@ startup. (setq gc-cons-threshold (* 1024 1024 1024)) #+END_SRC -#+RESULTS: -: 500000000 - ** General Configuration *** Editor settings @@ -137,9 +125,6 @@ buffer instead. (setq dired-use-ls-dired nil)) #+END_SRC -#+RESULTS: -: t - #+BEGIN_SRC emacs-lisp (global-set-key (kbd "M-u") #'upcase-dwim) (global-set-key (kbd "M-l") #'downcase-dwim) @@ -158,9 +143,6 @@ buffer instead. (global-set-key (kbd "C-c c") #'org-capture) #+END_SRC -#+RESULTS: -: org-capture - #+begin_src emacs-lisp (global-visual-line-mode t) #+end_src @@ -230,9 +212,6 @@ if that is ever a problem. (quote (" " mode-line-misc-info)))))) #+END_SRC -#+RESULTS: -| :eval | (simple-mode-line-render (quote ( mode-line-modified mode-line-buffer-identification %l:%c mode-line-modes )) (quote ((:propertize (:eval (when vc-mode (cond ((string-match Git[:-] vc-mode) (-custom-modeline-github-vc)) ((string-match SVN- vc-mode) (-custom-modeline-svn-vc)) (t (format %s vc-mode))))) face mode-line-vc))) (quote ( mode-line-misc-info))) | - Move the backup files into the temporaty directory so that they are out of the way. @@ -243,9 +222,6 @@ way. `((".*" ,temporary-file-directory t))) #+END_SRC -#+RESULTS: -| .* | /tmp/ | t | - Make emacs follow symlinks every time, this means that it will open the actual file and go to where the file is actually stored instead of editing it through the symlink. This enables the use of git and other version control when editing @@ -254,17 +230,11 @@ the file. (setq vc-follow-symlinks t) #+END_SRC -#+RESULTS: -: t - This stops paren mode with interfering with the modeline. #+BEGIN_SRC emacs-lisp (show-paren-mode 'expression) #+END_SRC -#+RESULTS: -: t - Revert the buffer automatically when a file changes on disc. This is useful when monitoring a file such as a log file. It will also do this silently. #+BEGIN_SRC emacs-lisp @@ -272,8 +242,6 @@ monitoring a file such as a log file. It will also do this silently. (setq auto-revert-verbose nil) #+END_SRC -#+RESULTS: - Disable tabs, I want to move towards only using spaces everywhere as that is my preferred style. This is just personal preference though. #+BEGIN_SRC emacs-lisp @@ -285,25 +253,16 @@ preferred style. This is just personal preference though. (setq-default python-indent 4) #+END_SRC -#+RESULTS: -: 4 - Set the line number display very high so that it is always shown in the modeline. #+BEGIN_SRC emacs-lisp (setq line-number-display-limit 2000000) #+END_SRC -#+RESULTS: -: 2000000 - Set the undo correctly #+BEGIN_SRC emacs-lisp (define-key global-map (kbd "C-\\") 'undo-only) #+END_SRC -#+RESULTS: -: undo-only - Setting up my keybindings #+BEGIN_SRC emacs-lisp @@ -346,9 +305,6 @@ Setting up my keybindings (define-key y-map (kbd "r") 'toggle-rot13-mode) #+END_SRC -#+RESULTS: -: password-store-generate - Set the font to Hack, which is an opensource monospace font designed for programming and looking at source code. @@ -366,9 +322,6 @@ programming and looking at source code. (setq default-frame-alist '((font . "Iosevka Medium-16"))))) #+END_SRC -#+RESULTS: -: ((font . Iosevka Medium-14)) - #+BEGIN_SRC emacs-lisp (use-package eshell :ensure nil @@ -404,9 +357,6 @@ programming and looking at source code. (eshell-send-input)))) #+END_SRC -#+RESULTS: -: eshell - *** Reload #+BEGIN_SRC emacs-lisp @@ -444,9 +394,6 @@ Finally, remove buffers when an email has been sent. (load-user-file "personal.el") #+END_SRC -#+RESULTS: -: t - ** Elfeed #+BEGIN_SRC emacs-lisp @@ -464,9 +411,6 @@ Finally, remove buffers when an email has been sent. ("q" . y/elfeed-save-db-and-bury))) #+END_SRC -#+RESULTS: -: y/elfeed-save-db-and-bury - Define utility functions to make the reader work. #+BEGIN_SRC emacs-lisp @@ -502,9 +446,6 @@ Define utility functions to make the reader work. (quit-window)) #+END_SRC -#+RESULTS: -: y/elfeed-save-db-and-bury - * Utility ** Navigation @@ -528,9 +469,6 @@ Set navigation commands in all the buffers (set-mark-command 1)) #+END_SRC -#+RESULTS: -: jump-to-mark - Enable winner mode to save window state. #+BEGIN_SRC emacs-lisp (winner-mode 1) @@ -559,9 +497,6 @@ Enable winner mode to save window state. '((t . ivy--regex-fuzzy)))) #+END_SRC -#+RESULTS: -: counsel-unicode-char - #+begin_src emacs-lisp (use-package avy :bind @@ -570,17 +505,12 @@ Enable winner mode to save window state. (setq avy-keys '(?a ?r ?s ?t ?d ?h ?n ?e ?i ?o))) #+end_src -#+RESULTS: -: avy-goto-char-2 - ** Visual *** All the icons #+BEGIN_SRC emacs-lisp (use-package all-the-icons) #+END_SRC -#+RESULTS: - ** Editing *** Hungry Delete #+BEGIN_SRC emacs-lisp @@ -589,9 +519,6 @@ Enable winner mode to save window state. (global-hungry-delete-mode)) #+END_SRC -#+RESULTS: -: t - *** SmartParens #+BEGIN_SRC emacs-lisp (use-package smartparens @@ -653,9 +580,6 @@ incrementally selecting more and more of the text. :bind ("M-o" . er/expand-region)) #+END_SRC -#+RESULTS: -: er/expand-region - *** Dired #+BEGIN_SRC emacs-lisp @@ -673,9 +597,6 @@ incrementally selecting more and more of the text. :bind (("C-c d" . deadgrep))) #+END_SRC -#+RESULTS: -: deadgrep - ** Yasnippets #+BEGIN_SRC emacs-lisp @@ -692,8 +613,6 @@ incrementally selecting more and more of the text. (direnv-mode)) #+END_SRC -#+RESULTS: - * Writing ** Spellcheck in emacs @@ -751,9 +670,6 @@ incrementally selecting more and more of the text. (require 'ox-latex)) #+END_SRC -#+RESULTS: -: ((\.json\' . js-mode) (\.flex\' . c-mode) (\.h\' . c++-mode) (\.odc\' . archive-mode) (\.odf\' . archive-mode) (\.odi\' . archive-mode) (\.otp\' . archive-mode) (\.odp\' . archive-mode) (\.otg\' . archive-mode) (\.odg\' . archive-mode) (\.ots\' . archive-mode) (\.ods\' . archive-mode) (\.odm\' . archive-mode) (\.ott\' . archive-mode) (\.odt\' . archive-mode) (README\.md\' . gfm-mode) (.tex' . latex-mode) (\.gpg\(~\|\.~[0-9]+~\)?\' nil epa-file) (\.hva\' . latex-mode) (\.drv\' . latex-mode) (\(?:build\|profile\)\.boot\' . clojure-mode) (\.cljs\' . clojurescript-mode) (\.cljc\' . clojurec-mode) (\.\(clj\|dtm\|edn\)\' . clojure-mode) (\.cmake\' . cmake-mode) (CMakeLists\.txt\' . cmake-mode) (\.envrc\' . direnv-envrc-mode) (\.elm\' . elm-mode) (\.fs[iylx]?\' . fsharp-mode) (\.hsc\' . haskell-mode) (\.l[gh]s\' . literate-haskell-mode) (\.hsig\' . haskell-mode) (\.[gh]s\' . haskell-mode) (\.cabal\'\|/cabal\.project\|/\.cabal/config\' . haskell-cabal-mode) (\.chs\' . haskell-c2hs-mode) (\.ghci\' . ghci-script-mode) (\.dump-simpl\' . ghc-core-mode) (\.hcr\' . ghc-core-mode) (/git-rebase-todo\' . git-rebase-mode) (\.md\' . markdown-mode) (\.markdown\' . markdown-mode) (\.nix\' . nix-mode) (\.pghci\' . pghaskell-mode) (\.pgml\' . pgocaml-mode) (\.pgsh\' . pgshell-mode) (\.phx\' . phox-mode) (\.eca?\' . easycrypt-mode) (\.v\' . coq-mode) (\.\(scala\|sbt\)\' . scala-mode) (\.elc\' . elisp-byte-code-mode) (\.zst\' nil jka-compr) (\.dz\' nil jka-compr) (\.xz\' nil jka-compr) (\.lzma\' nil jka-compr) (\.lz\' nil jka-compr) (\.g?z\' nil jka-compr) (\.bz2\' nil jka-compr) (\.Z\' nil jka-compr) (\.vr[hi]?\' . vera-mode) (\(?:\.\(?:rbw?\|ru\|rake\|thor\|jbuilder\|rabl\|gemspec\|podspec\)\|/\(?:Gem\|Rake\|Cap\|Thor\|Puppet\|Berks\|Vagrant\|Guard\|Pod\)file\)\' . ruby-mode) (\.re?st\' . rst-mode) (\.py[iw]?\' . python-mode) (\.m\' . octave-maybe-mode) (\.less\' . less-css-mode) (\.scss\' . scss-mode) (\.awk\' . awk-mode) (\.\(u?lpc\|pike\|pmod\(\.in\)?\)\' . pike-mode) (\.idl\' . idl-mode) (\.java\' . java-mode) (\.m\' . objc-mode) (\.ii\' . c++-mode) (\.i\' . c-mode) (\.lex\' . c-mode) (\.y\(acc\)?\' . c-mode) (\.h\' . c-or-c++-mode) (\.c\' . c-mode) (\.\(CC?\|HH?\)\' . c++-mode) (\.[ch]\(pp\|xx\|\+\+\)\' . c++-mode) (\.\(cc\|hh\)\' . c++-mode) (\.\(bat\|cmd\)\' . bat-mode) (\.[sx]?html?\(\.[a-zA-Z_]+\)?\' . mhtml-mode) (\.svgz?\' . image-mode) (\.svgz?\' . xml-mode) (\.x[bp]m\' . image-mode) (\.x[bp]m\' . c-mode) (\.p[bpgn]m\' . image-mode) (\.tiff?\' . image-mode) (\.gif\' . image-mode) (\.png\' . image-mode) (\.jpe?g\' . image-mode) (\.te?xt\' . text-mode) (\.[tT]e[xX]\' . tex-mode) (\.ins\' . tex-mode) (\.ltx\' . latex-mode) (\.dtx\' . doctex-mode) (\.org\' . org-mode) (\.el\' . emacs-lisp-mode) (Project\.ede\' . emacs-lisp-mode) (\.\(scm\|stk\|ss\|sch\)\' . scheme-mode) (\.l\' . lisp-mode) (\.li?sp\' . lisp-mode) (\.[fF]\' . fortran-mode) (\.for\' . fortran-mode) (\.p\' . pascal-mode) (\.pas\' . pascal-mode) (\.\(dpr\|DPR\)\' . delphi-mode) (\.ad[abs]\' . ada-mode) (\.ad[bs].dg\' . ada-mode) (\.\([pP]\([Llm]\|erl\|od\)\|al\)\' . perl-mode) (Imakefile\' . makefile-imake-mode) (Makeppfile\(?:\.mk\)?\' . makefile-makepp-mode) (\.makepp\' . makefile-makepp-mode) (\.mk\' . makefile-bsdmake-mode) (\.make\' . makefile-bsdmake-mode) (GNUmakefile\' . makefile-gmake-mode) ([Mm]akefile\' . makefile-bsdmake-mode) (\.am\' . makefile-automake-mode) (\.texinfo\' . texinfo-mode) (\.te?xi\' . texinfo-mode) (\.[sS]\' . asm-mode) (\.asm\' . asm-mode) (\.css\' . css-mode) (\.mixal\' . mixal-mode) (\.gcov\' . compilation-mode) (/\.[a-z0-9-]*gdbinit . gdb-script-mode) (-gdb\.gdb . gdb-script-mode) ([cC]hange\.?[lL]og?\' . change-log-mode) ([cC]hange[lL]og[-.][0-9]+\' . change-log-mode) (\$CHANGE_LOG\$\.TXT . change-log-mode) (\.scm\.[0-9]*\' . scheme-mode) (\.[ckz]?sh\'\|\.shar\'\|/\.z?profile\' . sh-mode) (\.bash\' . sh-mode) (\(/\|\`\)\.\(bash_\(profile\|history\|log\(in\|out\)\)\|z?log\(in\|out\)\)\' . sh-mode) (\(/\|\`\)\.\(shrc\|zshrc\|m?kshrc\|bashrc\|t?cshrc\|esrc\)\' . sh-mode) (\(/\|\`\)\.\([kz]shenv\|xinitrc\|startxrc\|xsession\)\' . sh-mode) (\.m?spec\' . sh-mode) (\.m[mes]\' . nroff-mode) (\.man\' . nroff-mode) (\.sty\' . latex-mode) (\.cl[so]\' . latex-mode) (\.bbl\' . latex-mode) (\.bib\' . bibtex-mode) (\.bst\' . bibtex-style-mode) (\.sql\' . sql-mode) (\(acinclude\|aclocal\|acsite\)\.m4\' . autoconf-mode) (\.m[4c]\' . m4-mode) (\.mf\' . metafont-mode) (\.mp\' . metapost-mode) (\.vhdl?\' . vhdl-mode) (\.article\' . text-mode) (\.letter\' . text-mode) (\.i?tcl\' . tcl-mode) (\.exp\' . tcl-mode) (\.itk\' . tcl-mode) (\.icn\' . icon-mode) (\.sim\' . simula-mode) (\.mss\' . scribe-mode) (\.f9[05]\' . f90-mode) (\.f0[38]\' . f90-mode) (\.indent\.pro\' . fundamental-mode) (\.\(pro\|PRO\)\' . idlwave-mode) (\.srt\' . srecode-template-mode) (\.prolog\' . prolog-mode) (\.tar\' . tar-mode) (\.\(arc\|zip\|lzh\|lha\|zoo\|[jew]ar\|xpi\|rar\|cbr\|7z\|ARC\|ZIP\|LZH\|LHA\|ZOO\|[JEW]AR\|XPI\|RAR\|CBR\|7Z\)\' . archive-mode) (\.oxt\' . archive-mode) (\.\(deb\|[oi]pk\)\' . archive-mode) (\`/tmp/Re . text-mode) (/Message[0-9]*\' . text-mode) (\`/tmp/fol/ . text-mode) (\.oak\' . scheme-mode) (\.sgml?\' . sgml-mode) (\.x[ms]l\' . xml-mode) (\.dbk\' . xml-mode) (\.dtd\' . sgml-mode) (\.ds\(ss\)?l\' . dsssl-mode) (\.js[mx]?\' . javascript-mode) (\.har\' . javascript-mode) (\.json\' . javascript-mode) (\.[ds]?va?h?\' . verilog-mode) (\.by\' . bovine-grammar-mode) (\.wy\' . wisent-grammar-mode) ([:/\]\..*\(emacs\|gnus\|viper\)\' . emacs-lisp-mode) (\`\..*emacs\' . emacs-lisp-mode) ([:/]_emacs\' . emacs-lisp-mode) (/crontab\.X*[0-9]+\' . shell-script-mode) (\.ml\' . lisp-mode) (\.ld[si]?\' . ld-script-mode) (ld\.?script\' . ld-script-mode) (\.xs\' . c-mode) (\.x[abdsru]?[cnw]?\' . ld-script-mode) (\.zone\' . dns-mode) (\.soa\' . dns-mode) (\.asd\' . lisp-mode) (\.\(asn\|mib\|smi\)\' . snmp-mode) (\.\(as\|mi\|sm\)2\' . snmpv2-mode) (\.\(diffs?\|patch\|rej\)\' . diff-mode) (\.\(dif\|pat\)\' . diff-mode) (\.[eE]?[pP][sS]\' . ps-mode) (\.\(?:PDF\|DVI\|OD[FGPST]\|DOCX\|XLSX?\|PPTX?\|pdf\|djvu\|dvi\|od[fgpst]\|docx\|xlsx?\|pptx?\)\' . doc-view-mode-maybe) (configure\.\(ac\|in\)\' . autoconf-mode) (\.s\(v\|iv\|ieve\)\' . sieve-mode) (BROWSE\' . ebrowse-tree-mode) (\.ebrowse\' . ebrowse-tree-mode) (#\*mail\* . mail-mode) (\.g\' . antlr-mode) (\.mod\' . m2-mode) (\.ses\' . ses-mode) (\.docbook\' . sgml-mode) (\.com\' . dcl-mode) (/config\.\(?:bat\|log\)\' . fundamental-mode) (/\.\(authinfo\|netrc\)\' . authinfo-mode) (\.\(?:[iI][nN][iI]\|[lL][sS][tT]\|[rR][eE][gG]\|[sS][yY][sS]\)\' . conf-mode) (\.la\' . conf-unix-mode) (\.ppd\' . conf-ppd-mode) (java.+\.conf\' . conf-javaprop-mode) (\.properties\(?:\.[a-zA-Z0-9._-]+\)?\' . conf-javaprop-mode) (\.toml\' . conf-toml-mode) (\.desktop\' . conf-desktop-mode) (/\.redshift.conf\' . conf-windows-mode) (\`/etc/\(?:DIR_COLORS\|ethers\|.?fstab\|.*hosts\|lesskey\|login\.?de\(?:fs\|vperm\)\|magic\|mtab\|pam\.d/.*\|permissions\(?:\.d/.+\)?\|protocols\|rpc\|services\)\' . conf-space-mode) (\`/etc/\(?:acpid?/.+\|aliases\(?:\.d/.+\)?\|default/.+\|group-?\|hosts\..+\|inittab\|ksysguarddrc\|opera6rc\|passwd-?\|shadow-?\|sysconfig/.+\)\' . conf-mode) ([cC]hange[lL]og[-.][-0-9a-z]+\' . change-log-mode) (/\.?\(?:gitconfig\|gnokiirc\|hgrc\|kde.*rc\|mime\.types\|wgetrc\)\' . conf-mode) (/\.\(?:asound\|enigma\|fetchmail\|gltron\|gtk\|hxplayer\|mairix\|mbsync\|msmtp\|net\|neverball\|nvidia-settings-\|offlineimap\|qt/.+\|realplayer\|reportbug\|rtorrent\.\|screen\|scummvm\|sversion\|sylpheed/.+\|xmp\)rc\' . conf-mode) (/\.\(?:gdbtkinit\|grip\|mpdconf\|notmuch-config\|orbital/.+txt\|rhosts\|tuxracer/options\)\' . conf-mode) (/\.?X\(?:default\|resource\|re\)s\> . conf-xdefaults-mode) (/X11.+app-defaults/\|\.ad\' . conf-xdefaults-mode) (/X11.+locale/.+/Compose\' . conf-colon-mode) (/X11.+locale/compose\.dir\' . conf-javaprop-mode) (\.~?[0-9]+\.[0-9][-.0-9]*~?\' nil t) (\.\(?:orig\|in\|[bB][aA][kK]\)\' nil t) ([/.]c\(?:on\)?f\(?:i?g\)?\(?:\.[a-zA-Z0-9._-]+\)?\' . conf-mode-maybe) (\.[1-9]\' . nroff-mode) (\.art\' . image-mode) (\.avs\' . image-mode) (\.bmp\' . image-mode) (\.cmyk\' . image-mode) (\.cmyka\' . image-mode) (\.crw\' . image-mode) (\.dcr\' . image-mode) (\.dcx\' . image-mode) (\.dng\' . image-mode) (\.dpx\' . image-mode) (\.fax\' . image-mode) (\.hrz\' . image-mode) (\.icb\' . image-mode) (\.icc\' . image-mode) (\.icm\' . image-mode) (\.ico\' . image-mode) (\.icon\' . image-mode) (\.jbg\' . image-mode) (\.jbig\' . image-mode) (\.jng\' . image-mode) (\.jnx\' . image-mode) (\.miff\' . image-mode) (\.mng\' . image-mode) (\.mvg\' . image-mode) (\.otb\' . image-mode) (\.p7\' . image-mode) (\.pcx\' . image-mode) (\.pdb\' . image-mode) (\.pfa\' . image-mode) (\.pfb\' . image-mode) (\.picon\' . image-mode) (\.pict\' . image-mode) (\.rgb\' . image-mode) (\.rgba\' . image-mode) (\.tga\' . image-mode) (\.wbmp\' . image-mode) (\.webp\' . image-mode) (\.wmf\' . image-mode) (\.wpg\' . image-mode) (\.xcf\' . image-mode) (\.xmp\' . image-mode) (\.xwd\' . image-mode) (\.yuv\' . image-mode) (\.tgz\' . tar-mode) (\.tbz2?\' . tar-mode) (\.txz\' . tar-mode) (\.tzst\' . tar-mode)) - ** Markdown Markdown is the standard for writing documentation. This snippet loads GFM (Github Flavoured Markdown) style. @@ -793,9 +709,6 @@ Markdown is the standard for writing documentation. This snippet loads GFM (add-hook 'org-trigger-hook 'save-buffer)) #+END_SRC -#+RESULTS: -: t - Set up ob for executing code blocks #+BEGIN_SRC emacs-lisp @@ -818,9 +731,6 @@ Set up ob for executing code blocks (shell . t)))) #+END_SRC -#+RESULTS: -: t - Exporting to html needs htmlize. #+BEGIN_SRC emacs-lisp @@ -862,9 +772,6 @@ Add org noter (setq org-ref-completion-library 'org-ref-ivy-cite)) #+END_SRC -#+RESULTS: -: org-ref-bibtex-hydra/body - *** Templates #+BEGIN_SRC emacs-lisp (setq org-capture-templates @@ -895,11 +802,6 @@ Add org noter ((org-agenda-overriding-header "University"))))) #+END_SRC -#+RESULTS: -| w | At work | tags-todo | @work | ((org-agenda-overriding-header Work)) | -| h | At home | tags-todo | @home | ((org-agenda-overriding-header Home)) | -| u | At uni | tags-todo | @uni | ((org-agenda-overriding-header University)) | - *** Contacts #+BEGIN_SRC emacs-lisp @@ -907,9 +809,6 @@ Add org noter '("~/Dropbox/org/contacts.org"))) #+END_SRC -#+RESULTS: -| /home/yannherklotz/Dropbox/org/contacts.org | - *** Remove Binding #+BEGIN_SRC emacs-lisp (define-key org-mode-map (kbd "C-,") nil) @@ -924,9 +823,6 @@ Add org noter (set-register ?c (cons 'file (format-time-string "~/Dropbox/org/journals/%Y-%m.org"))) #+END_SRC -#+RESULTS: -: (file . ~/Dropbox/org/journals/2019-09.org) - *** Exporting #+BEGIN_SRC emacs-lisp @@ -947,9 +843,6 @@ Add org noter (define-key pdf-view-mode-map (kbd "C-s") 'isearch-forward)) #+END_SRC -#+RESULTS: -| pdf-view-mode | - ** Writeroom #+begin_src emacs-lisp @@ -971,9 +864,6 @@ lot of different language support. (setq server-switch-hook nil)) #+END_SRC -#+RESULTS: -: magit-status - *** Projectile #+BEGIN_SRC emacs-lisp (use-package projectile @@ -1001,9 +891,6 @@ lot of different language support. (setq-default ediff-forward-word-function 'forward-char) #+END_SRC -#+RESULTS: -: forward-char - ** Language Support *** C++ @@ -1068,9 +955,6 @@ to install clang format script). ("C-c u" . 'clang-format-buffer))) #+END_SRC -#+RESULTS: -: clang-format-buffer - *** Clojure Using Cider for clojure environment. @@ -1108,9 +992,6 @@ Adding hook to clojure mode to enable strict parentheses mode. (setq coq-compile-before-require t)) #+end_src -#+RESULTS: -: t - *** Elm #+BEGIN_SRC emacs-lisp @@ -1183,18 +1064,12 @@ Haskell mode with company mode completion. :hook haskell-mode) #+END_SRC -#+RESULTS: -| (lambda nil (set (make-local-variable (quote projectile-tags-command)) hasktags -Re -f "%s" %s "%s")) | (lambda nil (local-set-key (kbd C-c v) (quote haskell-add-import))) | (lambda nil (local-set-key (kbd C-c y a) (quote y/haskell-align-comment))) | haskell-decl-scan-mode | interactive-haskell-mode | - *** LLVM IR #+begin_src text (require 'llvm-mode) #+end_src -#+RESULTS: -: llvm-mode - *** Python Elpy package for python, which provides an IDE type environment for python. @@ -1218,9 +1093,6 @@ Elpy package for python, which provides an IDE type environment for python. nil "_")))) #+END_SRC -#+RESULTS: -: python-shell-completion-native-try - *** JSON JSON files should be opened in js-mode. #+BEGIN_SRC emacs-lisp @@ -1243,8 +1115,6 @@ JSON files should be opened in js-mode. (use-package scala-mode) #+end_src -#+RESULTS: - *** Shell #+BEGIN_SRC emacs-lisp (setq sh-basic-offset 2) @@ -1257,9 +1127,6 @@ JSON files should be opened in js-mode. (setq flycheck-verilog-verilator-executable "verilator_bin") #+end_src -#+RESULTS: -: verilator_bin - ** Completion Support *** Company #+BEGIN_SRC emacs-lisp @@ -1332,9 +1199,6 @@ Shamelessly taken from https://github.com/alphapapa/unpackaged.el#hydra. (unpackaged/smerge-hydra/body))))) #+END_SRC -#+RESULTS: -| lambda | nil | (when smerge-mode (unpackaged/smerge-hydra/body)) | - * Look and Feel #+BEGIN_SRC emacs-lisp @@ -1347,14 +1211,11 @@ Shamelessly taken from https://github.com/alphapapa/unpackaged.el#hydra. (select-frame frame) (toggle-scroll-bar -1))) - ;(unless (boundp 'server-process) - ; (progn (load-theme 'sanityinc-solarized-light t) - ; (toggle-scroll-bar -1))) + (unless (boundp 'server-process) + (progn (load-theme 'sanityinc-tomorrow-night t) + (toggle-scroll-bar -1))) #+END_SRC -#+RESULTS: -| (lambda (frame) (select-frame frame) (load-theme (quote sanityinc-tomorrow-night) t) (toggle-scroll-bar -1)) | (lambda (frame) (select-frame frame) (load-theme (quote gruvbox-light-soft) t) (toggle-scroll-bar -1)) | x-dnd-init-frame | - * Conclusion Setting the gc-cons threshold back to what it was at the beginning. -- cgit From a9bb367d8117fb92d966eca6d5aefe1c70036a4b Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Mon, 16 Mar 2020 20:51:06 +0000 Subject: Add temp files, need to work on integrating --- emacs/loader.org | 20 ++++++++++++++++++-- install.sh | 2 +- zsh/.zsh/export.zsh | 12 ++++++++---- zsh/.zsh/function.zsh | 6 ------ zsh/.zsh/startup.zsh | 10 ---------- zsh/.zshrc | 3 +++ 6 files changed, 30 insertions(+), 23 deletions(-) diff --git a/emacs/loader.org b/emacs/loader.org index 1183215..b66488b 100644 --- a/emacs/loader.org +++ b/emacs/loader.org @@ -109,7 +109,7 @@ yes or no. Also stop the start up message from popping up and enter the scratch buffer instead. #+BEGIN_SRC emacs-lisp - ;;(setq warning-minimum-level :emergency) + (setq warning-minimum-level :emergency) (setq inhibit-startup-message t confirm-nonexistent-file-or-buffer nil default-directory "~/") @@ -121,11 +121,18 @@ buffer instead. (fset 'yes-or-no-p 'y-or-n-p) (global-hl-line-mode 1) (add-to-list 'custom-theme-load-path "~/.emacs.d/themes/") - (when (string= system-type "darwin") + (when (eq system-type 'darwin) (setq dired-use-ls-dired nil)) #+END_SRC #+BEGIN_SRC emacs-lisp + (when (eq system-type 'darwin) + (setq mac-right-option-modifier 'none + mac-option-key-is-meta nil + mac-command-key-is-meta t + mac-command-modifier 'meta + mac-option-modifier nil)) + (global-set-key (kbd "M-u") #'upcase-dwim) (global-set-key (kbd "M-l") #'downcase-dwim) (global-set-key (kbd "M-c") #'capitalize-dwim) @@ -447,6 +454,15 @@ Define utility functions to make the reader work. #+END_SRC * Utility +** Zettelkasten + +#+begin_src emacs-lisp + (when (file-directory-p "~/Projects/emacs-zettelkasten") + (add-to-list 'load-path "~/Projects/emacs-zettelkasten") + (require 'zettelkasten) + (zettelkasten-mode t)) +#+end_src + ** Navigation Set navigation commands in all the buffers diff --git a/install.sh b/install.sh index f7c0022..2bd7b26 100755 --- a/install.sh +++ b/install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -SCRIPT_DIR=$(dirname "$(readlink -f "$0")") +SCRIPT_DIR=$(pwd) function print_help { echo "Install configuration options to the correct paths." diff --git a/zsh/.zsh/export.zsh b/zsh/.zsh/export.zsh index a395d92..c488153 100644 --- a/zsh/.zsh/export.zsh +++ b/zsh/.zsh/export.zsh @@ -1,21 +1,25 @@ -export GITHUB_HOME=$HOME/Github +. $HOME/.nix-profile/etc/profile.d/nix.sh + +export GITHUB_HOME=$HOME/Projects export FZF_DEFAULT_COMMAND='fd --type file --hidden --no-ignore' export ALTERNATE_EDITOR="emacs -nw -Q" export EDITOR='emacsclient -nw' export VISUAL='emacsclient -c' export TERM='xterm-256color' +export CLICOLOR=1 export PATH="${HOME}/.gem/ruby/2.6.0/bin:/usr/local/bin:${PATH}" -export PATH="/usr/bin:${PATH}" export PATH="${HOME}/.yarn/bin:${PATH}" export PATH="${PATH}:/opt/Xilinx/Vivado/2019.1/bin" export PATH="${PATH}:/opt/intelFPGA_lite/18.1/quartus/bin" export PATH="${HOME}/.local/bin:${PATH}" export PATH="${HOME}/.cargo/bin:${PATH}" export PATH="${HOME}/.cabal/bin:${PATH}" +export PATH="/usr/local/bin:${PATH}" +export PATH="/Library/TeX/texbin:${PATH}" +export PATH="${PATH}:/Users/yannherklotz/Library/Python/3.7/bin" # Stop dotnet telemetry export DOTNET_CLI_TELEMETRY_OPTOUT=1 -# Fix java windows for tiling window managers -export _JAVA_AWT_WM_NONREPARENTING=1 +eval "$(direnv hook zsh)" diff --git a/zsh/.zsh/function.zsh b/zsh/.zsh/function.zsh index fdd6980..06a8e43 100644 --- a/zsh/.zsh/function.zsh +++ b/zsh/.zsh/function.zsh @@ -1,9 +1,3 @@ -alias fdisk='fdisk --color=always' -alias grep='grep --color=always' -alias ls='ls --color=always' -alias l='ls -la --color=always' -alias vi='nvim' -alias vim='nvim' alias emc='emacsclient -c -a ""' alias em='emacsclient -nw -a ""' alias ff='firefox' diff --git a/zsh/.zsh/startup.zsh b/zsh/.zsh/startup.zsh index e8caf69..e69de29 100644 --- a/zsh/.zsh/startup.zsh +++ b/zsh/.zsh/startup.zsh @@ -1,10 +0,0 @@ -# Nix -if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then - . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' -fi - -# direnv - -eval "$(direnv hook zsh)" - -# End Nix diff --git a/zsh/.zshrc b/zsh/.zshrc index b854793..ae0ee35 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -43,3 +43,6 @@ bindkey -M emacs '^N' history-substring-search-down # opam configuration test -r /home/yannherklotz/.opam/opam-init/init.zsh && . /home/yannherklotz/.opam/opam-init/init.zsh > /dev/null 2> /dev/null || true + +# added by travis gem +[ -f /Users/yannherklotz/.travis/travis.sh ] && source /Users/yannherklotz/.travis/travis.sh -- cgit From 1ef69dff0bb074ea950579b126d6ff3167b0e641 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Tue, 17 Mar 2020 17:05:09 +0000 Subject: Add org-ref to doom emacs --- doom/config.el | 28 +++++++++++++++++++++++++++- doom/packages.el | 4 ++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/doom/config.el b/doom/config.el index b5ddb93..7a688cd 100644 --- a/doom/config.el +++ b/doom/config.el @@ -123,6 +123,11 @@ (global-auto-revert-mode 1) (setq auto-revert-verbose nil) +;; Remove automatic `auto-fill-mode', and replace it by `visual-line-mode', +;; which is a personal preference. +(remove-hook 'text-mode-hook #'auto-fill-mode) +(add-hook 'text-mode-hook #'+word-wrap-mode) + ;; Set up magit when C-c g is called (use-package! magit :bind (("C-x g" . magit-status))) @@ -165,7 +170,9 @@ ("t" . "theorem")))) (use-package! org-id - :after org) + :after org + :init + (setq org-id-link-to-org-use-id 'create-if-interactive-and-no-custom-id)) ;; Disable org indent mode and remove C-, from the org-mode-map. (after! org @@ -193,6 +200,17 @@ ("u" "At uni" tags-todo "@uni" ((org-agenda-overriding-header "University"))))) +;; Set up org ref for PDFs +(use-package! org-ref + :after org + :bind (("C-c r" . org-ref-cite-hydra/body) + ("C-c b" . org-ref-bibtex-hydra/body)) + :config + (setq org-ref-bibliography-notes "~/Dropbox/bibliography/notes.org" + org-ref-default-bibliography '("~/Dropbox/bibliography/references.bib") + org-ref-pdf-directory "~/Dropbox/bibliography/papers/") + (setq org-ref-completion-library 'org-ref-ivy-cite)) + ;; Set up org registers to quickly jump to files that I use often. (set-register ?l (cons 'file "~/.emacs.d/loader.org")) (set-register ?m (cons 'file "~/Dropbox/org/main.org")) @@ -212,6 +230,14 @@ :config (zettelkasten-mode t)) +;; Mac configuration +(when (eq system-type 'darwin) + (setq mac-right-option-modifier 'none + mac-option-key-is-meta nil + mac-command-key-is-meta t + mac-command-modifier 'meta + mac-option-modifier nil)) + ;; Here are some additional functions/macros that could help you configure Doom: ;; ;; - `load!' for loading external *.el files relative to this one diff --git a/doom/packages.el b/doom/packages.el index 8891894..9ac41ad 100644 --- a/doom/packages.el +++ b/doom/packages.el @@ -50,6 +50,10 @@ ;; our package manager can't deal with; see raxod502/straight.el#279) ;(package! builtin-package :recipe (:branch "develop")) +;; Org mode dependencies +(package! org-ref) + +;; Misc dependencies (package! hungry-delete) (package! color-theme-sanityinc-tomorrow) (package! zettelkasten -- cgit From 467e39232f12ec8fb5a2386254259b89cebe5662 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Tue, 17 Mar 2020 17:06:47 +0000 Subject: Add mac support to doom --- doom/init.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doom/init.el b/doom/init.el index d257bc2..a6f2c65 100644 --- a/doom/init.el +++ b/doom/init.el @@ -90,7 +90,7 @@ ;;gist ; interacting with github gists lookup ; navigate your code and its documentation ;;lsp - ;;macos ; MacOS-specific commands + macos ; MacOS-specific commands magit ; a git porcelain for Emacs ;;make ; run make tasks from Emacs pass ; password manager for nerds -- cgit From a86b1f79cc8ffdf465da1469d0e5948e46efc8f4 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Wed, 18 Mar 2020 11:30:59 +0000 Subject: Add --- doom/config.el | 26 ++++++++++++++++++++++---- doom/packages.el | 2 +- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/doom/config.el b/doom/config.el index 7a688cd..32b47c7 100644 --- a/doom/config.el +++ b/doom/config.el @@ -230,13 +230,31 @@ :config (zettelkasten-mode t)) +;; Publishing projects, this one is for the zettelkasten +(use-package! ox-publish + :config + (setq org-publish-project-alist + '(("zettelkasten" + :base-directory "~/Dropbox/org/zettelkasten/" + :base-extension "org" + :publishing-directory "~/Dropbox/org/zettelkasten/html/" + :publishing-function org-html-publish-to-html + :headline-levels 4 + :auto-preamble t + :with-toc nil + :section-numbers nil + :html-head " +" + ))) + (add-hook 'org-export-before-processing-hook 'zettelkasten-org-export-preprocessor)) + ;; Mac configuration (when (eq system-type 'darwin) (setq mac-right-option-modifier 'none - mac-option-key-is-meta nil - mac-command-key-is-meta t - mac-command-modifier 'meta - mac-option-modifier nil)) + mac-option-key-is-meta nil + mac-command-key-is-meta t + mac-command-modifier 'meta + mac-option-modifier nil)) ;; Here are some additional functions/macros that could help you configure Doom: ;; diff --git a/doom/packages.el b/doom/packages.el index 9ac41ad..ce95615 100644 --- a/doom/packages.el +++ b/doom/packages.el @@ -57,4 +57,4 @@ (package! hungry-delete) (package! color-theme-sanityinc-tomorrow) (package! zettelkasten - :recipe (:host github :repo "ymherklotz/emacs-zettelkasten")) + :recipe (:host github :repo "ymherklotz/emacs-zettelkasten") :pin "a5bd657820") -- cgit From 9a7949abe33002c01ad9741987d62fe70412ee6e Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Wed, 18 Mar 2020 11:30:59 +0000 Subject: Add export for zettelkasten projects --- doom/config.el | 26 ++++++++++++++++++++++---- doom/packages.el | 2 +- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/doom/config.el b/doom/config.el index 7a688cd..32b47c7 100644 --- a/doom/config.el +++ b/doom/config.el @@ -230,13 +230,31 @@ :config (zettelkasten-mode t)) +;; Publishing projects, this one is for the zettelkasten +(use-package! ox-publish + :config + (setq org-publish-project-alist + '(("zettelkasten" + :base-directory "~/Dropbox/org/zettelkasten/" + :base-extension "org" + :publishing-directory "~/Dropbox/org/zettelkasten/html/" + :publishing-function org-html-publish-to-html + :headline-levels 4 + :auto-preamble t + :with-toc nil + :section-numbers nil + :html-head " +" + ))) + (add-hook 'org-export-before-processing-hook 'zettelkasten-org-export-preprocessor)) + ;; Mac configuration (when (eq system-type 'darwin) (setq mac-right-option-modifier 'none - mac-option-key-is-meta nil - mac-command-key-is-meta t - mac-command-modifier 'meta - mac-option-modifier nil)) + mac-option-key-is-meta nil + mac-command-key-is-meta t + mac-command-modifier 'meta + mac-option-modifier nil)) ;; Here are some additional functions/macros that could help you configure Doom: ;; diff --git a/doom/packages.el b/doom/packages.el index 9ac41ad..ce95615 100644 --- a/doom/packages.el +++ b/doom/packages.el @@ -57,4 +57,4 @@ (package! hungry-delete) (package! color-theme-sanityinc-tomorrow) (package! zettelkasten - :recipe (:host github :repo "ymherklotz/emacs-zettelkasten")) + :recipe (:host github :repo "ymherklotz/emacs-zettelkasten") :pin "a5bd657820") -- cgit From 208df59a0a4545c2da0ac75a2cb513ebbd391b86 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Wed, 18 Mar 2020 17:39:19 +0000 Subject: Disable undo-tree --- doom/packages.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doom/packages.el b/doom/packages.el index ce95615..dbb4a59 100644 --- a/doom/packages.el +++ b/doom/packages.el @@ -50,6 +50,9 @@ ;; our package manager can't deal with; see raxod502/straight.el#279) ;(package! builtin-package :recipe (:branch "develop")) +;; Disabling packages +(package! undo-tree :disable t) + ;; Org mode dependencies (package! org-ref) -- cgit From 3b55435803691baad50e6d921649eb24d84aede7 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Wed, 18 Mar 2020 17:43:39 +0000 Subject: Remove use-package call to load emacs faster --- doom/config.el | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/doom/config.el b/doom/config.el index c572a88..9ebeafa 100644 --- a/doom/config.el +++ b/doom/config.el @@ -234,22 +234,20 @@ (zettelkasten-mode t)) ;; Publishing projects, this one is for the zettelkasten -(use-package! ox-publish - :config - (setq org-publish-project-alist - '(("zettelkasten" - :base-directory "~/Dropbox/org/zettelkasten/" - :base-extension "org" - :publishing-directory "~/Dropbox/org/zettelkasten/html/" - :publishing-function org-html-publish-to-html - :headline-levels 4 - :auto-preamble t - :with-toc nil - :section-numbers nil - :html-head " +(setq org-publish-project-alist + '(("zettelkasten" + :base-directory "~/Dropbox/org/zettelkasten/" + :base-extension "org" + :publishing-directory "~/Dropbox/org/zettelkasten/html/" + :publishing-function org-html-publish-to-html + :headline-levels 4 + :auto-preamble t + :with-toc nil + :section-numbers nil + :html-head " " - ))) - (add-hook 'org-export-before-processing-hook 'zettelkasten-org-export-preprocessor)) + ))) +(add-hook 'org-export-before-processing-hook 'zettelkasten-org-export-preprocessor) ;; Mac configuration (when (eq system-type 'darwin) -- cgit From a99afc3da7ff4b804c93f100a7e6cdee5dcc0ba6 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Fri, 27 Mar 2020 15:51:22 +0000 Subject: Update doom configuration --- doom/config.el | 78 ++++++++++++++++++++++++++++++++------------------------ doom/init.el | 26 +++++++++---------- doom/packages.el | 14 +++++++--- 3 files changed, 68 insertions(+), 50 deletions(-) diff --git a/doom/config.el b/doom/config.el index 9ebeafa..d394560 100644 --- a/doom/config.el +++ b/doom/config.el @@ -26,7 +26,7 @@ ;; 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 'sanityinc-tomorrow-night) +(setq doom-theme 'modus-operandi) ;; 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! @@ -76,19 +76,6 @@ (global-set-key (kbd "C-`") #'push-mark-no-activate) (global-set-key (kbd "M-`") #'jump-to-mark) -;; Delete an emacs client frame. -(defun y/exit-emacs-client () - "consistent exit emacsclient. If not in emacs client, echo a - message in minibuffer, don't exit emacs. If in server mode and - editing file, do C-x # server-edit else do C-x 5 0 - delete-frame" - (interactive) - (if server-buffer-clients - (server-edit) - (delete-frame))) - -(global-set-key (kbd "C-c q") #'y/exit-emacs-client) - ;; Swap two window positions. (defun y/swap-windows () "Swaps two windows and leaves the cursor in the original one" @@ -106,6 +93,14 @@ (define-key y-map (kbd "g") 'password-store-generate) (define-key y-map (kbd "r") 'toggle-rot13-mode) +;; Mac configuration +(when (eq system-type 'darwin) + (setq mac-right-option-modifier 'none + mac-option-key-is-meta nil + mac-command-key-is-meta t + mac-command-modifier 'meta + mac-option-modifier nil)) + (defun y/insert-date () "Insert a timestamp according to locale's date and time format." (interactive) @@ -148,7 +143,7 @@ :config (global-hungry-delete-mode)) ;; Org configuration -(use-package org +(use-package! org :mode ("\\.org\\'" . org-mode) :init (map! :map org-mode-map @@ -192,16 +187,14 @@ ("~/Dropbox/org/someday.org" :level . 1) ("~/Dropbox/org/tickler.org" :maxlevel . 2) (,(format-time-string "~/Dropbox/org/journals/%Y-%m.org") :maxlevel . 2)) - org-todo-keywords '((sequence "TODO(t)" "WAITING(w)" "|" "DONE(d)" "CANCELLED(c)"))) - -;; Set custom agenda commands which can be activated in the agenda viewer. -(setq org-agenda-custom-commands - '(("w" "At work" tags-todo "@work" - ((org-agenda-overriding-header "Work"))) - ("h" "At home" tags-todo "@home" - ((org-agenda-overriding-header "Home"))) - ("u" "At uni" tags-todo "@uni" - ((org-agenda-overriding-header "University"))))) + ;; Set custom agenda commands which can be activated in the agenda viewer. + org-agenda-custom-commands + '(("w" "At work" tags-todo "@work" + ((org-agenda-overriding-header "Work"))) + ("h" "At home" tags-todo "@home" + ((org-agenda-overriding-header "Home"))) + ("u" "At uni" tags-todo "@uni" + ((org-agenda-overriding-header "University"))))) ;; Set up org ref for PDFs (use-package! org-ref @@ -214,6 +207,20 @@ org-ref-pdf-directory "~/Dropbox/bibliography/papers/") (setq org-ref-completion-library 'org-ref-ivy-cite)) +;; Set up org-noter +(use-package! org-noter + :after org + :commands org-noter + :config (setq org-noter-default-notes-file-names '("notes.org") + org-noter-notes-search-path '("~/org/bibliography") + org-noter-separate-notes-from-heading t)) + +(use-package! org-superstar + :hook (org-mode . org-superstar-mode) + :config + (setq org-superstar-headline-bullets-list '("⁖" "◉" "○" "✸") + org-superstar-special-todo-items t)) + ;; Set up org registers to quickly jump to files that I use often. (set-register ?l (cons 'file "~/.emacs.d/loader.org")) (set-register ?m (cons 'file "~/Dropbox/org/main.org")) @@ -224,14 +231,15 @@ (setq ispell-dictionary "en_GB") (use-package! flyspell + :hook (text-mode . flyspell-mode) :config (define-key flyspell-mode-map (kbd "C-.") nil) (define-key flyspell-mode-map (kbd "C-,") nil)) ;; Set up zettelkasten mode (use-package! zettelkasten - :config - (zettelkasten-mode t)) + :bind-keymap + ("C-c k" . zettelkasten-mode-map)) ;; Publishing projects, this one is for the zettelkasten (setq org-publish-project-alist @@ -249,13 +257,15 @@ ))) (add-hook 'org-export-before-processing-hook 'zettelkasten-org-export-preprocessor) -;; Mac configuration -(when (eq system-type 'darwin) - (setq mac-right-option-modifier 'none - mac-option-key-is-meta nil - mac-command-key-is-meta t - mac-command-modifier 'meta - mac-option-modifier nil)) +;; Proof general configuration +(use-package! proof-general + :mode "\\.v\\'" + :config + (setq coq-compile-before-require t + proof-splash-enable nil + proof-auto-action-when-deactivating-scripting 'retract + proof-delete-empty-windows nil + proof-auto-raise-buffers t)) ;; Here are some additional functions/macros that could help you configure Doom: ;; diff --git a/doom/init.el b/doom/init.el index a6f2c65..2bd908e 100644 --- a/doom/init.el +++ b/doom/init.el @@ -36,7 +36,7 @@ modeline ; snazzy, Atom-inspired modeline, plus API ;;nav-flash ; blink the current line after jumping ;;neotree ; a project drawer, like NERDTree for vim - ophints ; highlight the region an operation acts on + ;;ophints ; highlight the region an operation acts on (popup +defaults) ; tame sudden yet inevitable temporary windows ;;pretty-code ; replace bits of code with pretty symbols ;;tabs ; an tab bar for Emacs @@ -50,7 +50,7 @@ :editor ;;(evil +everywhere); come to the dark side, we have cookies - file-templates ; auto-snippets for empty files + ;;file-templates ; auto-snippets for empty files fold ; (nigh) universal code folding ;;(format +onsave) ; automated prettiness ;;god ; run Emacs commands without modifier keys @@ -59,7 +59,7 @@ ;;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 + ;;snippets ; my elves. They type so I don't have to word-wrap ; soft wrapping with language-aware indent :emacs @@ -76,19 +76,19 @@ :checkers syntax ; tasing you for every semicolon you forget - (spell +hunspell) ; tasing you for misspelling mispelling - grammar ; tasing grammar mistake every you make + (spell +hunspell) ; tasing you for misspelling mispelling + ;;grammar ; tasing grammar mistake every you make :tools ;;ansible ;;debugger ; FIXME stepping through code, to help you add bugs direnv ;;docker - editorconfig ; let someone else argue about tabs vs spaces + 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 ; navigate your code and its documentation ;;lsp macos ; MacOS-specific commands magit ; a git porcelain for Emacs @@ -104,23 +104,23 @@ :lang ;;agda ; types of types of types of types... ;;assembly ; assembly for fun or debugging - cc ; C/C++/Obj-C madness - clojure ; java with a lisp + cc ; C/C++/Obj-C madness + 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 + data ; config/data formats ;;elixir ; erlang done right ;;elm ; care for a cup of TEA? - emacs-lisp ; drown in parentheses + emacs-lisp ; drown in parentheses ;;erlang ; an elegant language for a more civilized age ;;ess ; emacs speaks statistics ;;faust ; dsp, but you get to keep your soul ;;fsharp ; ML stands for Microsoft's Language ;;fstar ; (dependent) types and (monadic) effects and Z3 ;;go ; the hipster dialect - (haskell +dante) ; a language that's lazier than I am + haskell ; a language that's lazier than I am ;;hy ; readability of scheme w/ speed of python ;;idris ; ;;(java +meghanada) ; the poster child for carpal tunnel syndrome @@ -153,7 +153,7 @@ ;;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 ; Fe2O3.unwrap().unwrap().unwrap().unwrap() ;;scala ; java, but good ;;scheme ; a fully conniving family of lisps sh ; she sells {ba,z,fi}sh shells on the C xor diff --git a/doom/packages.el b/doom/packages.el index dbb4a59..6571f93 100644 --- a/doom/packages.el +++ b/doom/packages.el @@ -51,13 +51,21 @@ ;(package! builtin-package :recipe (:branch "develop")) ;; Disabling packages -(package! undo-tree :disable t) +(disable-packages! undo-tree org-bullets helm) -;; Org mode dependencies +;; `org-mode' dependencies (package! org-ref) +(package! org-noter) +;; `org-bullets' replacement +(package! org-superstar) + +;; Proof general +(package! proof-general) ;; Misc dependencies (package! hungry-delete) (package! color-theme-sanityinc-tomorrow) +(package! modus-operandi-theme) +(package! modus-vivendi-theme) (package! zettelkasten - :recipe (:host github :repo "ymherklotz/emacs-zettelkasten") :pin "a5bd657820") + :recipe (:host github :repo "ymherklotz/emacs-zettelkasten")) -- cgit From e97c6f93f83fa8d668577cd3721fdc5bbb886951 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Fri, 27 Mar 2020 15:51:47 +0000 Subject: Add PATH for bison and cargo --- zsh/.zsh/export.zsh | 4 ++++ zsh/.zsh/function.zsh | 1 + 2 files changed, 5 insertions(+) diff --git a/zsh/.zsh/export.zsh b/zsh/.zsh/export.zsh index c7e34f8..7aa4e8b 100644 --- a/zsh/.zsh/export.zsh +++ b/zsh/.zsh/export.zsh @@ -19,6 +19,7 @@ if [[ -d "${HOME}/.gem/ruby/2.7.0/bin" ]]; then export PATH="${HOME}/.gem/ruby/2 export PATH="/usr/local/bin:${PATH}" export PATH="/Library/TeX/texbin:${PATH}" export PATH="${PATH}:/Users/yannherklotz/Library/Python/3.7/bin" +export PATH="/usr/local/opt/bison/bin:$PATH" # Stop dotnet telemetry export DOTNET_CLI_TELEMETRY_OPTOUT=1 @@ -38,3 +39,6 @@ if [[ "$?" -eq 0 ]]; then test -r /home/yannherklotz/.opam/opam-init/init.zsh && . /home/yannherklotz/.opam/opam-init/init.zsh > /dev/null 2> /dev/null || true eval "$(opam env)"; fi + +# Load rust environment +if [[ -f $HOME/.cargo/env ]]; then source $HOME/.cargo/env; fi diff --git a/zsh/.zsh/function.zsh b/zsh/.zsh/function.zsh index 20dc12d..be9dd79 100644 --- a/zsh/.zsh/function.zsh +++ b/zsh/.zsh/function.zsh @@ -1,6 +1,7 @@ alias emc='emacsclient -c -a ""' alias em='emacsclient -nw -a ""' alias ff='firefox' +alias vim=nvim # alias lspasscp='lpass show -c --password $(lpass ls | fzf | awk '{print $(NF)}' | sed 's/\\]//g')' # fixing pdflatex -- cgit From a3c386f8f24214b12c6d9ce1ad06c98d7735878a Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Fri, 3 Apr 2020 21:06:50 +0100 Subject: Clean up zsh exports --- zsh/.zsh/export.zsh | 55 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 18 deletions(-) diff --git a/zsh/.zsh/export.zsh b/zsh/.zsh/export.zsh index 7aa4e8b..671bf5c 100644 --- a/zsh/.zsh/export.zsh +++ b/zsh/.zsh/export.zsh @@ -1,5 +1,9 @@ +os=$(uname -s) + . $HOME/.nix-profile/etc/profile.d/nix.sh +[ -n $SSH_CLIENT ] && export MINIMAL_USER_CHAR="$(hostname)" + export GITHUB_HOME=$HOME/Projects export FZF_DEFAULT_COMMAND='fd --type file --hidden --no-ignore' export ALTERNATE_EDITOR="emacs -nw -Q" @@ -8,37 +12,52 @@ export VISUAL='emacsclient -c' export TERM='xterm-256color' export CLICOLOR=1 -export PATH="${HOME}/.gem/ruby/2.6.0/bin:/usr/local/bin:${PATH}" -export PATH="${HOME}/.yarn/bin:${PATH}" -export PATH="${PATH}:/opt/Xilinx/Vivado/2019.1/bin" -export PATH="${PATH}:/opt/intelFPGA_lite/18.1/quartus/bin" -export PATH="${HOME}/.local/bin:${PATH}" -export PATH="${HOME}/.cargo/bin:${PATH}" -export PATH="${HOME}/.cabal/bin:${PATH}" -if [[ -d "${HOME}/.gem/ruby/2.7.0/bin" ]]; then export PATH="${HOME}/.gem/ruby/2.7.0/bin:${PATH}"; fi -export PATH="/usr/local/bin:${PATH}" -export PATH="/Library/TeX/texbin:${PATH}" -export PATH="${PATH}:/Users/yannherklotz/Library/Python/3.7/bin" -export PATH="/usr/local/opt/bison/bin:$PATH" +prepend_path() { + test -d "$1" && PATH="$1:$PATH" +} + +append_path() { + test -d "$1" && PATH="$PATH:$1" +} + +if [ $os = "Darwin" ]; then + prepend_path "/Library/TeX/texbin" + prepend_path "/usr/local/opt/bison/bin" + + append_path "${HOME}/Library/Python/3.7/bin" +fi + +prepend_path "/usr/local/bin" +prepend_path "${HOME}/.gem/ruby/2.7.0/bin" +prepend_path "${HOME}/.yarn/bin" +prepend_path "${HOME}/.cargo/bin" +prepend_path "${HOME}/.cabal/bin" +prepend_path "${HOME}/.local/bin" + +append_path "/opt/Xilinx/Vivado/2019.1/bin" +append_path "/opt/intelFPGA_lite/18.1/quartus/bin" + +export PATH # Stop dotnet telemetry export DOTNET_CLI_TELEMETRY_OPTOUT=1 # Fix java windows for tiling window managers -if [[ $(uname -r) = "Linux" ]]; then export _JAVA_AWT_WM_NONREPARENTING=1; fi - -[ -f "$HOME/.travis/travis.sh" ] && source "$HOME/.travis/travis.sh" +[ $os = "Linux" ] && export _JAVA_AWT_WM_NONREPARENTING=1 # Direnv hook setup command -v direnv >/dev/null 2>&1 -if [[ "$?" -eq 0 ]]; then eval "$(direnv hook zsh)"; fi +[ "$?" -eq 0 ] && eval "$(direnv hook zsh)" # Opam hook setup and initialising it command -v opam >/dev/null 2>&1 -if [[ "$?" -eq 0 ]]; then +if [ "$?" -eq 0 ]; then test -r /home/yannherklotz/.opam/opam-init/init.zsh && . /home/yannherklotz/.opam/opam-init/init.zsh > /dev/null 2> /dev/null || true eval "$(opam env)"; fi # Load rust environment -if [[ -f $HOME/.cargo/env ]]; then source $HOME/.cargo/env; fi +[ -r $HOME/.cargo/env ] && source $HOME/.cargo/env + +# Travis +[ -r "$HOME/.travis/travis.sh" ] && source "$HOME/.travis/travis.sh" -- cgit From d20b40b7ff71bba80265e35fa647c09a2e1755d5 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Fri, 3 Apr 2020 21:07:03 +0100 Subject: Update emacs config options --- doom/config.el | 75 +++++++++++++++++++++++++++++++++++++++----------------- doom/packages.el | 8 ++++-- 2 files changed, 58 insertions(+), 25 deletions(-) diff --git a/doom/config.el b/doom/config.el index d394560..1c1d876 100644 --- a/doom/config.el +++ b/doom/config.el @@ -174,27 +174,27 @@ ;; Disable org indent mode and remove C-, from the org-mode-map. (after! org - (setq org-startup-indented nil) - (define-key org-mode-map (kbd "C-,") nil)) - -;; Set agenda files, refile targets and todo keywords. -(setq org-agenda-files (mapcar 'expand-file-name - (list "~/Dropbox/org/inbox.org" - "~/Dropbox/org/main.org" - "~/Dropbox/org/tickler.org" - (format-time-string "~/Dropbox/org/journals/%Y-%m.org"))) - org-refile-targets `(("~/Dropbox/org/main.org" :maxlevel . 2) - ("~/Dropbox/org/someday.org" :level . 1) - ("~/Dropbox/org/tickler.org" :maxlevel . 2) - (,(format-time-string "~/Dropbox/org/journals/%Y-%m.org") :maxlevel . 2)) - ;; Set custom agenda commands which can be activated in the agenda viewer. - org-agenda-custom-commands - '(("w" "At work" tags-todo "@work" - ((org-agenda-overriding-header "Work"))) - ("h" "At home" tags-todo "@home" - ((org-agenda-overriding-header "Home"))) - ("u" "At uni" tags-todo "@uni" - ((org-agenda-overriding-header "University"))))) + (define-key org-mode-map (kbd "C-,") nil) + ;; Set agenda files, refile targets and todo keywords. + (setq org-startup-indented nil + org-agenda-files (mapcar 'expand-file-name + (list "~/Dropbox/org/inbox.org" + "~/Dropbox/org/main.org" + "~/Dropbox/org/tickler.org" + (format-time-string "~/Dropbox/org/journals/%Y-%m.org"))) + org-refile-targets `(("~/Dropbox/org/main.org" :maxlevel . 2) + ("~/Dropbox/org/someday.org" :level . 1) + ("~/Dropbox/org/tickler.org" :maxlevel . 2) + (,(format-time-string "~/Dropbox/org/journals/%Y-%m.org") :maxlevel . 2)) + ;; Set custom agenda commands which can be activated in the agenda viewer. + org-agenda-custom-commands + '(("w" "At work" tags-todo "@work" + ((org-agenda-overriding-header "Work"))) + ("h" "At home" tags-todo "@home" + ((org-agenda-overriding-header "Home"))) + ("u" "At uni" tags-todo "@uni" + ((org-agenda-overriding-header "University")))) + org-log-done 'time)) ;; Set up org ref for PDFs (use-package! org-ref @@ -218,7 +218,7 @@ (use-package! org-superstar :hook (org-mode . org-superstar-mode) :config - (setq org-superstar-headline-bullets-list '("⁖" "◉" "○" "✸") + (setq org-superstar-headline-bullets-list '("♠" "♣" "♥" "♦") org-superstar-special-todo-items t)) ;; Set up org registers to quickly jump to files that I use often. @@ -259,7 +259,6 @@ ;; Proof general configuration (use-package! proof-general - :mode "\\.v\\'" :config (setq coq-compile-before-require t proof-splash-enable nil @@ -267,6 +266,36 @@ proof-delete-empty-windows nil proof-auto-raise-buffers t)) + (use-package smartparens + :bind (("M-[" . sp-backward-unwrap-sexp) + ("M-]" . sp-unwrap-sexp) + ("C-M-f" . sp-forward-sexp) + ("C-M-b" . sp-backward-sexp) + ("C-M-d" . sp-down-sexp) + ("C-M-a" . sp-backward-down-sexp) + ("C-M-e" . sp-up-sexp) + ("C-M-u" . sp-backward-up-sexp) + ("C-M-t" . sp-transpose-sexp) + ("C-M-n" . sp-next-sexp) + ("C-M-p" . sp-previous-sexp) + ("C-M-k" . sp-kill-sexp) + ("C-M-w" . sp-copy-sexp) + ("C-)" . sp-forward-slurp-sexp) + ("C-}" . sp-forward-barf-sexp) + ("C-(" . sp-backward-slurp-sexp) + ("C-{" . sp-backward-barf-sexp) + ("M-D" . sp-splice-sexp) + ("C-]" . sp-select-next-thing-exchange) + ("C-" . sp-select-previous-thing) + ("C-M-]" . sp-select-next-thing) + ("M-F" . sp-forward-symbol) + ("M-B" . sp-backward-symbol) + ("M-r" . sp-split-sexp)) + :config + (require 'smartparens-config) + (show-smartparens-global-mode +1) + (smartparens-global-mode 1)) + ;; Here are some additional functions/macros that could help you configure Doom: ;; ;; - `load!' for loading external *.el files relative to this one diff --git a/doom/packages.el b/doom/packages.el index 6571f93..04ddb37 100644 --- a/doom/packages.el +++ b/doom/packages.el @@ -64,8 +64,12 @@ ;; Misc dependencies (package! hungry-delete) +(package! vagrant-tramp) +(package! zettelkasten + :recipe (:host github :repo "ymherklotz/emacs-zettelkasten")) +(package! pinentry) + +;; Themes (package! color-theme-sanityinc-tomorrow) (package! modus-operandi-theme) (package! modus-vivendi-theme) -(package! zettelkasten - :recipe (:host github :repo "ymherklotz/emacs-zettelkasten")) -- cgit From 0ef187b518617ffd862043a318cd3178f64fe473 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Mon, 6 Apr 2020 20:43:17 +0100 Subject: Add MacOS configuration for yabai and skhd --- macos/skhd/skhdrc | 189 ++++++++++++++++++++++++++++++++++++++++++++++++++++ macos/yabai/yabairc | 17 +++++ 2 files changed, 206 insertions(+) create mode 100644 macos/skhd/skhdrc create mode 100755 macos/yabai/yabairc diff --git a/macos/skhd/skhdrc b/macos/skhd/skhdrc new file mode 100644 index 0000000..a634da0 --- /dev/null +++ b/macos/skhd/skhdrc @@ -0,0 +1,189 @@ +# ################################################################ # +# THE FOLLOWING IS AN EXPLANATION OF THE GRAMMAR THAT SKHD PARSES. # +# FOR SIMPLE EXAMPLE MAPPINGS LOOK FURTHER DOWN THIS FILE.. # +# ################################################################ # + +# A list of all built-in modifier and literal keywords can +# be found at https://github.com/koekeishiya/skhd/issues/1 +# +# A hotkey is written according to the following rules: +# +# hotkey = '<' | +# +# mode = 'name of mode' | ',' +# +# action = '[' ']' | '->' '[' ']' +# ':' | '->' ':' +# ';' | '->' ';' +# +# keysym = '-' | +# +# mod = 'modifier keyword' | '+' +# +# key = | +# +# literal = 'single letter or built-in keyword' +# +# keycode = 'apple keyboard kVK_ values (0x3C)' +# +# proc_map_lst = * +# +# proc_map = ':' | '~' | +# '*' ':' | '*' '~' +# +# string = '"' 'sequence of characters' '"' +# +# command = command is executed through '$SHELL -c' and +# follows valid shell syntax. if the $SHELL environment +# variable is not set, it will default to '/bin/bash'. +# when bash is used, the ';' delimeter can be specified +# to chain commands. +# +# to allow a command to extend into multiple lines, +# prepend '\' at the end of the previous line. +# +# an EOL character signifies the end of the bind. +# +# -> = keypress is not consumed by skhd +# +# * = matches every application not specified in +# +# ~ = application is unbound and keypress is forwarded per usual, when specified in a +# +# A mode is declared according to the following rules: +# +# mode_decl = '::' '@' ':' | '::' ':' | +# '::' '@' | '::' +# +# name = desired name for this mode, +# +# @ = capture keypresses regardless of being bound to an action +# +# command = command is executed through '$SHELL -c' and +# follows valid shell syntax. if the $SHELL environment +# variable is not set, it will default to '/bin/bash'. +# when bash is used, the ';' delimeter can be specified +# to chain commands. +# +# to allow a command to extend into multiple lines, +# prepend '\' at the end of the previous line. +# +# an EOL character signifies the end of the bind. + +# Open a new terminal +cmd - return : open /System/Applications/Utilities/Terminal.app + +# focus window +alt - u : yabai -m window --focus north +alt - e : yabai -m window --focus south +alt - n : yabai -m window --focus west +alt - i : yabai -m window --focus east + +# swap managed window +shift + alt - u : yabai -m window --swap north +shift + alt - e : yabai -m window --swap south +shift + alt - n : yabai -m window --swap west +shift + alt - i : yabai -m window --swap east + +# move managed window +shift + cmd - u : yabai -m window --warp north +shift + cmd - e : yabai -m window --warp south +shift + cmd - n : yabai -m window --warp west +shift + cmd - h : yabai -m window --warp east + +# balance size of windows +shift + alt - 0 : yabai -m space --balance + +# make floating window fill screen +shift + alt - up : yabai -m window --grid 1:1:0:0:1:1 + +# make floating window fill left-half of screen +shift + alt - left : yabai -m window --grid 1:2:0:0:1:1 + +# create desktop, move window and follow focus - uses jq for parsing json (brew install jq) +shift + cmd - n : yabai -m space --create && \ + index="$(yabai -m query --spaces --display | jq 'map(select(."native-fullscreen" == 0))[-1].index')" && \ + yabai -m window --space "${index}" && \ + yabai -m space --focus "${index}" + +# fast focus desktop +alt - c : yabai -m space --focus recent +alt - x : yabai -m space --focus next +alt - z : yabai -m space --focus prev +alt - 1 : yabai -m space --focus 1 +alt - 2 : yabai -m space --focus 2 +alt - 3 : yabai -m space --focus 3 +alt - 4 : yabai -m space --focus 4 +alt - 5 : yabai -m space --focus 5 +alt - 6 : yabai -m space --focus 6 +alt - 7 : yabai -m space --focus 7 +alt - 8 : yabai -m space --focus 8 +alt - 9 : yabai -m space --focus 9 + +# send window to desktop and follow focus +shift + alt - x : yabai -m window --space next; yabai -m space --focus next +shift + alt - z : yabai -m window --space prev; yabai -m space --focus prev +shift + alt - 1 : yabai -m window --space 1; yabai -m space --focus 1 +shift + alt - 2 : yabai -m window --space 2; yabai -m space --focus 2 +shift + alt - 3 : yabai -m window --space 3; yabai -m space --focus 3 +shift + alt - 4 : yabai -m window --space 4; yabai -m space --focus 4 +shift + alt - 5 : yabai -m window --space 5; yabai -m space --focus 5 +shift + alt - 6 : yabai -m window --space 6; yabai -m space --focus 6 +shift + alt - 7 : yabai -m window --space 7; yabai -m space --focus 7 +shift + alt - 8 : yabai -m window --space 8; yabai -m space --focus 8 +shift + alt - 9 : yabai -m window --space 9; yabai -m space --focus 9 + +# focus monitor +ctrl + alt - x : yabai -m display --focus prev +ctrl + alt - z : yabai -m display --focus next +ctrl + alt - 1 : yabai -m display --focus 1 +ctrl + alt - 2 : yabai -m display --focus 2 +ctrl + alt - 3 : yabai -m display --focus 3 + +# send window to monitor and follow focus +shift + ctrl - z : yabai -m window --display prev; yabai -m display --focus prev +shift + ctrl - x : yabai -m window --display next; yabai -m display --focus next +shift + ctrl - 1 : yabai -m window --display 1; yabai -m display --focus 1 +shift + ctrl - 2 : yabai -m window --display 2; yabai -m display --focus 2 +shift + ctrl - 3 : yabai -m window --display 3; yabai -m display --focus 3 + +# move floating window +shift + ctrl - a : yabai -m window --move rel:-20:0 +shift + ctrl - r : yabai -m window --move rel:0:20 +shift + ctrl - w : yabai -m window --move rel:0:-20 +shift + ctrl - s : yabai -m window --move rel:20:0 + +# increase window size +shift + alt - a : yabai -m window --resize left:-20:0 +shift + alt - w : yabai -m window --resize top:0:-20 +shift + alt - r : yabai -m window --resize bottom:0:20 +shift + alt - s : yabai -m window --resize right:20:0 + +# decrease window size +shift + cmd - r : yabai -m window --resize bottom:0:-20 +shift + cmd - w : yabai -m window --resize top:0:20 +shift + cmd - a : yabai -m window --resize left:20:0 +shift + cmd - s : yabai -m window --resize right:-20:0 + +# set insertion point in focused container +ctrl + alt - n : yabai -m window --insert west +ctrl + alt - u : yabai -m window --insert north +ctrl + alt - i : yabai -m window --insert east +ctrl + alt - e : yabai -m window --insert south + +# toggle window zoom +alt - d : yabai -m window --toggle zoom-parent +alt - f : yabai -m window --toggle zoom-fullscreen + +# toggle window split type +alt - m : yabai -m window --toggle split + +# float / unfloat window and center on screen +alt - t : yabai -m window --toggle float;\ + yabai -m window --grid 4:4:1:1:2:2 + +# toggle sticky(+float), topmost, border and picture-in-picture +alt - p : yabai -m window --toggle sticky;\ + yabai -m window --toggle topmost;\ + yabai -m window --toggle border;\ + yabai -m window --toggle pip diff --git a/macos/yabai/yabairc b/macos/yabai/yabairc new file mode 100755 index 0000000..a509658 --- /dev/null +++ b/macos/yabai/yabairc @@ -0,0 +1,17 @@ +#!/bin/zsh + +yabai -m config mouse_follows_focus off +yabai -m config focus_follows_mouse off + +yabai -m config window_shadow float +yabai -m config window_topmost on + +yabai -m config layout bsp +yabai -m config top_padding 5 +yabai -m config bottom_padding 5 +yabai -m config left_padding 5 +yabai -m config right_padding 5 +yabai -m config window_gap 5 + +yabai -m rule --add app=Emacs manage=on +yabai -m rule --add app="System Preferences" manage=off -- cgit From 37dc8f0fa5ba1779d45dae1abf6d4b44850cfda1 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Mon, 6 Apr 2020 20:43:36 +0100 Subject: Regularise the configuration --- zsh/.zsh/export.zsh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zsh/.zsh/export.zsh b/zsh/.zsh/export.zsh index 671bf5c..4e1de6d 100644 --- a/zsh/.zsh/export.zsh +++ b/zsh/.zsh/export.zsh @@ -2,7 +2,7 @@ os=$(uname -s) . $HOME/.nix-profile/etc/profile.d/nix.sh -[ -n $SSH_CLIENT ] && export MINIMAL_USER_CHAR="$(hostname)" +[ -n "$SSH_CLIENT" ] && export MINIMAL_USER_CHAR="$(hostname)" export GITHUB_HOME=$HOME/Projects export FZF_DEFAULT_COMMAND='fd --type file --hidden --no-ignore' @@ -13,11 +13,11 @@ export TERM='xterm-256color' export CLICOLOR=1 prepend_path() { - test -d "$1" && PATH="$1:$PATH" + [ -d "$1" ] && PATH="$1:$PATH" } append_path() { - test -d "$1" && PATH="$PATH:$1" + [ -d "$1" ] && PATH="$PATH:$1" } if [ $os = "Darwin" ]; then @@ -57,7 +57,7 @@ if [ "$?" -eq 0 ]; then fi # Load rust environment -[ -r $HOME/.cargo/env ] && source $HOME/.cargo/env +[ -r "$HOME/.cargo/env" ] && source $HOME/.cargo/env # Travis [ -r "$HOME/.travis/travis.sh" ] && source "$HOME/.travis/travis.sh" -- cgit From bd29111406622c71d0eb4e2c20a85898c5cef392 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Tue, 5 May 2020 13:16:08 +0100 Subject: Use pass for password instead --- isync/.mbsyncrc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/isync/.mbsyncrc b/isync/.mbsyncrc index be64efd..189fd5e 100644 --- a/isync/.mbsyncrc +++ b/isync/.mbsyncrc @@ -2,17 +2,15 @@ IMAPAccount imperial Host outlook.office365.com Port 993 User ymh15@ic.ac.uk -PassCmd "gpg -q --pinentry-mode loopback --for-your-eyes-only --no-tty --passphrase-file ~/.config/.yann --batch --yes -d ~/.authimperial.gpg" +PassCmd "pass show imperial/ymh15" SSLType IMAPS -CertificateFile /etc/ssl/certs/ca-certificates.crt IMAPAccount mailbox Host imap.mailbox.org Port 993 User ymherklotz@mailbox.org -PassCmd "gpg -q --pinentry-mode loopback --for-your-eyes-only --no-tty --passphrase-file ~/.config/.yann --batch --yes -d ~/.authmail.gpg" +PassCmd "pass show mailbox/ymherklotz@mailbox.org" SSLType IMAPS -CertificateFile /etc/ssl/certs/ca-certificates.crt IMAPStore imperial-remote Account imperial -- cgit From a87136f24c615a1056d7c638842c8ac598f28c0b Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Tue, 5 May 2020 13:16:30 +0100 Subject: Use notmuch and aspell --- doom/init.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doom/init.el b/doom/init.el index 2bd908e..8447c83 100644 --- a/doom/init.el +++ b/doom/init.el @@ -76,7 +76,7 @@ :checkers syntax ; tasing you for every semicolon you forget - (spell +hunspell) ; tasing you for misspelling mispelling + (spell +aspell) ; tasing you for misspelling mispelling ;;grammar ; tasing grammar mistake every you make :tools @@ -163,8 +163,8 @@ ;;web ; the tubes :email - (mu4e +gmail) - ;;notmuch + ;;(mu4e +gmail) + notmuch ;;(wanderlust +gmail) :app -- cgit From 0c21aad1ef73b642cf606b2052bc5c27acf6d033 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Tue, 5 May 2020 13:16:38 +0100 Subject: Use ebib --- doom/packages.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doom/packages.el b/doom/packages.el index 04ddb37..3be7349 100644 --- a/doom/packages.el +++ b/doom/packages.el @@ -62,6 +62,9 @@ ;; Proof general (package! proof-general) +;; Bibtex stuff +(package! ebib) + ;; Misc dependencies (package! hungry-delete) (package! vagrant-tramp) -- cgit From eecef1762cf7d79ecb2df8549e485ed2add79fbe Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Tue, 5 May 2020 13:16:42 +0100 Subject: Configuration for backups and set bib --- doom/config.el | 58 ++++++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 48 insertions(+), 10 deletions(-) diff --git a/doom/config.el b/doom/config.el index 1c1d876..89c42ee 100644 --- a/doom/config.el +++ b/doom/config.el @@ -1,9 +1,5 @@ ;;; $DOOMDIR/config.el -*- lexical-binding: t; -*- -;; Place your private configuration here! Remember, you do not need to run 'doom -;; sync' after modifying this file! - - ;; Some functionality uses this to identify you, e.g. GPG configuration, email ;; clients, file templates and snippets. (setq user-full-name "Yann Herklotz" @@ -49,7 +45,7 @@ (global-set-key (kbd "C-,") #'(lambda () (interactive) (other-window -1))) (global-set-key (kbd "C-c l") #'org-store-link) (global-set-key (kbd "C-c a") #'org-agenda) -(global-set-key (kbd "C-c c") #'org-capture) +(global-set-key (kbd "C-c /") #'avy-goto-word-1) ;; Set undo-only correctly (global-set-key (kbd "C-\\") 'undo-only) @@ -109,10 +105,28 @@ (define-key y-map (kbd "d") 'y/insert-date) ;; Set backup directories into the tmp folder -(setq backup-directory-alist - `((".*" . ,temporary-file-directory))) -(setq auto-save-file-name-transforms - `((".*" ,temporary-file-directory t))) +(defvar --backup-directory (concat user-emacs-directory "backups")) +(if (not (file-exists-p --backup-directory)) + (make-directory --backup-directory t)) +(setq backup-directory-alist `(("." . ,--backup-directory))) +(setq make-backup-files t ; backup of a file the first time it is saved. + backup-by-copying t ; don't clobber symlinks + version-control t ; version numbers for backup files + delete-old-versions t ; delete excess backup files silently + delete-by-moving-to-trash t + kept-old-versions 6 ; oldest versions to keep when a new numbered backup is made (default: 2) + kept-new-versions 9 ; newest versions to keep when a new numbered backup is made (default: 2) + auto-save-default t ; auto-save every buffer that visits a file + auto-save-timeout 20 ; number of seconds idle time before auto-save (default: 30) + auto-save-interval 200 ; number of keystrokes between auto-saves (default: 300) + ) + +;; Set sensitive data mode +(setq auto-mode-alist + (append + (list '("\\.\\(vcf\\|gpg\\)\\'" . sensitive-minor-mode) + '("\\.sv\\'" . verilog-mode)) + auto-mode-alist)) ;; Remove the ring for emacs (setq ring-bell-function 'ignore) @@ -121,6 +135,9 @@ (global-auto-revert-mode 1) (setq auto-revert-verbose nil) +;; Set sentence to end with double space +(setq sentence-end-double-space t) + ;; Remove automatic `auto-fill-mode', and replace it by `visual-line-mode', ;; which is a personal preference. (remove-hook 'text-mode-hook #'auto-fill-mode) @@ -172,6 +189,11 @@ :init (setq org-id-link-to-org-use-id 'create-if-interactive-and-no-custom-id)) +(use-package! org-contacts + :after org + :init + (setq org-contacts-files '("~/Dropbox/org/contacts.org"))) + ;; Disable org indent mode and remove C-, from the org-mode-map. (after! org (define-key org-mode-map (kbd "C-,") nil) @@ -181,10 +203,12 @@ (list "~/Dropbox/org/inbox.org" "~/Dropbox/org/main.org" "~/Dropbox/org/tickler.org" + "~/Dropbox/org/projects.org" (format-time-string "~/Dropbox/org/journals/%Y-%m.org"))) org-refile-targets `(("~/Dropbox/org/main.org" :maxlevel . 2) ("~/Dropbox/org/someday.org" :level . 1) ("~/Dropbox/org/tickler.org" :maxlevel . 2) + ("~/Dropbox/org/projects.org" :level . 1) (,(format-time-string "~/Dropbox/org/journals/%Y-%m.org") :maxlevel . 2)) ;; Set custom agenda commands which can be activated in the agenda viewer. org-agenda-custom-commands @@ -194,7 +218,15 @@ ((org-agenda-overriding-header "Home"))) ("u" "At uni" tags-todo "@uni" ((org-agenda-overriding-header "University")))) - org-log-done 'time)) + org-log-done 'time + org-capture-templates + `(("t" "Todo" entry (file+headline ,(format-time-string "~/Dropbox/org/journals/%Y-%m.org") "Today") + "* TODO %^{Title}\nCreated: %U\n\n%?\n") + ("c" "Contacts" entry (file "~/Dropbox/org/contacts.org") + "* %(org-contacts-template-name) + :PROPERTIES: + :EMAIL: %(org-contacts-template-email) + :END:")))) ;; Set up org ref for PDFs (use-package! org-ref @@ -227,6 +259,12 @@ (set-register ?i (cons 'file "~/Dropbox/org/inbox.org")) (set-register ?c (cons 'file (format-time-string "~/Dropbox/org/journals/%Y-%m.org"))) +;; Bibtex stuff +(use-package! ebib + :bind (("C-c y b" . ebib)) + :init + (setq ebib-preload-bib-files '("~/Dropbox/bibliography/references.bib"))) + ;; Set up dictionaries (setq ispell-dictionary "en_GB") -- cgit From bbeb335a1d255d77c5ab4a5cc71134bfd25fec6c Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Tue, 18 Aug 2020 11:32:52 +0100 Subject: Update doom config --- doom/config.el | 160 +++++++++++++++++++++++++++++++++---------------------- doom/init.el | 11 ++-- doom/packages.el | 8 +-- 3 files changed, 107 insertions(+), 72 deletions(-) diff --git a/doom/config.el b/doom/config.el index 89c42ee..8f66eca 100644 --- a/doom/config.el +++ b/doom/config.el @@ -16,8 +16,8 @@ ;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd ;; font string. You generally only need these two: (setq doom-font (font-spec :family "Iosevka" :size 16) - doom-variable-pitch-font (font-spec :family "Libre Baskerville") - doom-serif-font (font-spec :family "Libre Baskerville")) + doom-variable-pitch-font (font-spec :family "Libre Baskerville" :size 12) + doom-serif-font (font-spec :family "Libre Baskerville" :size 12)) ;; 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 @@ -46,6 +46,7 @@ (global-set-key (kbd "C-c l") #'org-store-link) (global-set-key (kbd "C-c a") #'org-agenda) (global-set-key (kbd "C-c /") #'avy-goto-word-1) +(global-set-key (kbd "M-=") #'count-words) ;; Set undo-only correctly (global-set-key (kbd "C-\\") 'undo-only) @@ -89,6 +90,8 @@ (define-key y-map (kbd "g") 'password-store-generate) (define-key y-map (kbd "r") 'toggle-rot13-mode) +(electric-indent-mode -1) + ;; Mac configuration (when (eq system-type 'darwin) (setq mac-right-option-modifier 'none @@ -107,7 +110,7 @@ ;; Set backup directories into the tmp folder (defvar --backup-directory (concat user-emacs-directory "backups")) (if (not (file-exists-p --backup-directory)) - (make-directory --backup-directory t)) + (make-directory --backup-directory t)) (setq backup-directory-alist `(("." . ,--backup-directory))) (setq make-backup-files t ; backup of a file the first time it is saved. backup-by-copying t ; don't clobber symlinks @@ -140,8 +143,10 @@ ;; Remove automatic `auto-fill-mode', and replace it by `visual-line-mode', ;; which is a personal preference. +(setq-default fill-column 100) (remove-hook 'text-mode-hook #'auto-fill-mode) (add-hook 'text-mode-hook #'+word-wrap-mode) +(add-hook 'text-mode-hook #'visual-fill-column-mode) ;; Set up magit when C-c g is called (use-package! magit @@ -170,6 +175,9 @@ org-return-follows-link t org-confirm-babel-evaluate nil org-use-speed-commands t + org-hide-emphasis-markers t + org-adapt-indentation nil + org-cycle-separator-lines 1 org-structure-template-alist '(("a" . "export ascii") ("c" . "center") ("C" . "comment") @@ -182,12 +190,10 @@ ("v" . "verse") ("el" . "src emacs-lisp") ("d" . "definition") - ("t" . "theorem")))) - -(use-package! org-id - :after org - :init - (setq org-id-link-to-org-use-id 'create-if-interactive-and-no-custom-id)) + ("t" . "theorem"))) + (customize-set-variable 'org-blank-before-new-entry + '((heading . nil) + (plain-list-item . nil)))) (use-package! org-contacts :after org @@ -204,6 +210,7 @@ "~/Dropbox/org/main.org" "~/Dropbox/org/tickler.org" "~/Dropbox/org/projects.org" + "~/Dropbox/org/pldi2020.org" (format-time-string "~/Dropbox/org/journals/%Y-%m.org"))) org-refile-targets `(("~/Dropbox/org/main.org" :maxlevel . 2) ("~/Dropbox/org/someday.org" :level . 1) @@ -223,7 +230,7 @@ `(("t" "Todo" entry (file+headline ,(format-time-string "~/Dropbox/org/journals/%Y-%m.org") "Today") "* TODO %^{Title}\nCreated: %U\n\n%?\n") ("c" "Contacts" entry (file "~/Dropbox/org/contacts.org") - "* %(org-contacts-template-name) + "* %(org-contacts-template-name) :PROPERTIES: :EMAIL: %(org-contacts-template-email) :END:")))) @@ -263,7 +270,13 @@ (use-package! ebib :bind (("C-c y b" . ebib)) :init - (setq ebib-preload-bib-files '("~/Dropbox/bibliography/references.bib"))) + (setq ebib-preload-bib-files '("~/Dropbox/bibliography/references.bib") + ebib-notes-directory "~/Dropbox/bibliography/notes/") + (add-to-list 'ebib-file-search-dirs "~/Dropbox/bibliography/papers") + (add-to-list 'ebib-file-associations '("pdf" . "open")) + (advice-add 'bibtex-generate-autokey :around + #'(lambda (orig-func &rest args) + (replace-regexp-in-string ":" "" (apply orig-func args))))) ;; Set up dictionaries (setq ispell-dictionary "en_GB") @@ -279,60 +292,58 @@ :bind-keymap ("C-c k" . zettelkasten-mode-map)) -;; Publishing projects, this one is for the zettelkasten -(setq org-publish-project-alist - '(("zettelkasten" - :base-directory "~/Dropbox/org/zettelkasten/" - :base-extension "org" - :publishing-directory "~/Dropbox/org/zettelkasten/html/" - :publishing-function org-html-publish-to-html - :headline-levels 4 - :auto-preamble t - :with-toc nil - :section-numbers nil - :html-head " -" - ))) -(add-hook 'org-export-before-processing-hook 'zettelkasten-org-export-preprocessor) - ;; Proof general configuration -(use-package! proof-general +(setq proof-splash-enable nil + proof-auto-action-when-deactivating-scripting 'retract + proof-delete-empty-windows nil + proof-auto-raise-buffers t + coq-compile-before-require t) + +(setq coq-may-use-prettify nil + company-coq-prettify-symbols nil) +(global-prettify-symbols-mode -1) + +(use-package smartparens + :bind (("M-[" . sp-backward-unwrap-sexp) + ("M-]" . sp-unwrap-sexp) + ("C-M-f" . sp-forward-sexp) + ("C-M-b" . sp-backward-sexp) + ("C-M-d" . sp-down-sexp) + ("C-M-a" . sp-backward-down-sexp) + ("C-M-e" . sp-up-sexp) + ("C-M-u" . sp-backward-up-sexp) + ("C-M-t" . sp-transpose-sexp) + ("C-M-n" . sp-next-sexp) + ("C-M-p" . sp-previous-sexp) + ("C-M-k" . sp-kill-sexp) + ("C-M-w" . sp-copy-sexp) + ("C-)" . sp-forward-slurp-sexp) + ("C-}" . sp-forward-barf-sexp) + ("C-(" . sp-backward-slurp-sexp) + ("C-{" . sp-backward-barf-sexp) + ("M-D" . sp-splice-sexp) + ("C-]" . sp-select-next-thing-exchange) + ("C-" . sp-select-previous-thing) + ("C-M-]" . sp-select-next-thing) + ("M-F" . sp-forward-symbol) + ("M-B" . sp-backward-symbol) + ("M-r" . sp-split-sexp)) :config - (setq coq-compile-before-require t - proof-splash-enable nil - proof-auto-action-when-deactivating-scripting 'retract - proof-delete-empty-windows nil - proof-auto-raise-buffers t)) - - (use-package smartparens - :bind (("M-[" . sp-backward-unwrap-sexp) - ("M-]" . sp-unwrap-sexp) - ("C-M-f" . sp-forward-sexp) - ("C-M-b" . sp-backward-sexp) - ("C-M-d" . sp-down-sexp) - ("C-M-a" . sp-backward-down-sexp) - ("C-M-e" . sp-up-sexp) - ("C-M-u" . sp-backward-up-sexp) - ("C-M-t" . sp-transpose-sexp) - ("C-M-n" . sp-next-sexp) - ("C-M-p" . sp-previous-sexp) - ("C-M-k" . sp-kill-sexp) - ("C-M-w" . sp-copy-sexp) - ("C-)" . sp-forward-slurp-sexp) - ("C-}" . sp-forward-barf-sexp) - ("C-(" . sp-backward-slurp-sexp) - ("C-{" . sp-backward-barf-sexp) - ("M-D" . sp-splice-sexp) - ("C-]" . sp-select-next-thing-exchange) - ("C-" . sp-select-previous-thing) - ("C-M-]" . sp-select-next-thing) - ("M-F" . sp-forward-symbol) - ("M-B" . sp-backward-symbol) - ("M-r" . sp-split-sexp)) - :config - (require 'smartparens-config) - (show-smartparens-global-mode +1) - (smartparens-global-mode 1)) + (require 'smartparens-config) + (show-smartparens-global-mode +1) + (smartparens-global-mode 1)) + +(use-package! ormolu + :hook (haskell-mode . ormolu-format-on-save-mode) + :bind + (:map haskell-mode-map + ("C-c r" . ormolu-format-buffer))) + +(after! writeroom-mode (setq +zen-text-scale 1)) + +(setq pdf-view-use-scaling t) + +(setq doc-view-resolution 300) ;; Here are some additional functions/macros that could help you configure Doom: ;; @@ -350,3 +361,26 @@ ;; ;; You can also try 'gd' (or 'C-c g d') to jump to their definition and see how ;; they are implemented. +(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. + '(org-blank-before-new-entry (quote ((heading) (plain-list-item)))) + '(package-selected-packages (quote (org-plus-contrib))) + '(safe-local-variable-values + (quote + ((eval add-to-list + (quote auto-mode-alist) + (quote + ("\\.v\\'" . verilog-mode))) + (eval setq org-ref-pdf-directory + (concat + (projectile-project-root) + "papers/")))))) +(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. + ) diff --git a/doom/init.el b/doom/init.el index 8447c83..682520c 100644 --- a/doom/init.el +++ b/doom/init.el @@ -32,7 +32,7 @@ ;;fill-column ; a `fill-column' indicator hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW hydra - ;;indent-guides ; highlighted indent columns + ;;indent-guides ; highlighted in dent columns modeline ; snazzy, Atom-inspired modeline, plus API ;;nav-flash ; blink the current line after jumping ;;neotree ; a project drawer, like NERDTree for vim @@ -69,7 +69,7 @@ vc ; version-control and Emacs, sitting in a tree :term - ;;eshell ; a consistent, cross-platform shell (WIP) + eshell ; a consistent, cross-platform shell (WIP) ;;shell ; a terminal REPL for Emacs ;;term ; terminals in Emacs ;;vterm ; another terminals in Emacs @@ -107,7 +107,7 @@ cc ; C/C++/Obj-C madness clojure ; java with a lisp ;;common-lisp ; if you've seen one lisp, you've seen them all - ;;coq ; proofs-as-programs + coq ; proofs-as-programs ;;crystal ; ruby at the speed of c ;;csharp ; unity, .NET, and mono shenanigans data ; config/data formats @@ -137,12 +137,13 @@ nix ; I hereby declare "nix geht mehr!" ocaml ; an objective camel (org ; organize your plain life in plain text - +dragndrop ; drag & drop files/images into org buffers + ;;+dragndrop ; drag & drop files/images into org buffers ;;+hugo ; use Emacs for hugo blogging ;;+jupyter ; ipython/jupyter support for babel ;;+pandoc ; export-with-pandoc support ;;+pomodoro ; be fruitful with the tomato technique - +present) ; using org-mode for presentations + ;;+present ; using org-mode for presentations + ) ;;perl ; write code no one else can comprehend ;;php ; perl's insecure younger brother ;;plantuml ; diagrams for confusing people more diff --git a/doom/packages.el b/doom/packages.el index 3be7349..26532fb 100644 --- a/doom/packages.el +++ b/doom/packages.el @@ -51,7 +51,7 @@ ;(package! builtin-package :recipe (:branch "develop")) ;; Disabling packages -(disable-packages! undo-tree org-bullets helm) +(disable-packages! undo-tree org-bullets helm pretty-code company-coq) ;; `org-mode' dependencies (package! org-ref) @@ -59,12 +59,12 @@ ;; `org-bullets' replacement (package! org-superstar) -;; Proof general -(package! proof-general) - ;; Bibtex stuff (package! ebib) +;; Haskell stuff +(package! ormolu) + ;; Misc dependencies (package! hungry-delete) (package! vagrant-tramp) -- cgit From 39c0a34f3c967545aaea1510f594fb92bf8e0166 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Tue, 18 Aug 2020 11:33:00 +0100 Subject: Update python and add 'exa' --- zsh/.zsh/export.zsh | 2 +- zsh/.zsh/function.zsh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/zsh/.zsh/export.zsh b/zsh/.zsh/export.zsh index 4e1de6d..9f898a4 100644 --- a/zsh/.zsh/export.zsh +++ b/zsh/.zsh/export.zsh @@ -24,7 +24,7 @@ if [ $os = "Darwin" ]; then prepend_path "/Library/TeX/texbin" prepend_path "/usr/local/opt/bison/bin" - append_path "${HOME}/Library/Python/3.7/bin" + append_path "${HOME}/Library/Python/3.8/bin" fi prepend_path "/usr/local/bin" diff --git a/zsh/.zsh/function.zsh b/zsh/.zsh/function.zsh index be9dd79..809471e 100644 --- a/zsh/.zsh/function.zsh +++ b/zsh/.zsh/function.zsh @@ -1,5 +1,6 @@ alias emc='emacsclient -c -a ""' alias em='emacsclient -nw -a ""' +alias ls='exa' alias ff='firefox' alias vim=nvim # alias lspasscp='lpass show -c --password $(lpass ls | fzf | awk '{print $(NF)}' | sed 's/\\]//g')' -- cgit From 2c6a2e578286509eed8c76487e43dbb9a7bf83ea Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Tue, 18 Aug 2020 11:33:12 +0100 Subject: Use alacritty as terminal --- macos/skhd/skhdrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macos/skhd/skhdrc b/macos/skhd/skhdrc index a634da0..6a0d5c9 100644 --- a/macos/skhd/skhdrc +++ b/macos/skhd/skhdrc @@ -71,7 +71,7 @@ # an EOL character signifies the end of the bind. # Open a new terminal -cmd - return : open /System/Applications/Utilities/Terminal.app +cmd - return : /Applications/Alacritty.app/Contents/MacOS/alacritty # focus window alt - u : yabai -m window --focus north -- cgit