Compare commits

...

2 commits

Author SHA1 Message Date
e8bc2be255
cleaning up; rewrote README 2025-03-04 22:42:07 -08:00
1924c069f0
fixed emacs dir 2025-03-04 22:31:03 -08:00
14 changed files with 600 additions and 702 deletions

4
.gitignore vendored
View file

@ -1,7 +1,7 @@
emacs/.config/** emacs/.config/emacs/*
!emacs/.config/emacs/
!emacs/.config/emacs/Emacs.org !emacs/.config/emacs/Emacs.org
!emacs/.config/emacs/early-init.el !emacs/.config/emacs/early-init.el
!emacs/.config/emacs/init.el
pianobar/.config/pianobar/album.jpg pianobar/.config/pianobar/album.jpg
pianobar/.config/pianobar/info pianobar/.config/pianobar/info
pianobar/.config/pianobar/state pianobar/.config/pianobar/state

View file

@ -1,56 +0,0 @@
# Dotfiles
My personal dotfiles for River/Sway on Arch Linux. They are designed to be used
with [gnu stow](https://www.gnu.org/software/stow/). Each directory is a kind
of 'module' that can be individually symlinked.
You are welcome to do whatever you would like with these configs (they are
licensed under the 0 clause BSD license); be inspired by them, copy them,
whatever, no attribution necessary. I would encourage you to fork this repo,
then use `stow` to install whatever modules you would like, changing whatever
you want as you go. For example, if you want to steal my neovim configuration,
you could run `stow nvim`, assuming this repo is located in your home
directory.
# Some Software I run
These are my configs that are most easily stealable. I have several more
configs in this repo that you are absolutely welcome to steal or look through,
but these are the most transferrable to other systems.
## Shell
I use [fish](https://fishshell.com/) together with
[starship](https://starship.rs). It's basic, but gets the job done.
## Editors
### Neovim
I love [neovim](https://neovim.io), but it's a pain to configure. My config is
a ~570 LOC lua monstrosity that works wonderfully for me but is kind of
incomprehensible. If you are new to neovim, I would recommend checking out
projects like [lunarvim](https://www.lunarvim.org/) or
[nvchad](https://nvchad.com/), as they are much easier to set up, and probably
better suited for your use case than my config.
### Emacs
I love [emacs](https://www.gnu.org/software/emacs/) as well. My configuration
is a literate `org` file that gets tangled into `init.el`. As far as Emacs
configurations go, it's pretty clean, but still is a several hundred line mess.
## Compositors
I'm on Wayland now, and mostly use [river](https://codeberg.org/river/river),
though I do have a config for [sway](https://swaywm.org/) set up. To help keep
the configs separate, I use [waybar](https://github.com/Alexays/Waybar) for
sway and [yambar](https://codeberg.org/dnkl/yambar) for river. All the other
configs (swaylock, fuzzel, etc.) are compositor agnostic. Note, in both my sway
and river configs I swap meta and left-alt. That's just a habit from starting
on [dwm](https://dwm.suckless.org/), whose default mod key is alt. You may want
to change that, as it interferes pretty heavily in keybindings from other apps.
## Keyd
Since I use vim and emacs, I like to map caps lock to act as control when held
and escape when tapped. I use a simple [keyd](https://github.com/rvaiya/keyd)
config for this. However, note that `keyd/default.conf` should be copied to
`/etc/keyd/` and the `keyd` service should be enabled and started. If `keyd`
isn't in your distro's repos, it is very easy to build and install from source.
Otherwise, [caps2esc](https://gitlab.com/interception/linux/plugins/caps2esc)
probably is and is likewise pretty simple to get set up.

78
README.org Normal file
View file

@ -0,0 +1,78 @@
#+title: William's Dotfiles
#+author: William Ball
#+email: williampi103@gmail.com
#+options: toc:nil num:nil
* Dotfiles
My personal dotfiles for River on Arch Linux. They are designed to be used with [[https://www.gnu.org/software/stow/][gnu stow]]. Each directory is a kind of 'module' that can be individually symlinked.
You are welcome to do whatever you would like with these configs (they are licensed under the 0 clause BSD license); be inspired by them, copy them, whatever, no attribution necessary. I would encourage you to fork this repo, then use =stow= to install whatever modules you would like, changing whatever you want as you go. For example, if you want to use just my neovim configuration, you could run =stow nvim=, assuming this repo is located in your home directory, and my neovim configuration will automatically be symlinked to =~/.config/nvim=.
* Some Software I run
** Terminal
*** Foot
I use [[https://codeberg.org/dnkl/foot][foot]] as my terminal of choice, mostly because I like having a terminal and client. It makes launching the terminal practically instantaneous, and I don't really need the multiplexing capabilities. I've also used and enjoyed [[https://alacritty.org/][alacritty]], [[https://sw.kovidgoyal.net/kitty/][kitty]], [[https://wezterm.org/][wezterm]] and [[https://st.suckless.org][st]] in the past and think they are all excellent terminals.
*** Fish
I use [[https://fishshell.com/][fish]] as my shell, with [[https://starship.rs][starship]] as my prompt. My config is fairly small and sensible, though you would likely want to tweak it. I particularly love and recommend settings =fish_hybrid_key_bindings=, as I'm used to both Emacs and Vim keybindings.
Most of the config is just setting the path, and tweaking some environment variables to make things better for wayland or force programs to follow the XDG spec.
*** RIIR
I have a couple (mostly written in rust) replacements for standard unix tools. Here's a bunch of them:
|-----------+----------|
| Tool | Replaces |
|-----------+----------|
| [[https://github.com/sharkdp/bat][bat]] | =cat= |
| [[https://github.com/bootandy/dust][dust]] | =du= |
| [[https://github.com/eza-community/eza][eza]] | =ls= |
| [[https://github.com/sharkdp/fd][fd]] | =find= |
| [[https://github.com/sharkdp/hyperfine][hyperfine]] | =time= |
| [[https://github.com/BurntSushi/ripgrep][ripgrep]] | =grep= |
| [[https://github.com/XAMPPRocky/tokei][tokei]] | =wc= |
|-----------+----------|
** Editors
*** Neovim
I absolutely love [[https://neovim.io][neovim]], though it is a pain to configure. My config is fairly clean as far as neovim configs go, but probably isn't a very good fit for your use case. I would recommend checking out projects like [[https://www.lunarvim.org/][lunarvim]], [[https://nvchad.com/][nvchad]], or [[https://github.com/LazyVim/LazyVim][LazyVim]] to get started, or borrowing how my config is structured but changing the actual details.
*** Emacs
I love both [[https://www.gnu.org/software/emacs/][emacs]] and vim, but use them for different purposes. In terms of editing experience, my extremely customized neovim is absolutely perfect for me, but there are some things that emacs can do that is just impossible to replicate in neovim. Emacs is fantastic for [[https://orgmode.org][org-mode]] and writing [[https://latex-project.org][LaTeX]], though I usually leave writing code to neovim (emacs still being single-threaded in <current-year> hurts).
** Desktop
I use a custom [[https://wayland.freedesktop.org][Wayland]] desktop built around the excellent compositor [[https://codeberg.org/river/river][river]]
*** River
The first tiling window manager I used (after a brief stint with [[https://i3wm.org][i3]]) was [[https://dwm.suckless.org][dwm]], and river strikes the best balance between maturity, usability, and similarity to dwm. The tag system is strictly superior to usual workspaces in my opinion.
*** Mako
I use [[https://github.com/emersion/mako][mako]] as my notification daemon of choice. I started off on X11 using [[https://github.com/dunst-project/dunst][dunst]], but switched to mako before dunst got Wayland support, since mako's almost the same thing.
*** Swaylock/Swayidle
I use [[https://github.com/swaywm/swaylock][swaylock]] and [[https://github.com/swaywm/swayidle][swayidle]] to handle my screen locking needs. I also have a couple scripts (=timeout.sh= and =toggle_caffeine.sh= in my river config), to basically enable toggling swayidle. I usually want my computer to lock automatically if I've been idle long enough, but sometimes want to be able to turn that off.
*** Fuzzel
I use [[https://codeberg.org/dnkl/fuzzel][fuzzel]] as my launcher. It's basically [[https://github.com/davatorium/rofi][rofi]] for wayland but with less baggage and better [[https://tools.suckless.org/dmenu/][dmenu]]-like functionality. I use it in several scripts in addition to it being my launcher.
*** Wob
I use [[https://github.com/francma/wob][wob]] to show my volume and brightness when I change them. It's just a wayland version of the excellent [[https://github.com/florentc/xob][xob]].
*** Wbg
I use [[https://codeberg.org/dnkl/wbg][wbg]] as my wallpaper setter. There are a million of these, and it doesn't really matter which you pick.
*** Waybar
I don't really like really elaborate and fancy status bars. Whatever status bar I'm using, I like to have workspaces on the left, time and date in the middle, and volume, wifi, and battery on the right. I don't know where I picked up this habit (I think an ancient [[https://github.com/LemonBoy/bar][lemonbar]] script of mine, but I don't really remember), but it's what I'm used to now, and is very easy to emulate in [[https://github.com/Alexays/Waybar][waybar]]. I've tried [[https://codeberg.org/dnkl/yambar][yambar]], but found it very confusing to configure.
*** Keyd
As a heavy emacs/vim user, remapping caps lock to esc/control is absolutely necessary, and [[https://github.com/rvaiya/keyd][keyd]] is great for this. Note that =stow keyd= won't work properly. Instead you should copy =keyd/default.conf= to =/etc/keyd/= and enable the =keyd= service. [[https://gitlab.com/interception/linux/plugins/caps2esc][caps2esc]] is also great for this purpose, but I find keyd a little easier to use.
*** Zathura
My pdf viewer of choice is [[https://pwmt.org/projects/zathura/][zathura]], which is simply excellent. Configurable, uses vim keybindings, does exactly what I need it to out of the box and nothing more. I've tried to get into [[https://sioyek.info/][sioyek]] in the past, but never quite figured it out.
*** Pianobar
[[https://github.com/PromyLOPh/pianobar][Pianobar]] is one of the most underrated pieces of software ever. It's an absolutely phenomenal cli [[https://pandora.com][pandora]] client (that skips ads btw). As just a cli, it's phenomenal, but it's also very easy to build on top of. I'm not much of a hacker, but I was easily able to throw together some scripts to let me pause, skip songs, etc. from keybinds from river, change the station with a dmenu style menu in fuzzel, and send notifications upon song changes with the album art and everything. All with a couple tiny bash scripts. If you don't want to set this up manually, there are also several pieces of software built on top of pianobar, my favorite being [[https://pithos.github.io/][pithos]] (though [[https://github.com/agrif/pianobar.el][pianobar.el]] is also a ton of fun, it just doesn't work very well for me).

View file

@ -0,0 +1,519 @@
#+title: My Emacs Config
#+author: William Ball
#+email: williampi103@gmail.com
#+property: header-args:emacs-lisp :tangle ./init.el :mkdirp
* Basic Settings
** UI
#+begin_src emacs-lisp
(setq inhibit-startup-message t)
(tool-bar-mode -1)
(tooltip-mode -1)
(set-fringe-mode 10)
(menu-bar-mode -1)
(setq visible-bell t)
(setq frame-resize-pixelwise t)
(fset 'yes-or-no-p 'y-or-n-p)
(setq default-frame-alist '((undecorated . t)))
(scroll-bar-mode -1)
#+end_src
** Backups
#+begin_src emacs-lisp
(defvar wball/backup-directory (concat user-emacs-directory "backups"))
(if (not (file-exists-p wball/backup-directory))
(make-directory wball/backup-directory t))
(setq backup-directory-alist `(("." . ,wball/backup-directory)))
(setq make-backup-files t
backup-by-copying t
version-control t
delete-old-versions t
auto-save-default t)
#+end_src
* Packages
** Straight.el
#+begin_src emacs-lisp
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 5))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
#+end_src
** use-package
#+begin_src emacs-lisp
(straight-use-package 'use-package)
(use-package straight
:custom (straight-use-package-by-default t))
(require 'use-package)
(setq use-package-always-ensure t)
(setq use-package-verbose t)
#+end_src
** Automatic updates
#+begin_src emacs-lisp
(use-package auto-package-update
:custom
(auto-package-update-interval 7)
(auto-package-update-prompt-before-update t)
(auto-package-update-hide-results t)
:config
(auto-package-update-maybe)
(auto-package-update-at-time "09:00"))
#+end_src
* UI
** Icons
#+begin_src emacs-lisp
(use-package all-the-icons)
#+end_src
** Rainbow delimiters
#+begin_src emacs-lisp
(use-package rainbow-delimiters
:hook (prog-mode . rainbow-delimiters-mode))
#+end_src
** Fonts
#+begin_src emacs-lisp
(use-package fontaine
:config
(setq fontaine-presets
'((regular
:default-height 150)
(small
:default-height 110)
(large
:default-weight semilight
:default-height 180
:bold-weight extrabold)
(extra-large
:default-weight semilight
:default-height 210
:bold-weight extrabold)
(t
:default-family "Iosevka Nerd Font"
:default-weight normal
:variable-pitch-family "Inter")))
(fontaine-set-preset 'regular))
#+end_src
** Which key
#+begin_src emacs-lisp
(use-package which-key
:defer 0
:diminish which-key-mode
:config
(which-key-mode)
(setq which-key-idle-delay 0.3))
#+end_src
** Theme
#+begin_src emacs-lisp
(use-package catppuccin-theme
:config
(load-theme 'catppuccin :no-confirm))
#+end_src
* Completion
** Vertico
#+begin_src emacs-lisp
(use-package vertico
:init (vertico-mode)
:custom (vertico-cycle t))
#+end_src
** Savehist
#+begin_src emacs-lisp
(use-package savehist
:straight (:type built-in)
:init (savehist-mode))
#+end_src
** Orderless
#+begin_src emacs-lisp
(use-package orderless
:init
(setq completion-styles '(orderless flex)
completion-category-defaults nil
completion-category-overrides '((file (styles partial-completion)))))
#+end_src
** Corfu
#+begin_src emacs-lisp
(use-package corfu
:custom
(corfu-cycle t)
(corfu-auto nil)
(corfu-echo-documentation 0.25)
:init
(global-corfu-mode)
(setq tab-always-indent 'complete))
#+end_src
** Cape
#+begin_src emacs-lisp
(use-package cape
:init
(add-to-list 'completion-at-point-functions #'cape-dabbrev)
(add-to-list 'completion-at-point-functions #'cape-file)
(add-to-list 'completion-at-point-functions #'cape-history))
#+end_src
** Marginalia
#+begin_src emacs-lisp
(use-package marginalia
:after vertico
:init (marginalia-mode))
#+end_src
** Consult
#+begin_src emacs-lisp
;; Example configuration for Consult
(use-package consult
;; Replace bindings. Lazily loaded by `use-package'.
:bind (;; C-c bindings in `mode-specific-map'
("C-c M-x" . consult-mode-command)
("C-c h" . consult-history)
("C-c k" . consult-kmacro)
("C-c m" . consult-man)
("C-c i" . consult-info)
([remap Info-search] . consult-info)
;; C-x bindings in `ctl-x-map'
("C-x M-:" . consult-complex-command) ;; orig. repeat-complex-command
("C-x b" . consult-buffer) ;; orig. switch-to-buffer
("C-x 4 b" . consult-buffer-other-window) ;; orig. switch-to-buffer-other-window
("C-x 5 b" . consult-buffer-other-frame) ;; orig. switch-to-buffer-other-frame
("C-x t b" . consult-buffer-other-tab) ;; orig. switch-to-buffer-other-tab
("C-x r b" . consult-bookmark) ;; orig. bookmark-jump
("C-x p b" . consult-project-buffer) ;; orig. project-switch-to-buffer
;; Custom M-# bindings for fast register access
("M-#" . consult-register-load)
("M-'" . consult-register-store) ;; orig. abbrev-prefix-mark (unrelated)
("C-M-#" . consult-register)
;; Other custom bindings
("M-y" . consult-yank-pop) ;; orig. yank-pop
;; M-g bindings in `goto-map'
("M-g e" . consult-compile-error)
("M-g f" . consult-flymake) ;; Alternative: consult-flycheck
("M-g g" . consult-goto-line) ;; orig. goto-line
("M-g M-g" . consult-goto-line) ;; orig. goto-line
("M-g o" . consult-outline) ;; Alternative: consult-org-heading
("M-g m" . consult-mark)
("M-g k" . consult-global-mark)
("M-g i" . consult-imenu)
("M-g I" . consult-imenu-multi)
;; M-s bindings in `search-map'
("M-s d" . consult-find) ;; Alternative: consult-fd
("M-s c" . consult-locate)
("M-s g" . consult-grep)
("M-s G" . consult-git-grep)
("M-s r" . consult-ripgrep)
("M-s l" . consult-line)
("M-s L" . consult-line-multi)
("M-s k" . consult-keep-lines)
("M-s u" . consult-focus-lines)
;; Isearch integration
("M-s e" . consult-isearch-history)
:map isearch-mode-map
("M-e" . consult-isearch-history) ;; orig. isearch-edit-string
("M-s e" . consult-isearch-history) ;; orig. isearch-edit-string
("M-s l" . consult-line) ;; needed by consult-line to detect isearch
("M-s L" . consult-line-multi) ;; needed by consult-line to detect isearch
;; Minibuffer history
:map minibuffer-local-map
("M-s" . consult-history) ;; orig. next-matching-history-element
("M-r" . consult-history)) ;; orig. previous-matching-history-element
;; Enable automatic preview at point in the *Completions* buffer. This is
;; relevant when you use the default completion UI.
:hook (completion-list-mode . consult-preview-at-point-mode)
;; The :init configuration is always executed (Not lazy)
:init
;; Tweak the register preview for `consult-register-load',
;; `consult-register-store' and the built-in commands. This improves the
;; register formatting, adds thin separator lines, register sorting and hides
;; the window mode line.
(advice-add #'register-preview :override #'consult-register-window)
(setq register-preview-delay 0.5)
;; Use Consult to select xref locations with preview
(setq xref-show-xrefs-function #'consult-xref
xref-show-definitions-function #'consult-xref)
;; Configure other variables and modes in the :config section,
;; after lazily loading the package.
:config
;; Optionally configure preview. The default value
;; is 'any, such that any key triggers the preview.
;; (setq consult-preview-key 'any)
;; (setq consult-preview-key "M-.")
;; (setq consult-preview-key '("S-<down>" "S-<up>"))
;; For some commands and buffer sources it is useful to configure the
;; :preview-key on a per-command basis using the `consult-customize' macro.
(consult-customize
consult-theme :preview-key '(:debounce 0.2 any)
consult-ripgrep consult-git-grep consult-grep
consult-bookmark consult-recent-file consult-xref
consult--source-bookmark consult--source-file-register
consult--source-recent-file consult--source-project-recent-file
;; :preview-key "M-."
:preview-key '(:debounce 0.4 any))
;; Optionally configure the narrowing key.
;; Both < and C-+ work reasonably well.
(setq consult-narrow-key "<") ;; "C-+"
;; Optionally make narrowing help available in the minibuffer.
;; You may want to use `embark-prefix-help-command' or which-key instead.
;; (keymap-set consult-narrow-map (concat consult-narrow-key " ?") #'consult-narrow-help)
)
#+end_src
* Languages
** Agda
#+begin_src emacs-lisp
; (load-file (let ((coding-system-for-read 'utf-8))
; (shell-command-to-string "agda-mode locate")))
#+end_src
** Idris
#+begin_src emacs-lisp
(use-package idris2-mode
:straight (:type git
:host github
:repo "idris-community/idris2-mode"))
#+end_src
** Haskell
#+begin_src emacs-lisp
(use-package haskell-mode)
#+end_src
* Latex
** Auctex
#+begin_src emacs-lisp
(use-package tex-site
:straight auctex
:hook
(LaTeX-mode . visual-line-mode)
(LaTeX-mode . flyspell-mode)
(LaTeX-mode . reftex-mode)
(LaTeX-mode . prettify-symbols-mode)
(LaTeX-mode . outline-minor-mode)
:custom
(TeX-auto-save t)
(TeX-parse-self t)
(TeX-master t)
(reftex-plug-in-to-AUCTeX t)
(preview-auto-cache-preamble t)
(preview-scale-function 0.50)
(TeX-view-program-selection
'(((output-dvi has-no-display-manager) "dvi2tty")
((output-dvi style-pstricks) "dvips and gv")
(output-dvi "xdvi")
(output-pdf "Zathura")
(output-html "xdg-open"))))
#+end_src
** CDLatex
#+begin_src emacs-lisp
(use-package cdlatex
:hook
(LaTeX-mode . #'turn-on-cdlatex)
:custom
(cdlatex-math-symbol-prefix ?\;))
#+end_src
** Yasnippet and laas
#+begin_src emacs-lisp
(use-package yasnippet
:config
(yas-global-mode 1))
#+end_src
#+begin_src emacs-lisp
(defun wball/beginning-of-word ()
(or (= (preceding-char) 32) (= (preceding-char) 0) (= (preceding-char) 10)))
(use-package laas
:hook ((LaTeX-mode . laas-mode)
(org-mode . laas-mode))
:custom
(laas-enable-auto-space nil)
:config
(aas-set-snippets 'laas-mode
:cond #'wball/beginning-of-word
"mk" (lambda () (interactive)
(yas-expand-snippet "\\\\($1\\\\)$0"))
"dm" (lambda () (interactive)
(yas-expand-snippet "\\[\n\t$1\n\\]"))
:cond (lambda () (and (wball/beginning-of-word) (texmathp)))
"set" (lambda () (interactive)
(yas-expand-snippet "\\\\{$1\\\\}$0"))
"empty" "\\emptyset"
"and" "\\wedge"
"or" "\\vee"
"forall" "\\forall"
"exists" "\\exists"
"notin" "\\notin"
"cap" "\\cap"
"cup" "\\cup"
:cond #'texmathp
"NN" "\\N"
"ZZ" "\\Z"
"QQ" "\\Q"
"oo" "\\circ"
"RR" "\\R"
"CC" "\\C"
"BB" "\\B"
"PP" "\\P"
"FF" "\\F"
"HH" "\\H"
"\\\\\\" "\\setminus"
"s=" "\\subseteq"
"s<" "\\subset"
"invs" "^{-1}"
"opl" "\\oplus"
"td" (lambda () (interactive)
(yas-expand-snippet "^{$1}$0"))
"__" (lambda () (interactive)
(yas-expand-snippet "_{$1}$0"))))
#+end_src
* Org Mode
** Org itself
#+begin_src emacs-lisp
(use-package org
:straight (:type built-in)
:init
(setq org-list-allow-alphabetical t)
:custom
(org-startup-indented t)
(org-pretty-entities t)
(org-hide-emphasis-markers t)
(org-startup-with-inline-images t)
(org-image-actual-width '(300))
(org-export-with-smart-quotes t)
(org-directory "~/Nextcloud/org")
(org-cite-global-bibliography '("~/Nextcloud/library.bib"))
(org-agenda-files `(,org-directory))
(org-preview-latex-default-process 'imagemagick)
(org-highlight-latex-and-related '(native))
(org-default-notes-file (mapcar (lambda (x) (concat org-directory x))
'("/todo.org" "/done.org")))
:after ox-latex
:config
(setq org-format-latex-options (plist-put org-format-latex-options :scale 0.6))
(add-to-list 'org-latex-classes '("myreport" "\\documentclass[11pt]{report}"
("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")))
(require 'org-tempo)
:bind (("C-c c" . org-capture)
("C-c l" . org-store-link)
("C-c a" . org-agenda))
:hook (org-mode . visual-line-mode)
(org-mode . flyspell-mode))
#+end_src
** Prettify
#+begin_src emacs-lisp
(use-package org-modern
:hook ((org-mode . org-modern-mode)
(org-agenda-finalize . org-modern-agenda)))
#+end_src
** Citeproc
#+begin_src emacs-lisp
(use-package org-ref)
(require 'oc-csl)
(require 'oc-natbib)
(require 'oc-biblatex)
#+end_src
** Org fragtog
Once [[https://abode.karthinks.com/org-latex-preview/][the improvements to =org-latex-preview= get merged]], this will be unnecessary. For now, however, this really comes in handy.
#+begin_src emacs-lisp
(use-package org-fragtog
:hook (org-mode . org-fragtog-mode))
#+end_src
* Pdfs
** Pdf tools
#+begin_src emacs-lisp
(use-package pdf-tools)
#+end_src
* Terminals/Shells
** Eshell
#+begin_src emacs-lisp
(defun wball/configure-eshell ()
(add-hook 'eshell-pre-command-hook 'eshell-save-some-history)
(add-to-list 'eshell-output-filter-functions 'eshell-truncate-buffer)
(setq eshell-history-size 10000
eshell-buffer-maximum-lines 10000
eshell-history-ignoredups t
eshell-scroll-to-bottom-on-input t))
(use-package eshell
:ensure nil
:commands eshell
:hook (eshell-first-time-mode . wball/configure-eshell)
:bind (("C-c e" . eshell))
:config
(with-eval-after-load 'esh-opt
(setq eshell-destroy-buffer-when-process-dies t)))
(defun eshell/clear (&rest args)
(apply #'eshell/clear-scrollback args))
(defalias 'ff 'find-file)
(defalias 'fo 'find-file-other-window)
(use-package exec-path-from-shell
:config
(when (daemonp)
(exec-path-from-shell-initialize)))
#+end_src
** Dired
#+begin_src emacs-lisp
(use-package dired
:straight (:type built-in)
:commands (dired dired-jump)
:custom ((dired-listing-switches "-agho --group-directories-first"))
:config
(require 'dired-x))
(use-package dired-single
:after dired)
(use-package dired-hide-dotfiles
:hook (dired-mode . dired-hide-dotfiles-mode))
#+end_src
* Misc
** magit
#+begin_src emacs-lisp
(use-package magit)
#+end_src

View file

@ -1,6 +1,7 @@
# This file contains fish universal variable definitions. # This file contains fish universal variable definitions.
# VERSION: 3.0 # VERSION: 3.0
SETUVAR --export FZF_DEFAULT_OPTS:\x2d\x2dcolor\x3dbg\x2b\x3a\x23313244\x2cbg\x3a\x231e1e2e\x2cspinner\x3a\x23f5e0dc\x2chl\x3a\x23f38ba8\x20\x2d\x2dcolor\x3dfg\x3a\x23cdd6f4\x2cheader\x3a\x23f38ba8\x2cinfo\x3a\x23cba6f7\x2cpointer\x3a\x23f5e0dc\x20\x2d\x2dcolor\x3dmarker\x3a\x23f5e0dc\x2cfg\x2b\x3a\x23cdd6f4\x2cprompt\x3a\x23cba6f7\x2chl\x2b\x3a\x23f38ba8 SETUVAR --export FZF_DEFAULT_OPTS:\x2d\x2dcolor\x3dbg\x2b\x3a\x23313244\x2cbg\x3a\x231e1e2e\x2cspinner\x3a\x23f5e0dc\x2chl\x3a\x23f38ba8\x20\x2d\x2dcolor\x3dfg\x3a\x23cdd6f4\x2cheader\x3a\x23f38ba8\x2cinfo\x3a\x23cba6f7\x2cpointer\x3a\x23f5e0dc\x20\x2d\x2dcolor\x3dmarker\x3a\x23f5e0dc\x2cfg\x2b\x3a\x23cdd6f4\x2cprompt\x3a\x23cba6f7\x2chl\x2b\x3a\x23f38ba8
SETUVAR --export GPG_TTY:not\x20a\x20tty
SETUVAR --export SSH_AGENT_PID:786479 SETUVAR --export SSH_AGENT_PID:786479
SETUVAR --export SSH_AUTH_SOCK:/tmp/ssh\x2dXXXXXXkRTHwG/agent\x2e786475 SETUVAR --export SSH_AUTH_SOCK:/tmp/ssh\x2dXXXXXXkRTHwG/agent\x2e786475
SETUVAR ZO_CMD:zo SETUVAR ZO_CMD:zo

View file

@ -1,4 +0,0 @@
Host fg
Hostname forgejo-ssh.ballcloud.cc
User git
ProxyCommand /usr/bin/cloudflared access ssh --hostname %h

View file

@ -1,287 +0,0 @@
### Autotiling
exec autotiling
### Variables
#
# Logo key. Use Mod1 for Alt.
set $mod Mod4
# Home row direction keys, like vim
set $left h
set $down j
set $up k
set $right l
# Your preferred terminal emulator
set $term wezterm
set $browser firefox
set $emacs "emacsclient --create-frame --alternate-editor='emacs'"
# Your preferred application launcher
# Note: pass the final command to swaymsg so that the resulting window can be opened
# on the original workspace that the command was run on.
set $menu fuzzel | xargs swaymsg exec --
### Appearance
# window corner radius in px
# corner_radius 0
#
# # Window background blur
# blur off
# blur_xray off
# blur_passes 2
# blur_radius 5
#
# shadows enable
# shadows_on_csd off
# shadow_blur_radius 20
# shadow_color #0000007F
#
# # inactive window fade amount. 0.0 = no dimming, 1.0 = fully dimmed
# default_dim_inactive 0.0
# dim_inactive_colors.unfocused #000000FF
# dim_inactive_colors.urgent #900000FF
#
# # Move minimized windows into Scratchpad (enable|disable)
# scratchpad_minimize disable
smart_gaps on
gaps inner 10
default_border pixel 2
client.focused #f5c2e7 #1e1e2e #cdd6f4 #a6e3a1 #f5c2e7
client.unfocused #1e1e2e #1e1e2e #cdd6f4 #a6e3a1 #586e75
client.focused_inactive #1e1e2e #1e1e2e #cdd6f4 #a6e3a1 #586e75
font pango:Iosevka Nerd Font 10
### Output configuration
#
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
output * bg ~/.config/wallpaper.png fill
output * scale 1.25
#
# Example configuration:
#
# output HDMI-A-1 resolution 1920x1080 position 1920,0
#
# You can get the names of your outputs by running: swaymsg -t get_outputs
### Idle configuration
#
# Example configuration:
#
exec swayidle -w \
timeout 300 'swaylock -f -c 000000' \
timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
before-sleep 'swaylock -f -c 000000'
#
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
### Input configuration
#
# Example configuration:
#
input "type:touchpad" {
dwt enabled
tap enabled
natural_scroll enabled
accel_profile adaptive
}
input "type:keyboard" {
xkb_layout us,us
xkb_variant ,dvorak
xkb_options altwin:swap_lalt_lwin,grp:win_space_toggle
repeat_delay 300
repeat_rate 40
}
seat * hide_cursor 3000
seat * hide_cursor when-typing enable
#
# You can get the names of your inputs by running: swaymsg -t get_inputs
# Read `man 5 sway-input` for more information about this section.
bindgesture swipe:right workspace prev
bindgesture swipe:left workspace next
### Key bindings
#
# Basics:
#
# Start a terminal
bindsym $mod+Return exec $term
bindsym $mod+bracketright exec $browser
bindsym $mod+e exec $emacs
bindsym $mod+d exec "makoctl dismiss"
bindsym $mod+Shift+d exec "makoctl dismiss --all"
bindsym $mod+z exec "books.sh"
bindsym $mod+y exec "papers.sh"
bindsym $mod+Control+k exec 'brightnessctl set +5%'
bindsym $mod+Control+j exec 'brightnessctl set 5%-'
bindsym XF86MonBrightnessUp exec 'brightnessctl set +5%'
bindsym XF86MonBrightnessDown exec 'brightnessctl set 5%-'
bindsym $mod+Shift+o exec 'swaylock -f -c 000000'
bindsym XF86AudioRaiseVolume exec 'wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 2%+'
bindsym XF86AudioLowerVolume exec 'wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-'
bindsym XF86AudioMute exec 'wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle'
bindsym XF86AudioMicMute exec 'wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle'
# Kill focused window
bindsym $mod+Shift+c kill
# Start your launcher
bindsym $mod+semicolon exec $menu
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
floating_modifier $mod normal
# Reload the configuration file
bindsym $mod+Shift+r reload
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+q exit
#
# Moving around:
#
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# Or use $mod+[up|down|left|right]
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# Ditto, with arrow keys
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
#
# Workspaces:
#
# Switch to workspace
bindsym $mod+1 workspace number 1
bindsym $mod+2 workspace number 2
bindsym $mod+3 workspace number 3
bindsym $mod+4 workspace number 4
bindsym $mod+5 workspace number 5
bindsym $mod+6 workspace number 6
bindsym $mod+7 workspace number 7
bindsym $mod+8 workspace number 8
bindsym $mod+9 workspace number 9
bindsym $mod+0 workspace number 10
# Move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number 1
bindsym $mod+Shift+2 move container to workspace number 2
bindsym $mod+Shift+3 move container to workspace number 3
bindsym $mod+Shift+4 move container to workspace number 4
bindsym $mod+Shift+5 move container to workspace number 5
bindsym $mod+Shift+6 move container to workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9
bindsym $mod+Shift+0 move container to workspace number 10
# Note: workspaces can have any name you want, not just numbers.
# We just use 1-10 as the default.
#
# Layout stuff:
#
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
bindsym $mod+b splith
bindsym $mod+v splitv
# Switch the current container between different layout styles
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+t layout toggle split
# Make the current focus fullscreen
bindsym $mod+f fullscreen
# Toggle the current focus between tiling and floating mode
bindsym $mod+Shift+space floating toggle
# Swap focus between the tiling area and the floating area
bindsym $mod+space focus mode_toggle
# Move focus to the parent container
bindsym $mod+a focus parent
#
# Scratchpad:
#
# Sway has a "scratchpad", which is a bag of holding for windows.
# You can send windows there and get them back later.
# Move the currently focused window to the scratchpad
bindsym $mod+Shift+slash move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+slash scratchpad show
#
# Resizing containers:
#
mode "resize" {
# left will shrink the containers width
# right will grow the containers width
# up will shrink the containers height
# down will grow the containers height
bindsym $mod+$left resize shrink width 10px
bindsym $mod+$down resize grow height 10px
bindsym $mod+$up resize shrink height 10px
bindsym $mod+$right resize grow width 10px
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
#
# pianobar mode:
#
mode "pianobar" {
bindsym $mod+s exec "~/.config/pianobar/change_station.sh" ; mode "default"
bindsym $mod+p exec "echo 'p' > ~/.config/pianobar/ctl" ; mode "default"
bindsym $mod+c exec "~/.config/pianobar/display_info.sh" ; mode "default"
bindsym $mod+n exec "echo 'n' > ~/.config/pianobar/ctl" ; mode "default"
bindsym s exec "~/.config/pianobar/change_station.sh" ; mode "default"
bindsym p exec "echo 'p' > ~/.config/pianobar/ctl" ; mode "default"
bindsym c exec "~/.config/pianobar/display_info.sh" ; mode "default"
bindsym n exec "echo 'n' > ~/.config/pianobar/ctl" ; mode "default"
bindsym Escape mode "default"
}
bindsym $mod+p mode "pianobar"
#
# Status Bar:
#
# Read `man 5 sway-bar` for more information about this section.
bar {
swaybar_command waybar
}
# autostart
exec blueman-applet
exec mako
exec nm-applet
exec emacs --daemon
include /etc/sway/config.d/*

View file

@ -1,97 +0,0 @@
// -*- mode: json -*-
{
"layer": "top",
"position": "bottom",
"height" : 30,
"modules-left": [
"sway/workspaces",
],
"modules-center": [
"clock",
],
"modules-right": [
"sway/language",
"pulseaudio",
"network",
"battery",
"tray"
],
"sway/language": {
"format": "{short} {variant}",
"on-click": "swaymsg input type:keyboard xkb_switch_layout next",
},
"sway/workspaces": {
"format": "{icon}",
"format-icons": {
"1": " 1 ",
"2": " 2 ",
"3": " 3 ",
"4": " 4 ",
"5": " 5 ",
"6": " 6 ",
"7": " 7 ",
"8": " 8 ",
"9": " 9 ",
},
},
"clock": {
"format": "{:%H:%M %A, %B %d}",
"tooltip": false
},
"pulseaudio": {
"format": "{icon} {volume:2}%",
"format-bluetooth": "{icon} {volume}%",
"format-muted": "MUTE",
"format-icons": {
"headphones": "",
"default": [
"",
""
]
},
"scroll-step": 5,
"on-click": "pamixer -t",
"on-click-right": "pavucontrol"
},
"network": {
"interface": "wlan0",
"format": "{ifname}",
"format-wifi": "{essid} ({signalStrength}%)  ",
"format-ethernet": "{ipaddr}/{cidr} ",
"format-disconnected": "",
"tooltip-format": "{ifname} via {gwaddr} ",
"tooltip-format-wifi": "{essid} ({signalStrength}%)  ",
"tooltip-format-ethernet": "{ifname} ",
"tooltip-format-disconnected": "Disconnected",
"max-length": 50
},
"battery": {
"bat": "BAT0",
"interval": 60,
"states": {
"good": 95,
"warning": 30,
"critical": 15
},
"format": "{icon} {capacity}%",
"format-icons": [
"",
"",
"",
"",
""
]
},
"tray": {
"icon-size": 20
}
}

View file

@ -1,37 +0,0 @@
/*
*
* Catppuccin Mocha palette
* Maintainer: rubyowo
*
*/
@define-color base #1e1e2e;
@define-color mantle #181825;
@define-color crust #11111b;
@define-color text #cdd6f4;
@define-color subtext0 #a6adc8;
@define-color subtext1 #bac2de;
@define-color surface0 #313244;
@define-color surface1 #45475a;
@define-color surface2 #585b70;
@define-color overlay0 #6c7086;
@define-color overlay1 #7f849c;
@define-color overlay2 #9399b2;
@define-color blue #89b4fa;
@define-color lavender #b4befe;
@define-color sapphire #74c7ec;
@define-color sky #89dceb;
@define-color teal #94e2d5;
@define-color green #a6e3a1;
@define-color yellow #f9e2af;
@define-color peach #fab387;
@define-color maroon #eba0ac;
@define-color red #f38ba8;
@define-color mauve #cba6f7;
@define-color pink #f5c2e7;
@define-color flamingo #f2cdcd;
@define-color rosewater #f5e0dc;

View file

@ -1,66 +0,0 @@
@import "mocha.css";
* {
font-size: 20px;
font-family: Iosevka Nerd Font;
border-radius: 0;
}
window#waybar {
background: rgba(30, 30, 40, 1);
color: @text;
}
#workspaces,
#clock,
#pulseaudio,
#battery,
#tray {
background: transparent;
}
#language {
color: @yellow;
}
#workspaces button {
padding: 0 2px;
color: @text;
}
#workspaces button.focused {
color: @base;
background: @pink;
}
#workspaces button:hover {
box-shadow: inherit;
text-shadow: inherit;
}
#workspaces button:hover {
background: @yellow;
color: @base;
border: @base;
padding: 0 3px;
}
#pulseaudio {
color: @red;
}
#network {
color: @green;
}
#battery {
color: @blue;
}
#clock,
#pulseaudio,
#memory,
#cpu,
#battery,
#disk {
padding: 0 10px;
}

View file

@ -1,153 +0,0 @@
font: &font Iosevka Nerd Font:size=40
rosewater: &rosewater f5e0dcff
flamingo: &flamingo f2cdcdff
pink: &pink f5c2e7ff
mauve: &mauve cba6f7ff
red: &red f38ba8ff
maroon: &maroon eba0acff
peach: &peach fab387ff
yellow: &yellow f9e2afff
green: &green a6e3a1ff
teal: &teal 94e2d5ff
sky: &sky 89dcebff
sapphire: &sapphire 74c7ecff
blue: &blue 89b4faff
lavender: &lavender b4befeff
text: &text cdd6f4ff
base: &base 1e1e2eff
bg_default: &bg_default {stack: [{background: {color: *base}}, {underline: {size: 4, color: *pink}}]}
bar:
height: 80
location: bottom
font: *font
spacing: 10
margin: 7
layer: bottom
foreground: *text
background: *base
left:
- river:
anchors:
- base: &river_base
left-margin: 10
right-margin: 13
default: {string: {text:  }}
conditions:
id == 1: {string: {text: 1}}
id == 2: {string: {text: 2}}
id == 3: {string: {text: 3}}
id == 4: {string: {text: 4}}
id == 5: {string: {text: 5}}
id == 6: {string: {text: 6}}
id == 7: {string: {text: 7}}
id == 8: {string: {text: 8}}
id == 9: {string: {text: 9}}
id == 1048576: {string: {text: "scratchpad"}}
content:
map:
on-click:
left: sh -c "riverctl set-focused-tags $((1 << ({id} - 1)))"
right: sh -c "riverctl toggle-focused-tags $((1 << ({id} -1)))"
middle: sh -c "riverctl toggle-view-tags $((1 << ({id} -1)))"
conditions:
state == urgent:
map:
<<: *river_base
deco: {background: {color: *red}}
state == focused:
map:
<<: *river_base
deco: *bg_default
state == visible && ~occupied:
map:
<<: *river_base
state == visible && occupied:
map:
<<: *river_base
deco: *bg_default
state == unfocused:
map:
<<: *river_base
state == invisible && ~occupied: {empty: {}}
state == invisible && occupied:
map:
<<: *river_base
deco: {underline: {size: 3, color: *blue}}
center:
- clock:
time-format: "%H:%M %A, %B %d"
content:
- string: {text: "{time}"}
right:
- network:
# name: "wlan0"
poll-interval: 1000
content:
map:
default: {string: {text: "", foreground: *text}}
conditions:
state == down: {string: {text:  , foreground: *text}}
state == up:
map:
default:
- string: {text:  }
- string: {text: " {ssid}"}
conditions:
ipv4 == "":
- string: {text:  , foreground: *text}
- string: {text: " {ssid}", foreground: *text}
- battery:
name: BAT0
poll-interval: 60000
anchors:
discharging: &discharging
list:
items:
- ramp:
tag: capacity
items:
- string: {text:  , foreground: *red}
- string: {text:  , foreground: *red}
- string: {text:  ,}
- string: {text:  ,}
- string: {text:  ,}
- string: {text:  ,}
- string: {text:  ,}
- string: {text:  ,}
- string: {text:  ,}
- string: {text:  , foreground: *green}
- string: {text: " {capacity}% {estimate}"}
content:
map:
conditions:
state == unknown:
<<: *discharging
state == discharging:
<<: *discharging
state == charging:
- string: {text:  , foreground: *text}
- string: {text: " {capacity}% {estimate}"}
state == full:
- string: {text:  , foreground: *green}
- string: {text: " {capacity}% full"}
state == "not charging":
- ramp:
tag: capacity
items:
- string: {text:   , foreground: *red}
- string: {text:   , foreground: *rosewater}
- string: {text:   , foreground: *green}
- string: {text:   , foreground: *green}
- string: {text:   , foreground: *green}
- string: {text:   , foreground: *green}
- string: {text:   , foreground: *green}
- string: {text:   , foreground: *green}
- string: {text:   , foreground: *green}
- string: {text:   , foreground: *green}
- string: {text: " {capacity}%"}