diff --git a/README.adoc b/README.adoc index 773fc3d..0717e11 100644 --- a/README.adoc +++ b/README.adoc @@ -245,8 +245,7 @@ Just run the following command `git clone https://github.com/hlissner/doom-emacs * Minium version (from `emacs --version`): ** `GNU Emacs 26.3` ** For Doom Emacs, it's not particularly important since it's in rolling release but for future references, it is from the `develop` branch at commit https://github.com/hlissner/doom-emacs/commit/efa599f076c3a140c6b4006c352fdba3361abebd[`efa599f076c3a140c6b4006c352fdba3361abebd`] accessed at 2020-04-24. -* The Doom configs are just the default config so there's not much to go through here. -I may also add snippet files in there. +* The Doom configs are just the default config and some snippets (in `snippets/`) so there's not much to go through here. * Regarding theming Doom Emacs, I've found mainly two ways. ** First is simply using https://gitlab.com/jjzmajic/ewal[ewal] but the resulting colors are not pretty IMO and I haven't found a way to customize it aside from forking and modifying the package itself. ** Second is simply generating the Doom Emacs theme file myself; @@ -398,6 +397,17 @@ I also recommend https://www.youtube.com/watch?v=GYW9i_u5PYs[Luke Smith's video] That's where I also heard of it. +=== https://systemd.io/[systemd] + +A set of building blocks for system management of a Linux-based system. + +* Config located at link:systemd/[`sxiv/`] directory. +* The usual target path is at `$HOME/.config/systemd`. +* Minimum version (from `systemctl --version`): +** `systemd 245 (245.5-2-arch)` +* Contains simple services and timers (as replacement for cron) such as backups and package list updates. + + === https://www.x.org/wiki/[Xorg] A display server implementing X window system. @@ -417,7 +427,8 @@ A Unix shell and an alternative to the Bash. Mostly chosen due to its wide options for customization compared to GNU Bash. * Config found at link:zsh/[`zsh/`] directory. -* The usual target path for a user is at `$HOME/`. +* The usual target path for a user is at `$HOME/.config/zsh`. +You do have to set `ZDOTDIR=$XDG_CONFIG_HOME/zsh` at `/etc/zsh/zshenv` (requires root privilege) though. * Minimum version (from `zsh --version`): ** `zsh 5.7.1 (x86_64-pc-linux-gnu)` * Contains `.zprofile` and `.zshrc`. @@ -466,6 +477,7 @@ If you want to look for some alternatives or just feeling adventurous yourself, * https://github.com/sharkdp/bat[bat] - Basically `cat(1)` with wings. * https://github.com/jarun/Buku[Buku] - A developer-oriented (i.e., easy to integrate with your own programs) browser-independent bookmark manager for the command line. +* https://github.com/cookiecutter/cookiecutter[Cookiecutter] - A project template generator for your... projects. :) * https://github.com/ogham/exa[exa] - A user-friendly replacement for `ls(1)`. * https://github.com/sharkdp/fd[fd] - A user-friendly alternative to `find(1)` from https://www.gnu.org/software/findutils/[GNU `findutils`]. * https://feh.finalrewind.org/[feh] - A minimal image viewer. diff --git a/emacs/config.el b/emacs/config.el index bef2de0..6c26c24 100644 --- a/emacs/config.el +++ b/emacs/config.el @@ -20,7 +20,6 @@ ;; 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 "Source Serif Pro") doom-serif-font (font-spec :family "Source Serif Pro")) ;; There are two ways to load a theme. Both assume the theme is installed and @@ -30,14 +29,13 @@ ;; If you use `org' and don't want your org files in the default location below, ;; change `org-directory'. It must be set before org loads! -(setq org-directory "~/org/") +(setq org-directory "~/writings/orgnotes") ;; 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 global-display-line-numbers-mode t) (setq display-line-numbers-type 'relative) - ;; Here are some additional functions/macros that could help you configure Doom: ;; ;; - `load!' for loading external *.el files relative to this one @@ -55,12 +53,21 @@ ;; You can also try 'gd' (or 'C-c g d') to jump to their definition and see how ;; they are implemented. +;; Search the project path with Projectile. +(setq projectile-project-search-path '("~/projects/software/" "~/writings/")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; CUSTOM PACKAGES CONFIGURATIONS ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; Set the TeX engine to LuaTeX. +(after! tex + (TeX-engine-set "luatex") + (add-to-list 'safe-local-variable-values + '(TeX-command-extra-options . "-shell-escape")) +) + ;;(use-package! ewal ;; :init (setq ewal-json-file "~/.cache/wal/colors.json" ;; ewal-use-built-in-always-p nil diff --git a/emacs/init.el b/emacs/init.el index b346470..0015816 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -1,4 +1,4 @@ -;;; init.el -*- lexical-binding: t; -*- +;;; init.el -* ;; This file controls what Doom modules are enabled and what order they load in. ;; Remember to run 'doom sync' after modifying it! diff --git a/emacs/snippets/fundamental-mode/box b/emacs/snippets/fundamental-mode/box new file mode 100644 index 0000000..4b90efc --- /dev/null +++ b/emacs/snippets/fundamental-mode/box @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: Create a box +# key: box +# expand-env: ((yas-indent-line 'fixed) (yas-wrap-around-region 'nil)) +# -- +┌${1:$(make-string (+ 2 (string-width yas-text)) ?\-)}┐ +| $1 | +└${1:$(make-string (+ 2 (string-width yas-text)) ?\-)}┘ diff --git a/emacs/snippets/fundamental-mode/eg b/emacs/snippets/fundamental-mode/eg new file mode 100644 index 0000000..5ea94f1 --- /dev/null +++ b/emacs/snippets/fundamental-mode/eg @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: Shorthand for e.g. +# key: eg +# condition: t +# -- +(e.g., $1) \ No newline at end of file diff --git a/emacs/snippets/fundamental-mode/em b/emacs/snippets/fundamental-mode/em new file mode 100644 index 0000000..0f93721 --- /dev/null +++ b/emacs/snippets/fundamental-mode/em @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: Em dash +# key: em +# -- +— diff --git a/emacs/snippets/fundamental-mode/ie b/emacs/snippets/fundamental-mode/ie new file mode 100644 index 0000000..0a91bc7 --- /dev/null +++ b/emacs/snippets/fundamental-mode/ie @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: Shorthand for i.e. in parenthesis +# key: ie +# -- +(i.e., $1) \ No newline at end of file diff --git a/emacs/snippets/fundamental-mode/sign b/emacs/snippets/fundamental-mode/sign new file mode 100644 index 0000000..d90aba9 --- /dev/null +++ b/emacs/snippets/fundamental-mode/sign @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# contributor: Gabriel Arazas +# name: The ending signature useful for email. +# key: sign +# uuid: sign +# -- +${1:Sincerely,} +${2:`user-full-name`} + diff --git a/emacs/snippets/latex-mode/agraph b/emacs/snippets/latex-mode/agraph new file mode 100644 index 0000000..c33e77d --- /dev/null +++ b/emacs/snippets/latex-mode/agraph @@ -0,0 +1,25 @@ +# -*- mode: snippet -*- +# name: Graph without considering integers +# key: agraph +# -- +\begin{figure}[${1:ht}] + \centering + \begin{tikzpicture} + \begin{axis}[ + xlabel=${2:$x$}, + ylabel=${3:$y$}, + axis lines = middle, + grid=major, + axis equal=false, + tick style={very thick}, + major tick style=thick, + minor tick num=2, + domain=${4:-10}:${5:10},$6 + ] + \addplot[samples=${7:$$(+ (string-to-number (or (yas-field-value 5) "0")) (string-to-number (or (yas-field-value 4) "0")))}, $8]{${9:x}\}; + \end{axis} + \end{tikzpicture} + \caption{$10} + \label{fig!${11:$10}} +\end{figure} +`(yas-field-value 4)` \ No newline at end of file diff --git a/emacs/snippets/latex-mode/bf b/emacs/snippets/latex-mode/bf new file mode 100644 index 0000000..f058635 --- /dev/null +++ b/emacs/snippets/latex-mode/bf @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: Boldface text +# key: bf +# -- +\textbf{$1} diff --git a/emacs/snippets/latex-mode/equation b/emacs/snippets/latex-mode/equation new file mode 100644 index 0000000..35b8031 --- /dev/null +++ b/emacs/snippets/latex-mode/equation @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: \equation +# key: eq +# -- +\begin{equation} + \label{math!$1} + $2 +\end{equation} diff --git a/emacs/snippets/latex-mode/it b/emacs/snippets/latex-mode/it new file mode 100644 index 0000000..22756c3 --- /dev/null +++ b/emacs/snippets/latex-mode/it @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: Italic text +# key: it +# -- +\textit{$1} diff --git a/emacs/snippets/latex-mode/li b/emacs/snippets/latex-mode/li new file mode 100644 index 0000000..ee24c60 --- /dev/null +++ b/emacs/snippets/latex-mode/li @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: List item for lists +# key: li +# -- +\item{$1} diff --git a/emacs/snippets/latex-mode/mathblock b/emacs/snippets/latex-mode/mathblock new file mode 100644 index 0000000..e61643a --- /dev/null +++ b/emacs/snippets/latex-mode/mathblock @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: LaTeX math block +# key: mb +# -- +\begin{equation*} +$1 +\end{equation*} diff --git a/emacs/snippets/latex-mode/mathinline b/emacs/snippets/latex-mode/mathinline new file mode 100644 index 0000000..a59599c --- /dev/null +++ b/emacs/snippets/latex-mode/mathinline @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: Math inline block +# key: mi +# -- +$$1$ \ No newline at end of file diff --git a/emacs/snippets/latex-mode/ol b/emacs/snippets/latex-mode/ol new file mode 100644 index 0000000..0b61047 --- /dev/null +++ b/emacs/snippets/latex-mode/ol @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: Ordered list +# key: ol +# -- +\begin{enumerate} + $1 +\end{enumerate} diff --git a/emacs/snippets/latex-mode/section b/emacs/snippets/latex-mode/section new file mode 100644 index 0000000..6af0fde --- /dev/null +++ b/emacs/snippets/latex-mode/section @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: \section +# key: sec +# uuid: sec +# -- +\section{$1} +\label{sect!$1} diff --git a/emacs/snippets/latex-mode/subsection b/emacs/snippets/latex-mode/subsection new file mode 100644 index 0000000..804349e --- /dev/null +++ b/emacs/snippets/latex-mode/subsection @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: \subsection +# key: subsec +# uuid: subsec +# -- +\subsection{$1} +\label{subsect!$1} diff --git a/emacs/snippets/latex-mode/tt b/emacs/snippets/latex-mode/tt new file mode 100644 index 0000000..ecb87f2 --- /dev/null +++ b/emacs/snippets/latex-mode/tt @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: Teletype text +# key: tt +# -- +\texttt{$1} diff --git a/emacs/snippets/latex-mode/ul b/emacs/snippets/latex-mode/ul new file mode 100644 index 0000000..562bb90 --- /dev/null +++ b/emacs/snippets/latex-mode/ul @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: Unordered list +# key: ul +# -- +\begin{itemize} + $1 +\end{itemize} diff --git a/emacs/snippets/org-mode/link b/emacs/snippets/org-mode/link new file mode 100644 index 0000000..329ebca --- /dev/null +++ b/emacs/snippets/org-mode/link @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: Org-Mode link +# key: link +# -- +[[${1:URL}][${2:Description}]] diff --git a/locations.json b/locations.json index bd0276b..daf35fc 100644 --- a/locations.json +++ b/locations.json @@ -11,7 +11,8 @@ "rofi": "$HOME/.config/rofi/", "sxiv": "$HOME/.config/sxiv", "sxhkd": "$HOME/.config/sxhkd/", + "systemd": "$HOME/.config/systemd", "wal": "$HOME/.config/wal", "xorg": "$HOME", - "zsh": "$HOME" + "zsh": "$HOME/.config/zsh" } diff --git a/nvim/own-snippets/asciidoc.snippets b/nvim/own-snippets/asciidoc.snippets index 1c2b0e4..d00ea8b 100644 --- a/nvim/own-snippets/asciidoc.snippets +++ b/nvim/own-snippets/asciidoc.snippets @@ -191,6 +191,7 @@ $0 endsnippet snippet append "Appendix block" bi +`!p snip.rv = "\n" * 4` [appendix] == ${1:Additional readings} $0 diff --git a/nvim/own-snippets/tex.snippets b/nvim/own-snippets/tex.snippets index 2278c5c..fffb584 100644 --- a/nvim/own-snippets/tex.snippets +++ b/nvim/own-snippets/tex.snippets @@ -45,7 +45,7 @@ def add_variable_numbers(*inputs, **kwargs): total += i except ValueError: continue - + return total endglobal @@ -142,7 +142,7 @@ snippet subsec "Subsection tag" bi \subsection{$1} \label{subsect!$1} $0 -endsnippet +endsnippet # Common commands snippet pack "Use package command" bis @@ -270,7 +270,7 @@ $0 endsnippet snippet alignli "Quick align equation with label" biw -${1:} &= ${2:} \label{math!$3} \\ $4 +${1:} &= ${2:} \label{math!$3} \\ $4 endsnippet snippet gathered "Gathered environment which lets you gather a bunch of equations and assign them under one equation number" bi @@ -378,7 +378,7 @@ snippet plot3 "Add a 3D plot" i $0 endsnippet -# Common mathematical functions and symbols +# Common mathematical functions and symbols # Also take note that most expressions are prepended with 'M' to mean mathematical usage snippet === "Equivalent to" iw \equiv @@ -955,7 +955,7 @@ snippet li "List item for the OL/UL lists" iw \item{$1} $0 endsnippet - + context "not math()" snippet a "URL links (with description)" iw \href{${1:}}{${2:}} $0 @@ -1127,7 +1127,7 @@ snippet GOo "Lowercase Greek letter omega" w endsnippet # Custom commands and environment (for my class notes) -# Do not use this if you don't have the following packages and +# Do not use this if you don't have the following packages and # does not have my custom document style file: # * tcolorbox # * xcolor diff --git a/systemd/user/local-backup.service b/systemd/user/local-backup.service new file mode 100644 index 0000000..c9a3e3c --- /dev/null +++ b/systemd/user/local-backup.service @@ -0,0 +1,9 @@ +[Unit] +Description=Backup with Unison + +[Service] +Type=oneshot +ExecStart=/usr/bin/unison main -fat -ignorearchives -batch -root "/run/media/%u/Seagate Backup Plus Drive" -links true + +[Install] +WantedBy=graphical.target diff --git a/systemd/user/local-backup.timer b/systemd/user/local-backup.timer new file mode 100644 index 0000000..a66e536 --- /dev/null +++ b/systemd/user/local-backup.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Backup with Unison + +[Timer] +OnCalendar=*-*-* 0/4:00:00 +Persistent=true + +[Install] +WantedBy=default.target diff --git a/systemd/user/pkglist-commit.service b/systemd/user/pkglist-commit.service new file mode 100644 index 0000000..7cb7bf7 --- /dev/null +++ b/systemd/user/pkglist-commit.service @@ -0,0 +1,9 @@ +[Unit] +Description=Commit the package list into the dotfiles + +[Service] +Type=oneshot +ExecStart=%h/.local/bin/commit-pkglist + +[Install] +WantedBy=default.target diff --git a/systemd/user/pkglist-commit.timer b/systemd/user/pkglist-commit.timer new file mode 100644 index 0000000..285cfb1 --- /dev/null +++ b/systemd/user/pkglist-commit.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Commit the package list into the dotfiles + +[Timer] +OnCalendar=monthly +Persistent=true + +[Install] +WantedBy=default.target diff --git a/systemd/user/pkglist-update.service b/systemd/user/pkglist-update.service new file mode 100644 index 0000000..c6cdf26 --- /dev/null +++ b/systemd/user/pkglist-update.service @@ -0,0 +1,10 @@ +[Unit] +Description=Create a package list from the Arch Linux repos + +[Service] +Type=oneshot +ExecStart=/usr/bin/pacman -Qqem > $HOME/dotfiles/aur-packages.txt +ExecStart=/usr/bin/pacman -Qqen > $HOME/dotfiles/packages.txt + +[Install] +WantedBy=default.target diff --git a/systemd/user/pkglist-update.timer b/systemd/user/pkglist-update.timer new file mode 100644 index 0000000..54d45d5 --- /dev/null +++ b/systemd/user/pkglist-update.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Create a package list from the Arch Linux repos + +[Timer] +OnCalendar=*-*-* 1/6:00:00 +Persistent=true + +[Install] +WantedBy=default.target