aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2024-05-06 02:23:38 +0530
committerAryadev Chavali <aryadev@aryadevchavali.com>2024-05-06 02:38:06 +0530
commit2986c04c2fcad44eb80ce01336ade33a7429cf7a (patch)
treeb27268aaf71518841b11d19050f727275965b876
parent04a4f50daf64f3159b9f8f15c0a106073d738a54 (diff)
downloaddotfiles-2986c04c2fcad44eb80ce01336ade33a7429cf7a.tar.gz
dotfiles-2986c04c2fcad44eb80ce01336ade33a7429cf7a.tar.bz2
dotfiles-2986c04c2fcad44eb80ce01336ade33a7429cf7a.zip
(Emacs|Shell|SystemD)~Small changes
-rw-r--r--Emacs/.config/emacs/app.org8
-rw-r--r--Emacs/.config/emacs/config.org108
-rw-r--r--Emacs/.config/emacs/core.org6
-rw-r--r--Emacs/.config/emacs/early-init.el2
-rw-r--r--Emacs/.config/emacs/elisp/haskell-multiedit.el5
-rw-r--r--Emacs/.config/emacs/elisp/move.el7
-rw-r--r--Emacs/.config/emacs/lang.org2
-rw-r--r--Shell/.zshrc2
-rw-r--r--SystemD/.config/systemd/user/mail.timer4
9 files changed, 90 insertions, 54 deletions
diff --git a/Emacs/.config/emacs/app.org b/Emacs/.config/emacs/app.org
index a173269..4791444 100644
--- a/Emacs/.config/emacs/app.org
+++ b/Emacs/.config/emacs/app.org
@@ -158,8 +158,7 @@ integrate it into my workflow just a bit better.
(notmuch-tag-change-list '("-inbox" "+flagged") unflag) beg end)
(when (eq beg end)
(notmuch-search-next-thread)))
- (advice-add #'notmuch-poll-and-refresh-this-buffer :before
- #'+mail/sync-mail)
+
(advice-add #'notmuch-poll-and-refresh-this-buffer :after
#'+mail/trash-junk)
(with-eval-after-load "evil-collection"
@@ -194,7 +193,8 @@ are some corners I'd like to adjust).
:init
(setq-default dired-listing-switches "-AFBlu --group-directories-first"
dired-omit-files "^\\."
- dired-dwim-target t)
+ dired-dwim-target t
+ image-dired-external-viewer "nsxiv")
(with-eval-after-load "evil-collection"
(evil-collection-dired-setup))
:general
@@ -443,7 +443,7 @@ Pretty symbols and a display record.
:display
("\\*e?shell\\*" ; for general shells as well
(display-buffer-at-bottom)
- (window-height . 0.30)))
+ (window-height . 0.33)))
#+end_src
** Eshell variables and aliases
Set some sane defaults, a banner and a prompt. The prompt checks for
diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org
index c0f279e..05a9d62 100644
--- a/Emacs/.config/emacs/config.org
+++ b/Emacs/.config/emacs/config.org
@@ -159,8 +159,8 @@ In [[file:early-init.el][early-init.el]] I set the number of
native-workers to 4, which isn't necessarily optimal when
loading/compiling the rest of this file depending on the machine I
use:
-- On my laptop (=spiderboy=) I'd prefer to have it use 2-3 threads so I
- can actually use the rest of the laptop while waiting for
+- On my laptop (=spiderboy=) I'd prefer to have it use 2-3 threads so
+ I can actually use the rest of the laptop while waiting for
compilation
- On my desktop (=oldboy=) I'd prefer to use 4-6 threads as I can
afford more, so I can get a faster load up.
@@ -253,7 +253,7 @@ Set font size to 140 if on my desktop (oldboy) or 175 if on my laptop
:straight nil
:config
(+oreo/sys-name-cond
- ("spiderboy" (set-face-attribute 'default nil :height 175))
+ ("spiderboy" (set-face-attribute 'default nil :height 145))
("oldboy" (set-face-attribute 'default nil :height 140))))
#+end_src
** Startup screen
@@ -571,7 +571,9 @@ need to use it.
:keymaps 'override
"C-s" #'avy-goto-char-timer
"M-s" #'isearch-forward
- "gl" #'avy-goto-line))
+ "gp" #'avy-move-region
+ "gl" #'avy-goto-line
+ "gw" #'avy-goto-word-1))
#+end_src
** Ace window
Though evil provides a great many features in terms of window
@@ -587,6 +589,16 @@ management of windows (closing, switching, etc).
(nmmap
[remap evil-window-next] #'ace-window))
#+end_src
+** Ace link
+Avy-style link following!
+#+begin_src emacs-lisp
+(use-package ace-link
+ :straight t
+ :general
+ (nmmap
+ :keymaps 'override
+ "gL" #'ace-link))
+#+end_src
** Helpful
Helpful provides a modernised interface for some common help
commands. I replace ~describe-function~, ~describe-variable~ and
@@ -667,7 +679,8 @@ thing faster and within Emacs lisp. ~rgrep~ is useful though.
:keymaps 'grep-mode-map
"0" #'evil-beginning-of-line
"q" #'quit-window
- "i" #'wgrep-change-to-wgrep-mode)
+ "i" #'wgrep-change-to-wgrep-mode
+ "c" #'recompile)
(nmmap
:keymaps 'wgrep-mode-map
"q" #'evil-record-macro
@@ -681,13 +694,22 @@ thing faster and within Emacs lisp. ~rgrep~ is useful though.
#+begin_src emacs-lisp
(use-package rg
:after grep
+ :display
+ ("^\\*\\*ripgrep\\*\\*"
+ (display-buffer-at-bottom display-buffer-reuse-window)
+ (window-height . 0.35)
+ (reusable-frames . t))
:general
(search-leader
"R" #'rg)
- (:keymaps 'rg-mode-map
- "]]" #'rg-next-file
- "[[" #'rg-prev-file
- "q" #'quit-window)
+ (nmmap
+ :keymaps 'rg-mode-map
+ "c" #'rg-recompile
+ "C" #'rg-rerun-toggle-case
+ "]]" #'rg-next-file
+ "[[" #'rg-prev-file
+ "q" #'quit-window
+ "i" #'wgrep-change-to-wgrep-mode)
:init
(setq rg-group-result t
rg-hide-command t
@@ -695,7 +717,9 @@ thing faster and within Emacs lisp. ~rgrep~ is useful though.
rg-show-header t
rg-custom-type-aliases nil
rg-default-alias-fallback "all"
- rg-buffer-name "*ripgrep*"))
+ rg-buffer-name "*ripgrep*")
+ :config
+ (evil-set-initial-state 'rg-mode 'normal))
#+end_src
*** Searching Lisp config
Using grep search all the elisp files. With ~wgrep~ this provides
@@ -730,10 +754,12 @@ focus on a buffer.
(mode-leader
"o" #'+olivetti-mode)
:init
- (setq-default olivetti-body-width 0.7)
- (setq olivetti-style nil)
- (add-hook 'olivetti-mode-on-hook (proc (interactive) (text-scale-increase 1)))
- (add-hook 'olivetti-mode-off-hook (proc (interactive) (text-scale-decrease 1)))
+ (setq-default olivetti-body-width 0.6)
+ (setq olivetti-style 'fancy)
+ (add-hook 'olivetti-mode-on-hook
+ (proc (interactive) (text-scale-increase 1)))
+ (add-hook 'olivetti-mode-off-hook
+ (proc (interactive) (text-scale-decrease 1)))
:config
(defun +olivetti-mode ()
(interactive)
@@ -939,12 +965,14 @@ keymaps. Same with dictionary searching.
("\\*Dictionary\\*"
(display-buffer-reuse-window display-buffer-same-window)
(reusable-frames . t))
+ :init
+ (setq dictionary-server "dict.org")
:general
- (local-leader
- :keymaps 'override
- "[" #'le-thesaurus-get-synonyms
- "]" #'le-thesaurus-get-antonyms
- "#" #'dictionary-search))
+ (search-leader
+ :infix "w"
+ "s" #'le-thesaurus-get-synonyms
+ "a" #'le-thesaurus-get-antonyms
+ "d" #'dictionary-search))
#+end_src
* Programming packages
Packages that help with programming in general, providing IDE like
@@ -962,13 +990,19 @@ in the minibuffer. A lot cleaner.
:straight nil
:hook (prog-mode-hook . eldoc-mode)
:init
- (global-eldoc-mode 1))
+ (global-eldoc-mode 1)
+ :general
+ (leader
+ "h>" #'eldoc-doc-buffer))
(use-package eldoc-box
:hook (eldoc-mode-hook . eldoc-box-hover-mode)
:init
(setq eldoc-box-position-function #'eldoc-box--default-upper-corner-position-function
- eldoc-box-clear-with-C-g t))
+ eldoc-box-clear-with-C-g t)
+ :general
+ (leader
+ "h." #'eldoc-box-help-at-point))
#+end_src
** Flycheck
Flycheck is the checking system for Emacs. I don't necessarily like
@@ -1047,7 +1081,7 @@ flymake]])
:after (flycheck eglot)
:hook (eglot-managed-mode-hook . flycheck-eglot-mode))
#+end_src
-** Tabs and spaces
+** Indentation
By default, turn off tabs and set the tab width to two.
#+begin_src emacs-lisp
(setq-default indent-tabs-mode nil
@@ -1056,7 +1090,7 @@ By default, turn off tabs and set the tab width to two.
However, if necessary later, define a function that may activate tabs locally.
#+begin_src emacs-lisp
-(defun +oreo/activate-tabs ()
+(defun +oreo/use-tabs ()
(interactive)
(setq-local indent-tabs-mode t))
#+end_src
@@ -1209,9 +1243,10 @@ for latex fragments.
(use-package org
:defer t
:init
- (setq org-format-latex-options '(:foreground default :background default :scale 2
- :html-foreground "Black" :html-background "Transparent"
- :html-scale 1.0 :matchers ("begin" "$1" "$" "$$" "\\(" "\\["))
+ (setq org-format-latex-options
+ '(:foreground default :background default :scale 2
+ :html-foreground "Black" :html-background "Transparent"
+ :html-scale 1.0 :matchers ("begin" "$1" "$" "$$" "\\(" "\\["))
org-latex-src-block-backend 'minted
org-latex-minted-langs '((emacs-lisp "common-lisp")
(ledger "text")
@@ -1221,15 +1256,18 @@ for latex fragments.
(caml "ocaml"))
org-latex-packages-alist '(("" "minted"))
org-latex-pdf-process
- '("latexmk -f -bibtex -pdf -shell-escape -%latex -interaction=nonstopmode -output-directory=%o %f")
- org-latex-minted-options '(("style" "colorful")
- ("linenos")
- ("frame" "single")
- ("mathescape")
- ("fontfamily" "courier")
- ("samepage" "false")
- ("breaklines" "true")
- ("breakanywhere" "true"))))
+ (list (concat "latexmk -f -bibtex -pdf "
+ "-shell-escape -%latex -interaction=nonstopmode "
+ "-output-directory=%o %f"))
+ org-latex-minted-options
+ '(("style" "colorful")
+ ("linenos")
+ ("frame" "single")
+ ("mathescape")
+ ("fontfamily" "courier")
+ ("samepage" "false")
+ ("breaklines" "true")
+ ("breakanywhere" "true"))))
#+end_src
** Org Core Variables
Tons of variables for org-mode, including a ton of latex ones. Can't
diff --git a/Emacs/.config/emacs/core.org b/Emacs/.config/emacs/core.org
index 417d978..b727f78 100644
--- a/Emacs/.config/emacs/core.org
+++ b/Emacs/.config/emacs/core.org
@@ -110,7 +110,7 @@ code.
(general-evil-setup t))
#+end_src
-** Some binds in Emacs
+** Some binds for Emacs
Some bindings that I couldn't fit elsewhere easily.
#+begin_src emacs-lisp
(use-package emacs
@@ -126,6 +126,8 @@ Some bindings that I couldn't fit elsewhere easily.
"C-M-l" #'+move/word-forward)
(nmmap
+ "M-;" #'eval-expression
+ "g=" #'align-regexp
"C--" #'text-scale-decrease
"C-=" #'text-scale-increase
"C-+" #'text-scale-adjust)
@@ -140,7 +142,7 @@ Some bindings that I couldn't fit elsewhere easily.
"h" '(help-command :which-key "Help"))
(mode-leader
- "t" #'+oreo/switch-theme)
+ "T" #'+oreo/switch-theme)
(code-leader
"F" `(,(proc (interactive) (find-file "~/Code/"))
diff --git a/Emacs/.config/emacs/early-init.el b/Emacs/.config/emacs/early-init.el
index a238e8e..da57d3c 100644
--- a/Emacs/.config/emacs/early-init.el
+++ b/Emacs/.config/emacs/early-init.el
@@ -35,5 +35,5 @@
(push '(menu-bar-lines . 0) default-frame-alist)
(push '(tool-bar-lines . 0) default-frame-alist)
(push '(vertical-scroll-bars) default-frame-alist)
-(push '(alpha . (85 65)) default-frame-alist)
+(push '(alpha . (85 80)) default-frame-alist)
(advice-add #'x-apply-session-resources :override #'ignore)
diff --git a/Emacs/.config/emacs/elisp/haskell-multiedit.el b/Emacs/.config/emacs/elisp/haskell-multiedit.el
index 89aeb7b..96eb19d 100644
--- a/Emacs/.config/emacs/elisp/haskell-multiedit.el
+++ b/Emacs/.config/emacs/elisp/haskell-multiedit.el
@@ -37,9 +37,8 @@
"Minor mode for haskell buffers generated by haskell-interactive-mode.
Provides bindings to retrieve content back into the REPL with
full multi-edit commands"
- nil
- ""
- haskell-multiedit-mode-map)
+ :lighter nil
+ :keymap haskell-multiedit-mode-map)
(with-eval-after-load "haskell"
(defun haskell-multiedit ()
diff --git a/Emacs/.config/emacs/elisp/move.el b/Emacs/.config/emacs/elisp/move.el
index 77dd785..ed154fb 100644
--- a/Emacs/.config/emacs/elisp/move.el
+++ b/Emacs/.config/emacs/elisp/move.el
@@ -37,16 +37,11 @@
;;; Code:
-(defun +move/--normalise-arg (arg)
- (if (or (null arg) (< arg 1))
- 1
- arg))
-
(defmacro +move/create-move (name description &rest body)
`(defun ,name (&optional arg)
,description
(interactive "P")
- (let ((arg (+move/--normalise-arg arg)))
+ (let ((arg (if (or (null arg) (< arg 1)) 1 arg)))
(while (not (= arg 0))
,@body
(setq arg (- arg 1))))))
diff --git a/Emacs/.config/emacs/lang.org b/Emacs/.config/emacs/lang.org
index b1cbcb2..15f9ecb 100644
--- a/Emacs/.config/emacs/lang.org
+++ b/Emacs/.config/emacs/lang.org
@@ -15,7 +15,7 @@ change it for C++.
(("[mM]akefile\\'" . "Makefile skeleton")
""
"CC=gcc
-CFLAGS=-Wall -Wextra -Werror -Wswitch-enum -ggdb -fsanitize=address -std=c11
+CFLAGS=-Wall -Wextra -Werror -Wswitch-enum -ggdb -fsanitize=address -fsanitize=undefined -std=c11
LIBS=
ARGS=
diff --git a/Shell/.zshrc b/Shell/.zshrc
index bb95636..ae1b445 100644
--- a/Shell/.zshrc
+++ b/Shell/.zshrc
@@ -133,3 +133,5 @@ export SDKMAN_DIR="/home/oreo/.sdkman"
[[ -s "/home/oreo/.sdkman/bin/sdkman-init.sh" ]] && source "/home/oreo/.sdkman/bin/sdkman-init.sh"
eval $(opam env)
+
+[ -f "/home/oreo/.ghcup/env" ] && . "/home/oreo/.ghcup/env" # ghcup-env
diff --git a/SystemD/.config/systemd/user/mail.timer b/SystemD/.config/systemd/user/mail.timer
index 0d1b970..b166cba 100644
--- a/SystemD/.config/systemd/user/mail.timer
+++ b/SystemD/.config/systemd/user/mail.timer
@@ -1,9 +1,9 @@
[Unit]
-Description=Run mail sync every 3 hours
+Description=Run mail sync every hour
[Timer]
OnBootSec=1min
-OnUnitActiveSec=10800
+OnUnitActiveSec=3600
Unit=mail.service
[Install]