diff options
-rw-r--r-- | X/.xinitrc | 5 | ||||
-rwxr-xr-x | bspwm/bspwmrc | 5 | ||||
-rw-r--r-- | doom/config.el | 277 | ||||
-rw-r--r-- | doom/init.el | 178 | ||||
-rw-r--r-- | doom/packages.el | 60 | ||||
-rw-r--r-- | emacs/loader.org | 55 | ||||
-rw-r--r-- | polybar/config | 79 | ||||
-rwxr-xr-x | polybar/launch.sh | 1 | ||||
-rw-r--r-- | rofi/config | 3 | ||||
-rw-r--r-- | sxhkd/sxhkdrc | 16 | ||||
-rw-r--r-- | tmux/.tmux.conf | 2 | ||||
-rw-r--r-- | zsh/.zsh/export.zsh | 17 | ||||
-rw-r--r-- | zsh/.zsh/function.zsh | 4 | ||||
-rw-r--r-- | zsh/.zsh/startup.zsh | 5 | ||||
-rw-r--r-- | zsh/.zshrc | 14 |
15 files changed, 668 insertions, 53 deletions
@@ -33,14 +33,15 @@ if [ -d /etc/X11/xinit/xinitrc.d ] ; then fi # Startup programs +eval $(ssh-agent) dropbox & -sxhkd -m 1 & +sxhkd & compton & redshift & dunst & wal -R +xrandr --output DP-1 --auto --output DP-2 --left-of DP-1 --auto --output DVI-1-0 --rotate left --right-of DP-1 --auto feh --bg-fill "$(< "${HOME}/.cache/wal/wal")" -xinput set-prop 'DLL075B:01 06CB:76AF Touchpad' 'libinput Natural Scrolling Enabled' 1 xsetroot -cursor_name left_ptr #exec i3 diff --git a/bspwm/bspwmrc b/bspwm/bspwmrc index bf0d897..b6a2ca7 100755 --- a/bspwm/bspwmrc +++ b/bspwm/bspwmrc @@ -1,7 +1,8 @@ #!/bin/sh -bspc monitor eDP-1 -d term web code music 5 6 -bspc monitor DP-1 -d 7 8 9 0 +bspc monitor DP-1 -d term web code music +bspc monitor DP-2 -d 5 6 7 8 +bspc monitor DVI-1-0 -d 9 0 bspc config border_width 0 bspc config window_gap 5 diff --git a/doom/config.el b/doom/config.el new file mode 100644 index 0000000..c572a88 --- /dev/null +++ b/doom/config.el @@ -0,0 +1,277 @@ +;;; $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" + user-mail-address "yann@yannherklotz.com") + +;; Doom exposes five (optional) variables for controlling fonts in Doom. Here +;; are the three important ones: +;; +;; + `doom-font' +;; + `doom-variable-pitch-font' +;; + `doom-big-font' -- used for `doom-big-font-mode'; use this for +;; presentations or streaming. +;; +;; 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")) + +;; 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) + +;; If you use `org' and don't want your org files in the default location below, +;; change `org-directory'. It must be set before org loads! +(setq org-directory "~/Dropbox/org/") + +;; This determines the style of line numbers in effect. If set to `nil', line +;; numbers are disabled. For relative line numbers, set this to `relative'. +(setq display-line-numbers-type nil) + +;; Add some keybinding customisations. + +;; Stop emacs from freezing when trying to minimize it on a tiling WM. +(global-unset-key (kbd "C-z")) +(global-set-key (kbd "M-u") #'upcase-dwim) +(global-set-key (kbd "M-l") #'downcase-dwim) +(global-set-key (kbd "M-c") #'capitalize-dwim) +(global-set-key (kbd "C-c z") #'quick-calc) +(global-set-key (kbd "<f5>") #'revert-buffer) +(global-set-key (kbd "C-.") #'other-window) +(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) + +;; Set undo-only correctly +(global-set-key (kbd "C-\\") 'undo-only) + +;; Revert C-a and C-e to go to the beginning and end of line, not a fan of the +;; default smart functions. +(global-set-key (kbd "C-a") #'beginning-of-line) +(global-set-key (kbd "C-e") #'end-of-line) + +;; Define functions to push and pop from mark. +(defun push-mark-no-activate () + "Pushes `point' to `mark-ring' and does not activate the region + Equivalent to \\[set-mark-command] when \\[transient-mark-mode] is disabled" + (interactive) + (push-mark (point) t nil) + (message "Pushed mark to ring")) + +(defun jump-to-mark () + "Jumps to the local mark, respecting the `mark-ring' order. + This is the same as using \\[set-mark-command] with the prefix argument." + (interactive) + (set-mark-command 1)) + +(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" + (interactive) + (ace-swap-window) + (aw-flip-window)) + +;; Define a custom key map for other useful commands. +(define-prefix-command 'y-map) +(global-set-key (kbd "C-c y") 'y-map) + +(define-key y-map (kbd "s") 'y/swap-windows) +(define-key y-map (kbd "p") 'password-store-copy) +(define-key y-map (kbd "i") 'password-store-insert) +(define-key y-map (kbd "g") 'password-store-generate) +(define-key y-map (kbd "r") 'toggle-rot13-mode) + +(defun y/insert-date () + "Insert a timestamp according to locale's date and time format." + (interactive) + (insert (format-time-string "%c" (current-time)))) + +(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))) + +;; Remove the ring for emacs +(setq ring-bell-function 'ignore) + +;; Automatically refresh files +(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))) + +;; Configure activation for whitespace mode +(use-package! whitespace + :bind (("C-x w" . whitespace-mode))) + +;; Configure expand-region mode. +(use-package! expand-region + :bind ("M-o" . er/expand-region)) + +;; Delete all whitespace until the first non-whitespace character. +(use-package! hungry-delete + :config (global-hungry-delete-mode)) + +;; Org configuration +(use-package org + :mode ("\\.org\\'" . org-mode) + :init + (map! :map org-mode-map + "M-n" #'outline-next-visible-heading + "M-p" #'outline-previous-visible-heading) + (setq org-src-window-setup 'current-window + org-return-follows-link t + org-confirm-babel-evaluate nil + org-use-speed-commands t + org-structure-template-alist '(("a" . "export ascii") + ("c" . "center") + ("C" . "comment") + ("e" . "example") + ("E" . "export") + ("h" . "export html") + ("l" . "export latex") + ("q" . "quote") + ("s" . "src") + ("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)) + +;; 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)) + 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 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")) +(set-register ?i (cons 'file "~/Dropbox/org/inbox.org")) +(set-register ?c (cons 'file (format-time-string "~/Dropbox/org/journals/%Y-%m.org"))) + +;; Set up dictionaries +(setq ispell-dictionary "en_GB") + +(use-package! flyspell + :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)) + +;; 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 "<link rel=\"stylesheet\" href=\"css/fonts.css\" /> +<link rel=\"stylesheet\" href=\"css/default.css\" />" + ))) + (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)) + +;; Here are some additional functions/macros that could help you configure Doom: +;; +;; - `load!' for loading external *.el files relative to this one +;; - `use-package' for configuring packages +;; - `after!' for running code after a package has loaded +;; - `add-load-path!' for adding directories to the `load-path', relative to +;; this file. Emacs searches the `load-path' when you load packages with +;; `require' or `use-package'. +;; - `map!' for binding new keys +;; +;; To get information about any of these functions/macros, move the cursor over +;; the highlighted symbol at press 'K' (non-evil users must press 'C-c g k'). +;; This will open documentation for it, including demos of how they are used. +;; +;; You can also try 'gd' (or 'C-c g d') to jump to their definition and see how +;; they are implemented. diff --git a/doom/init.el b/doom/init.el new file mode 100644 index 0000000..a6f2c65 --- /dev/null +++ b/doom/init.el @@ -0,0 +1,178 @@ +;;; init.el -*- lexical-binding: t; -*- + +;; This file controls what Doom modules are enabled and what order they load in. +;; Remember to run 'doom sync' after modifying it! + +;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's +;; documentation. There you'll find information about all of Doom's modules +;; and what flags they support. + +;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or +;; 'C-c g k' for non-vim users) to view its documentation. This works on +;; flags as well (those symbols that start with a plus). +;; +;; Alternatively, press 'gd' (or 'C-c g d') on a module to browse its +;; directory (for easy access to its source code). + +(doom! :input + ;;chinese + ;;japanese + + :completion + company ; the ultimate code completion backend + ;;helm ; the *other* search engine for love and life + ;;ido ; the other *other* search engine... + ivy ; a search engine for love and life + + :ui + ;;deft ; notational velocity for Emacs + doom ; what makes DOOM look the way it does + ;;doom-dashboard ; a nifty splash screen for Emacs + ;;doom-quit ; DOOM quit-message prompts when you quit Emacs + ;;fill-column ; a `fill-column' indicator + hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW + hydra + ;;indent-guides ; highlighted indent columns + 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 + (popup +defaults) ; tame sudden yet inevitable temporary windows + ;;pretty-code ; replace bits of code with pretty symbols + ;;tabs ; an tab bar for Emacs + ;;treemacs ; a project drawer, like neotree but cooler + ;;unicode ; extended unicode support for various languages + ;;vc-gutter ; vcs diff in the fringe + ;;vi-tilde-fringe ; fringe tildes to mark beyond EOB + ;;window-select ; visually switch windows + ;;workspaces ; tab emulation, persistence & separate workspaces + zen ; distraction-free coding or writing + + :editor + ;;(evil +everywhere); come to the dark side, we have cookies + file-templates ; auto-snippets for empty files + fold ; (nigh) universal code folding + ;;(format +onsave) ; automated prettiness + ;;god ; run Emacs commands without modifier keys + ;;lispy ; vim for lisp, for people who don't like vim + ;;multiple-cursors ; editing in many places at once + ;;objed ; text object editing for the innocent + ;;parinfer ; turn lisp into python, sort of + ;;rotate-text ; cycle region at point between text candidates + snippets ; my elves. They type so I don't have to + word-wrap ; soft wrapping with language-aware indent + + :emacs + dired ; making dired pretty [functional] + electric ; smarter, keyword-based electric-indent + ;;ibuffer ; interactive buffer management + vc ; version-control and Emacs, sitting in a tree + + :term + ;;eshell ; a consistent, cross-platform shell (WIP) + ;;shell ; a terminal REPL for Emacs + ;;term ; terminals in Emacs + ;;vterm ; another terminals in Emacs + + :checkers + syntax ; tasing you for every semicolon you forget + (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 + ;;ein ; tame Jupyter notebooks with emacs + (eval +overlay) ; run code, run (also, repls) + ;;gist ; interacting with github gists + lookup ; navigate your code and its documentation + ;;lsp + macos ; MacOS-specific commands + magit ; a git porcelain for Emacs + ;;make ; run make tasks from Emacs + pass ; password manager for nerds + pdf ; pdf enhancements + ;;prodigy ; FIXME managing external services & code builders + ;;rgb ; creating color strings + ;;terraform ; infrastructure as code + ;;tmux ; an API for interacting with tmux + ;;upload ; map local to remote projects via ssh/ftp + + :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 + ;;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 + ;;elixir ; erlang done right + ;;elm ; care for a cup of TEA? + emacs-lisp ; drown in parentheses + ;;erlang ; an elegant language for a more civilized age + ;;ess ; emacs speaks statistics + ;;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 + ;;hy ; readability of scheme w/ speed of python + ;;idris ; + ;;(java +meghanada) ; the poster child for carpal tunnel syndrome + ;;javascript ; all(hope(abandon(ye(who(enter(here)))))) + ;;julia ; a better, faster MATLAB + ;;kotlin ; a better, slicker Java(Script) + latex ; writing papers in Emacs has never been so fun + ;;lean + ;;factor + ;;ledger ; an accounting system in Emacs + ;;lua ; one-based indices? one-based indices + markdown ; writing docs for people to ignore + ;;nim ; python + lisp at the speed of c + nix ; I hereby declare "nix geht mehr!" + ocaml ; an objective camel + (org ; organize your plain life in plain text + +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 + ;;perl ; write code no one else can comprehend + ;;php ; perl's insecure younger brother + ;;plantuml ; diagrams for confusing people more + ;;purescript ; javascript, but functional + python ; beautiful is better than ugly + ;;qt ; the 'cutest' gui framework ever + ;;racket ; a DSL for DSLs + ;;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() + ;;scala ; java, but good + ;;scheme ; a fully conniving family of lisps + sh ; she sells {ba,z,fi}sh shells on the C xor + ;;solidity ; do you need a blockchain? No. + ;;swift ; who asked for emoji variables? + ;;terra ; Earth and Moon in alignment for performance. + ;;web ; the tubes + + :email + (mu4e +gmail) + ;;notmuch + ;;(wanderlust +gmail) + + :app + ;;calendar + ;;irc ; how neckbeards socialize + ;;(rss +org) ; emacs as an RSS reader + ;;twitter ; twitter client https://twitter.com/vnought + + :config + ;;literate + (default +bindings +smartparens)) diff --git a/doom/packages.el b/doom/packages.el new file mode 100644 index 0000000..ce95615 --- /dev/null +++ b/doom/packages.el @@ -0,0 +1,60 @@ +;; -*- no-byte-compile: t; -*- +;;; $DOOMDIR/packages.el + +;; To install a package with Doom you must declare them here, run 'doom sync' on +;; the command line, then restart Emacs for the changes to take effect. +;; Alternatively, use M-x doom/reload. +;; +;; WARNING: Disabling core packages listed in ~/.emacs.d/core/packages.el may +;; have nasty side-effects and is not recommended. + + +;; All of Doom's packages are pinned to a specific commit, and updated from +;; release to release. To un-pin all packages and live on the edge, do: +;(unpin! t) + +;; ...but to unpin a single package: +;(unpin! pinned-package) +;; Use it to unpin multiple packages +;(unpin! pinned-package another-pinned-package) + + +;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror: +;(package! some-package) + +;; To install a package directly from a particular repo, you'll need to specify +;; a `:recipe'. You'll find documentation on what `:recipe' accepts here: +;; https://github.com/raxod502/straight.el#the-recipe-format +;(package! another-package +; :recipe (:host github :repo "username/repo")) + +;; If the package you are trying to install does not contain a PACKAGENAME.el +;; file, or is located in a subdirectory of the repo, you'll need to specify +;; `:files' in the `:recipe': +;(package! this-package +; :recipe (:host github :repo "username/repo" +; :files ("some-file.el" "src/lisp/*.el"))) + +;; If you'd like to disable a package included with Doom, for whatever reason, +;; you can do so here with the `:disable' property: +;(package! builtin-package :disable t) + +;; You can override the recipe of a built in package without having to specify +;; all the properties for `:recipe'. These will inherit the rest of its recipe +;; from Doom or MELPA/ELPA/Emacsmirror: +;(package! builtin-package :recipe (:nonrecursive t)) +;(package! builtin-package-2 :recipe (:repo "myfork/package")) + +;; Specify a `:branch' to install a package from a particular branch or tag. +;; This is required for some packages whose default branch isn't 'master' (which +;; our package manager can't deal with; see 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 + :recipe (:host github :repo "ymherklotz/emacs-zettelkasten") :pin "a5bd657820") diff --git a/emacs/loader.org b/emacs/loader.org index b66488b..b885599 100644 --- a/emacs/loader.org +++ b/emacs/loader.org @@ -121,11 +121,14 @@ 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/") + (add-to-list 'load-path "~/.emacs.d/modes/") + (setq ring-bell-function 'ignore) (when (eq system-type 'darwin) (setq dired-use-ls-dired nil)) #+END_SRC #+BEGIN_SRC emacs-lisp + (global-unset-key (kbd "C-z")) (when (eq system-type 'darwin) (setq mac-right-option-modifier 'none mac-option-key-is-meta nil @@ -457,8 +460,8 @@ Define utility functions to make the reader work. ** Zettelkasten #+begin_src emacs-lisp - (when (file-directory-p "~/Projects/emacs-zettelkasten") - (add-to-list 'load-path "~/Projects/emacs-zettelkasten") + (when (file-directory-p "~/projects/emacs-zettelkasten") + (add-to-list 'load-path "~/projects/emacs-zettelkasten") (require 'zettelkasten) (zettelkasten-mode t)) #+end_src @@ -625,8 +628,7 @@ incrementally selecting more and more of the text. #+BEGIN_SRC emacs-lisp (use-package direnv - :config - (direnv-mode)) + :config (direnv-mode)) #+END_SRC * Writing @@ -664,7 +666,7 @@ incrementally selecting more and more of the text. (setq TeX-engine 'luatex) (setq TeX-auto-save t) (setq TeX-parse-self t) - ; (setq TeX-command-extra-options "-shell-escape") + (setq-default TeX-command-extra-options "-shell-escape") (setq TeX-save-query nil) (setq-default TeX-master nil) (setq TeX-PDF-mode t) @@ -771,7 +773,7 @@ Add org noter (use-package org-noter :after org :config (setq org-noter-default-notes-file-names '("notes.org") - org-noter-notes-search-path '("~/org/research") + org-noter-notes-search-path '("~/org/bibliography") org-noter-separate-notes-from-heading t)) (use-package org-ref @@ -783,16 +785,24 @@ Add org noter :config (setq org-ref-bibliography-notes "~/Dropbox/bibliography/notes.org" org-ref-default-bibliography '("~/Dropbox/bibliography/references.bib") - org-ref-pdf-directory "~/Dropbox/bibliography/bibtex-pdfs/") - (setq org-latex-pdf-process (list "latexmk -shell-escape -bibtex -f -pdf %f")) + org-ref-pdf-directory "~/Dropbox/bibliography/papers/") (setq org-ref-completion-library 'org-ref-ivy-cite)) #+END_SRC +*** Org ID + +#+begin_src emacs-lisp + (use-package org-id + :ensure nil + :after org) +#+end_src + *** Templates #+BEGIN_SRC emacs-lisp (setq org-capture-templates '(("t" "todo" entry (file+headline "~/Dropbox/org/inbox.org" "Tasks") - "* TODO %?\n\n%i\n%a\n\n"))) + "* TODO %?\n\n%i\n%a\n\n") + ())) #+END_SRC *** Agenda @@ -843,7 +853,8 @@ Add org noter #+BEGIN_SRC emacs-lisp (use-package ox-twbs) - #+EN +#+END_SRC + ** PDF Tools #+BEGIN_SRC emacs-lisp @@ -1005,7 +1016,8 @@ Adding hook to clojure mode to enable strict parentheses mode. #+begin_src emacs-lisp (use-package proof-general :config - (setq coq-compile-before-require t)) + (setq coq-compile-before-require t) + (setq proof-splash-enable nil)) #+end_src *** Elm @@ -1065,7 +1077,6 @@ Haskell mode with company mode completion. (set (make-local-variable 'projectile-tags-command) "hasktags -Re -f \"%s\" %s \"%s\""))) (setq ;;haskell-mode-stylish-haskell-path "brittany" - haskell-stylish-on-save t flycheck-ghc-language-extensions '("OverloadedStrings")) (setq haskell-indentation-layout-offset 4 @@ -1082,8 +1093,17 @@ Haskell mode with company mode completion. *** LLVM IR -#+begin_src text - (require 'llvm-mode) +#+begin_src emacs-lisp + (when (file-exists-p "~/.emacs.d/modes/llvm-mode.el") + (require 'llvm-mode)) +#+end_src + +*** HOL + +#+begin_src emacs-lisp + (when (file-exists-p "/opt/hol/tools/hol-mode.el") + (setq hol-executable "/opt/hol/bin/hol") + (load "/opt/hol/tools/hol-mode.el")) #+end_src *** Python @@ -1137,6 +1157,13 @@ JSON files should be opened in js-mode. (setq sh-indentation 2) #+END_SRC +*** SMTLIBv2 + +#+begin_src emacs-lisp + (require 'smtlib-mode) + (add-to-list 'auto-mode-alist '("\\.smt\\'" . smtlib-mode)) +#+end_src + *** Verilog #+begin_src emacs-lisp diff --git a/polybar/config b/polybar/config index fbf09e0..c0913bd 100644 --- a/polybar/config +++ b/polybar/config @@ -17,7 +17,7 @@ secondary = ${xrdb:color5:#e60053} alert = ${xrdb:color1:#bd2c40} [bar/main] -monitor = ${env:MONITOR:eDP-1} +monitor = DP-1 width = 100% height = 27 ;offset-x = 1% @@ -40,10 +40,11 @@ padding-right = 1 module-margin-left = 1 module-margin-right = 2 -font-0 = scientifica:style=Regular:pixelsize=12 -font-1 = Unifont:fontformat=truetype:size=8:antialias=false;0 -font-2 = FontAwesome:style=Regular -font-4 = Wuncon Siji:style=Regular:pixelsize=10;1 +font-0 = Iosevka:style=Regular:pixelsize=10 +font-1 = Font Awesome 5 Free:style=Solid:pixelsize=9 +font-2 = Font Awesome 5 Brands:style=Regular +font-3 = Siji:style=Regular:pixelsize=10 +font-4 = Unifont:fontformat=truetype:size=8:antialias=false modules-left = bspwm modules-center = date @@ -68,8 +69,60 @@ scroll-down = bspwm-deskprev cursor-click = pointer cursor-scroll = ns-resize +[bar/third] +monitor = DVI-1-0 +width = 100% +height = 27 +;offset-x = 1% +;offset-y = 1% +radius = 0 +fixed-center = true + +background = ${colors.background} +foreground = ${colors.foreground} + +line-size = 3 +line-color = ${colors.primary} + +border-size = 0 +border-color = #00000000 + +padding-left = 1 +padding-right = 1 + +module-margin-left = 1 +module-margin-right = 2 + +font-0 = Iosevka:style=Regular:pixelsize=10 +font-1 = Font Awesome 5 Free:style=Solid:pixelsize=9 +font-2 = Font Awesome 5 Brands:style=Regular +font-3 = Siji:style=Regular:pixelsize=10 +font-4 = Unifont:fontformat=truetype:size=8:antialias=false + +modules-left = bspwm +modules-center = date + +tray-position = right +tray-padding = 2 +;tray-transparent = true +;tray-background = #0063ff + +wm-restack = bspwm +;wm-restack = i3 + +;override-redirect = true + +scroll-up = bspwm-desknext +scroll-down = bspwm-deskprev + +;scroll-up = i3wm-wsnext +;scroll-down = i3wm-wsprev + +cursor-click = pointer +cursor-scroll = ns-resize + [bar/second] -monitor = DP-1 +monitor = DP-2 width = 100% height = 27 ;offset-x = 1% @@ -92,12 +145,14 @@ padding-right = 1 module-margin-left = 1 module-margin-right = 2 -font-0 = scientifica:style=Regular:pixelsize=12 -font-1 = Unifont:fontformat=truetype:size=8:antialias=false;0 -font-2 = FontAwesome:style=Regular -font-4 = Wuncon Siji:style=Regular:pixelsize=10;1 +font-0 = Iosevka:style=Regular:pixelsize=10 +font-1 = Font Awesome 5 Free:style=Solid:pixelsize=9 +font-2 = Font Awesome 5 Brands:style=Regular +font-3 = Siji:style=Regular:pixelsize=10 +font-4 = Unifont:fontformat=truetype:size=8:antialias=false modules-left = bspwm +modules-center = date tray-position = right tray-padding = 2 @@ -288,7 +343,7 @@ ramp-signal-foreground = ${colors.foreground} [module/eth] type = internal/network -interface = net0 +interface = eno1 interval = 3.0 format-connected-underline = ${colors.primary} @@ -319,7 +374,7 @@ format-underline = ${colors.primary} label = %date% %time% [module/volume] -type = internal/volume +type = internal/alsa format-volume = <label-volume> <bar-volume> label-volume = VOL diff --git a/polybar/launch.sh b/polybar/launch.sh index ad30310..1ab828a 100755 --- a/polybar/launch.sh +++ b/polybar/launch.sh @@ -8,5 +8,6 @@ while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done polybar main & polybar second & +polybar third & echo "Bars launched..." diff --git a/rofi/config b/rofi/config index f69402f..59512f6 100644 --- a/rofi/config +++ b/rofi/config @@ -1,4 +1,5 @@ rofi.combi-modi: window,drun rofi.font: hack 10 rofi.modi: combi -rofi.theme: .cache/wal/colors-rofi-dark.rasi +rofi.theme: sidebar +rofi.monitor: -4 diff --git a/sxhkd/sxhkdrc b/sxhkd/sxhkdrc index 3e162bc..11e6853 100644 --- a/sxhkd/sxhkdrc +++ b/sxhkd/sxhkdrc @@ -92,7 +92,7 @@ super + alt + {_,shift + }{1-9,0} # # preselect the direction -super + ctrl + {h,j,k,l} +super + ctrl + {n,e,u,i} bspc node -p {west,south,north,east} # preselect the ratio @@ -127,17 +127,17 @@ super + {Left,Down,Up,Right} # Media # -XF86Audio{Play,Stop,Next,Prev} - playerctl {play-pause,stop,next,previous} +super + alt + shift + ctrl + {a,r,s,t} + playerctl {play-pause,stop,previous,next} -XF86MonBrightness{Up,Down} +super + alt + shift + ctrl + {w,q} light -{A,U} 5 -XF86Audio{Raise,Lower}Volume - amixer set Master 5%{+,-} +super + alt + shift + ctrl + {p,f,g} + amixer set Master {5%+,5%-,toggle-mute} -XF86AudioMute - amixer set Master toggle-mute +super + alt + shift + ctrl + z + emacsclient -c -a emacs # # Power diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index b2f198b..4205194 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -41,4 +41,4 @@ set -g visual-silence off set -g word-separators " -_@" set -g mouse on set -g set-clipboard external -bind -T root MouseUp2Pane paste
\ No newline at end of file +bind -T root MouseUp2Pane paste diff --git a/zsh/.zsh/export.zsh b/zsh/.zsh/export.zsh index c488153..c7e34f8 100644 --- a/zsh/.zsh/export.zsh +++ b/zsh/.zsh/export.zsh @@ -15,6 +15,7 @@ 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" @@ -22,4 +23,18 @@ export PATH="${PATH}:/Users/yannherklotz/Library/Python/3.7/bin" # Stop dotnet telemetry export DOTNET_CLI_TELEMETRY_OPTOUT=1 -eval "$(direnv hook zsh)" +# 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" + +# Direnv hook setup +command -v direnv >/dev/null 2>&1 +if [[ "$?" -eq 0 ]]; then eval "$(direnv hook zsh)"; fi + +# Opam hook setup and initialising it +command -v opam >/dev/null 2>&1 +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 diff --git a/zsh/.zsh/function.zsh b/zsh/.zsh/function.zsh index 06a8e43..20dc12d 100644 --- a/zsh/.zsh/function.zsh +++ b/zsh/.zsh/function.zsh @@ -18,11 +18,11 @@ fdd() { wal-tile() { wal -n -i "$@" feh --bg-fill "$(< "${HOME}/.cache/wal/wal")" - /home/yannherklotz/.local/bin/betterlock -u "$(< "${HOME}/.cache/wal/wal")" + $HOME/.local/bin/betterlock -u "$(< "${HOME}/.cache/wal/wal")" } wal-tile-l() { wal -l -n -i "$@" feh --bg-fill "$(< "${HOME}/.cache/wal/wal")" - /home/yannherklotz/.local/bin/betterlock -u "$(< "${HOME}/.cache/wal/wal")" + $HOME/.local/bin/betterlock -u "$(< "${HOME}/.cache/wal/wal")" } diff --git a/zsh/.zsh/startup.zsh b/zsh/.zsh/startup.zsh index e69de29..67716ac 100644 --- a/zsh/.zsh/startup.zsh +++ b/zsh/.zsh/startup.zsh @@ -0,0 +1,5 @@ +# 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 +# End Nix @@ -1,3 +1,5 @@ +[[ $TERM == "dumb" ]] && unsetopt zle && PS1=$ && return + # Lines configured by zsh-newuser-install HISTFILE=~/.histfile HISTSIZE=100000 @@ -23,9 +25,7 @@ setopt HIST_IGNORE_DUPS setopt HIST_IGNORE_SPACE setopt HIST_FIND_NO_DUPS -if [ -d ~/.cache/wal ]; then - (cat ~/.cache/wal/sequences &) -fi +if [ -d ~/.cache/wal ]; then (cat ~/.cache/wal/sequences &) fi # Sourcing everything if [ -e /usr/share/fzf/key-bindings.zsh ]; then source /usr/share/fzf/key-bindings.zsh; fi @@ -39,10 +39,4 @@ if [ -e $HOME/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh ]; then source $H bindkey '^[[A' history-substring-search-up bindkey '^[[B' history-substring-search-down bindkey -M emacs '^P' history-substring-search-up -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 +bindkey -M emacs ^N history-substring-search-down |