Move rofi and emacs to home config
This commit is contained in:
35
modules/home/emacs/default.nix
Normal file
35
modules/home/emacs/default.nix
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
|
||||
# as well as the libraries available from your flake's inputs.
|
||||
lib,
|
||||
# An instance of `pkgs` with your overlays and packages applied is also available.
|
||||
pkgs,
|
||||
# You also have access to your flake's inputs.
|
||||
inputs,
|
||||
|
||||
# Additional metadata is provided by Snowfall Lib.
|
||||
system, # The system architecture for this host (eg. `x86_64-linux`).
|
||||
target, # The Snowfall Lib target for this system (eg. `x86_64-iso`).
|
||||
format, # A normalized name for the system target (eg. `iso`).
|
||||
virtual
|
||||
, # A boolean to determine whether this system is a virtual target using nixos-generators.
|
||||
systems, # An attribute map of your defined hosts.
|
||||
|
||||
# All other arguments come from the module system.
|
||||
config, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let cfg = config.modules.emacs;
|
||||
in {
|
||||
options.modules.emacs = { enable = mkOption { default = false; }; };
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.file = {
|
||||
".config/doom" = {
|
||||
source = ./doom;
|
||||
recursive = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
344
modules/home/emacs/doom/config.el
Normal file
344
modules/home/emacs/doom/config.el
Normal file
@ -0,0 +1,344 @@
|
||||
;; 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
|
||||
|
||||
(setq user-full-name "Julian Mutter"
|
||||
user-mail-address "julian.mutter@comumail.de")
|
||||
|
||||
(setq doom-theme 'doom-dracula
|
||||
doom-font (font-spec :family "Source Code Pro" :size 14)
|
||||
doom-variable-pitch-font (font-spec :family "DejaVu Sans" :size 15))
|
||||
|
||||
(setq display-line-numbers-type 'nil) ;; 'relative
|
||||
|
||||
(setq-default evil-escape-key-sequence "kj")
|
||||
|
||||
;; (after! company
|
||||
;; (setq company-idle-delay 0.1))
|
||||
|
||||
(map! :leader :desc "Open external terminal" "o t" (cmd! (call-process-shell-command "$TERMINAL &" nil 0)))
|
||||
(map! :leader :desc "Open external file explorer" "o e" (cmd! (call-process-shell-command "thunar &" nil 0)))
|
||||
|
||||
;; Remap font scaling keybindings to make more sense
|
||||
(map! :desc "Increase font size" :n "C-+" #'text-scale-increase)
|
||||
(map! :desc "Decrease font size" :n "C--" #'text-scale-decrease)
|
||||
(map! :desc "Reset font size" :n "C-=" #'doom/reset-font-size)
|
||||
|
||||
(map! :desc "Flycheck next error" :nv "g n" #'flycheck-next-error)
|
||||
(map! :desc "Flycheck previous error" :nv "g N" #'flycheck-previous-error)
|
||||
(map! :leader "c X" #'flycheck-list-errors)
|
||||
|
||||
(map! :desc "Save" :g "C-s" #'fd-save-and-escape)
|
||||
;; (map! :leader "w 1" #'delete-other-windows)
|
||||
(map! :leader "t p" #'+popup/toggle)
|
||||
|
||||
;; Useful for recompiling or running a project
|
||||
(map! :nvi "<f5>" #'projectile-repeat-last-command)
|
||||
|
||||
;; Do not use autosave when using vim save command
|
||||
(evil-ex-define-cmd "write" #'fd-format-without-autosave)
|
||||
|
||||
;; Select other window by number
|
||||
(dotimes (counter 9)
|
||||
(let ((command (format "(map! :leader \"%d\" #'winum-select-window-%d)"
|
||||
(1+ counter) (1+ counter))))
|
||||
(eval (read command))))
|
||||
|
||||
(map! :leader "r" #'quickrun)
|
||||
|
||||
(defun fd-format-without-autosave()
|
||||
(interactive)
|
||||
(let ((current-prefix-arg 4)) ;; pass universal argument
|
||||
(call-interactively #'save-buffer))
|
||||
)
|
||||
|
||||
(defun fd-save-and-escape()
|
||||
(interactive)
|
||||
(company-abort)
|
||||
(evil-force-normal-state)
|
||||
(save-buffer))
|
||||
|
||||
;; Do not ask before exiting emacs
|
||||
(setq confirm-kill-emacs nil)
|
||||
|
||||
;; Open pdf files with external reader
|
||||
(openwith-mode t)
|
||||
(setq openwith-associations '(("\\.pdf\\'" "evince" (file))))
|
||||
|
||||
;; Org settings
|
||||
(setq org-directory "~/Nextcloud/org"
|
||||
org-roam-directory "~/Nextcloud/org/roam")
|
||||
|
||||
;; Make all org files agenda files
|
||||
(setq org-agenda-files (list org-directory "~/dev/bachelor-thesis/notes"))
|
||||
|
||||
(setq org-export-allow-bind-keywords t)
|
||||
|
||||
;; Insert timestamp when marking task as done
|
||||
(setq org-log-done #'time)
|
||||
|
||||
(add-hook 'org-clock-in-hook #'save-buffer)
|
||||
(add-hook 'org-clock-out-hook #'save-buffer)
|
||||
|
||||
(setq org-pomodoro-manual-break t)
|
||||
|
||||
;; Max volume is 65536 since player is paplay
|
||||
(let ((volume "--volume=40000"))
|
||||
(setq org-pomodoro-start-sound-args volume)
|
||||
(setq org-pomodoro-killed-sound-args volume)
|
||||
(setq org-pomodoro-ticking-sound-args volume)
|
||||
(setq org-pomodoro-finished-sound-args volume)
|
||||
(setq org-pomodoro-overtime-sound-args volume)
|
||||
(setq org-pomodoro-long-break-sound-args volume)
|
||||
(setq org-pomodoro-short-break-sound-args volume)
|
||||
)
|
||||
|
||||
(setq org-agenda-custom-commands
|
||||
'(("." "Clocking today" agenda ""
|
||||
((org-agenda-span 1)
|
||||
(org-agenda-start-day "today")
|
||||
(org-agenda-start-with-clockreport-mode t)
|
||||
(org-agenda-start-with-log-mode 'clockcheck)
|
||||
))))
|
||||
|
||||
(setq org-agenda-clockreport-parameter-plist '(:link t :maxlevel 2 :fileskip0 t)) ;; :stepskip0 t
|
||||
(setq org-clock-mode-line-total 'today)
|
||||
|
||||
(map! :map org-mode-map :nvi "C-k" #'org-backward-element)
|
||||
(map! :map org-mode-map :nvi "C-j" #'org-forward-element)
|
||||
(map! :map org-mode-map :nvi "C-h" #'org-up-element)
|
||||
(map! :map org-mode-map :nvi "C-l" #'org-down-element)
|
||||
|
||||
(map! :map org-mode-map :nvi "M-i" #'org-roam-node-insert)
|
||||
(map! :map org-mode-map :nvi "M-@" #'org-cite-insert)
|
||||
(map! :map doom-leader-notes-map "r r" #'org-roam-node-find)
|
||||
(map! :map doom-leader-notes-map "r t" #'org-roam-buffer-toggle)
|
||||
(map! :map doom-leader-notes-map "s" #'fd-org-notes-search-follow-symlinks)
|
||||
|
||||
(after! org
|
||||
(add-to-list 'org-capture-templates
|
||||
'("b" "Bachelor todo" entry
|
||||
(file+headline "bachelor/todo.org" "Inbox")
|
||||
"* IDEA %?\n%i\n%T\n%a" :prepend t)
|
||||
))
|
||||
|
||||
|
||||
|
||||
(defun fd-org-notes-search-follow-symlinks (query)
|
||||
"Alternative to +default/org-notes-search which follows symbolic links for better project inlusion"
|
||||
(interactive
|
||||
(list (if (doom-region-active-p)
|
||||
(buffer-substring-no-properties
|
||||
(doom-region-beginning)
|
||||
(doom-region-end))
|
||||
"")))
|
||||
(require 'org)
|
||||
(+vertico-file-search :query query :in org-directory :args '("-L")))
|
||||
|
||||
(defun fd-org-latex-preview-buffer ()
|
||||
"Show latex preview for whole buffer by running org-latex-preview with C-u C-u"
|
||||
(interactive)
|
||||
(let ((current-prefix-arg '(16)))
|
||||
(call-interactively 'org-latex-preview)
|
||||
))
|
||||
|
||||
;; Custom time format display
|
||||
(setq-default org-display-custom-times t)
|
||||
(setq org-time-stamp-custom-formats '("<%d.%m.%Y %a>" . "<%d.%m.%Y %a %H:%M>"))
|
||||
|
||||
;; Enable org mode like header navigation
|
||||
(map! :map TeX-mode-map :nvi "<backtab>" #'outline-cycle-buffer)
|
||||
|
||||
(map! :map TeX-mode-map :nv "C-k" #'outline-backward-same-level)
|
||||
(map! :map TeX-mode-map :nv "C-j" #'outline-forward-same-level)
|
||||
(map! :map TeX-mode-map :nv "C-h" #'outline-up-heading)
|
||||
(map! :map TeX-mode-map :nv "C-l" #'outline-next-heading)
|
||||
|
||||
;; Fixes latexindent not finding perl libraries
|
||||
(setenv "PERL5LIB" "~/perl5/lib/perl5")
|
||||
|
||||
(setq +latex-viewers '(evince))
|
||||
|
||||
(use-package! lsp-ltex
|
||||
:after latex
|
||||
:init
|
||||
(setq lsp-ltex-enabled t)
|
||||
(setq lsp-ltex-language "en-US")
|
||||
(setq lsp-ltex-mother-tongue "de-DE"))
|
||||
|
||||
;; Do not automatically enable writegood mode
|
||||
(remove-hook! '(org-mode-hook markdown-mode-hook rst-mode-hook asciidoc-mode-hook latex-mode-hook LaTeX-mode-hook) #'writegood-mode)
|
||||
|
||||
;; Removing hooks for automatic spell checking set here: https://github.com/hlissner/doom-emacs/blob/develop/modules/checkers/spell/config.el
|
||||
(remove-hook! '(org-mode-hook
|
||||
markdown-mode-hook
|
||||
TeX-mode-hook
|
||||
rst-mode-hook
|
||||
mu4e-compose-mode-hook
|
||||
message-mode-hook
|
||||
git-commit-mode-hook)
|
||||
#'flyspell-mode)
|
||||
|
||||
(remove-hook! '(yaml-mode-hook
|
||||
conf-mode-hook
|
||||
prog-mode-hook)
|
||||
#'flyspell-prog-mode)
|
||||
|
||||
;; (setq ispell-dictionary "english")
|
||||
(setq ispell-personal-dictionary "~/ispell-personal-dictionary")
|
||||
|
||||
(map! :map doom-leader-toggle-map :desc "Toggle dictionary" "d" #'fd-switch-dictionary)
|
||||
|
||||
(defun fd-switch-dictionary()
|
||||
(interactive)
|
||||
(let* ((dic ispell-current-dictionary)
|
||||
(change (if (string= dic "german") "english" "german")))
|
||||
(ispell-change-dictionary change)
|
||||
(message "Dictionary switched from %s to %s" dic change)
|
||||
))
|
||||
|
||||
(set-flyspell-predicate! '(latex-mode)
|
||||
#'+latex-flyspell-word-p)
|
||||
|
||||
(defun +latex-flyspell-word-p ()
|
||||
"Return t if point is on a word that should be spell checked.
|
||||
|
||||
Return nil if on a link url, markup, html, or references."
|
||||
(let ((faces (ensure-list (get-text-property (point) 'face))))
|
||||
(or (and (memq 'font-lock-comment-face faces)
|
||||
(memq 'markdown-code-face faces))
|
||||
(not (cl-loop with unsafe-faces = '(font-lock-comment-face
|
||||
;; font-latex-math-face
|
||||
;; font-latex-string-face
|
||||
font-lock-keyword-face
|
||||
font-lock-constant-face
|
||||
font-lock-function-name-face
|
||||
font-lock-variable-name-face
|
||||
font-lock-type-face ;; figure captions
|
||||
)
|
||||
for face in faces
|
||||
if (memq face unsafe-faces)
|
||||
return t)))))
|
||||
|
||||
;; (setq lsp-dart-flutter-sdk-dir "~/snap/flutter/common/flutter")
|
||||
;; (map! :mode dart-mode :leader "r" #'flutter-run-or-hot-reload)
|
||||
|
||||
;; Make sniping simpler for german keyboard
|
||||
(setq evil-snipe-scope 'visible)
|
||||
(map! :map evil-snipe-override-mode-map :m "," #'evil-snipe-repeat)
|
||||
(map! :map evil-snipe-override-mode-map :m ";" #'evil-snipe-repeat-reverse)
|
||||
(map! :map evil-snipe-parent-transient-map "," #'evil-snipe-repeat)
|
||||
(map! :map evil-snipe-parent-transient-map ";" #'evil-snipe-repeat-reverse)
|
||||
|
||||
(add-hook 'matlab-mode-hook (lambda () (add-to-list 'quickrun-file-alist '("\\.m\\'" . "octave"))))
|
||||
;; (assq-delete-all "objc" quickrun-file-alist)
|
||||
|
||||
(quickrun-add-command "matlab"
|
||||
'((:command . "octave"))
|
||||
:mode #'matlab-mode
|
||||
)
|
||||
|
||||
(quickrun-add-command "octave"
|
||||
'((:command . "octave"))
|
||||
:mode #'octave-mode
|
||||
)
|
||||
|
||||
;; (autoload 'matlab-mode "matlab" "Matlab Editing Mode" t)
|
||||
(add-to-list
|
||||
'auto-mode-alist
|
||||
'("\\.m$" . matlab-mode))
|
||||
;; (setq matlab-indent-function t)
|
||||
;; (setq matlab-shell-command "/urs/local/bin/matlab")
|
||||
|
||||
(map! :desc "Toggle case of word" :nv "g C" #'toggle-word-case)
|
||||
|
||||
(defun toggle-word-case ()
|
||||
"Toggle the case of current word or text selection."
|
||||
|
||||
(interactive)
|
||||
(let (
|
||||
(deactivate-mark nil)
|
||||
$p1 $p2)
|
||||
(if (use-region-p)
|
||||
(setq $p1 (region-beginning) $p2 (region-end))
|
||||
(save-excursion
|
||||
(skip-chars-backward "[:alpha:]")
|
||||
(setq $p1 (point))
|
||||
(skip-chars-forward "[:alpha:]")
|
||||
(setq $p2 (point))))
|
||||
(let ((first-char-prop (get-char-code-property (char-after $p1) 'general-category)))
|
||||
(cond ((string= "Ll" first-char-prop) ; Lower case
|
||||
(upcase-region $p1 (+ $p1 1)))
|
||||
((string= "Lu" first-char-prop) ; Upper case
|
||||
(downcase-region $p1 (+ $p1 1)))
|
||||
(t (message "Word does not start with a alphabetic character"))))))
|
||||
|
||||
(add-hook 'tetris-mode-hook #'turn-off-evil-mode)
|
||||
|
||||
(map! :map 'doom-leader-project-map :desc "Repeat last command" "SPC" #'projectile-repeat-last-command)
|
||||
|
||||
(defun fd-pretty-print-dirty-json()
|
||||
(interactive)
|
||||
(let ((new-buffer-contents (shell-command-to-string (format "echo '%s' | newliner" (buffer-string)))))
|
||||
(erase-buffer)
|
||||
(insert new-buffer-contents)
|
||||
(evil-indent (buffer-end -1) (buffer-end +1)))
|
||||
)
|
||||
|
||||
(defun fd-inventory-transfer()
|
||||
(interactive)
|
||||
(fd-inventory-transfer-check-if-valid-table)
|
||||
(let ((location-from (string-trim (org-table-get 1 2)))
|
||||
(location-to (string-trim (org-table-get 1 3)))
|
||||
(item-name (string-trim (org-table-get-field 1))))
|
||||
(let (transfer-amount)
|
||||
(setq transfer-amount (read-number (concat "Transfer from " location-from " to " location-to ": ")))
|
||||
(fd-inventory-transfer-log-transfer transfer-amount item-name location-from location-to)
|
||||
(fd-inventory-transfer-do-transfer transfer-amount)
|
||||
(org-table-align)
|
||||
)))
|
||||
|
||||
(defun fd-inventory-transfer-check-if-valid-table ()
|
||||
(unless (org-at-table-p) (error "You are not inside a table"))
|
||||
(unless (and (string-match-p "^[[:blank:]]*-?[0-9]+[[:blank:]]*$" (org-table-get-field 2))
|
||||
(string-match-p "^[[:blank:]]*-?[0-9]+[[:blank:]]*$" (org-table-get-field 3)))
|
||||
(error "Amounts in table are not numbers"))
|
||||
(if (or (string= "" (org-table-get 1 2))
|
||||
(string= "" (org-table-get 1 3)))
|
||||
(error "No valid table header")))
|
||||
|
||||
(defun fd-inventory-transfer-do-transfer(amount)
|
||||
(let* ((amount-from-location (string-to-number (org-table-get-field 2)))
|
||||
(amount-to-location (string-to-number (org-table-get-field 3)))
|
||||
(amount-from-location-new (- amount-from-location amount))
|
||||
(amount-to-location-new (+ amount-to-location amount)))
|
||||
(progn (org-table-get-field 2 (number-to-string amount-from-location-new))
|
||||
(org-table-get-field 3 (number-to-string amount-to-location-new)))))
|
||||
|
||||
(defun fd-inventory-transfer-log-transfer(amount item-name from-location to-location)
|
||||
(save-excursion
|
||||
(let* ((log-heading-point (or (org-find-exact-headline-in-buffer "Transfer log" nil t)
|
||||
(progn (goto-char (org-table-end))
|
||||
(org-insert-heading)
|
||||
(insert "Transfer log")
|
||||
(point)))))
|
||||
(goto-char log-heading-point)
|
||||
(forward-line)
|
||||
(let ((message (concat "- " (format-time-string "%d.%m.%Y") ": *" (number-to-string amount) "* =" item-name "= from " from-location " to " to-location "\n")))
|
||||
(insert message))
|
||||
)))
|
||||
|
||||
(defun fd-python-to-latex(regionBegin regionEnd)
|
||||
(interactive (if (use-region-p)
|
||||
(list (region-beginning) (region-end))
|
||||
(list (point-min) (point-max))))
|
||||
(shell-command-on-region regionBegin regionEnd "python2latex"))
|
||||
|
||||
(set-docsets! 'haskell-mode "Haskell")
|
||||
|
||||
(setq! citar-bibliography '("~/Nextcloud/zotero-sources.bib"))
|
195
modules/home/emacs/doom/init.el
Normal file
195
modules/home/emacs/doom/init.el
Normal file
@ -0,0 +1,195 @@
|
||||
;;; init.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; This file controls what Doom modules are enabled and what order they load
|
||||
;; in. Remember to run 'doom sync' after modifying it!
|
||||
|
||||
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
|
||||
;; documentation. There you'll find a link to Doom's Module Index where all
|
||||
;; of our modules are listed, including what flags they support.
|
||||
|
||||
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
|
||||
;; 'C-c c k' for non-vim users) to view its documentation. This works on
|
||||
;; flags as well (those symbols that start with a plus).
|
||||
;;
|
||||
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
|
||||
;; directory (for easy access to its source code).
|
||||
|
||||
(doom! :input
|
||||
;;bidi ; (tfel ot) thgir etirw uoy gnipleh
|
||||
;;chinese
|
||||
;;japanese
|
||||
;;layout ; auie,ctsrnm is the superior home row
|
||||
|
||||
:completion
|
||||
company ; the ultimate code completion backend
|
||||
;;helm ; the *other* search engine for love and life
|
||||
;;ido ; the other *other* search engine...
|
||||
;;ivy ; a search engine for love and life
|
||||
vertico ; the search engine of the future
|
||||
|
||||
:ui
|
||||
;;deft ; notational velocity for Emacs
|
||||
doom ; what makes DOOM look the way it does
|
||||
doom-dashboard ; a nifty splash screen for Emacs
|
||||
;;doom-quit ; DOOM quit-message prompts when you quit Emacs
|
||||
;;(emoji +unicode) ; 🙂
|
||||
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
|
||||
;;hydra
|
||||
;;indent-guides ; highlighted indent columns
|
||||
;;ligatures ; ligatures and symbols to make your code pretty again
|
||||
;;minimap ; show a map of the code on the side
|
||||
modeline ; snazzy, Atom-inspired modeline, plus API
|
||||
;;nav-flash ; blink cursor line after big motions
|
||||
;;neotree ; a project drawer, like NERDTree for vim
|
||||
ophints ; highlight the region an operation acts on
|
||||
(popup +defaults) ; tame sudden yet inevitable temporary windows
|
||||
;;tabs ; a tab bar for Emacs
|
||||
(treemacs +lsp) ; a project drawer, like neotree but cooler
|
||||
;;unicode ; extended unicode support for various languages
|
||||
(vc-gutter +pretty) ; vcs diff in the fringe
|
||||
vi-tilde-fringe ; fringe tildes to mark beyond EOB
|
||||
(window-select +numbers) ; visually switch windows
|
||||
workspaces ; tab emulation, persistence & separate workspaces
|
||||
;;zen ; distraction-free coding or writing
|
||||
|
||||
:editor
|
||||
(evil +everywhere) ; come to the dark side, we have cookies
|
||||
file-templates ; auto-snippets for empty files
|
||||
fold ; (nigh) universal code folding
|
||||
(format +onsave) ; automated prettiness
|
||||
;;god ; run Emacs commands without modifier keys
|
||||
;;lispy ; vim for lisp, for people who don't like vim
|
||||
;;multiple-cursors ; editing in many places at once
|
||||
;;objed ; text object editing for the innocent
|
||||
;;parinfer ; turn lisp into python, sort of
|
||||
;;rotate-text ; cycle region at point between text candidates
|
||||
snippets ; my elves. They type so I don't have to
|
||||
;;word-wrap ; soft wrapping with language-aware indent
|
||||
|
||||
:emacs
|
||||
dired ; making dired pretty [functional]
|
||||
electric ; smarter, keyword-based electric-indent
|
||||
;;ibuffer ; interactive buffer management
|
||||
undo ; persistent, smarter undo for your inevitable mistakes
|
||||
vc ; version-control and Emacs, sitting in a tree
|
||||
|
||||
:term
|
||||
;;eshell ; the elisp shell that works everywhere
|
||||
;;shell ; simple shell REPL for Emacs
|
||||
;;term ; basic terminal emulator for Emacs
|
||||
;;vterm ; the best terminal emulation in Emacs
|
||||
|
||||
:checkers
|
||||
syntax ; tasing you for every semicolon you forget
|
||||
(spell +flyspell +hunspell +everywhere) ; tasing you for misspelling mispelling
|
||||
;; grammar ; tasing grammar mistake every you make
|
||||
|
||||
:tools
|
||||
;; ansible
|
||||
biblio ; Writes a PhD for you (citation needed)
|
||||
;;collab ; buffers with friends
|
||||
;;debugger ; FIXME stepping through code, to help you add bugs
|
||||
direnv
|
||||
docker
|
||||
;;editorconfig ; let someone else argue about tabs vs spaces
|
||||
;; ein ; tame Jupyter notebooks with emacs
|
||||
(eval +overlay) ; run code, run (also, repls)
|
||||
;;gist ; interacting with github gists
|
||||
(lookup +docsets +dictionary) ; navigate your code and its documentation
|
||||
lsp ; M-x vscode
|
||||
magit ; a git porcelain for Emacs
|
||||
make ; run make tasks from Emacs
|
||||
;;pass ; password manager for nerds
|
||||
;;pdf ; pdf enhancements
|
||||
;;prodigy ; FIXME managing external services & code builders
|
||||
;;rgb ; creating color strings
|
||||
;;taskrunner ; taskrunner for all your projects
|
||||
;;terraform ; infrastructure as code
|
||||
;;tmux ; an API for interacting with tmux
|
||||
;;tree-sitter ; syntax and parsing, sitting in a tree...
|
||||
;;upload ; map local to remote projects via ssh/ftp
|
||||
|
||||
:os
|
||||
(:if IS-MAC macos) ; improve compatibility with macOS
|
||||
;;tty ; improve the terminal Emacs experience
|
||||
|
||||
:lang
|
||||
;;agda ; types of types of types of types...
|
||||
;;beancount ; mind the GAAP
|
||||
(cc +lsp) ; C > C++ == 1
|
||||
;;clojure ; java with a lisp
|
||||
;;common-lisp ; if you've seen one lisp, you've seen them all
|
||||
;;coq ; proofs-as-programs
|
||||
;;crystal ; ruby at the speed of c
|
||||
;;csharp ; unity, .NET, and mono shenanigans
|
||||
;;data ; config/data formats
|
||||
(dart +flutter) ; paint ui and not much else
|
||||
;;dhall
|
||||
;;elixir ; erlang done right
|
||||
;;elm ; care for a cup of TEA?
|
||||
emacs-lisp ; drown in parentheses
|
||||
;;erlang ; an elegant language for a more civilized age
|
||||
ess ; emacs speaks statistics
|
||||
;;factor
|
||||
;;faust ; dsp, but you get to keep your soul
|
||||
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
|
||||
;;fsharp ; ML stands for Microsoft's Language
|
||||
;;fstar ; (dependent) types and (monadic) effects and Z3
|
||||
;;gdscript ; the language you waited for
|
||||
(go +lsp) ; the hipster dialect
|
||||
;;(graphql +lsp) ; Give queries a REST
|
||||
(haskell +lsp) ; a language that's lazier than I am
|
||||
;;hy ; readability of scheme w/ speed of python
|
||||
;;idris ; a language you can depend on
|
||||
json ; At least it ain't XML
|
||||
(java +lsp) ; the poster child for carpal tunnel syndrome
|
||||
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
|
||||
(julia +lsp +tree-sitter) ; a better, faster MATLAB
|
||||
;;kotlin ; a better, slicker Java(Script)
|
||||
(latex +lsp +latexmk) ; writing papers in Emacs has never been so fun
|
||||
;;lean ; for folks with too much to prove
|
||||
;;ledger ; be audit you can be
|
||||
;;lua ; one-based indices? one-based indices
|
||||
markdown ; writing docs for people to ignore
|
||||
;;nim ; python + lisp at the speed of c
|
||||
(nix +lsp) ; I hereby declare "nix geht mehr!"
|
||||
;;ocaml ; an objective camel
|
||||
(org +dragndrop +pandoc +pretty +roam2 +pomodoro +noter) ; organize your plain life in plain text
|
||||
;;php ; perl's insecure younger brother
|
||||
;;plantuml ; diagrams for confusing people more
|
||||
;;purescript ; javascript, but functional
|
||||
(python +lsp +pyright) ; beautiful is better than ugly
|
||||
;;qt ; the 'cutest' gui framework ever
|
||||
;;racket ; a DSL for DSLs
|
||||
;;raku ; the artist formerly known as perl6
|
||||
;;rest ; Emacs as a REST client
|
||||
;;rst ; ReST in peace
|
||||
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
|
||||
(rust +lsp +tree-sitter) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
|
||||
;;scala ; java, but good
|
||||
;;(scheme +guile) ; a fully conniving family of lisps
|
||||
sh ; she sells {ba,z,fi}sh shells on the C xor
|
||||
;;sml
|
||||
;;solidity ; do you need a blockchain? No.
|
||||
;;swift ; who asked for emoji variables?
|
||||
;;terra ; Earth and Moon in alignment for performance.
|
||||
;;web ; the tubes
|
||||
yaml ; JSON, but readable
|
||||
;;zig ; C, but simpler
|
||||
|
||||
:email
|
||||
;;(mu4e +org +gmail)
|
||||
;;notmuch
|
||||
;;(wanderlust +gmail)
|
||||
|
||||
:app
|
||||
calendar
|
||||
;;emms
|
||||
;;everywhere ; *leave* Emacs!? You must be joking
|
||||
;;irc ; how neckbeards socialize
|
||||
;;(rss +org) ; emacs as an RSS reader
|
||||
;;twitter ; twitter client https://twitter.com/vnought
|
||||
|
||||
:config
|
||||
;;literate
|
||||
(default +bindings +smartparens))
|
0
modules/home/emacs/doom/org-agenda-files
Normal file
0
modules/home/emacs/doom/org-agenda-files
Normal file
61
modules/home/emacs/doom/packages.el
Normal file
61
modules/home/emacs/doom/packages.el
Normal file
@ -0,0 +1,61 @@
|
||||
;; -*- no-byte-compile: t; -*-
|
||||
;;; $DOOMDIR/packages.el
|
||||
|
||||
;; To install a package with Doom you must declare them here and run 'doom sync'
|
||||
;; on the command line, then restart Emacs for the changes to take effect -- or
|
||||
;; use 'M-x doom/reload'.
|
||||
|
||||
|
||||
;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror:
|
||||
;(package! some-package)
|
||||
|
||||
;; (package! company-quickhelp)
|
||||
|
||||
(package! github-tags) ;; Needed for lsp-ltex auto-install to work
|
||||
(package! lsp-ltex)
|
||||
|
||||
(package! org-roam-ui)
|
||||
(package! openwith)
|
||||
|
||||
;; To install a package directly from a remote git repo, you must specify a
|
||||
;; `:recipe'. You'll find documentation on what `:recipe' accepts here:
|
||||
;; https://github.com/raxod502/straight.el#the-recipe-format
|
||||
;(package! another-package
|
||||
; :recipe (:host github :repo "username/repo"))
|
||||
|
||||
(package! matlab
|
||||
:recipe (:repo "https://git.code.sf.net/p/matlab-emacs/src" ))
|
||||
|
||||
;; If the package you are trying to install does not contain a PACKAGENAME.el
|
||||
;; file, or is located in a subdirectory of the repo, you'll need to specify
|
||||
;; `:files' in the `:recipe':
|
||||
;(package! this-package
|
||||
; :recipe (:host github :repo "username/repo"
|
||||
; :files ("some-file.el" "src/lisp/*.el")))
|
||||
|
||||
;; If you'd like to disable a package included with Doom, you can do so here
|
||||
;; with the `:disable' property:
|
||||
;(package! builtin-package :disable t)
|
||||
|
||||
;; You can override the recipe of a built in package without having to specify
|
||||
;; all the properties for `:recipe'. These will inherit the rest of its recipe
|
||||
;; from Doom or MELPA/ELPA/Emacsmirror:
|
||||
;(package! builtin-package :recipe (:nonrecursive t))
|
||||
;(package! builtin-package-2 :recipe (:repo "myfork/package"))
|
||||
|
||||
;; Specify a `:branch' to install a package from a particular branch or tag.
|
||||
;; This is required for some packages whose default branch isn't 'master' (which
|
||||
;; our package manager can't deal with; see raxod502/straight.el#279)
|
||||
;(package! builtin-package :recipe (:branch "develop"))
|
||||
|
||||
;; Use `:pin' to specify a particular commit to install.
|
||||
;(package! builtin-package :pin "1a2b3c4d5e")
|
||||
|
||||
|
||||
;; Doom's packages are pinned to a specific commit and updated from release to
|
||||
;; release. The `unpin!' macro allows you to unpin single packages...
|
||||
;(unpin! pinned-package)
|
||||
;; ...or multiple packages
|
||||
;(unpin! pinned-package another-pinned-package)
|
||||
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
|
||||
;(unpin! t)
|
7
modules/home/emacs/doom/snippets/latex-mode/dof-acronym
Normal file
7
modules/home/emacs/doom/snippets/latex-mode/dof-acronym
Normal file
@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: dof acronym
|
||||
# uuid: dof
|
||||
# key: dof
|
||||
# condition: t
|
||||
# --
|
||||
\ac{DOF}
|
10
modules/home/emacs/doom/snippets/latex-mode/equation
Normal file
10
modules/home/emacs/doom/snippets/latex-mode/equation
Normal file
@ -0,0 +1,10 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: equation
|
||||
# uuid: eq
|
||||
# key: eq
|
||||
# condition: t
|
||||
# --
|
||||
\begin{equation}
|
||||
\label{eqn:$1}
|
||||
$0
|
||||
\end{equation}
|
276
modules/home/rofi/config.rasi
Normal file
276
modules/home/rofi/config.rasi
Normal file
@ -0,0 +1,276 @@
|
||||
configuration {
|
||||
modi: "run,drun";
|
||||
/* width: 50;*/
|
||||
lines: 10;
|
||||
/* columns: 1;*/
|
||||
/* font: "mono 12";*/
|
||||
/* bw: 1;*/
|
||||
/* location: 0;*/
|
||||
/* padding: 5;*/
|
||||
/* yoffset: 0;*/
|
||||
/* xoffset: 0;*/
|
||||
/* fixed-num-lines: true;*/
|
||||
show-icons: true;
|
||||
terminal: "alacritty";
|
||||
/* ssh-client: "ssh";*/
|
||||
/* ssh-command: "{terminal} -e {ssh-client} {host} [-p {port}]";*/
|
||||
/* run-command: "{cmd}";*/
|
||||
/* run-list-command: "";*/
|
||||
/* run-shell-command: "{terminal} -e {cmd}";*/
|
||||
/* window-command: "wmctrl -i -R {window}";*/
|
||||
/* window-match-fields: "all";*/
|
||||
/* icon-theme: ;*/
|
||||
/* drun-match-fields: "name,generic,exec,categories,keywords";*/
|
||||
/* drun-categories: ;*/
|
||||
/* drun-show-actions: false;*/
|
||||
/* drun-display-format: "{name} [<span weight='light' size='small'><i>({generic})</i></span>]";*/
|
||||
/* drun-url-launcher: "xdg-open";*/
|
||||
/* disable-history: false;*/
|
||||
/* ignored-prefixes: "";*/
|
||||
/* sort: false;*/
|
||||
/* sorting-method: "normal";*/
|
||||
/* case-sensitive: false;*/
|
||||
/* cycle: true;*/
|
||||
/* sidebar-mode: false;*/
|
||||
/* eh: 1;*/
|
||||
/* auto-select: false;*/
|
||||
/* parse-hosts: false;*/
|
||||
/* parse-known-hosts: true;*/
|
||||
/* combi-modi: "window,run";*/
|
||||
/* matching: "normal";*/
|
||||
/* tokenize: true;*/
|
||||
/* m: "-5";*/
|
||||
/* line-margin: 2;*/
|
||||
/* line-padding: 1;*/
|
||||
/* filter: ;*/
|
||||
/* separator-style: "dash";*/
|
||||
/* hide-scrollbar: false;*/
|
||||
/* fullscreen: false;*/
|
||||
/* fake-transparency: false;*/
|
||||
/* dpi: -1;*/
|
||||
/* threads: 0;*/
|
||||
/* scrollbar-width: 8;*/
|
||||
/* scroll-method: 0;*/
|
||||
/* fake-background: "screenshot";*/
|
||||
/* window-format: "{w} {c} {t}";*/
|
||||
/* click-to-exit: true;*/
|
||||
/* show-match: true;*/
|
||||
/* theme: ;*/
|
||||
/* color-normal: ;*/
|
||||
/* color-urgent: ;*/
|
||||
/* color-active: ;*/
|
||||
/* color-window: ;*/
|
||||
/* max-history-size: 25;*/
|
||||
/* combi-hide-mode-prefix: false;*/
|
||||
/* matching-negate-char: '-' /* unsupported */;*/
|
||||
/* cache-dir: ;*/
|
||||
/* window-thumbnail: false;*/
|
||||
/* drun-use-desktop-cache: false;*/
|
||||
/* drun-reload-desktop-cache: false;*/
|
||||
/* normalize-match: false;*/
|
||||
/* pid: "/run/user/1000/rofi.pid";*/
|
||||
/* display-window: ;*/
|
||||
/* display-windowcd: ;*/
|
||||
/* display-run: ;*/
|
||||
/* display-ssh: ;*/
|
||||
/* display-drun: ;*/
|
||||
/* display-combi: ;*/
|
||||
/* display-keys: ;*/
|
||||
/* display-file-browser: ;*/
|
||||
/* display-calc: ;*/
|
||||
/* kb-primary-paste: "Control+V,Shift+Insert";*/
|
||||
/* kb-secondary-paste: "Control+v,Insert";*/
|
||||
/* kb-clear-line: "Control+w";*/
|
||||
/* kb-move-front: "Control+a";*/
|
||||
/* kb-move-end: "Control+e";*/
|
||||
/* kb-move-word-back: "Alt+b,Control+Left";*/
|
||||
/* kb-move-word-forward: "Alt+f,Control+Right";*/
|
||||
/* kb-move-char-back: "Left,Control+b";*/
|
||||
/* kb-move-char-forward: "Right,Control+f";*/
|
||||
/* kb-remove-word-back: "Control+Alt+h,Control+BackSpace";*/
|
||||
/* kb-remove-word-forward: "Control+Alt+d";*/
|
||||
/* kb-remove-char-forward: "Delete,Control+d";*/
|
||||
/* kb-remove-char-back: "BackSpace,Shift+BackSpace,Control+h";*/
|
||||
/* kb-remove-to-eol: "Control+k";*/
|
||||
/* kb-remove-to-sol: "Control+u";*/
|
||||
/* kb-accept-entry: "Control+j,Control+m,Return,KP_Enter";*/
|
||||
kb-accept-custom: "Control+Return";
|
||||
/* kb-accept-alt: "Shift+Return";*/
|
||||
/* kb-delete-entry: "Shift+Delete";*/
|
||||
/* kb-mode-next: "Shift+Right,Control+Tab";*/
|
||||
/* kb-mode-previous: "Shift+Left,Control+ISO_Left_Tab";*/
|
||||
/* kb-row-left: "Control+Page_Up";*/
|
||||
/* kb-row-right: "Control+Page_Down";*/
|
||||
/* kb-row-up: "Up,Control+p,ISO_Left_Tab";*/
|
||||
/* kb-row-down: "Down,Control+n";*/
|
||||
/* kb-row-tab: "Tab";*/
|
||||
/* kb-page-prev: "Page_Up";*/
|
||||
/* kb-page-next: "Page_Down";*/
|
||||
/* kb-row-first: "Home,KP_Home";*/
|
||||
/* kb-row-last: "End,KP_End";*/
|
||||
/* kb-row-select: "Control+space";*/
|
||||
/* kb-screenshot: "Alt+S";*/
|
||||
/* kb-ellipsize: "Alt+period";*/
|
||||
/* kb-toggle-case-sensitivity: "grave,dead_grave";*/
|
||||
/* kb-toggle-sort: "Alt+grave";*/
|
||||
/* kb-cancel: "Escape,Control+g,Control+bracketleft";*/
|
||||
/* kb-custom-1: "Alt+1";*/
|
||||
/* kb-custom-2: "Alt+2";*/
|
||||
/* kb-custom-3: "Alt+3";*/
|
||||
/* kb-custom-4: "Alt+4";*/
|
||||
/* kb-custom-5: "Alt+5";*/
|
||||
/* kb-custom-6: "Alt+6";*/
|
||||
/* kb-custom-7: "Alt+7";*/
|
||||
/* kb-custom-8: "Alt+8";*/
|
||||
/* kb-custom-9: "Alt+9";*/
|
||||
/* kb-custom-10: "Alt+0";*/
|
||||
/* kb-custom-11: "Alt+exclam";*/
|
||||
/* kb-custom-12: "Alt+at";*/
|
||||
/* kb-custom-13: "Alt+numbersign";*/
|
||||
/* kb-custom-14: "Alt+dollar";*/
|
||||
/* kb-custom-15: "Alt+percent";*/
|
||||
/* kb-custom-16: "Alt+dead_circumflex";*/
|
||||
/* kb-custom-17: "Alt+ampersand";*/
|
||||
/* kb-custom-18: "Alt+asterisk";*/
|
||||
/* kb-custom-19: "Alt+parenleft";*/
|
||||
/* kb-select-1: "Super+1";*/
|
||||
/* kb-select-2: "Super+2";*/
|
||||
/* kb-select-3: "Super+3";*/
|
||||
/* kb-select-4: "Super+4";*/
|
||||
/* kb-select-5: "Super+5";*/
|
||||
/* kb-select-6: "Super+6";*/
|
||||
/* kb-select-7: "Super+7";*/
|
||||
/* kb-select-8: "Super+8";*/
|
||||
/* kb-select-9: "Super+9";*/
|
||||
/* kb-select-10: "Super+0";*/
|
||||
/* ml-row-left: "ScrollLeft";*/
|
||||
/* ml-row-right: "ScrollRight";*/
|
||||
/* ml-row-up: "ScrollUp";*/
|
||||
/* ml-row-down: "ScrollDown";*/
|
||||
/* me-select-entry: "MousePrimary";*/
|
||||
/* me-accept-entry: "MouseDPrimary";*/
|
||||
/* me-accept-custom: "Control+MouseDPrimary";*/
|
||||
}
|
||||
|
||||
/*Dracula theme based on the Purple official rofi theme*/
|
||||
|
||||
* {
|
||||
font: "Jetbrains Mono 14";
|
||||
foreground: #f8f8f2;
|
||||
background: #282a36;
|
||||
active-background: #6272a4;
|
||||
urgent-background: #ff5555;
|
||||
selected-background: @active-background;
|
||||
selected-urgent-background: @urgent-background;
|
||||
selected-active-background: @active-background;
|
||||
separatorcolor: @active-background;
|
||||
bordercolor: @active-background;
|
||||
}
|
||||
|
||||
#window {
|
||||
background-color: @background;
|
||||
border: 1;
|
||||
border-radius: 6;
|
||||
border-color: @bordercolor;
|
||||
padding: 5;
|
||||
}
|
||||
#mainbox {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#message {
|
||||
border: 1px dash 0px 0px ;
|
||||
border-color: @separatorcolor;
|
||||
padding: 1px ;
|
||||
}
|
||||
#textbox {
|
||||
text-color: @foreground;
|
||||
}
|
||||
#listview {
|
||||
fixed-height: 0;
|
||||
border: 2px dash 0px 0px ;
|
||||
border-color: @bordercolor;
|
||||
spacing: 2px ;
|
||||
scrollbar: false;
|
||||
padding: 2px 0px 0px ;
|
||||
}
|
||||
#element {
|
||||
border: 0;
|
||||
padding: 1px ;
|
||||
}
|
||||
#element.normal.normal {
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
}
|
||||
#element.normal.urgent {
|
||||
background-color: @urgent-background;
|
||||
text-color: @urgent-foreground;
|
||||
}
|
||||
#element.normal.active {
|
||||
background-color: @active-background;
|
||||
text-color: @foreground;
|
||||
}
|
||||
#element.selected.normal {
|
||||
background-color: @selected-background;
|
||||
text-color: @foreground;
|
||||
}
|
||||
#element.selected.urgent {
|
||||
background-color: @selected-urgent-background;
|
||||
text-color: @foreground;
|
||||
}
|
||||
#element.selected.active {
|
||||
background-color: @selected-active-background;
|
||||
text-color: @foreground;
|
||||
}
|
||||
#element.alternate.normal {
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
}
|
||||
#element.alternate.urgent {
|
||||
background-color: @urgent-background;
|
||||
text-color: @foreground;
|
||||
}
|
||||
#element.alternate.active {
|
||||
background-color: @active-background;
|
||||
text-color: @foreground;
|
||||
}
|
||||
#scrollbar {
|
||||
width: 2px ;
|
||||
border: 0;
|
||||
handle-width: 8px ;
|
||||
padding: 0;
|
||||
}
|
||||
#sidebar {
|
||||
border: 2px dash 0px 0px ;
|
||||
border-color: @separatorcolor;
|
||||
}
|
||||
#button.selected {
|
||||
background-color: @selected-background;
|
||||
text-color: @foreground;
|
||||
}
|
||||
#inputbar {
|
||||
spacing: 0;
|
||||
text-color: @foreground;
|
||||
padding: 1px ;
|
||||
}
|
||||
#case-indicator {
|
||||
spacing: 0;
|
||||
text-color: @foreground;
|
||||
}
|
||||
#entry {
|
||||
spacing: 0;
|
||||
text-color: @foreground;
|
||||
}
|
||||
#prompt {
|
||||
spacing: 0;
|
||||
text-color: @foreground;
|
||||
}
|
||||
#inputbar {
|
||||
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
|
||||
}
|
||||
#textbox-prompt-colon {
|
||||
expand: false;
|
||||
str: ":";
|
||||
margin: 0px 0.3em 0em 0em ;
|
||||
text-color: @foreground;
|
||||
}
|
@ -25,10 +25,11 @@ in {
|
||||
options.modules.rofi = { enable = mkOption { default = false; }; };
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.rofi = { enable = true; };
|
||||
# this would need you to config rofi using home-manager
|
||||
# programs.rofi = { enable = true; };
|
||||
|
||||
home.file = {
|
||||
".config/rofi/config.rasi".source = ../../i3/rofi/config.rasi;
|
||||
};
|
||||
home.packages = with pkgs; [ rofi ];
|
||||
|
||||
home.file = { ".config/rofi/config.rasi".source = ./config.rasi; };
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user