mirror of
https://github.com/foo-dogsquared/dotfiles.git
synced 2025-02-07 12:19:02 +00:00
Add YASnippets to Doom Emacs and systemd
I've also changed the target of zsh to its appropriate location according to the XDG Base Directory specs so that's neat.
This commit is contained in:
parent
49a71cb5f4
commit
d117f30281
18
README.adoc
18
README.adoc
@ -245,8 +245,7 @@ Just run the following command `git clone https://github.com/hlissner/doom-emacs
|
|||||||
* Minium version (from `emacs --version`):
|
* Minium version (from `emacs --version`):
|
||||||
** `GNU Emacs 26.3`
|
** `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.
|
** 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.
|
* The Doom configs are just the default config and some snippets (in `snippets/`) so there's not much to go through here.
|
||||||
I may also add snippet files in there.
|
|
||||||
* Regarding theming Doom Emacs, I've found mainly two ways.
|
* 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.
|
** 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;
|
** 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.
|
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]
|
=== https://www.x.org/wiki/[Xorg]
|
||||||
|
|
||||||
A display server implementing X window system.
|
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.
|
Mostly chosen due to its wide options for customization compared to GNU Bash.
|
||||||
|
|
||||||
* Config found at link:zsh/[`zsh/`] directory.
|
* 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`):
|
* Minimum version (from `zsh --version`):
|
||||||
** `zsh 5.7.1 (x86_64-pc-linux-gnu)`
|
** `zsh 5.7.1 (x86_64-pc-linux-gnu)`
|
||||||
* Contains `.zprofile` and `.zshrc`.
|
* 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/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/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/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://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.
|
* https://feh.finalrewind.org/[feh] - A minimal image viewer.
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd
|
;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd
|
||||||
;; font string. You generally only need these two:
|
;; font string. You generally only need these two:
|
||||||
(setq doom-font (font-spec :family "Iosevka" :size 16)
|
(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"))
|
doom-serif-font (font-spec :family "Source Serif Pro"))
|
||||||
|
|
||||||
;; There are two ways to load a theme. Both assume the theme is installed and
|
;; 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,
|
;; 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!
|
;; 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
|
;; 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'.
|
;; numbers are disabled. For relative line numbers, set this to `relative'.
|
||||||
(setq global-display-line-numbers-mode t)
|
(setq global-display-line-numbers-mode t)
|
||||||
(setq display-line-numbers-type 'relative)
|
(setq display-line-numbers-type 'relative)
|
||||||
|
|
||||||
|
|
||||||
;; Here are some additional functions/macros that could help you configure Doom:
|
;; Here are some additional functions/macros that could help you configure Doom:
|
||||||
;;
|
;;
|
||||||
;; - `load!' for loading external *.el files relative to this one
|
;; - `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
|
;; You can also try 'gd' (or 'C-c g d') to jump to their definition and see how
|
||||||
;; they are implemented.
|
;; they are implemented.
|
||||||
|
|
||||||
|
;; Search the project path with Projectile.
|
||||||
|
(setq projectile-project-search-path '("~/projects/software/" "~/writings/"))
|
||||||
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; CUSTOM PACKAGES CONFIGURATIONS ;
|
; 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
|
;;(use-package! ewal
|
||||||
;; :init (setq ewal-json-file "~/.cache/wal/colors.json"
|
;; :init (setq ewal-json-file "~/.cache/wal/colors.json"
|
||||||
;; ewal-use-built-in-always-p nil
|
;; ewal-use-built-in-always-p nil
|
||||||
|
@ -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.
|
;; This file controls what Doom modules are enabled and what order they load in.
|
||||||
;; Remember to run 'doom sync' after modifying it!
|
;; Remember to run 'doom sync' after modifying it!
|
||||||
|
8
emacs/snippets/fundamental-mode/box
Normal file
8
emacs/snippets/fundamental-mode/box
Normal file
@ -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)) ?\-)}┘
|
6
emacs/snippets/fundamental-mode/eg
Normal file
6
emacs/snippets/fundamental-mode/eg
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: Shorthand for e.g.
|
||||||
|
# key: eg
|
||||||
|
# condition: t
|
||||||
|
# --
|
||||||
|
(e.g., $1)
|
5
emacs/snippets/fundamental-mode/em
Normal file
5
emacs/snippets/fundamental-mode/em
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: Em dash
|
||||||
|
# key: em
|
||||||
|
# --
|
||||||
|
—
|
5
emacs/snippets/fundamental-mode/ie
Normal file
5
emacs/snippets/fundamental-mode/ie
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: Shorthand for i.e. in parenthesis
|
||||||
|
# key: ie
|
||||||
|
# --
|
||||||
|
(i.e., $1)
|
9
emacs/snippets/fundamental-mode/sign
Normal file
9
emacs/snippets/fundamental-mode/sign
Normal file
@ -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`}
|
||||||
|
|
25
emacs/snippets/latex-mode/agraph
Normal file
25
emacs/snippets/latex-mode/agraph
Normal file
@ -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)`
|
5
emacs/snippets/latex-mode/bf
Normal file
5
emacs/snippets/latex-mode/bf
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: Boldface text
|
||||||
|
# key: bf
|
||||||
|
# --
|
||||||
|
\textbf{$1}
|
8
emacs/snippets/latex-mode/equation
Normal file
8
emacs/snippets/latex-mode/equation
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: \equation
|
||||||
|
# key: eq
|
||||||
|
# --
|
||||||
|
\begin{equation}
|
||||||
|
\label{math!$1}
|
||||||
|
$2
|
||||||
|
\end{equation}
|
5
emacs/snippets/latex-mode/it
Normal file
5
emacs/snippets/latex-mode/it
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: Italic text
|
||||||
|
# key: it
|
||||||
|
# --
|
||||||
|
\textit{$1}
|
5
emacs/snippets/latex-mode/li
Normal file
5
emacs/snippets/latex-mode/li
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: List item for lists
|
||||||
|
# key: li
|
||||||
|
# --
|
||||||
|
\item{$1}
|
7
emacs/snippets/latex-mode/mathblock
Normal file
7
emacs/snippets/latex-mode/mathblock
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: LaTeX math block
|
||||||
|
# key: mb
|
||||||
|
# --
|
||||||
|
\begin{equation*}
|
||||||
|
$1
|
||||||
|
\end{equation*}
|
5
emacs/snippets/latex-mode/mathinline
Normal file
5
emacs/snippets/latex-mode/mathinline
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: Math inline block
|
||||||
|
# key: mi
|
||||||
|
# --
|
||||||
|
$$1$
|
7
emacs/snippets/latex-mode/ol
Normal file
7
emacs/snippets/latex-mode/ol
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: Ordered list
|
||||||
|
# key: ol
|
||||||
|
# --
|
||||||
|
\begin{enumerate}
|
||||||
|
$1
|
||||||
|
\end{enumerate}
|
7
emacs/snippets/latex-mode/section
Normal file
7
emacs/snippets/latex-mode/section
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: \section
|
||||||
|
# key: sec
|
||||||
|
# uuid: sec
|
||||||
|
# --
|
||||||
|
\section{$1}
|
||||||
|
\label{sect!$1}
|
7
emacs/snippets/latex-mode/subsection
Normal file
7
emacs/snippets/latex-mode/subsection
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: \subsection
|
||||||
|
# key: subsec
|
||||||
|
# uuid: subsec
|
||||||
|
# --
|
||||||
|
\subsection{$1}
|
||||||
|
\label{subsect!$1}
|
5
emacs/snippets/latex-mode/tt
Normal file
5
emacs/snippets/latex-mode/tt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: Teletype text
|
||||||
|
# key: tt
|
||||||
|
# --
|
||||||
|
\texttt{$1}
|
7
emacs/snippets/latex-mode/ul
Normal file
7
emacs/snippets/latex-mode/ul
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: Unordered list
|
||||||
|
# key: ul
|
||||||
|
# --
|
||||||
|
\begin{itemize}
|
||||||
|
$1
|
||||||
|
\end{itemize}
|
5
emacs/snippets/org-mode/link
Normal file
5
emacs/snippets/org-mode/link
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: Org-Mode link
|
||||||
|
# key: link
|
||||||
|
# --
|
||||||
|
[[${1:URL}][${2:Description}]]
|
@ -11,7 +11,8 @@
|
|||||||
"rofi": "$HOME/.config/rofi/",
|
"rofi": "$HOME/.config/rofi/",
|
||||||
"sxiv": "$HOME/.config/sxiv",
|
"sxiv": "$HOME/.config/sxiv",
|
||||||
"sxhkd": "$HOME/.config/sxhkd/",
|
"sxhkd": "$HOME/.config/sxhkd/",
|
||||||
|
"systemd": "$HOME/.config/systemd",
|
||||||
"wal": "$HOME/.config/wal",
|
"wal": "$HOME/.config/wal",
|
||||||
"xorg": "$HOME",
|
"xorg": "$HOME",
|
||||||
"zsh": "$HOME"
|
"zsh": "$HOME/.config/zsh"
|
||||||
}
|
}
|
||||||
|
@ -191,6 +191,7 @@ $0
|
|||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet append "Appendix block" bi
|
snippet append "Appendix block" bi
|
||||||
|
`!p snip.rv = "\n" * 4`
|
||||||
[appendix]
|
[appendix]
|
||||||
== ${1:Additional readings}
|
== ${1:Additional readings}
|
||||||
$0
|
$0
|
||||||
|
9
systemd/user/local-backup.service
Normal file
9
systemd/user/local-backup.service
Normal file
@ -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
|
9
systemd/user/local-backup.timer
Normal file
9
systemd/user/local-backup.timer
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Backup with Unison
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=*-*-* 0/4:00:00
|
||||||
|
Persistent=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
9
systemd/user/pkglist-commit.service
Normal file
9
systemd/user/pkglist-commit.service
Normal file
@ -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
|
9
systemd/user/pkglist-commit.timer
Normal file
9
systemd/user/pkglist-commit.timer
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Commit the package list into the dotfiles
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=monthly
|
||||||
|
Persistent=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
10
systemd/user/pkglist-update.service
Normal file
10
systemd/user/pkglist-update.service
Normal file
@ -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
|
9
systemd/user/pkglist-update.timer
Normal file
9
systemd/user/pkglist-update.timer
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user