My System Config
Step 1: Get the latest Arch ISO
Here is the download page. Fetch a copy.
Step 2: Prepare a USB
Simplest method of all is to copy the ISO to the pen drive. Alternately, use Ventoy. If you use ventoy, you can turn on secure boot support.
Step 3: Boot the ISO
Turn off secure-boot and then boot into the system using the ISO.
Step 3.1: Connect to the internet
TL;DR
iwctl will open a prompt that also has autocomplete.
device listdevice /name/ set-property Powered onadapter /adapter/ set-property Powered onstation /name/ scanstation /name/ get-networksstation /name/ connect SSID
Step 3.2: Get latest version of archinstall
pacman -Sy archinstall
Step 4: Install using archinstall
<- Step 3.2: Get latest version of archinstall
In the archinstall menu:
Choose global mirrors, choose disk config with btrfs and zstd enabled alongside using default subvolumes, add encryption to the btrfs partition, enable swap on zram, use systemd-boot as bootloader, enable Unified kernel images, DO NOT set a root password, add a sudo user, in profile select Desktop > Sway, select polkit to be the seat access, change greeter to sddm, select pipewire for audio, select linux kernel (hardened sucks ass), select network-manager for network config, install it, and wait.
Step 5: Post install steps from ISO
Once done, use the ISO and mount the encrypted drive as follows:
cryptsetup --allow-discards --persistent open /path/to/dev root
This will allow Step 11: zram setup and fstrim to be used.
After this, mount the root partition and NOT THE SUBVOLUME! This is needed for Step 7: Post package drama I: Kernel
mount /dev/mapper/root /mnt
You should see a couple of folders (subvols actually) when you do it. Now run
btrfs subvolume set-default /mnt/@
Now unmount and remount and check if root subvolume was properly mounted directly or not. We need to do this because of this. And we need the default later on here.
Step 6: Packages
Install git. Clone paru's repo and cd into it and run makepkg -si. This should install paru.
Now install emacs and somehow run org babel tangle from CLI.
You might want to move some of the files to their respective places after you change the
username.
Step 7: Post package drama I: Kernel
mkinitcpio
Now we need to make a lot of tweaks over here. First up, edit /etc/mkinitcpio.conf and change
the contents to something like this:
MODULES=(btrfs)
BINARIES=()
FILES=()
HOOKS=(base systemd autodetect microcode keyboard modconf kms sd-vconsole block sd-encrypt filesystems fsck)
The module array is needed for the filesystem. The hooks array has some important elements:
- base: needed as a dep for fsck (since it pulls
/bin/sh, otherwise pretty useless) - systemd: actual init
- sd-vconsole: lets you type the encrypt pass
- sd-encrypt: will autodecrypt based on a fixed format file
linux.preset
Change it to this:
# mkinitcpio preset file for the 'linux' package
#ALL_config="/etc/mkinitcpio.conf"
ALL_kver="/boot/vmlinuz-linux"
microcode=(/boot/*-ucode.img)
PRESETS=('default' 'fallback')
#default_config="/etc/mkinitcpio.conf"
#default_image="/boot/initramfs-linux.img"
default_uki="/boot/EFI/Linux/arch-linux.efi"
default_options="--splash=/usr/share/systemd/bootctl/splash-arch.bmp"
#fallback_config="/etc/mkinitcpio.conf"
#fallback_image="/boot/initramfs-linux-fallback.img"
fallback_uki="/boot/EFI/Linux/arch-linux-fallback.efi"
fallback_options="-S autodetect"
Regenerate the uki.
Kernel cmdline and crypttab
<- Step 5: Post install steps from ISO
Now, we have the fstab set up for us already by archinstall script. We need to set up the crypttab.initramfs to be able to unlock the root partition at boot.
These are the contents of /etc/crypttab.initramfs
root /dev/path_to_dev none tpm2-device=auto
For kernel cmdline, you need a single option, quiet (to suppress the noisy boot messages). In my
case the file happened to be /etc/kernel/cmdline, it could be anywhere mentioned here though.
Secure Boot using sbctl
Over here the archwiki and upstream README pretty much suffice.
Make sure to run
sbctl enroll-keys -mto enroll the microsoft keys as well!!
Add an mkinitcpio post hook that signs all the enrolled binaries as well
cat << EOF > /etc/initcpio/post/uki-sbctl
#!/usr/bin/env bash
echo "signing all files"
sbctl sign-all -g
EOF
chmod +x /etc/initcpio/post/uki-sbctl
This assumes that all the files were already listed in sbctl's database.
Unlocking LUKS via TPM
Now add a second slot to the LUKS container and enroll a key to bind with TPM (make sure secure boot is on for this).
Rest, follow this section.
I personally bound it to pcr7 only and use a pin alongside. I don't have much idea on what's a good combination.
Step 8: Post package drama II: Remaining packages
Install rustup for Rust development.
Flatpak and pipx should be installed on their own after this.
Step 9: Meta stuff to be set up
xdg-user-dirs:xdg-user-dirs-update- copy the
lock@.servicefrom dotfiles to/etc/systemd/system/- Run
systemctl enable lock@(id -u)
- Run
- Copy
issueandparu.confto/etc - Move over the rest of the stuff mentioned in the dotfiles.
- Copy over the gtk-3.0 and gtk-4.0 themes to all the flatpak config folders.
- Move librewolf's
chromefolder to its designated spot. - Refresh font-cache:
fc-cache -fv - Add insults to
sudo - Run topgrade once to sync everything
- rebuild bat's cache:
bat cache --build - Copy over the cursor theme to two different locations:
~/.iconsand~/.local/share/icons. Yes both places. It doesn't work for flatpaks otherwise.- Download any you want. I use oreo grey cursors.
- From the config folder, copy the themes folder to
~/.local/share/themes/. I took a massive pain to set that shit up.
Step 10: Battery, Bluetooth, Music and Firewall
- Enable
bluetooth.service - Enable
tlp.serviceand masksystemd-rfkill.{service,socket} - Enable
ufw.service(defaults are mostly good)
Step 11: zram setup and fstrim
<- Step 5: Post install steps from ISO
zram-generator and how to use it optimizations
Enable fstrim.timer
Step 12: pacman related stuff
paccache.timer: clears cache oftenpacman-filesdb-refresh.timer: refreshes packmac-filesystemreflector.timer: refresh mirrorlists based on speed
Step 13: Disable SDDM and other things
I don't use it, as I launch sway straight from tty.
systemctl disable sddm.service
Run
metapac cleansystemctl --user enable idle.servicesystemctl --user enable bg.servicesystemctl --user enable cliphist.servicesystemctl --user enable waybar.servicesystemctl --user enable wireplumber.service
Another thing to do is to add the following to /etc/pam.d/login, so that logging in using tty also
unlocks the gnome-keyring.
auth optional pam_gnome_keyring.so
session optional pam_gnome_keyring.so auto_start
Step 14: Restart
Step 15: Set up mail creds
They are not in my config for obvious reasons. I don't want to doxx my accounts.
Bin
This is for validating your network session on IITM subnet from the CLI. I write this in bash because it's helpful for arch/server installations
super_secure_curl() { # shits actually weaker key exchange lmao
curl -w "%{response_code}\n" --silent --output /dev/null --ciphers DEFAULT@SECLEVEL=1 -k $@
}
read -p "Enter roll number: " roll
stty -echo
read -p "Enter password: " pass
stty echo
response=$(super_secure_curl -c cookies.txt https://netaccess.iitm.ac.in/account/login)
if [ $response == "200" ]; then
response=$(super_secure_curl -X POST -b cookies.txt --data-raw "userLogin=$roll&userPassword=$pass&submit=" https://netaccess.iitm.ac.in/account/login)
if [ $response == "302" ]; then
response=$(super_secure_curl -X POST -b cookies.txt --data-raw "duration=2&approveBtn=" https://netaccess.iitm.ac.in/account/approve)
if [ $response == "302" ]; then
printf "\nLogged in!"
else
printf "\nFailed!"
fi
else
printf "\nFailed!"
fi
else
printf "\nFailed!"
fi
[ -f cookies.txt ] && rm cookies.txt
URL="$1"
BASENAME=$(basename "$URL")
HTMLFILE="${BASENAME}.html"
ORGFILE="${BASENAME}.org"
curl -L "$URL" -o "$HTMLFILE"
pandoc -f html -o org "$HTMLFILE" -o "$ORGFILE"
rm "$HTMLFILE"
Bashrc
append path function
This is a useful function that makes sure that only one instance of a dir is in $PATH
append_path() {
case ":$PATH:" in
*:"$1":*) ;;
*)
PATH="${PATH:+$PATH:}$1"
;;
esac
}
Setting paths
Rest of path madness
test -r '/home/innocentzero/.opam/opam-init/init.sh' && . '/home/innocentzero/.opam/opam-init/init.sh' > /dev/null 2> /dev/null || true
append_path '/home/innocentzero/.local/bin/'
append_path '/home/innocentzero/bin/'
append_path '/home/innocentzero/.cargo/bin/'
append_path '/home/innocentzero/.ghcup/bin'
append_path '/home/innocentzero/.cabal/bin'
export PATH
# unload the path function
unset -f append_path
Env exports
some important env exports
# important stuff
export TERM=kitty
export TERMINAL=kitty
export EDITOR=helix
# set bat as the highlighter for man
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
export MANROFFOPT="-c"
# Qt decorations off
export QT_WAYLAND_FORCE_DPI=physical
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export _JAVA_AWT_WM_NONREPARENTING=1
export GPG_TTY=$(tty)
NEWT COLORS
These help set the color for nmtui (and anything else that uses newt)
export NEWT_COLORS="root=#EEEEEE,#0A0A0A border=#a9b1d6,#0A0A0A window=#a9b1d6,#0A0A0A shadow=#0A0A0A,#0A0A0A title=#a9b1d6,#0A0A0A button=#a9b1d6,#0A0A0A button_active=#7aa2f7,#0A0A0A actbutton=#7aa2f7,#0A0A0A compactbutton=#7aa2f7,#0A0A0A checkbox=#a9b1d6,#0A0A0A actcheckbox=#7aa2f7,#0A0A0A entry=#a9b1d6,#0A0A0A actentry=#7aa2f7,#0A0A0A disentry=#7aa2f7,#0A0A0A textbox=#a9b1d6,#0A0A0A acttextbox=#7aa2f7,#0A0A0A label=#a9b1d6,#0A0A0A listbox=#a9b1d6,#0A0A0A actlistbox=#7aa2f7,#0A0A0A sellistbox=#7aa2f7,#0A0A0A actsellistbox=#7aa2f7,#0A0A0A"
other helpful initializations
# init zoxide
eval "$(zoxide init bash)"
# in place of command -h
help() {
"$@" --help 2>&1 | bathelp
}
. "$HOME/.cargo/env"
[ -f "/home/innocentzero/.ghcup/env" ] && . "/home/innocentzero/.ghcup/env" # ghcup-env
Start up compositors
Start up niri at tty1 and cage emacs at tty2 (This is how I start up)
# set env variables for sway to work properly
if [ "$(tty)" = "/dev/tty1" ]; then
# Make sure there's no already running session.
if systemctl --user -q is-active niri.service; then
echo 'A niri session is already running.'
exit 1
fi
# Reset failed state of all user units.
systemctl --user reset-failed
# Import the login manager environment.
systemctl --user import-environment
# DBus activation environment is independent from systemd. While most of
# dbus-activated services are already using `SystemdService` directive, some
# still don't and thus we should set the dbus environment with a separate
# command.
if hash dbus-update-activation-environment 2> /dev/null; then
dbus-update-activation-environment --all
fi
# Start niri and wait for it to terminate.
systemctl --user --wait start niri.service
# Force stop of graphical-session.target.
systemctl --user start --job-mode=replace-irreversibly niri-shutdown.target
# Unset environment that we've set.
systemctl --user unset-environment WAYLAND_DISPLAY XDG_SESSION_TYPE XDG_CURRENT_DESKTOP NIRI_SOCKET
elif [ "$(tty)" = "/dev/tty2" ]; then
# start emacs in kiosk mode to eliminate all distractions
cage -d -- emacs
fi
Dconf
dconf write "/org/gnome/desktop/interface/gtk-theme" "'adw-gtk3-dark'"
Make sure the themes folder is included in the right place.
perfect config
A lot of these settings have been borrowed from doom-emacs/minimal-emacs.d
Variable guides: If anything is used in module/file foo, label it i0/foo/varname
Function guides: If anything is called in module/file foo, label it i0/foo/funname
If anything is meant to be used by the end user, label it i0/usage/funname
Hook guides: If anything runs before foo-event, label it i0/module/pre-foo-event-hook
If anything runs after foo-event, label it i0/module/post-foo-event-hook
Early init
Lexical bindings
First we toggle lexical bindings. This is apparently a major boost once byte compiled.
;;; early-init.el --- Early Init -*- lexical-binding: t; -*-
Start time notes
Note the start time of emacs. This will let you get total time spent on init.
(defconst i0/early-init/emacs-start-time (current-time))
Raise garbage collection limits
Temporarily raise the garbage collection threshold to its maximum value. It will be restored later to controlled values. We install a hook for that.
(setq gc-cons-threshold most-positive-fixnum)
(setq gc-cons-percentage 1.0)
GC Threshold
The GC threshold and percentage - these control how frequently the GC is triggered. The cons threshold is how many cons cells you can create before GC gets triggerd. Higher values help with init to reduce GC load. The cons percentage allows you to use x * 100 % of the heap.
(defconst i0/early-init/gc-cons-threshold (* 32 1024 1024))
(defconst i0/early-init/gc-cons-percentage 0.5)
GC Reset delay
The seconds after which GC is reset to the former state
(defconst i0/early-init/gc-reset-delay 0.5)
Set debug variable
This variable is used throughout early init to debug potential causes of issues.
(defconst i0/early-init/debug-init t)
Turn off garbage collection messages
(setq garbage-collection-messages i0/early-init/debug-init)
Restoring GC
This function restores the GC to the earlier behaviour.
This depends on i0/early-init/gc-reset-delay to check whether to delay it (and by how much).
See the documentation on add-hook to make sense of the symbols. The value is the priority or the niceness. The one after that is buffer locality.
(defun i0/early-init/restore-gc-values ()
(setq gc-cons-threshold i0/early-init/gc-cons-threshold)
(setq gc-cons-percentage i0/early-init/gc-cons-percentage))
(defun i0/early-init/restore-gc ()
(if (bound-and-true-p i0/early-init/gc-reset-delay)
(run-with-timer i0/early-init/gc-reset-delay nil
#'i0/early-init/restore-gc-values)
(i0/early-init/restore-gc-values)))
(add-hook 'emacs-startup-hook #'i0/early-init/restore-gc 99)
Memory read from processes
This increases the memory read limits and immediately reads outputs
(setq read-process-output-max (* 5 1024 1024))
(setq process-adaptive-read-buffering nil)
Warnings and errors
Depending on the debug mode's presence, use either warnings or errors, and increase the message space.
(setq warning-minimum-level (if i0/early-init/debug-init :warning :error))
(setq warning-suppress-types '((lexical-binding)))
(when i0/early-init/debug-init (setq message-log-max 16384))
pgtk event timeout
This improves performance of child-frames in wayland.
(when (boundp 'pgtk-wait-for-event-timeout)
(setq pgtk-wait-for-event-timeout 0.001))
legacy advice warnings
Disable warnings from the legacy advice API. They aren't useful.
(setq ad-redefinition-action 'accept)
Font compacting
Font compacting can be very resource-intensive
(setq inhibit-compacting-font-caches t)
Unless daemon or non-interactive
This macro's arguments are run only when emacs is not running as a daemon or noninteractively
(defmacro i0/early-init/unless-daemon-or-noninteractive (&rest body)
`(when (and (not (daemonp))
(not noninteractive))
,@body))
Frame resizing
Don't resize frames. We don't care. This improves the speed.
(i0/early-init/unless-daemon-or-noninteractive
(setq frame-resize-pixelwise t)
(setq frame-inhibit-implied-resize t))
case-insensitive searches
Don't run them. A second, case-insensitive pass over auto-mode-alist is time wasted.
(i0/early-init/unless-daemon-or-noninteractive
(setq auto-mode-case-fold nil))
startup screens
Turn off all startup screen related stuff. It's absolutely not needed.
(i0/early-init/unless-daemon-or-noninteractive
(setq
inhibit-splash-screen t
inhibit-startup-screen t
inhibit-startup-echo-area-message user-login-name)
(setq
initial-buffer-choice nil
inhibit-startup-buffer-menu t
inhibit-x-resources t
initial-major-mode 'fundamental-mode
initial-scratch-message nil)
(advice-add 'display-startup-echo-area-message :override #'ignore)
(advice-add 'display-startup-screen :override #'ignore))
Useless CLI options
Unset command line options irrelevant to the current OS. These options
are still processed by command-line-1 but have no effect.
(i0/early-init/unless-daemon-or-noninteractive
(unless i0/early-init/debug-init
(unless (eq system-type 'darwin)
(setq command-line-ns-option-alist nil))
(unless (memq initial-window-system '(x pgtk))
(setq command-line-x-option-alist nil))))
Redisplay inhibitions
Inhibit redisplays during startup. Saves performance since multiple continuous rendering isn't done. Also looks prettier.
(defun i0/early-init/reset-inhibit-redisplay ()
(setq-default inhibit-redisplay nil)
(remove-hook 'post-command-hook #'i0/early-init/reset-inhibit-redisplay))
(i0/early-init/unless-daemon-or-noninteractive
(setq-default inhibit-redisplay t)
(add-hook 'post-command-hook #'i0/early-init/reset-inhibit-redisplay -99))
Re-enable a bunch of things we disabled
If we don't undo inhibit-{message, redisplay} and there's an error, we'll see nothing but a blank Emacs frame. Also echo the time, because we cannot do it before this advice is executed, aka, anywhere else. Modeline is restored after enlight buffer.
(defun emacs-startup-time-milliseconds ()
(let ((diff (float-time (time-subtract (current-time) i0/early-init/emacs-start-time))))
(* 1000 diff)))
(defun i0/early-init/startup-load-user-init-file (fn &rest args)
(unwind-protect
(apply fn args)
(message "Emacs startup time: %.3f ms" (emacs-startup-time-milliseconds))))
(advice-add 'startup--load-user-init-file :around #'i0/early-init/startup-load-user-init-file)
Disabling frame titles
I use WMs without the titlebars. Remove all formatting and disable all decorations
(setq
frame-title-format nil
icon-title-format nil)
(add-to-list 'default-frame-alist '(undecorated . t))
(add-to-list 'initial-frame-alist '(undecorated . t))
menu bar and crap
Remove menu, tool, and scroll bar lines. We intentionally not call menu-bar-mode because that can
trigger or queue redraws at startup. Also, avoid calling tool-bar-setup
(push '(menu-bar-lines . 0) default-frame-alist)
(unless (memq window-system '(mac ns))
(setq menu-bar-mode nil))
(push '(tool-bar-lines . 0) default-frame-alist)
(unless (memq window-system '(mac ns))
(setq tool-bar-mode nil))
(i0/early-init/unless-daemon-or-noninteractive
(when (fboundp 'tool-bar-setup)
(advice-add 'tool-bar-setup :override #'ignore)))
(push '(vertical-scroll-bars . nil) default-frame-alist)
(unless (memq window-system '(mac ns))
(scroll-bar-mode -1))
(when (bound-and-true-p tooltip-mode)
(tooltip-mode -1))
use-package hacks
Disable package.el and also set a couple of use-package values to be used across init.el and early-init.el
(setq
use-package-compute-statistics i0/early-init/debug-init
use-package-expand-minimally (not i0/early-init/debug-init)
package-enable-at-startup nil
package-archives nil
use-package-always-ensure nil
use-package-verbose nil
package--init-file-ensured t)
(advice-add 'use-package-ensure :override #'ignore)
Lazy load every last thing on the planet
Lexical bindings
Enable lexical bindings for init.el
;;; init.el --- Init -*- lexical-binding: t; -*-
elpaca
(setq user-emacs-directory "~/.config/emacs/")
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
(defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory))
(defvar elpaca-order
'(elpaca
:repo "https://github.com/progfolio/elpaca.git"
:ref nil
:files (:defaults (:exclude "extensions"))
:build (:not elpaca--activate-package)))
(let* ((repo (expand-file-name "elpaca/" elpaca-repos-directory))
(build (expand-file-name "elpaca/" elpaca-builds-directory))
(order (cdr elpaca-order))
(default-directory repo))
(add-to-list 'load-path (if (file-exists-p build) build repo))
(unless (file-exists-p repo)
(make-directory repo t)
(when (< emacs-major-version 28) (require 'subr-x))
(condition-case-unless-debug err
(if-let ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*"))
((zerop (call-process "git" nil buffer t "clone" (plist-get order :repo) repo)))
((zerop (call-process "git" nil buffer t "checkout" (or (plist-get order :ref) "--"))))
(emacs (concat invocation-directory invocation-name))
((zerop (call-process emacs nil buffer nil "-Q" "-L" "." "--batch"
"--eval" "(byte-recompile-directory \".\" 0 'force)")))
((require 'elpaca))
((elpaca-generate-autoloads "elpaca" repo)))
(progn
(message "%s" (buffer-string))
(kill-buffer buffer))
(error "%s" (with-current-buffer buffer (buffer-string))))
((error)
(warn "%s" err)
(delete-directory repo 'recursive))))
(unless (require 'elpaca-autoloads nil t)
(require 'elpaca)
(elpaca-generate-autoloads "elpaca" repo)
(load "./elpaca-autoloads")))
(add-hook 'after-init-hook #'elpaca-process-queues)
(elpaca `(,@elpaca-order))
use-package macro
This is a macro-wrapper around use-package that basically stops use-package from installing
packages that have :ensure specifications. It does this by iterating over all the elements in
the list form of the config and once it hits :ensure, it removes that and the element following
it from the list. There is probably a more efficient way of doing this.
A different macro by the same name is used by emacsync to sync the packages using elpaca while
making sure they don't load up.
(elpaca
elpaca-use-package
(elpaca-use-package-mode)
(setq elpaca-use-package-by-default t))
(elpaca-wait)
GCMH
This package configures and installs hooks around the garbage collector to make it collect more
during no user interaction and less during active user interaction. It has to be done after startup
because till startup, we have our own things done with the garbage collector in early-init.el
and combining that with this makes your emacs freeze for some reason.
(use-package gcmh :init (gcmh-mode))
Theme directory
We load our custom themes here. This is what will be used to load the doom theme. All of them
are byte compiled by emacsync.
(setq custom-theme-load-path
`(,(expand-file-name "themes/" user-emacs-directory) custom-theme-directory t))
(load-theme 'doom-tokyonight-black t)
tab bar (local)
Use centaur tabs to show grouped buffers together. I hate the fact that this can't be lazy-loaded, I tried my best but the functions just don't work. Enlight fails to hide its tab when we switch back to it.
(use-package centaur-tabs
:config (centaur-tabs-mode)
:hook
(enlight-mode . centaur-tabs-local-mode)
(org-agenda-mode . centaur-tabs-local-mode)
(calendar-mode . centaur-tabs-local-mode)
:custom
(centaur-tabs-cycle-scope 'tabs)
(centaur-tabs-style "bar")
(centaur-tabs-height 32)
(centaur-tabs-set-icons t)
(centaur-tabs-set-modified-marker t)
(centaur-tabs-set-close-button nil)
(centaur-tabs-set-bar 'over))
opening buffer
I use enlight to display a single ascii art image. This should not be lazy loaded. It is the first buffer. I define hooks around it to load things when I change buffers.
(defun i0/init/enlight-disable-modeline ()
(setq mode-line-format nil))
(use-package enlight
:demand t
:config
(defun my-file-contents (filename)
(with-temp-buffer
(insert-file-contents filename)
(buffer-string)))
(setq enlight-content (my-file-contents "~/.config/emacs/ginkgo.txt"))
:custom (initial-buffer-choice #'enlight)
:hook (enlight-mode . i0/init/enlight-disable-modeline))
Modeline
The modeline. Also set up the battery percentage and time. Hooked to the first buffer switch hook, because I don't need a modeline till then.
(use-package doom-modeline
:demand t
:config
(doom-modeline-mode)
(display-time-mode 1)
(display-battery-mode 1))
Icons
I need these packages for other things for various reasons.
(use-package nerd-icons :defer t)
(use-package all-the-icons :defer t)
Fringe area space
Give some breathing room around the window, almost internal padding, if you will.
(set-fringe-mode 10)
Unicode environment
Taken from this brilliant answer from reddit.
(set-locale-environment "en_US.UTF-8")
async compilation on exit
Ask whether to terminate asynchronous compilations on exit
(setq native-comp-async-query-on-exit t)
shorter answers
Allow for shorter responses: "y" for yes and "n" for no.
(setq read-answer-short t)
(setq use-short-answers t)
(advice-add 'yes-or-no-p :override #'y-or-n-p)
Disable file dialogs
We'll use the ones inbuilt in emacs. The dialog boxes by the WM are ugly and out of looks.
(setq use-file-dialog nil)
(setq use-dialog-box nil)
line numbering
Enable line numbering in various modes. This is not a global because line numbers everywhere are ugly.
(defun i0/init/enable-line-numbers ()
(display-line-numbers-mode)
(setq display-line-numbers 'relative))
(add-hook 'prog-mode-hook #'i0/init/enable-line-numbers t)
(add-hook 'conf-toml-mode-hook #'i0/init/enable-line-numbers t)
(add-hook 'toml-mode-hook #'i0/init/enable-line-numbers t)
(add-hook 'toml-ts-mode-hook #'i0/init/enable-line-numbers t)
(add-hook 'typst-ts-mode-hook #'i0/init/enable-line-numbers t)
(add-hook 'latex-mode-hook #'i0/init/enable-line-numbers t)
Auto pairing of brackets
Enable autopairing of brackets.
(defun i0/init/pair-brackets ()
(electric-pair-mode 1))
(add-hook 'prog-mode-hook #'i0/init/pair-brackets t)
indent-tabs-mode
No tabs, only spaces
(defun i0/init/notabs ()
(setq-default indent-tabs-mode nil))
(add-hook 'prog-mode-hook #'i0/init/notabs t)
vim mode
Emacs has a vi emulation mode called viper.
Use vim keybinds everywhere, along with undo-fu for undo-redo. The variables in :init need to be
defined before evil is loaded, as per docs.
(use-package evil
:demand t
:init
(setq
evil-want-keybinding nil
evil-respect-visual-line-mode t)
:custom
(evil-want-minibuffer t)
(evil-cross-lines t)
(evil-undo-system 'undo-fu)
:config
(evil-mode 1)
(evil-global-set-key 'normal (kbd "U") 'evil-redo)
(evil-set-initial-state 'vterm-mode 'emacs))
(use-package undo-fu :after evil :demand t)
Use evil everywhere. Mostly implements motion mode in a lot of places.
(use-package evil-collection
:after evil
:config
(setq evil-collection-mode-list (remove 'vterm evil-collection-mode-list))
(evil-collection-init))
(defun i0/init/evil-org-agenda-setup ()
(require 'evil-org-agenda)
(evil-org-agenda-set-keys))
(use-package evil-org
:after (org evil)
:demand t
:hook
(org-agenda-mode . i0/init/evil-org-agenda-setup))
Commenting in vim.
(use-package evil-commentary
:after evil
:hook prog-mode
:commands evil-commentary)
Use tree sitter text objects to navigate. This is mostly meant for jumping to the next function.
(use-package evil-textobj-tree-sitter
:demand t
:after (treesit evil evil-collection)
:commands evil-textobj-tree-sitter-goto-textobj)
(defun i0/keybind/next-func ()
(interactive)
(evil-textobj-tree-sitter-goto-textobj "function.outer"))
(defun i0/keybind/prev-func ()
(interactive)
(evil-textobj-tree-sitter-goto-textobj "function.outer" t))
Projectile mode
Manages projects. I use this over project.el because
- It caches and saves both the recently viewed projects and files in the project.
- It allows vterm to be spawned in the proejct directory root.
- It allows you to add/remove projects from the list of recent projects.
(use-package projectile
:demand t
:config (projectile-mode +1)
:custom (projectile-enable-caching t))
TODO Terminal
Configure the terminal and allow for new windows to be spawned. Use nushell if found, otherwise not.
(use-package vterm
:commands (vterm projectile-run-vterm-other-window)
:config
(when (executable-find "nu")
(setq vterm-shell (executable-find "nu"))))
(defun i0/keybind/vterm-new-window ()
"Create a new vterm buffer in a new window"
(interactive)
(let ((buf (generate-new-buffer-name "*vterm*")))
(vterm buf)))
Highlight TODO
Does literally what it says
(use-package hl-todo
:hook prog-mode
:custom
(hl-todo-highlight-punctuation ":")
(hl-todo-keyword-faces
'(("TODO" . "#CC3333")
("FIXME" . "#FF0000")
("DEBUG" . "#A020F0")
("GOTCHA" . "#FF4500")
("STUB" . "#1E90FF"))))
Git
For some reason deferring transient doesn't let magit load, so we're loading transient immediately.
(use-package transient :demand t)
(use-package magit
:demand t
:after transient
:custom (transient-default-level 7))
(use-package pinentry :config (pinentry-start))
Tree sitter
The first package automatically installs/prompts us for ts-modes in emacs.
(use-package treesit-auto
:demand t
:custom
(treesit-auto-install 'prompt)
(treesit-font-lock-level 4)
(treesit-language-source-alist
'((nu . ("https://github.com/nushell/tree-sitter-nu" "main" "src"))
(haskell . ("https://github.com/tree-sitter/tree-sitter-haskell"))
(kdl . ("https://github.com/tree-sitter-grammars/tree-sitter-kdl"))))
:config (global-treesit-auto-mode)
:hook
((nu-ts-mode . prettify-symbols-mode)
(rust-ts-mode . prettify-symbols-mode)
(c-ts-mode . prettify-symbols-mode)
(python-ts-mode . prettify-symbols-mode)
(neocaml-mode . prettify-symbols-mode)
(haskell-ts-mode . prettify-symbols-mode)
(c++-ts-mode . prettify-symbols-mode)))
(use-package treesit-fold
:ensure
(treesit-fold :type git :host github :repo "emacs-tree-sitter/treesit-fold")
:hook prog-mode)
Indentation bars
(use-package indent-bars
:after treesit
:custom
(indent-bars-no-descend-lists t)
(indent-bars-treesit-support t)
:hook prog-mode)
LSP booster
Configure LSPs for various languages.
(use-package eglot
:ensure nil
:demand t
:hook
(c++-mode . eglot-ensure)
(c++-ts-mode . eglot-ensure)
(c-mode . eglot-ensure)
(c-ts-mode . eglot-ensure)
(rust-ts-mode . eglot-ensure)
(conf-toml-mode . eglot-ensure)
(python-mode . eglot-ensure)
(python-ts-mode . eglot-ensure)
(haskell-ts-mode . eglot-ensure)
(typst-ts-mode . eglot-ensure)
(bash-ts-mode . eglot-ensure)
(neocaml-mode . eglot-ensure)
(sh-mode . eglot-ensure)
(nushell-ts-mode . eglot-ensure)
:custom
(eglot-events-buffer-config '(:size 0))
(eglot-autoshutdown t)
(eglot-ignored-server-capabilities '(:documentHighlightProvider :inlayHintProvider))
:config
(add-to-list
'eglot-server-programs
'((rust-ts-mode) . ("rustup" "run" "stable" "rust-analyzer" :initializationOptions (:check (:command "clippy")))))
(add-to-list
'eglot-server-programs
'((toml-ts-mode) . ("taplo" "lsp" "stdio")))
(add-to-list
'eglot-server-programs '((nushell-ts-mode) . ("nu" "--lsp")))
(add-to-list
'eglot-server-programs '((typst-ts-mode) . ("tinymist")))
(add-to-list
'eglot-server-programs
'((sh-mode bash-ts-mode) . ("bash-language-server" "start")))
(add-to-list
'eglot-server-programs
'((neocaml-mode ocaml-ts-mode) . ("ocamllsp" "--stdio"))))
Bytecode compilation of the JSON. This is something I'm not sure of, seems like it's not needed at all. Generic usage seems the same to me, but startup times are better with or without io-only mode, because less bufferring. And that helps with completions and stuff.
;; (i0/init/configure-package
;; eglot-booster
;; :ensure (:host github :repo "jdtsmith/eglot-booster")
;; :after eglot
;; :custom (eglot-booster-io-only t)
;; :config (eglot-booster-mode))
Box hover doc thingy.
(defun i0/init/eldoc-keybinds-setup (_)
(general-define-key
:states '(normal)
"C-d" '(eldoc-box-scroll-up :which-key t)
"C-u" '(eldoc-box-scroll-down :which-key t)))
(use-package eldoc-box
:after eglot
:demand t
:hook (eldoc-box-buffer-setup . i0/init/eldoc-keybinds-setup))
Hacks around the minibuffer
This sets up hooks around interactive function calls, and later removes them. This is needed for
the invocation of anything that has (interactive), aka, anything that can be called via minibuffer.
(savehist-mode 1)
Completion packages
Vertico shows the most recent commands in minibuffer for that command.
(use-package vertico
:demand t
:custom
(vertico-count 10)
(evil-complete-next-minibuffer-func 'vertico-next)
(evil-complete-previous-minibuffer-func 'vertico-previous)
(read-extended-command-predicate #'command-completion-default-include-p)
(context-menu-mode t)
:init (vertico-mode))
Orderless allows for fuzzy search across words, but regular substring search within a word.
(use-package orderless
:demand t
:config
(setq completion-styles '(orderless basic))
(setq completion-category-defaults nil)
(setq completion-category-overrides '((file (styles . (partial-completion))))))
Corfu is your average completion framework working on capfs. Cape adds to the capfs. Kind icon shows icons for the menu.
(use-package
corfu
:custom
(corfu-auto t)
(corfu-auto-delay 0.1)
(corfu-popupinfo-delay 0.1)
(corfu-cycle t)
(corfu-quit-at-boundary nil)
(corfu-quit-no-match t)
(corfu-preview-current t)
(corfu-preselect 'prompt)
(corfu-on-exact-match nil)
(corfu-separator ?\s)
(global-corfu-minibuffer t)
:demand t
:config (global-corfu-mode))
(defun i0/init/cape-elisp-init ()
(add-hook 'completion-at-point-functions #'cape-elisp-block nil t))
(defun i0/init/cape-emoji-init ()
(add-hook 'completion-at-point-functions #'cape-emoji nil t))
(use-package
cape
:after corfu
:demand t
:hook
((org-mode markdown-mode) . i0/init/cape-emoji-init)
((org-mode markdown-mode) . i0/init/cape-elisp-init)
:config
(add-hook 'completion-at-point-functions #'cape-dabbrev)
(add-hook 'completion-at-point-functions #'cape-file)
(advice-add 'eglot-completion-at-point :around #'cape-wrap-buster))
(use-package
kind-icon
:after corfu
:custom (kind-icon-default-face 'corfu-default)
:config
(add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter))
Docs
Shows help pages for various things.
(use-package helpful
:commands
(helpful-function
helpful-callable
helpful-variable
helpful-symbol
helpful-key))
Shows minibuffer documentation.
(use-package marginalia :demand t :init (marginalia-mode))
Diff highlights
Git diffs in the fringe
(use-package diff-hl
:hook
(magit-pre-refresh . diff-hl-magit-pre-refresh)
(magit-post-refresh . diff-hl-magit-post-refresh)
(prog-mode . diff-hl-mode))
Rust
Rust config is fairly straightforward.
(use-package rust-ts-mode :ensure nil :mode "\\.rs\\'")
(defun rust-run-test-under-cursor ()
(interactive)
(save-excursion
(if (re-search-backward "\\(#\\[test\\]\\|fn [a-zA-Z0-9_]+\\)" nil t)
(let ((fn-name nil))
(when (looking-at "#\\[test\\]")
(forward-line 1)
(when (looking-at "fn \\([a-zA-Z0-9_]+\\)")
(setq fn-name (match-string 1))))
(when (and (not fn-name) (looking-at "fn \\([a-zA-Z0-9_]+\\)"))
(setq fn-name (match-string 1)))
(if fn-name
(compile (format "cargo test %s -- --nocapture" fn-name))
(message "No test function found at point.")))
(message "No test attribute or function found."))))
OCaml mode
(use-package neocaml
:mode ("\\.ml\\'" "\\.mli\\'" "\\.mlp\\'")
:ensure (neocaml :type git :host github :repo "bbatsov/neocaml"))
(use-package dune
:mode ("\\.dune\\'" "dune-workspace\\'" "dune-project\\'"))
(use-package dune-format
:after dune
:hook (dune-mode . dune-format-on-save-mode))
(use-package opam-switch-mode :hook (neocaml-mode . opam-switch-mode))
Typst ts mode
The config is straightforward. We need to prvoide some options to the LSP to get it to save the PDF at the correct location. Apart from that, also need to make sure that it creates the folder where I want it to, and picks fonts up from where I want it to. The hooks mimic auctex's behaviour. They'll reload the PDF buffer upon save in the typst buffer.
(defun i0/init/typst-after-save ()
(add-hook 'after-save-hook 'i0/init/typst-auto-reload-pdf nil t))
(defun i0/init/typst-auto-reload-pdf ()
(let* ((src-file (buffer-file-name))
(default-directory (or (projectile-project-root (project-current))
default-directory))
(rel-dir (or (file-name-directory (file-relative-name src-file default-directory))
""))
(name (file-name-base src-file))
(pdf-file (expand-file-name (format "target/%s%s.pdf" rel-dir name)
default-directory))
(buf (find-buffer-visiting pdf-file)))
(when (and (file-exists-p pdf-file) buf (featurep 'pdf-tools))
(with-current-buffer buf
(pdf-view-revert-buffer nil t)))))
(use-package
typst-ts-mode
:ensure (:type git :host codeberg :repo "meow_king/typst-ts-mode")
:mode "\\.typ\\'"
:config
(setq-default eglot-workspace-configuration
'(:exportPdf
"onSave"
:outputPath "$root/target/$dir/$name"
:fontPaths ["./fonts/"]
:formatterMode "typstyle"))
:hook
(typst-ts-mode . i0/init/typst-after-save))
Lisp
- Rainbow brackets
(use-package rainbow-delimiters :hook emacs-lisp-mode) - Formatter
Internally creates a temporary buffer that formats all of the elements and then spits them out back into the current buffer. However, that buffer seems to be killed pretty soon for some reason.
(use-package elisp-autofmt :commands (elisp-autofmt-mode elisp-autofmt-buffer) :custom (elisp-autofmt-on-save-p 'always) (elisp-autofmt-style 'native) :hook emacs-lisp-mode)
Markdown
Nothing much going on here.
(use-package markdown-mode
:defer t
:mode ("README\\.md\\'" . gfm-mode)
:config (setq markdown-fontify-code-blocks-natively t))
Auctex
The latex compile hook compiles at every save. The hook in config section makes the document buffer reset.
(defun i0/init/latex-compile ()
(TeX-command-run-all nil))
(defun i0/init/latex-after-save ()
(add-hook 'after-save-hook #'i0/init/latex-compile nil nil))
(use-package auctex
:mode "\\.tex\\'"
:hook
(LaTeX-mode
. i0/init/latex-after-save)
:custom
(TeX-parse-self t)
(TeX-auto-save t)
(TeX-PDF-mode t)
:config
(add-hook
'TeX-after-compilation-finished-functions #'TeX-revert-document-buffer))
KDL
Niri's config format
(use-package
kdl-ts-mode
:ensure (:host github :repo "merrickluo/kdl-ts-mode")
:mode "\\.kdl\\'")
Org
Some prereqs.
(defun i0/init/org-add-ids-to-headlines-in-file ()
(interactive)
(org-map-entries 'org-id-get-create))
(use-package jinx :commands jinx-correct)
(defun i0/usage/spellcheck ()
(interactive)
(jinx-correct 4))
(defun i0/init/org-headline-hook ()
(add-hook
'before-save-hook #'i0/init/org-add-ids-to-headlines-in-file
nil t))
(defun i0/init/org-checkbox-hook ()
(add-hook 'before-save-hook #'org-update-checkbox-count nil t))
The actual giant block. Just watch systemcrafters' emacs from scratch video on org-mode. I don't lazy-load this because I need it ready.
(use-package
org
:demand t
:hook
(org-mode . i0/init/org-headline-hook)
(org-mode . i0/init/org-checkbox-hook)
:custom
(evil-auto-indent nil)
(org-agenda-files
'("~/innocentzeros_coven/org_home/Tasks.org"
"~/innocentzeros_coven/org_home/Schedule.org"
"~/innocentzeros_coven/org_home/Birthdays.org"))
(org-agenda-remove-tags t)
(org-agenda-start-with-log-mode t)
(org-todo-keywords
'((""
"TODO(t)"
"DREAM(D)"
"ONGOING(o)"
"NEXT(n)"
"|"
"DONE(d!)"
"CANCELLED(c@)")))
(org-tag-alist
'(("@home" . ?H)
("@acads" . ?W)
("@oss" . ?C)
("@work" . ?s)
("@blogging" . ?w)))
(org-capture-templates
'(("t" "Task" entry
(file
"~/innocentzeros_coven/org_home/Tasks.org")
"* TODO %?\n %U\n %i"
:empty-lines 1)
("s"
"Schedule"
entry
(file "~/innocentzeros_coven/org_home/Schedule.org")
"* %?\n %U\n %i")))
(org-refile-targets
'(("~/innocentzeros_coven/org_home/Tasks.org" :maxlevel . 1)))
(org-preview-latex-default-process 'dvisvgm)
(org-latex-create-formula-image-program 'dvisvgm)
(org-startup-with-inline-images t)
(org-log-done 'time)
(org-log-into-drawer t)
(org-catch-invisible-edits 'show-and-error)
(org-special-ctrl-a/e t)
(org-insert-heading-respect-content t)
(org-hide-emphasis-markers t)
(org-pretty-entities t)
:config
(require 'org-agenda)
(defun load-org-agenda-files-background ()
"Load all org-agenda files in the background without displaying."
(dolist (file org-agenda-files)
(unless (get-buffer (find-file-noselect file))
(find-file-noselect file))))
(add-hook 'emacs-startup-hook #'load-org-agenda-files-background)
(advice-add 'org-store-log-note :after #'org-save-all-org-buffers)
(advice-add 'org-todo :after #'org-save-all-org-buffers)
(advice-add 'org-refile :after #'org-save-all-org-buffers)
(require 'org-tempo)
(add-to-list 'org-modules 'org-tempo)
(add-to-list 'org-structure-template-alist '("sh" . "src shell"))
(add-to-list 'org-structure-template-alist '("py" . "src python"))
(add-to-list
'org-structure-template-alist '("el" . "src emacs-lisp"))
(org-babel-do-load-languages
'org-babel-load-languages '((emacs-lisp . t) (shell . t)))
(setq org-babel-python-command "/usr/bin/python3")
(setq org-confirm-babel-evaluate nil))
Some other stuff.
(use-package org-contrib :defer t)
(use-package org-modern
:demand t
:hook
(org-mode . org-modern-mode)
(org-agenda-finalize . org-modern-agenda))
(use-package org-journal
:demand t
:commands org-journal-new-entry
:custom
(org-journal-file-format "%Y.org")
(org-journal-dir "~/innocentzeros_coven/org_home/")
(org-journal-file-type 'yearly)
(org-journal-date-format "%A, %d %B %Y")
(org-journal-enable-agenda-integration t))
(use-package org-mem
:after org-node
:custom
(org-mem-do-sync-with-org-id t)
(org-mem-watch-dirs '("~/innocentzeros_coven/org_home"))
:config (org-mem-updater-mode))
(use-package org-node
:demand t
:config
(org-node-cache-mode)
(org-node-backlink-mode)
:custom
(org-node-prefer-with-heading t)
(org-node-file-directory-ask "~/innocentzeros_coven/org_home/Private/"))
Some functions that I use to clock my schedule from the CLI.
(defun cli-org-clock-in (heading)
(find-file "~/innocentzeros_coven/org_home/Schedule.org")
(org-clock-in-new heading)
(save-buffer))
(defun cli-org-clock-out ()
(org-clock-out)
(find-file "~/innocentzeros_coven/org_home/Schedule.org")
(save-buffer))
(defun org-clock-in-new (heading)
(goto-char (point-max))
(unless (bolp)
(insert "\n"))
(insert "* " heading "\n")
(org-insert-time-stamp (current-time) t t)
(insert "\n")
(org-clock-in))
(defun org-clock-status ()
(if (org-clock-is-active)
(format "%s" (org-clock-get-clock-string))
"No active clock"))
Org export
Blog publishing.
(use-package org-static-blog
:commands org-static-blog-publish)
(use-package htmlize :defer t)
(defun i0/usage/blog-dispatch ()
(interactive)
(org-id-update-id-locations
(directory-files-recursively
(expand-file-name "Notes/" (projectile-project-root))
".*\\.org$"))
(setq
org-static-blog-publish-title "My verbosity"
org-static-blog-publish-url "https://innocentzero.is-a.dev/"
org-static-blog-publish-directory "~/blog/"
org-static-blog-posts-directory (expand-file-name "Notes/" (projectile-project-root))
org-static-blog-drafts-directory (expand-file-name "Notes/" (projectile-project-root))
org-static-blog-use-preview t
org-static-blog-enable-tags t
org-export-with-section-numbers nil
org-export-with-toc nil
org-static-blog-page-header "<link rel=\"stylesheet\" href=\"./mygram.css\"> <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css\" integrity=\"sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq\" crossorigin=\"anonymous\"> <script defer src=\"https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js\" integrity=\"sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz\" crossorigin=\"anonymous\"></script> <script defer src=\"https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/auto-render.min.js\" integrity=\"sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI\" crossorigin=\"anonymous\" onload=\"renderMathInElement(document.body);\"></script>"
org-static-blog-page-preamble "<h1 class=\"top-heading\">InnocentZero's Treasure Chest</h1><a class=\"button top\" href=\"./index.html\">Home</a><a class=\"button top\" href=\"./rss.xml\">Feed</a><a class=\"button top\" href=\"./about.html\">About Me</a><a class=\"button top\" href=\"./people.html\">List of interesting people</a><br><hr class=line-break-rounded>"
org-static-blog-page-postamble "<hr class=line-break-rounded><div id=\"archive\"> <a class=\"button\" href=\"./archive.html\">Other posts</a> </div> <center><a rel=\"license\" href=\"https://creativecommons.org/licenses/by-sa/3.0/\"><img alt=\"Creative Commons License\" style=\"border-width:0\" src=\"https://i.creativecommons.org/l/by-sa/3.0/88x31.png\" /></a><br />This website by <a xmlns:cc=\"https://creativecommons.org/ns#\" href=\"https://innocentzer0.codeberg.page\" property=\"cc:attributionName\" rel=\"cc:attributionURL\">innocentzer0</a> is licensed under a <a rel=\"license\" href=\"https://creativecommons.org/licenses/by-sa/3.0/\">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.</center>"
org-static-blog-index-front-matter "<h1> Welcome to the treasure chest</h1>\n")
(org-static-blog-publish))
iBuffer
(defvar ibuffer-filter-groups)
(defun i0/init/ibuffer-groups ()
(setq ibuffer-filter-groups
(append
'(("Dired Buffers" (mode . dired-mode))
("Terminals"
(or (mode . vterm-mode) (name . "^\\*vterm.*\\*")))
("Email" (or (mode . notmuch-hello-mode)
(mode . notmuch-message-mode)
(name . "^\\*notmuch.*\\*")))
("Helpful Buffers" (or (mode . helpful-mode)
(name . "^\\*helpful.*\\*")))
("Browser windows"
(or (mode . eww-mode) (name . "^\\*eww\\*"))))
(ibuffer-vc-generate-filter-groups-by-vc-root)
'(("Planner" (or (name . "^\\*Calendar\\*$")
(name . "^\\*Org Agenda\\*")))
("Emacs" (or (name . "^\\*scratch\\*$")
(name . "^\\*Messages\\*$"))))))
(ibuffer-do-sort-by-alphabetic))
(use-package ibuffer-vc
:commands (ibuffer ibuffer-vc-generate-filter-groups-by-vc-root)
:hook (ibuffer-mode . i0/init/ibuffer-groups)
:custom
(ibuffer-formats
'((mark
modified
read-only
vc-status-mini
" "
(name 18 18 :left :elide)
" "
(size 9 -1 :right)
" "
(mode 16 16 :left :elide)
" "
(vc-status 16 16 :left)
" "
vc-relative-file))))
(use-package all-the-icons-ibuffer
:after ibuffer-vc
:hook ibuffer-mode)
dired
I only spawn dired from the CLI. The keybinds for dired are here since they are loaded after general, but most not override it. Double definition is okay.
(use-package
dired
:ensure nil
:custom
(dired-kill-when-opening-new-dired-buffer t)
(dired-listing-switches "-alh")
:commands dired
:config
(general-define-key
:states '(normal)
:keymaps '(dired-mode-map)
"+" '(i0/keybind/dired-file-or-dir :which-key t)))
(use-package fd-dired :after dired :commands fd-dired)
(use-package all-the-icons-dired :hook dired-mode)
Filetree
side preview of filetree
(use-package treemacs
:commands treemacs-add-and-display-current-project-exclusively
:custom
(treemacs-follow-mode t)
(treemacs-filewatch-mode t)
(treemacs-fringe-indicator-mode #'always))
(use-package treemacs-evil :after (treemacs evil))
music player
use empv to play media and spawn based on commands
(use-package empv
:commands
(empv-play
empv-play-file empl-play-directory empv-playlist-load-from-file))
Read my email accounts from the Mail directory. They are literally my email accounts as directories, so it helps.
Apart from that, just setting up some basic config options for notmuch
(defun i0/init/mail-accounts ()
(require 'cl-lib)
(let ((mail-path (expand-file-name "~/Mail")))
(cl-loop
for
dir
in
(directory-files mail-path t "^[^.].*@.*" t)
collect
(file-name-nondirectory dir))))
(defun i0/init/mail-fccs ()
(require 'cl-lib)
(let ((accounts (i0/init/mail-accounts)))
(cl-loop
for
account
in
accounts
collect
(cons account (format "%s/sent" account)))))
(use-package notmuch
:custom
(send-mail-function 'sendmail-send-it)
(sendmail-program (executable-find "msmtp"))
(mail-user-agent 'notmuch-user-agent)
(mail-specify-envelope-from t)
(message-sendmail-envelope-from 'header)
(mail-envelope-from 'header)
(message-kill-buffer-on-exit t)
(notmuch-fcc-dirs (i0/init/mail-fccs))
:commands (notmuch notmuch-hello))
pdf reader
It is, well, the PDF reader.
(use-package pdf-tools
:config (pdf-tools-install)
:custom (pdf-view-midnight-colors '("#cccccc" . "#0a0a0a"))
:mode ("\\.pdf\\'" . pdf-view-mode)
:magic ("%PDF" . pdf-view-mode))
Which key integration
Key prompts.
(use-package which-key :demand t)
Keybinds
(defun i0/keybind/insert-pair (char)
(interactive "cEnter character: ")
(unless (= char 27) ;; Do nothing if ESC is pressed
(let* ((pairs '((?\( . ?\)) (?\[ . ?\]) (?\{ . ?\}) (?\< . ?\>)))
(closing (or (cdr (assoc char pairs)) char)))
(if (region-active-p)
(insert-pair 1 char closing)
(insert (string char) (string closing))
(backward-char)))))
(defun i0/keybind/revert-buffer ()
(interactive)
(revert-buffer :ignore-auto :noconfirm))
(defun i0/keybind/prev-error ()
(interactive)
(flymake-goto-prev-error))
(defun i0/keybind/dired-file-or-dir (input)
(interactive "sEnter the path to new file/dir: ")
(if (string-suffix-p "/" input)
(dired-create-directory (substring input 0 -1))
(dired-create-empty-file input)))
(defun i0/keybind/change-window-width ()
(interactive)
(message "Use +/= to increase width, - to decrease width; any other key to stop")
(set-transient-map
(let ((map (make-sparse-keymap)))
(define-key map (kbd "+")
(lambda ()
(interactive)
(evil-window-increase-width 1)
(i0/keybind/change-window-width)))
(define-key map (kbd "=")
(lambda ()
(interactive)
(evil-window-increase-width 1)
(i0/keybind/change-window-width)))
(define-key map (kbd "-")
(lambda ()
(interactive)
(evil-window-decrease-width 1)
(i0/keybind/change-window-width)))
map)))
(defun i0/keybind/change-window-height ()
(interactive)
(message "Use +/= to increase width, - to decrease width; any other key to stop")
(set-transient-map
(let ((map (make-sparse-keymap)))
(define-key map (kbd "+")
(lambda ()
(interactive)
(evil-window-increase-height 1)
(i0/keybind/change-window-height)))
(define-key map (kbd "=")
(lambda ()
(interactive)
(evil-window-increase-height 1)
(i0/keybind/change-window-height)))
(define-key map (kbd "-")
(lambda ()
(interactive)
(evil-window-decrease-height 1)
(i0/keybind/change-window-height)))
map)))
(use-package
general
:demand t
:config
(general-auto-unbind-keys)
(general-define-key
:states '(normal visual emacs insert)
:keymaps
'(override)
"M-t"
'(tab-new :which-key "new major tab")
"M-h"
'(tab-previous :which-key "previous major tab")
"M-l"
'(tab-next :which-key "next major tab")
"M-w"
'(tab-close :which-key "close major tab"))
;; tab navigation
(general-define-key
:states '(normal visual)
:keymaps
'(override)
"H"
'(centaur-tabs-backward :which-key "previous tab")
"L"
'(centaur-tabs-forward :which-key "next tab"))
(general-define-key
:states '(normal visual)
:keymaps
'(override)
"K"
'(eldoc-box-help-at-point :which-key "Show docs"))
;; corfu going round in states
(general-define-key
:keymaps
'(corfu-map)
"TAB"
'(corfu-next :which-key t)
"<backtab>"
'(corfu-previous :which-key t))
(define-key evil-normal-state-map "m" nil)
(define-key evil-visual-state-map "m" nil)
;; helix paren keybinds
(general-define-key
:states '(normal visual)
:prefix
"m"
"<escape>"
'(keyboard-escape-quit :which-key t)
"m"
'(evil-jump-item :which-key "goto matching")
"s"
'(i0/keybind/insert-pair :which-key "add surrounding pair"))
;; overridden space binds
(general-define-key
:states '(normal visual treemacs)
:keymaps 'override
:prefix-map 'overriding
:prefix "SPC"
;; new file in project root
"SPC"
'(projectile-find-file :which-key "find file")
;; abort mini buffer
"<escape>"
'(abort-minibuffers :which-key "exit minibuf")
;; buffer actions
"b"
'(:ignore t :which-key "buffer")
"b <escape>"
'(keyboard-escape-quit :which-key t)
"b b"
'(ibuffer :which-key "list buffers")
"b d"
'(kill-current-buffer :which-key "kill buffer")
"b r"
'(i0/keybind/revert-buffer :which-key "reload buffer")
;; git stuff
"g"
'(:ignore t :which-key "git")
"g <escape>"
'(keyboard-escape-quit :which-key t)
"g g"
'(magit :which-key "open")
"g l"
'(magit-log :which-key "log")
;; helpful keybinds
"h"
'(:ignore t :which-key "helpful")
"h <escape>"
'(keyboard-escape-quit :which-key t)
"h f"
'(helpful-function :which-key "search for function")
"h c"
'(helpful-callable :which-key "search for callable")
"h v"
'(helpful-variable :which-key "search for variable")
"h s"
'(helpful-symbol :which-key "search for symbol")
"h k"
'(helpful-key :which-key "search for key")
;; org mode globals
"o"
'(:ignore t :which-key "org")
"o <escape>"
'(keyboard-escape-quit :which-key t)
"o a"
'(org-agenda :which-key "Show agenda")
"o c"
'(org-capture :which-key "capture something")
"o f"
'(org-node-find :which-key "find org node")
"o j"
'(org-journal-new-entry :which-key "new journal entry")
;; projectile keybinds
"p"
'(:ignore t :which-key "projects")
"p <escape>"
'(keyboard-escape-quit :which-key t)
"p p"
'(projectile-switch-project :which-key "switch project")
"p a"
'(projectile-add-known-project :which-key "add project")
"p r"
'(projectile-remove-known-project :which-key "remove project")
"r"
'(restart-emacs :which-key "restart emacs")
"t"
'(treemacs-add-and-display-current-project-exclusively
:which-key "treemacs")
;; window manipulation
"w"
'(:ignore t :which-key "windows")
"w <escape>"
'(keyboard-escape-quit :which-key t)
"w v"
'(split-window-right :which-key "split vertical")
"w b"
'(split-window-below :which-key "split horizontal")
"w l"
'(evil-window-right :which-key "goto right window")
"w h"
'(evil-window-left :which-key "goto left window")
"w j"
'(evil-window-down :which-key "goto below window")
"w k"
'(evil-window-up :which-key "goto above window")
"w q"
'(delete-window :which-key "delete window")
"w ="
'(i0/keybind/change-window-width :which-key "change window width")
"w +"
'(i0/keybind/change-window-height :which-key "change window height")
"x"
'(execute-extended-command :which-key "execute command")
"T"
'(:ignore t :which-key "Create terminal")
"T <escape>"
'(keyboard-escape-quit :which-key t)
"T t"
'(projectile-run-vterm-other-window :which-key "Terminal in project root")
"T T"
'(i0/keybind/vterm-new-window :which-key "New Terminal window"))
;; errors and hunks
(general-define-key
:states '(normal visual)
:prefix
"]"
"<escape>"
'(keyboard-escape-quit :which-key t)
"g"
'(diff-hl-next-hunk :which-key "next hunk")
"f"
'(i0/keybind/next-func :which-key "next function")
"d"
'(flymake-goto-next-error :which-key "next error")
"t"
'(hl-todo-next :which-key "next todo"))
;; errors and hunks pt 2
(general-define-key
:states '(normal visual)
:prefix
"["
"<escape>"
'(keyboard-escape-quit :which-key t)
"g"
'(diff-hl-previous-hunk :which-key "previous hunk")
"f"
'(i0/keybind/prev-func :which-key "previous function")
"d"
'(i0/keybind/prev-error :which-key "previous error")
"t"
'(hl-todo-previous :which-key "previous todo"))
;; non overriding keybinds
(general-define-key
:states '(normal visual)
:prefix-map 'non-overriding
:prefix "SPC"
;; org has its own variants
"f"
'(:ignore t :which-key "folding")
"f <escape>"
'(keyboard-escape-quit :which-key t)
"f a"
'(treesit-fold-close-all :which-key "fold all")
"f o"
'(treesit-fold-open :which-key "open fold here")
"f c"
'(treesit-fold-close :which-key "close fold here")
;; lsp keybinds are overridden in elisp buffers
"l"
'(:ignore t :which-key "lsp")
"l <escape>"
'(keyboard-escape-quit :which-key t)
"l a"
'(eglot-code-actions :which-key "code actions")
"l q"
'(eglot-shutdown :which-key "shut down lsp")
"l r"
'(eglot-rename :which-key "rename symbol")
"l R"
'(xref-find-references :which-key "find references")
"l i"
'(eglot-find-implementation :which-key "find implementation")
"l g"
'(eglot-find-typeDefinition :which-key "find definition")
"l f"
'(eglot-format :which-key "format buffer")
"l d"
'(eglot-find-declaration :which-key "find declaration")
"l c"
'(evil-commentary :which-key "Comment"))
(general-define-key
:states '(normal visual)
:keymaps '(emacs-lisp-mode-map)
:prefix
"SPC"
"l f"
'(elisp-autofmt-buffer :which-key "format buffer"))
(general-define-key
:states '(visual)
:keymaps '(emacs-lisp-mode-map)
:prefix
"SPC"
"l e"
'(eval-region :which-key "evaluate region"))
(general-define-key
:states '(visual normal)
:keymaps '(rust-ts-mode-map)
:prefix
"SPC"
"l t"
'(rust-run-test-under-cursor :which-key "run test"))
;; org
(general-define-key
:states '(normal visual)
:keymaps 'org-mode-map
:prefix "SPC"
"f"
'(:ignore t :which-key "folding")
"f <escape>"
'(keyboard-escape-quit :which-key t)
"f a"
'(org-fold-hide-sublevels :which-key "fold all subs")
"f o"
'(org-fold-show-subtree :which-key "open fold here")
"f c"
'(org-fold-hide-subtree :which-key "close fold here")
"o d"
'(org-deadline :which-key "Add a deadline")
"o s"
'(org-schedule :which-key "Add schedule")
"o t"
'(org-todo :which-key "Toggle todo")
"o h"
'(org-insert-link :which-key "add link")
"o i"
'(org-link-preview :which-key "toggle images")
"o l"
'(org-node-insert-link :which-key "insert node link")
"o e"
'(org-ctrl-c-ctrl-c :which-key "evaluate region")
"o x"
'(org-latex-preview :which-key "toggle Latex")
"o o"
'(org-edit-special :which-key "edit block")))
Fonts
This hook sets it up for every frame because for some reason emacs chooses to mess with me otherwise.
(defun i0/init/set-frame-font ()
(progn
(set-face-attribute 'default nil
:font "JetBrainsMono Nerd Font"
:height 115
:weight 'medium)
(set-face-attribute 'italic nil
:font "Source Code Pro Italic"
:height 115
:slant 'oblique
:weight 'medium)
(set-face-attribute 'font-lock-comment-face nil
:font "Source Code Pro Semibold Italic"
:height 115
:slant 'oblique
:weight 'semi-bold)))
(if (daemonp)
(add-hook
'after-make-frame-functions
(lambda (frame)
(select-frame frame)
(i0/init/set-frame-font)))
(i0/init/set-frame-font))
theme.el
;;; doom-themes-base.el --- base faces for all doom themes -*- lexical-binding: t; -*-
;;; Commentary: foo
;;; Code:
;; These are used as a basis for every Doom theme defined with `def-doom-theme',
;; as a set of reasonble defaults. They are intended to be overidden where it
;; makes sense to.
(defvar doom-themes-base-faces
'((bold
:weight 'bold
:foreground
(if bold
'unspecified
base8))
(bold-italic :inherit '(bold italic))
(italic :slant 'italic)
(escape-glyph :foreground cyan)
(default :background bg :foreground fg)
(fringe :inherit 'default :foreground base4)
(region
:background region
:distant-foreground (doom-darken fg 0.2)
:extend t)
(highlight
:background highlight
:foreground base0
:distant-foreground base8)
(cursor :background highlight)
(shadow :foreground base5)
(minibuffer-prompt :foreground highlight)
(tooltip :background bg-alt :foreground fg)
(secondary-selection :background grey :extend t)
(lazy-highlight
(&dark
:background (doom-darken highlight 0.3)
:foreground base8
:distant-foreground base0
:weight 'bold)
(&light
:background (doom-blend bg highlight 0.7)
:foreground base0
:distant-foreground base8))
(match :foreground green :background base0 :weight 'bold)
(trailing-whitespace :background red)
(nobreak-space :inherit 'escape-glyph :underline t)
(vertical-border
:background vertical-bar
:foreground vertical-bar)
(link :foreground highlight :underline t :weight 'bold)
(error :foreground error)
(warning :foreground warning)
(success :foreground success)
;;;; font-lock-* faces
(font-lock-builtin-face :foreground builtin)
(font-lock-comment-face :foreground comments)
(font-lock-comment-delimiter-face
:inherit 'font-lock-comment-face)
(font-lock-doc-face
:inherit 'font-lock-comment-face
:foreground doc-comments)
(font-lock-constant-face :foreground constants)
(font-lock-function-name-face :foreground functions)
(font-lock-keyword-face :foreground keywords)
(font-lock-string-face :foreground strings)
(font-lock-type-face :foreground type)
(font-lock-variable-name-face :foreground variables)
(font-lock-number-face :foreground numbers)
(font-lock-warning-face :inherit 'warning)
(font-lock-negation-char-face
:inherit 'bold
:foreground operators)
(font-lock-preprocessor-face :inherit 'bold :foreground operators)
(font-lock-preprocessor-char-face
:inherit 'bold
:foreground operators)
(font-lock-regexp-grouping-backslash
:inherit 'bold
:foreground operators)
(font-lock-regexp-grouping-construct
:inherit 'bold
:foreground operators)
;;;; mode-line / header-line
(mode-line :background bg :foreground fg :distant-foreground bg)
(mode-line-active :inherit 'mode-line)
(mode-line-inactive
:background bg-alt
:foreground fg-alt
:distant-foreground bg-alt)
(mode-line-emphasis :foreground highlight :distant-foreground bg)
(mode-line-highlight :inherit 'highlight :distant-foreground bg)
(mode-line-buffer-id :weight 'bold)
(header-line :inherit 'mode-line)
(header-line-highlight :inherit 'mode-line-highlight)
;;;; tab-line/tab-bar (Emacs 27+)
(tab-line :background bg-alt :foreground bg-alt)
(tab-line-tab :background bg :foreground fg)
(tab-line-tab-inactive
:inherit 'tab-line-tab
:background bg-alt
:foreground fg-alt)
(tab-line-tab-inactive-alternate :inherit 'tab-line-tab-inactive)
(tab-line-tab-current :background bg :foreground fg)
;; (tab-line-special )
(tab-line-highlight :inherit 'tab-line-tab)
(tab-line-close-highlight :foreground highlight)
((tab-bar &inherit tab-line))
((tab-bar-tab &inherit tab-line-tab))
((tab-bar-tab-inactive &inherit tab-line-tab-inactive))
;;;; Line numbers
;; 1. Line number faces must explicitly disable its text style attributes
;; because nearby faces may "bleed" into the line numbers otherwise.
;; 2. All other line number plugin faces should &inherit from these.
(line-number
:inherit 'default
:foreground base5
:distant-foreground 'unspecified
:weight 'normal
:italic 'unspecified
:underline 'unspecified
:strike-through 'unspecified)
(line-number-current-line
:inherit '(hl-line default)
:foreground fg
:distant-foreground 'unspecified
:weight 'normal
:italic 'unspecified
:underline 'unspecified
:strike-through 'unspecified)
;;;; --- Package faces ----------------------
;; What follows are faces for all the packages doom-themes explicitly
;; supports. Headings are formatted as such:
;;
;; PACKAGE [<built-in>] [<modes:some-mode[, ...]>]
;;
;; The purpose of this is to make it easy to jump to via `imenu', or search
;; for with isearch, swiper, etc.
;;;; agda-mode <modes:agda2-mode>
(agda2-highlight-keyword-face :inherit 'font-lock-keyword-face)
(agda2-highlight-string-face :inherit 'font-lock-string-face)
(agda2-highlight-number-face :inherit 'font-lock-string-face)
(agda2-highlight-symbol-face
:inherit 'font-lock-variable-name-face)
(agda2-highlight-primitive-type-face
:inherit 'font-lock-type-face)
(agda2-highlight-bound-variable-face
:inherit 'font-lock-variable-name-face)
(agda2-highlight-inductive-constructor-face
:inherit 'font-lock-type-face)
(agda2-highlight-coinductive-constructor-face
:inherit 'font-lock-type-face)
(agda2-highlight-datatype-face :inherit 'font-lock-type-face)
(agda2-highlight-field-face :inherit 'font-lock-type-face)
(agda2-highlight-function-face
:inherit 'font-lock-function-name-face)
(agda2-highlight-module-face
:inherit 'font-lock-variable-name-face)
(agda2-highlight-postulate-face :inherit 'font-lock-type-face)
(agda2-highlight-primitive-face :inherit 'font-lock-type-face)
(agda2-highlight-macro-face
:inherit 'font-lock-function-name-face)
(agda2-highlight-record-face :inherit 'font-lock-type-face)
(agda2-highlight-error-face :inherit 'font-lock-warning-face)
(agda2-highlight-dotted-face
:inherit 'font-lock-variable-name-face)
(agda2-highlight-unsolved-meta-face
:inherit 'font-lock-warning-face)
(agda2-highlight-unsolved-constraint-face
:inherit 'font-lock-warning-face)
(agda2-highlight-termination-problem-face
:inherit 'font-lock-warning-face)
(agda2-highlight-positivity-problem-face
:inherit 'font-lock-warning-face)
(agda2-highlight-incomplete-pattern-face
:inherit 'font-lock-warning-face)
(agda2-highlight-typechecks-face :inherit 'font-lock-warning-face)
;;;; auctex <modes:latex-mode>
(font-latex-bold-face :inherit 'bold)
(font-latex-italic-face :inherit 'italic)
(font-latex-math-face :foreground blue)
(font-latex-sedate-face :inherit 'font-lock-keyword-face)
(font-latex-sectioning-0-face
:foreground blue
:weight 'ultra-bold)
(font-latex-sectioning-1-face
:foreground magenta
:weight 'semi-bold)
(font-latex-sectioning-2-face
:foreground violet
:weight 'semi-bold)
(font-latex-sectioning-3-face
:foreground (doom-lighten blue 0.3)
:weight 'semi-bold)
(font-latex-sectioning-4-face
:foreground (doom-lighten magenta 0.3)
:weight 'semi-bold)
(font-latex-sectioning-5-face
:foreground (doom-lighten violet 0.3)
:weight 'semi-bold)
(font-latex-script-char-face :foreground dark-blue)
(font-latex-string-face :inherit 'font-lock-string-face)
(font-latex-warning-face :inherit 'font-lock-warning-face)
(font-latex-verbatim-face
:inherit 'fixed-pitch
:foreground violet
:slant 'italic)
(TeX-error-description-error :inherit 'error :weight 'bold)
(TeX-error-description-warning :inherit 'warning :weight 'bold)
(TeX-error-description-tex-said :inherit 'success :weight 'bold)
;;;; alert
(alert-high-face :inherit bold :foreground warning)
(alert-low-face :foreground grey)
(alert-moderate-face :inherit bold :foreground fg-alt)
(alert-trivial-face :foreground doc-comments)
(alert-urgent-face :inherit bold :foreground error)
;;;; all-the-icons
(all-the-icons-blue :foreground blue)
(all-the-icons-blue-alt :foreground teal)
(all-the-icons-cyan :foreground cyan)
(all-the-icons-cyan-alt :foreground cyan)
(all-the-icons-dblue :foreground dark-blue)
(all-the-icons-dcyan :foreground dark-cyan)
(all-the-icons-dgreen :foreground (doom-darken green 0.3))
(all-the-icons-dmaroon :foreground (doom-darken magenta 0.3))
(all-the-icons-dorange :foreground (doom-darken orange 0.3))
(all-the-icons-dpink :foreground (doom-lighten red 0.15))
(all-the-icons-dpurple :foreground (doom-darken violet 0.3))
(all-the-icons-dred :foreground (doom-darken red 0.3))
(all-the-icons-dsilver :foreground (doom-lighten grey 0.1))
(all-the-icons-dyellow :foreground (doom-darken yellow 0.3))
(all-the-icons-green :foreground green)
(all-the-icons-lblue :foreground (doom-lighten blue 0.3))
(all-the-icons-lcyan :foreground (doom-lighten cyan 0.3))
(all-the-icons-lgreen :foreground (doom-lighten green 0.3))
(all-the-icons-lmaroon :foreground (doom-lighten magenta 0.3))
(all-the-icons-lorange :foreground (doom-lighten orange 0.3))
(all-the-icons-lpink :foreground (doom-lighten red 0.55))
(all-the-icons-lpurple :foreground (doom-lighten violet 0.3))
(all-the-icons-lred :foreground (doom-lighten red 0.3))
(all-the-icons-lsilver :foreground (doom-lighten grey 0.7))
(all-the-icons-lyellow :foreground (doom-lighten yellow 0.3))
(all-the-icons-maroon :foreground magenta)
(all-the-icons-orange :foreground orange)
(all-the-icons-pink :foreground (doom-lighten red 0.35))
(all-the-icons-purple :foreground violet)
(all-the-icons-purple-alt
:foreground (doom-blend violet grey 0.15))
(all-the-icons-red :foreground red)
(all-the-icons-red-alt :foreground (doom-blend red grey 0.15))
(all-the-icons-silver :foreground (doom-lighten grey 0.45))
(all-the-icons-yellow :foreground yellow)
;;;; all-the-icons-dired
(all-the-icons-dired-dir-face :foreground doc-comments)
;;;; annotate
(annotate-annotation
:background (doom-blend highlight bg 0.1)
:foreground doc-comments)
(annotate-annotation-secondary
:background (doom-blend green bg 0.1)
:foreground doc-comments)
(annotate-highlight
:background (doom-blend highlight bg 0.1)
:underline highlight)
(annotate-highlight-secondary
:background (doom-blend green bg 0.1)
:underline green)
;;;; ansi-color <built-in>
(ansi-color-black :foreground bg :background bg)
(ansi-color-red :foreground red :background red)
(ansi-color-green :foreground green :background green)
(ansi-color-yellow :foreground yellow :background yellow)
(ansi-color-blue :foreground blue :background blue)
(ansi-color-magenta :foreground magenta :background magenta)
(ansi-color-cyan :foreground cyan :background cyan)
(ansi-color-white :foreground fg :background fg)
;; This color is used effectively as grayed out foreground text.
;; base5 and up have too much contrast in light themes;
;; base5 and lower have too little contrast in dark themes.
(ansi-color-bright-black
(&light :foreground base4 :background base4)
(&dark :foreground base6 :background base6))
(ansi-color-bright-red
:foreground (doom-lighten red 0.15)
:background (doom-lighten red 0.15))
(ansi-color-bright-green
:foreground (doom-lighten green 0.15)
:background (doom-lighten green 0.15))
(ansi-color-bright-yellow
:foreground (doom-lighten yellow 0.15)
:background (doom-lighten yellow 0.15))
(ansi-color-bright-blue
:foreground (doom-lighten blue 0.15)
:background (doom-lighten blue 0.15))
(ansi-color-bright-magenta
:foreground (doom-lighten magenta 0.15)
:background (doom-lighten magenta 0.15))
(ansi-color-bright-cyan
:foreground (doom-lighten cyan 0.15)
:background (doom-lighten cyan 0.15))
(ansi-color-bright-white :foreground base8 :background base8)
;;;; anzu
(anzu-replace-highlight
:background base0
:foreground red
:weight 'bold
:strike-through t)
(anzu-replace-to
:background base0
:foreground green
:weight 'bold)
;;;; avy
(avy-background-face :foreground comments)
(avy-lead-face
:background highlight
:foreground bg
:distant-foreground fg
:weight 'bold)
(avy-lead-face-0
(&all :inherit 'avy-lead-face)
(&dark :background (doom-lighten highlight 0.3))
(&light :background (doom-darken highlight 0.3)))
(avy-lead-face-1
(&all :inherit 'avy-lead-face)
(&dark :background (doom-lighten highlight 0.6))
(&light :background (doom-darken highlight 0.6)))
(avy-lead-face-2
(&all :inherit 'avy-lead-face)
(&dark :background (doom-lighten highlight 0.9))
(&light :background (doom-darken highlight 0.9)))
;;;; bookmark
(bookmark-face
:background (doom-blend highlight bg 0.1)
:extend t)
;;;; bookmark+
(bmkp-*-mark :foreground bg :background yellow)
(bmkp->-mark :foreground yellow)
(bmkp-D-mark :foreground bg :background red)
(bmkp-X-mark :foreground red)
(bmkp-a-mark :background red)
(bmkp-bad-bookmark :foreground bg :background yellow)
(bmkp-bookmark-file :foreground violet :background bg-alt)
(bmkp-bookmark-list :background bg-alt)
(bmkp-buffer :foreground blue)
(bmkp-desktop :foreground bg :background violet)
(bmkp-file-handler :background red)
(bmkp-function :foreground green)
(bmkp-gnus :foreground orange)
(bmkp-heading :foreground yellow)
(bmkp-info :foreground cyan)
(bmkp-light-autonamed :foreground bg-alt :background cyan)
(bmkp-light-autonamed-region :foreground bg-alt :background red)
(bmkp-light-fringe-autonamed
:foreground bg-alt
:background violet)
(bmkp-light-fringe-non-autonamed
:foreground bg-alt
:background green)
(bmkp-light-mark :foreground bg :background cyan)
(bmkp-light-non-autonamed :foreground bg :background violet)
(bmkp-light-non-autonamed-region :foreground bg :background red)
(bmkp-local-directory :foreground bg :background violet)
(bmkp-local-file-with-region :foreground yellow)
(bmkp-local-file-without-region :foreground comments)
(bmkp-man :foreground violet)
(bmkp-no-jump :foreground comments)
(bmkp-no-local :foreground yellow)
(bmkp-non-file :foreground green)
(bmkp-remote-file :foreground orange)
(bmkp-sequence :foreground blue)
(bmkp-su-or-sudo :foreground red)
(bmkp-t-mark :foreground violet)
(bmkp-url :foreground blue :underline t)
(bmkp-variable-list :foreground green)
;;;; calfw
(cfw:face-title
:foreground blue
:weight 'bold
:height 2.0
:inherit 'variable-pitch)
(cfw:face-header
:foreground (doom-blend blue bg 0.8)
:weight 'bold)
(cfw:face-sunday
:foreground (doom-blend red bg 0.8)
:weight 'bold)
(cfw:face-saturday
:foreground (doom-blend red bg 0.8)
:weight 'bold)
(cfw:face-holiday :background bg-alt :weight 'bold)
(cfw:face-grid :foreground vertical-bar)
(cfw:face-periods :foreground yellow)
(cfw:face-toolbar)
(cfw:face-toolbar-button-off
:foreground base6
:weight 'bold
:inherit 'variable-pitch)
(cfw:face-toolbar-button-on
:foreground blue
:weight 'bold
:inherit 'variable-pitch)
(cfw:face-default-content :foreground fg)
(cfw:face-day-title :foreground fg :weight 'bold)
(cfw:face-today-title
:foreground bg
:background blue
:weight 'bold)
(cfw:face-default-day :weight 'bold)
(cfw:face-today :weight 'bold)
(cfw:face-annotation :foreground violet)
(cfw:face-disable :foreground grey)
(cfw:face-select :background region)
;;;; centaur-tabs
((centaur-tabs-default &inherit tab-bar) :box nil)
((centaur-tabs-selected &inherit tab-bar-tab) :box nil)
((centaur-tabs-unselected &inherit tab-bar-tab-inactive) :box nil)
(centaur-tabs-selected-modified :background bg :foreground teal)
(centaur-tabs-unselected-modified
:background bg-alt
:foreground teal)
(centaur-tabs-active-bar-face
:background
(if (bound-and-true-p -modeline-bright)
modeline-bg
highlight))
(centaur-tabs-modified-marker-selected
:foreground
(if (bound-and-true-p -modeline-bright)
modeline-bg
highlight)
:inherit 'centaur-tabs-selected)
(centaur-tabs-modified-marker-unselected
:foreground
(if (bound-and-true-p -modeline-bright)
modeline-bg
highlight)
:inherit 'centaur-tabs-unselected)
;;;; company
(company-tooltip :inherit 'tooltip)
(company-tooltip-common
:foreground highlight
:distant-foreground base0
:weight 'bold)
(company-tooltip-search
:background highlight
:foreground bg
:distant-foreground fg
:weight 'bold)
(company-tooltip-search-selection
:background (doom-darken selection 0.25))
(company-tooltip-selection :background selection :weight 'bold)
(company-tooltip-mouse
:background magenta
:foreground bg
:distant-foreground fg)
(company-tooltip-annotation
:foreground violet
:distant-foreground bg)
(company-scrollbar-bg :inherit 'tooltip)
(company-scrollbar-fg :background highlight)
(company-preview :foreground comments)
(company-preview-common :background base3 :foreground highlight)
(company-preview-search :inherit 'company-tooltip-search)
(company-template-field :inherit 'match)
;;;; company-box
(company-box-candidate :foreground fg)
;;;; corfu
(corfu-default :inherit 'tooltip)
(corfu-current :background bg :foreground fg)
;;;; circe
(circe-fool :foreground doc-comments)
(circe-highlight-nick-face :weight 'bold :foreground constants)
(circe-prompt-face :weight 'bold :foreground highlight)
(circe-server-face :foreground comments)
(circe-my-message-face :weight 'bold)
;;;; cperl <built-in>
(cperl-array-face
:weight 'bold
:inherit 'font-lock-variable-name-face)
(cperl-hash-face
:weight 'bold
:slant 'italic
:inherit 'font-lock-variable-name-face)
(cperl-nonoverridable-face :inherit 'font-lock-builtin-face)
;;;; compilation <built-in>
(compilation-column-number :inherit 'font-lock-comment-face)
(compilation-line-number :foreground highlight)
(compilation-error :inherit 'error :weight 'bold)
(compilation-warning :inherit 'warning :slant 'italic)
(compilation-info :inherit 'success)
(compilation-mode-line-exit :inherit 'compilation-info)
(compilation-mode-line-fail :inherit 'compilation-error)
;;;; custom <built-in>
(custom-button
:foreground blue
:background bg
:box '(:line-width 1 :style nil))
(custom-button-unraised
:foreground violet
:background bg
:box '(:line-width 1 :style nil))
(custom-button-pressed-unraised
:foreground bg
:background violet
:box '(:line-width 1 :style nil))
(custom-button-pressed
:foreground bg
:background blue
:box '(:line-width 1 :style nil))
(custom-button-mouse
:foreground bg
:background blue
:box '(:line-width 1 :style nil))
(custom-variable-button :foreground green :underline t)
(custom-saved
:foreground green
:background (doom-blend green bg 0.2)
:bold bold)
(custom-comment :foreground fg :background region)
(custom-comment-tag :foreground grey)
(custom-modified
:foreground blue
:background (doom-blend blue bg 0.2))
(custom-variable-tag :foreground magenta)
(custom-visibility :foreground blue :underline 'unspecified)
(custom-group-subtitle :foreground red)
(custom-group-tag :foreground violet)
(custom-group-tag-1 :foreground blue)
(custom-set :foreground yellow :background bg)
(custom-themed :foreground yellow :background bg)
(custom-invalid
:foreground red
:background (doom-blend red bg 0.2))
(custom-variable-obsolete :foreground grey :background bg)
(custom-state
:foreground green
:background (doom-blend green bg 0.2))
(custom-changed :foreground blue :background bg)
;;;; cider
;; (cider-stacktrace-error-class-face :inherit 'font-lock-warning-face)
;; (cider-stacktrace-error-message-face :inherit 'font-lock-doc-face)
;; (cider-stacktrace-filter-active-face :inherit 'button :underline t :weight 'normal)
;; (cider-stacktrace-filter-inactive-face :inherit 'cider-stacktrace-filter-active-face :underline nil)
;; (cider-stacktrace-face :inherit 'default)
;; (cider-stacktrace-ns-face :inherit 'font-lock-comment-face)
;; (cider-stacktrace-fn-face :inherit 'default :weight 'bold)
;; (cider-docview-emphasis-face :inherit 'default :underline t)
;; (cider-docview-strong-face :inherit 'default :underline t :weight 'bold)
;; (cider-docview-literal-face :inherit 'font-lock-string-face)
;; (cider-docview-table-border-face :inherit 'shadow)
(cider-debug-code-overlay-face :background base3)
;; (cider-debug-prompt-face :inherit font-lock-builtin-face :underline t)
(cider-enlightened-face
:inherit 'cider-result-overlay-face
:box `(:color ,orange :line-width -1))
(cider-enlightened-local-face :foreground orange :weight 'bold)
;; (cider-repl-prompt-face :inherit 'font-lock-keyword-face)
;; (cider-repl-stdout-face :inherit 'font-lock-string-face)
;; (cider-repl-stderr-face :inherit 'font-lock-warning-face)
;; (cider-repl-input-face :weight 'bold)
;; (cider-repl-result-face )
(cider-result-overlay-face
:background base3
:box `(:line-width -1 :color ,base5))
(cider-fringe-good-face :foreground green)
(cider-deprecated-face :background (doom-blend bg yellow 0.8))
(cider-instrumented-face :background (doom-blend bg red 0.8))
(cider-traced-face :background (doom-blend bg cyan 0.8))
;; (cider-reader-conditional-face :inherit 'font-lock-comment-face)
(cider-error-highlight-face
`((((supports :underline (:style wave)))
(:inherit
unspecified
:underline (:style wave :color ,(car error))))
(t (:inherit font-lock-warning-face :underline t))))
(cider-warning-highlight-face
`((((supports :underline (:style wave)))
(:underline
(:style wave :color ,(car warning))
:inherit unspecified))
(t
(:inherit
font-lock-warning-face
:underline (:color ,(car warning))))))
(cider-test-failure-face :background (doom-blend bg error 0.7))
(cider-test-error-face :background orange)
(cider-test-success-face
(&light :foreground base0 :background green)
(&dark :foreground green :background base0))
;;;; diff-hl
(diff-hl-change :foreground vc-modified :background vc-modified)
(diff-hl-delete :foreground vc-deleted :background vc-deleted)
(diff-hl-insert :foreground vc-added :background vc-added)
;;;; diff-mode <built-in>
(diff-added :inherit 'hl-line :foreground green)
(diff-changed :foreground violet)
(diff-context
(&dark :foreground (doom-darken fg 0.12))
(&light :foreground (doom-lighten fg 0.12)))
(diff-removed :foreground red :background base3)
(diff-header :foreground cyan)
(diff-file-header :foreground blue)
(diff-hunk-header :foreground violet)
(diff-refine-added :inherit 'diff-added :inverse-video t)
(diff-refine-changed :inherit 'diff-changed :inverse-video t)
(diff-refine-removed :inherit 'diff-removed :inverse-video t)
;;;; dired <built-in>
(dired-directory :foreground builtin)
(dired-ignored :foreground comments)
(dired-flagged :foreground red)
(dired-header :foreground blue :weight 'bold)
(dired-mark :foreground orange :weight 'bold)
(dired-marked :foreground magenta :weight 'bold :inverse-video t)
(dired-perm-write :foreground fg :underline t)
(dired-symlink :foreground cyan :weight 'bold)
(dired-warning :foreground warning)
;;;; dired+
(diredp-file-name :foreground base8)
(diredp-dir-name :foreground base8 :weight 'bold)
(diredp-ignored-file-name :foreground base5)
(diredp-compressed-file-suffix :foreground base5)
(diredp-symlink :foreground violet)
(diredp-dir-heading :foreground blue :weight 'bold)
(diredp-file-suffix :foreground violet)
(diredp-read-priv :foreground magenta)
(diredp-write-priv :foreground green)
(diredp-exec-priv :foreground yellow)
(diredp-rare-priv :foreground red :weight 'bold)
(diredp-dir-priv :foreground blue :weight 'bold)
(diredp-no-priv :foreground base5)
(diredp-number :foreground magenta)
(diredp-date-time :foreground blue)
;;;; dired-k
(dired-k-modified :foreground vc-modified :weight 'bold)
(dired-k-commited :foreground green :weight 'bold)
(dired-k-added :foreground vc-added :weight 'bold)
(dired-k-untracked :foreground teal :weight 'bold)
(dired-k-ignored :foreground base5 :weight 'bold)
(dired-k-directory :foreground blue :weight 'bold)
;;;; dired-subtree
(dired-subtree-depth-1-face :background (doom-darken bg-alt 0.02))
(dired-subtree-depth-2-face :background (doom-darken bg-alt 0.04))
(dired-subtree-depth-3-face :background (doom-darken bg-alt 0.06))
(dired-subtree-depth-4-face :background (doom-darken bg-alt 0.08))
(dired-subtree-depth-5-face :background (doom-darken bg-alt 0.10))
(dired-subtree-depth-6-face :background (doom-darken bg-alt 0.12))
;;;; diredfl
(diredfl-autofile-name :foreground base4)
(diredfl-compressed-file-name :foreground yellow)
(diredfl-compressed-file-suffix
:foreground (doom-blend orange bg 0.6))
(diredfl-date-time :foreground cyan :weight 'light)
(diredfl-deletion
:foreground red
:background (doom-blend red bg 0.2)
:weight 'bold)
(diredfl-deletion-file-name
:foreground red
:background (doom-blend red bg 0.2))
(diredfl-dir-heading :foreground blue :weight 'bold)
(diredfl-dir-name :foreground blue)
(diredfl-dir-priv :foreground blue)
(diredfl-exec-priv :foreground green)
(diredfl-executable-tag :foreground green)
(diredfl-file-name :foreground fg)
(diredfl-file-suffix :foreground (doom-blend fg bg 0.6))
(diredfl-flag-mark
:foreground yellow
:background (doom-blend yellow bg 0.2)
:weight 'bold)
(diredfl-flag-mark-line :background (doom-blend yellow bg 0.1))
(diredfl-ignored-file-name :foreground comments)
(diredfl-link-priv :foreground violet)
(diredfl-no-priv :inherit 'shadow)
(diredfl-number :foreground orange)
(diredfl-other-priv :foreground magenta)
(diredfl-rare-priv :foreground fg)
(diredfl-read-priv :foreground yellow)
(diredfl-symlink :foreground violet)
(diredfl-tagged-autofile-name :foreground base5)
(diredfl-write-priv :foreground red)
;;;; disk-usage
(disk-usage-children :foreground yellow)
(disk-usage-percent :foreground violet)
(disk-usage-size :foreground blue)
(disk-usage-symlink :foreground cyan :weight 'bold)
;;;; doom-modeline
(doom-modeline-eldoc-bar :background green)
(doom-modeline-bar-inactive) ; transparent
;;;; doom-themes
(doom-themes-visual-bell :background error)
;;;; ediff <built-in>
(ediff-fine-diff-A
:background (doom-blend selection bg 0.7)
:weight 'bold
:extend t)
(ediff-fine-diff-B :inherit 'ediff-fine-diff-A)
(ediff-fine-diff-C :inherit 'ediff-fine-diff-A)
(ediff-current-diff-A
:background (doom-blend selection bg 0.3)
:extend t)
(ediff-current-diff-B :inherit 'ediff-current-diff-A)
(ediff-current-diff-C :inherit 'ediff-current-diff-A)
(ediff-even-diff-A :inherit 'hl-line)
(ediff-even-diff-B :inherit 'ediff-even-diff-A)
(ediff-even-diff-C :inherit 'ediff-even-diff-A)
(ediff-odd-diff-A :inherit 'ediff-even-diff-A)
(ediff-odd-diff-B :inherit 'ediff-odd-diff-A)
(ediff-odd-diff-C :inherit 'ediff-odd-diff-A)
;;;; elfeed
(elfeed-log-debug-level-face :foreground comments)
(elfeed-log-error-level-face :inherit 'error)
(elfeed-log-info-level-face :inherit 'success)
(elfeed-log-warn-level-face :inherit 'warning)
(elfeed-search-date-face :foreground violet)
(elfeed-search-feed-face :foreground blue)
(elfeed-search-tag-face :foreground comments)
(elfeed-search-title-face :foreground comments)
(elfeed-search-filter-face :foreground violet)
(elfeed-search-unread-count-face :foreground yellow)
(elfeed-search-unread-title-face :foreground fg :weight 'bold)
;;;; elixir-mode <modes:elixir-mode>
(elixir-atom-face
(&light :foreground dark-blue) (&dark :foreground cyan))
(elixir-attribute-face :foreground violet)
;;;; elscreen
(elscreen-tab-background-face :background bg)
(elscreen-tab-control-face :background bg :foreground bg)
(elscreen-tab-current-screen-face
:background bg-alt
:foreground fg)
(elscreen-tab-other-screen-face :background bg :foreground fg-alt)
;;;; embark
((embark-target &inherit vertico-current))
;;;; enh-ruby-mode <modes:enh-ruby-mode>
(enh-ruby-heredoc-delimiter-face :inherit 'font-lock-string-face)
(enh-ruby-op-face :foreground operators)
(enh-ruby-regexp-delimiter-face :inherit 'enh-ruby-regexp-face)
(enh-ruby-regexp-face :foreground constants)
(enh-ruby-string-delimiter-face :inherit 'font-lock-string-face)
(erm-syn-errline :underline `(:style wave :color ,error))
(erm-syn-warnline :underline `(:style wave :color ,warning))
;;;; erc <built-in>
(erc-button :weight 'bold :underline t)
(erc-default-face :inherit 'default)
(erc-action-face :weight 'bold)
(erc-command-indicator-face :weight 'bold)
(erc-direct-msg-face :foreground magenta)
(erc-error-face :inherit 'error)
(erc-header-line
:background (doom-darken bg-alt 0.15)
:foreground highlight)
(erc-input-face :foreground green)
(erc-current-nick-face :foreground green :weight 'bold)
(erc-timestamp-face :foreground blue :weight 'bold)
(erc-nick-default-face :weight 'bold)
(erc-nick-msg-face :foreground magenta)
(erc-nick-prefix-face :inherit 'erc-nick-default-face)
(erc-my-nick-face :foreground green :weight 'bold)
(erc-my-nick-prefix-face :inherit 'erc-my-nick-face)
(erc-notice-face :foreground comments)
(erc-prompt-face :foreground highlight :weight 'bold)
;;;; eshell <built-in>
(eshell-prompt :foreground highlight :weight 'bold)
(eshell-ls-archive :foreground magenta)
(eshell-ls-backup :foreground yellow)
(eshell-ls-clutter :foreground red)
(eshell-ls-directory :foreground blue)
(eshell-ls-executable :foreground green)
(eshell-ls-missing :foreground red)
(eshell-ls-product :foreground orange)
(eshell-ls-readonly :foreground orange)
(eshell-ls-special :foreground violet)
(eshell-ls-symlink :foreground cyan)
(eshell-ls-unreadable :foreground base5)
;;;; evil
(evil-ex-info :foreground error :slant 'italic)
(evil-ex-search
:background highlight
:foreground base0
:weight 'bold)
(evil-ex-substitute-matches
:background base0
:foreground red
:weight 'bold
:strike-through t)
(evil-ex-substitute-replacement
:background base0
:foreground green
:weight 'bold)
(evil-search-highlight-persist-highlight-face
:inherit 'lazy-highlight)
;;;; evil-mc
(evil-mc-cursor-default-face
:background magenta
:foreground base0)
(evil-mc-region-face :inherit 'region)
(evil-mc-cursor-bar-face
:height 1
:background magenta
:foreground base0)
(evil-mc-cursor-hbar-face :underline `(:color ,highlight))
;;;; evil-snipe
(evil-snipe-first-match-face
:foreground highlight
:background dark-blue
:weight 'bold)
(evil-snipe-matches-face
:foreground highlight
:underline t
:weight 'bold)
;;;; evil-googles
(evil-goggles-default-face
:inherit 'region
:background (doom-blend region bg 0.5))
;;;; eww
(eww-form-checkbox :inherit 'eww-form-file)
(eww-form-file :inherit 'eww-form-submit :background bg-alt)
(eww-form-select :inherit 'eww-form-submit :background bg-alt)
(eww-form-submit
:inherit 'eww-form-text
:box `(:line-width 2 :style released-button)
:background base2)
(eww-form-text
:box `(:line-width 1 :color ,base3)
:background bg
:foreground fg
:distant-foreground bg)
(eww-form-textarea :inherit 'eww-form-text)
(eww-invalid-certificate :foreground error)
(eww-valid-certificate :foreground highlight)
;;;; eyebrowse
(eyebrowse-mode-line-active :weight 'bold :foreground highlight)
;;;; flycheck
(flycheck-error :underline `(:style wave :color ,red))
(flycheck-warning :underline `(:style wave :color ,yellow))
(flycheck-info :underline `(:style wave :color ,green))
(flycheck-fringe-error :inherit 'fringe :foreground error)
(flycheck-fringe-warning :inherit 'fringe :foreground warning)
(flycheck-fringe-info :inherit 'fringe :foreground success)
;;;; flycheck-posframe
(flycheck-posframe-face :inherit 'default)
(flycheck-posframe-background-face :background bg-alt)
(flycheck-posframe-error-face
:inherit 'flycheck-posframe-face
:foreground error)
(flycheck-posframe-info-face
:inherit 'flycheck-posframe-face
:foreground fg)
(flycheck-posframe-warning-face
:inherit 'flycheck-posframe-face
:foreground warning)
;;;; flymake
(flymake-error :underline `(:style wave :color ,red))
(flymake-note :underline `(:style wave :color ,green))
(flymake-warning :underline `(:style wave :color ,orange))
;;;; flyspell <built-in>
(flyspell-incorrect
:underline `(:style wave :color ,error)
:inherit 'unspecified)
(flyspell-duplicate
:underline `(:style wave :color ,warning)
:inherit 'unspecified)
;;;; flx-ido
(flx-highlight-face
:weight 'bold
:foreground yellow
:underline nil)
;;;; forge
(forge-dimmed :inherit 'magit-dimmed)
(forge-pullreq-open :inherit 'forge-issue-open)
(forge-pullreq-merged :inherit 'forge-issue-completed)
(forge-pullreq-rejected :inherit 'forge-issue-unplanned)
;;;; git-commit
(git-commit-summary :foreground strings)
(git-commit-overlong-summary
:inherit 'error
:background base0
:slant 'italic
:weight 'bold)
(git-commit-nonempty-second-line
:inherit 'git-commit-overlong-summary)
(git-commit-keyword :foreground cyan :slant 'italic)
(git-commit-pseudo-header :foreground doc-comments :slant 'italic)
(git-commit-known-pseudo-header
:foreground doc-comments
:weight 'bold
:slant 'italic)
(git-commit-comment-branch-local :foreground magenta)
(git-commit-comment-branch-remote :foreground green)
(git-commit-comment-detached :foreground orange)
(git-commit-comment-heading :foreground keywords)
(git-commit-comment-file :foreground violet)
(git-commit-comment-action)
;;;; git-gutter
(git-gutter:modified :inherit 'fringe :foreground vc-modified)
(git-gutter:added :inherit 'fringe :foreground vc-added)
(git-gutter:deleted :inherit 'fringe :foreground vc-deleted)
;;;; git-gutter+
(git-gutter+-modified
:inherit 'fringe
:foreground vc-modified
:background 'unspecified)
(git-gutter+-added
:inherit 'fringe
:foreground vc-added
:background 'unspecified)
(git-gutter+-deleted
:inherit 'fringe
:foreground vc-deleted
:background 'unspecified)
;;;; git-gutter-fringe
((git-gutter-fr:modified &inherit git-gutter:modified))
((git-gutter-fr:added &inherit git-gutter:added))
((git-gutter-fr:deleted &inherit git-gutter:deleted))
;;;; gnus (built-in)
(gnus-group-mail-1 :weight 'bold :foreground fg)
(gnus-group-mail-2 :inherit 'gnus-group-mail-1)
(gnus-group-mail-3 :inherit 'gnus-group-mail-1)
(gnus-group-mail-1-empty :foreground base5)
(gnus-group-mail-2-empty :inherit 'gnus-group-mail-1-empty)
(gnus-group-mail-3-empty :inherit 'gnus-group-mail-1-empty)
(gnus-group-news-1 :inherit 'gnus-group-mail-1)
(gnus-group-news-2 :inherit 'gnus-group-news-1)
(gnus-group-news-3 :inherit 'gnus-group-news-1)
(gnus-group-news-4 :inherit 'gnus-group-news-1)
(gnus-group-news-5 :inherit 'gnus-group-news-1)
(gnus-group-news-6 :inherit 'gnus-group-news-1)
(gnus-group-news-1-empty :inherit 'gnus-group-mail-1-empty)
(gnus-group-news-2-empty :inherit 'gnus-group-news-1-empty)
(gnus-group-news-3-empty :inherit 'gnus-group-news-1-empty)
(gnus-group-news-4-empty :inherit 'gnus-group-news-1-empty)
(gnus-group-news-5-empty :inherit 'gnus-group-news-1-empty)
(gnus-group-news-6-empty :inherit 'gnus-group-news-1-empty)
(gnus-group-mail-low :inherit 'gnus-group-mail-1 :weight 'normal)
(gnus-group-mail-low-empty :inherit 'gnus-group-mail-1-empty)
(gnus-group-news-low
:inherit 'gnus-group-mail-1
:foreground base5)
(gnus-group-news-low-empty
:inherit 'gnus-group-news-low
:weight 'normal)
(gnus-header-content :inherit 'message-header-other)
(gnus-header-from :inherit 'message-header-other)
(gnus-header-name :inherit 'message-header-name)
(gnus-header-newsgroups :inherit 'message-header-other)
(gnus-header-subject :inherit 'message-header-subject)
(gnus-summary-cancelled :foreground red :strike-through t)
(gnus-summary-high-ancient
:foreground (doom-lighten base5 0.2)
:inherit 'italic)
(gnus-summary-high-read :foreground (doom-lighten fg 0.2))
(gnus-summary-high-ticked :foreground (doom-lighten magenta 0.2))
(gnus-summary-high-unread :foreground (doom-lighten green 0.2))
(gnus-summary-low-ancient
:foreground (doom-darken base5 0.2)
:inherit 'italic)
(gnus-summary-low-read :foreground (doom-darken fg 0.2))
(gnus-summary-low-ticked :foreground (doom-darken magenta 0.2))
(gnus-summary-low-unread :foreground (doom-darken green 0.2))
(gnus-summary-normal-ancient :foreground base5 :inherit 'italic)
(gnus-summary-normal-read :foreground fg)
(gnus-summary-normal-ticked :foreground magenta)
(gnus-summary-normal-unread :foreground green :inherit 'bold)
(gnus-summary-selected :foreground blue :weight 'bold)
(gnus-cite-1 :foreground violet)
(gnus-cite-2 :foreground yellow)
(gnus-cite-3 :foreground magenta)
(gnus-cite-4 :foreground green)
(gnus-cite-5 :foreground green)
(gnus-cite-6 :foreground green)
(gnus-cite-7 :foreground magenta)
(gnus-cite-8 :foreground magenta)
(gnus-cite-9 :foreground magenta)
(gnus-cite-10 :foreground yellow)
(gnus-cite-11 :foreground yellow)
(gnus-signature :foreground yellow)
(gnus-x-face :background base5 :foreground fg)
;;;; goggles
(goggles-changed :inherit 'region)
(goggles-removed
:background (doom-blend red bg-alt 0.25)
:extend t)
(goggles-added :background (doom-blend green bg-alt 0.25))
;;;; helm
(helm-selection
(&all :inherit 'bold :background selection :extend t)
(&dark :distant-foreground highlight)
(&light :distant-foreground base0))
(helm-match
:inherit 'bold
:foreground highlight
:distant-foreground base8)
(helm-source-header
:background base2
:foreground keywords
:weight 'bold)
(helm-visible-mark :inherit '(bold highlight))
(helm-moccur-buffer :inherit 'link)
(helm-ff-file :foreground fg)
(helm-ff-prefix :foreground keywords)
(helm-ff-dotted-directory :foreground grey)
(helm-ff-directory :foreground variables)
(helm-ff-executable :foreground base8 :inherit 'italic)
(helm-grep-match :foreground highlight :distant-foreground red)
(helm-grep-file :foreground methods)
(helm-grep-lineno :foreground base5)
(helm-grep-finish :foreground green)
;;;; helm-swoop
(helm-swoop-target-line-face
:foreground highlight
:inverse-video t)
(helm-swoop-target-line-block-face :foreground yellow)
(helm-swoop-target-word-face :foreground green :inherit 'bold)
(helm-swoop-target-number-face :foreground base5)
;;;; helm-rg
(helm-rg-active-arg-face :foreground green :weight 'normal)
(helm-rg-base-rg-cmd-face :foreground grey :weight 'normal)
(helm-rg-colon-separator-ripgrep-output-face :foreground base8)
(helm-rg-directory-cmd-face
:foreground (doom-darken yellow 0.25)
:background base0
:weight 'normal)
(helm-rg-directory-header-face
:foreground base8
:background base0
:weight 'bold)
(helm-rg-error-message :foreground red)
(helm-rg-extra-arg-face :foreground yellow :weight 'normal)
(helm-rg-file-match-face :foreground cyan :underline t)
(helm-rg-inactive-arg-face :foreground grey :weight 'normal)
(helm-rg-line-number-match-face :foreground orange :underline t)
(helm-rg-match-text-face :foreground base8 :background violet)
(helm-rg-title-face
:foreground violet
:background base0
:weight 'bold)
;;;; helpful
(helpful-heading :weight 'bold :height 1.2)
;;;; hi-lock <built-in>
(hi-yellow :background yellow)
(hi-pink :background magenta)
(hi-red-b :foreground red :weight 'bold)
(hi-green :background green)
(hi-green-b :foreground green :weight 'bold)
(hi-blue :background blue)
(hi-blue-b :foreground blue :weight 'bold)
;; (hi-black-b :weight 'bold)
;; (hi-black-hb :inherit 'variable-pitch :weight 'bold :height 1.67)
;;;; hideshow <built-in>
(+fold-hideshow-folded-face ; this is defined in Doom Emacs, only
:inherit 'font-lock-comment-face
:weight 'light
:background (doom-darken bg 0.15))
;;;; highlight-numbers-mode
(highlight-numbers-number :inherit 'bold :foreground numbers)
;;;; highlight-indentation-mode
(highlight-indentation-face :inherit 'hl-line)
(highlight-indentation-current-column-face :background base1)
(highlight-indentation-guides-odd-face
:inherit 'highlight-indentation-face)
(highlight-indentation-guides-even-face
:inherit 'highlight-indentation-face)
;;;; highlight-quoted-mode
(highlight-quoted-symbol :foreground type)
(highlight-quoted-quote :foreground operators)
;;;; highlight-symbol
(highlight-symbol-face
(&dark
:background (doom-lighten region 0.1)
:distant-foreground fg-alt)
(&light
:background (doom-darken region 0.1)
:distant-foreground fg-alt))
;;;; highlight-thing
(highlight-thing
(&dark
:background (doom-lighten region 0.1)
:distant-foreground fg-alt)
(&light
:background (doom-darken region 0.1)
:distant-foreground fg-alt))
;;;; hl-fill-column-face
(hl-fill-column-face :inherit '(hl-line shadow))
;;;; hl-line (built-in)
(hl-line :background bg-alt :extend t)
;;;; hl-todo
(hl-todo :foreground red :weight 'bold)
;;;; hlinum
(linum-highlight-face :foreground fg :weight 'normal)
;;;; hydra
(hydra-face-red :foreground red :weight 'bold)
(hydra-face-blue :foreground blue :weight 'bold)
(hydra-face-amaranth :foreground magenta :weight 'bold)
(hydra-face-pink :foreground violet :weight 'bold)
(hydra-face-teal :foreground teal :weight 'bold)
;;;; iedit
(iedit-occurrence
:foreground magenta
:weight 'bold
:inverse-video t)
(iedit-read-only-occurrence :inherit 'region)
;;;; ido <built-in>
(ido-first-match :foreground orange)
(ido-indicator :foreground red :background bg)
(ido-only-match :foreground green)
(ido-subdir :foreground violet)
(ido-virtual :foreground comments)
;;;; imenu-list
;; (imenu-list-entry-face)
(imenu-list-entry-face-0 :foreground highlight)
(imenu-list-entry-subalist-face-0
:inherit 'imenu-list-entry-face-0
:weight 'bold)
(imenu-list-entry-face-1 :foreground green)
(imenu-list-entry-subalist-face-1
:inherit 'imenu-list-entry-face-1
:weight 'bold)
(imenu-list-entry-face-2 :foreground yellow)
(imenu-list-entry-subalist-face-2
:inherit 'imenu-list-entry-face-2
:weight 'bold)
;;;; indent-guide
((indent-guide-face &inherit highlight-indentation-face))
;;;; isearch <built-in>
(isearch :inherit 'lazy-highlight :weight 'bold)
(isearch-fail :background error :foreground base0 :weight 'bold)
;;;; ivy
(ivy-current-match :background region :extend t)
(ivy-minibuffer-match-face-1
:foreground (doom-lighten grey 0.14)
:weight 'light)
(ivy-minibuffer-match-face-2
:inherit 'ivy-minibuffer-match-face-1
:foreground magenta
:background base1
:weight 'semi-bold)
(ivy-minibuffer-match-face-3
:inherit 'ivy-minibuffer-match-face-2
:foreground green
:weight 'semi-bold)
(ivy-minibuffer-match-face-4
:inherit 'ivy-minibuffer-match-face-2
:foreground yellow
:weight 'semi-bold)
(ivy-minibuffer-match-highlight :foreground violet)
(ivy-highlight-face :foreground violet)
(ivy-confirm-face :foreground success)
(ivy-match-required-face :foreground error)
(ivy-virtual :inherit 'italic :foreground doc-comments)
(ivy-modified-buffer :inherit 'bold :foreground warning)
;;;; ivy-posframe
(ivy-posframe :background (doom-darken bg-alt 0.2))
(ivy-posframe-border :inherit 'internal-border)
;;;; selectrum
(selectrum-current-candidate :background region :extend t)
;;;; vertico
(vertico-current :background region :extend t)
;;;; vertico-posframe
;;(vertico-posframe :inherit 'default)
(vertico-posframe-border :background grey)
(vertico-posframe-border-2 :background red)
(vertico-posframe-border-3 :background green)
(vertico-posframe-border-4 :background blue)
(vertico-posframe-border-fallback :background yellow)
;;;; jabber
(jabber-activity-face :foreground red :weight 'bold)
(jabber-activity-personal-face :foreground blue :weight 'bold)
(jabber-chat-error :foreground red :weight 'bold)
(jabber-chat-prompt-foreign :foreground red :weight 'bold)
(jabber-chat-prompt-local :foreground blue :weight 'bold)
(jabber-chat-prompt-system :foreground green :weight 'bold)
(jabber-chat-text-foreign :foreground fg)
(jabber-chat-text-local :foreground fg)
(jabber-rare-time-face :foreground green)
(jabber-roster-user-away :foreground yellow)
(jabber-roster-user-chatty :foreground green :weight 'bold)
(jabber-roster-user-dnd :foreground red)
(jabber-roster-user-error :foreground red)
(jabber-roster-user-offline :foreground fg)
(jabber-roster-user-online :foreground green :weight 'bold)
(jabber-roster-user-xa :foreground cyan)
;;;; jdee <modes:jdee-mode>
(jdee-font-lock-number-face :foreground numbers)
(jdee-font-lock-operator-face :foreground operators)
(jdee-font-lock-constant-face :inherit 'font-lock-constant-face)
(jdee-font-lock-constructor-face :foreground methods)
(jdee-font-lock-public-face :inherit 'font-lock-keyword-face)
(jdee-font-lock-protected-face :inherit 'font-lock-keyword-face)
(jdee-font-lock-private-face :inherit 'font-lock-keyword-face)
(jdee-font-lock-modifier-face :inherit 'font-lock-type-face)
(jdee-font-lock-doc-tag-face :foreground violet)
(jdee-font-lock-italic-face :inherit 'italic)
(jdee-font-lock-bold-face :inherit 'bold)
(jdee-font-lock-link-face
:foreground blue
:italic nil
:underline t)
;;;; js2-mode <modes:js2-mode,js2-jsx-mode>
(js2-function-param :foreground variables)
(js2-function-call :foreground functions)
(js2-object-property :foreground violet)
(js2-jsdoc-tag :foreground doc-comments)
(js2-external-variable :foreground operators)
;;;; keycast
(keycast-command :inherit 'mode-line-emphasis)
(keycast-key :inherit '(bold mode-line-highlight))
;;;; ledger-mode <modes:ledger-mode>
(ledger-font-posting-date-face :foreground blue)
(ledger-font-posting-amount-face :foreground yellow)
(ledger-font-posting-account-face :foreground base8)
(ledger-font-payee-cleared-face :foreground violet :weight 'bold)
(ledger-font-payee-uncleared-face :foreground base5 :weight 'bold)
(ledger-font-xact-highlight-face :background base0)
;;;; linum <built-in>
((linum &inherit line-number))
;;;; linum-relative
((linum-relative-current-face &inherit line-number-current-line))
;;;; lui
(lui-time-stamp-face :foreground violet)
(lui-highlight-face :foreground highlight)
(lui-button-face :foreground builtin :underline t)
;;;; magit
(magit-bisect-bad :foreground red)
(magit-bisect-good :foreground green)
(magit-bisect-skip :foreground orange)
(magit-blame-hash :foreground cyan)
(magit-blame-date :foreground red)
(magit-blame-heading
:foreground orange
:background base3
:extend t)
(magit-branch-current :foreground blue)
(magit-branch-local :foreground cyan)
(magit-branch-remote :foreground green)
(magit-cherry-equivalent :foreground violet)
(magit-cherry-unmatched :foreground cyan)
(magit-diff-added
:foreground (doom-darken vc-added 0.2)
:background (doom-blend vc-added bg 0.1)
:extend t)
(magit-diff-added-highlight
:foreground vc-added
:background (doom-blend vc-added bg 0.2)
:weight 'bold
:extend t)
(magit-diff-base
:foreground (doom-darken orange 0.2)
:background (doom-blend orange bg 0.1)
:extend t)
(magit-diff-base-highlight
:foreground orange
:background (doom-blend orange bg 0.2)
:weight 'bold
:extend t)
(magit-diff-context
:foreground (doom-darken fg 0.4)
:background bg
:extend t)
(magit-diff-context-highlight
:foreground fg
:background bg-alt
:extend t)
(magit-diff-file-heading :foreground fg :weight 'bold :extend t)
(magit-diff-file-heading-selection
:foreground magenta
:background dark-blue
:weight 'bold
:extend t)
(magit-diff-hunk-heading
:foreground bg
:background (doom-blend violet bg 0.3)
:extend t)
(magit-diff-hunk-heading-highlight
:foreground bg
:background violet
:weight 'bold
:extend t)
(magit-diff-lines-heading
:foreground yellow
:background red
:extend t
:extend t)
(magit-diff-removed
:foreground (doom-darken vc-deleted 0.2)
:background (doom-blend vc-deleted base3 0.1)
:extend t)
(magit-diff-removed-highlight
:foreground vc-deleted
:background (doom-blend vc-deleted base3 0.2)
:weight 'bold
:extend t)
(magit-diffstat-added :foreground vc-added)
(magit-diffstat-removed :foreground vc-deleted)
(magit-dimmed :foreground fg-alt)
(magit-hash :foreground comments)
(magit-header-line
:background dark-blue
:foreground base8
:weight 'bold
:box `(:line-width 3 :color ,dark-blue))
(magit-filename :foreground violet)
(magit-log-author :foreground orange)
(magit-log-date :foreground blue)
(magit-log-graph :foreground comments)
(magit-process-ng :inherit 'error)
(magit-process-ok :inherit 'success)
(magit-reflog-amend :foreground magenta)
(magit-reflog-checkout :foreground blue)
(magit-reflog-cherry-pick :foreground green)
(magit-reflog-commit :foreground green)
(magit-reflog-merge :foreground green)
(magit-reflog-other :foreground cyan)
(magit-reflog-rebase :foreground magenta)
(magit-reflog-remote :foreground cyan)
(magit-reflog-reset :inherit 'error)
(magit-refname :foreground comments)
(magit-section-heading :foreground blue :weight 'bold :extend t)
(magit-section-heading-selection
:foreground orange
:weight 'bold
:extend t)
(magit-section-highlight :inherit 'hl-line)
(magit-section-secondary-heading
:foreground violet
:weight 'bold
:extend t)
(magit-sequence-drop :foreground red)
(magit-sequence-head :foreground blue)
(magit-sequence-part :foreground orange)
(magit-sequence-stop :foreground green)
(magit-signature-bad :inherit 'error)
(magit-signature-error :inherit 'error)
(magit-signature-expired :foreground orange)
(magit-signature-good :inherit 'success)
(magit-signature-revoked :foreground magenta)
(magit-signature-untrusted :foreground yellow)
(magit-tag :foreground yellow)
;;;; make-mode <built-in> <modes:makefile-mode,makefile-automake-mode,makefile-makepp-mode,makefile-gmake-mode,makefile-imake-mode,makefile-bsdmake-mode>
(makefile-targets :foreground blue)
;;;; man <built-in> <mode:Man-mode>
(Man-overstrike :inherit 'bold :foreground operators)
(Man-underline :inherit 'underline :foreground keywords)
;;;; markdown-mode <modes:markdown-mode,gfm-mode>
(markdown-header-face :inherit 'bold :foreground highlight)
(markdown-header-delimiter-face :inherit 'markdown-header-face)
(markdown-metadata-key-face :foreground red)
(markdown-list-face :foreground red)
(markdown-link-face :foreground highlight)
(markdown-url-face :foreground magenta :weight 'normal)
(markdown-italic-face :inherit 'italic :foreground violet)
(markdown-bold-face :inherit 'bold :foreground orange)
(markdown-markup-face :foreground operators)
(markdown-blockquote-face
:inherit 'italic
:foreground doc-comments)
(markdown-pre-face :foreground strings)
(markdown-code-face :background base3 :extend t)
(markdown-reference-face :foreground doc-comments)
(markdown-inline-code-face
:inherit '(markdown-code-face markdown-pre-face)
:extend nil)
(markdown-html-attr-name-face
:inherit 'font-lock-variable-name-face)
(markdown-html-attr-value-face :inherit 'font-lock-string-face)
(markdown-html-entity-face :inherit 'font-lock-variable-name-face)
(markdown-html-tag-delimiter-face :inherit 'markdown-markup-face)
(markdown-html-tag-name-face :inherit 'font-lock-keyword-face)
;;;; marginalia
(marginalia-documentation :inherit 'font-lock-doc-face)
(marginalia-file-priv-dir :foreground blue)
(marginalia-file-priv-exec :foreground green)
(marginalia-file-priv-link :foreground violet)
(marginalia-file-priv-other :foreground magenta)
(marginalia-file-priv-rare :foreground fg)
(marginalia-file-priv-read :foreground yellow)
(marginalia-file-priv-write :foreground red)
(marginalia-number :foreground numbers)
(marginalia-size :foreground violet)
(marginalia-lighter :foreground violet)
;;;; message <built-in>
(message-header-name :foreground green)
(message-header-subject :foreground highlight :weight 'bold)
(message-header-to :foreground highlight :weight 'bold)
(message-header-cc
:inherit 'message-header-to
:foreground (doom-darken highlight 0.15))
(message-header-other :foreground violet)
(message-header-newsgroups :foreground yellow)
(message-header-xheader :foreground doc-comments)
(message-separator :foreground comments)
(message-mml :foreground comments :slant 'italic)
((message-cited-text &inherit gnus-cite-1))
((message-cited-text-1 &inherit gnus-cite-2))
((message-cited-text-2 &inherit gnus-cite-3))
((message-cited-text-3 &inherit gnus-cite-4))
((message-cited-text-4 &inherit gnus-cite-5))
;;;; mic-paren
(paren-face-match
:foreground red
:background base0
:weight 'ultra-bold)
(paren-face-mismatch
:foreground base0
:background red
:weight 'ultra-bold)
(paren-face-no-match
:inherit 'paren-face-mismatch
:weight 'ultra-bold)
;;;; minimap
(minimap-current-line-face :background selection)
(minimap-active-region-background :background vertical-bar)
;; mm
(mm-uu-extract
:background (doom-blend highlight base2 0.07)
:foreground (doom-blend highlight fg 0.15))
;;;; mmm-mode
(mmm-init-submode-face :background (doom-blend red bg 0.1))
(mmm-cleanup-submode-face :background (doom-blend yellow bg 0.1))
(mmm-declaration-submode-face
:background (doom-blend cyan bg 0.1))
(mmm-comment-submode-face :background (doom-blend blue bg 0.1))
(mmm-output-submode-face :background (doom-blend violet bg 0.1))
(mmm-special-submode-face :background (doom-blend green bg 0.1))
(mmm-code-submode-face :background bg-alt)
(mmm-default-submode-face) ; make transparent
;;;; multiple cursors
(mc/cursor-face :inherit 'cursor)
;;;; nav-flash
(nav-flash-face
:background selection
:foreground base8
:weight 'bold)
;;;; neotree
(neo-root-dir-face
:foreground strings
:background bg
:box `(:line-width 4 :color ,bg))
(neo-file-link-face :foreground fg)
(neo-dir-link-face :foreground highlight)
(neo-expand-btn-face :foreground highlight)
(neo-vc-edited-face :foreground yellow)
(neo-vc-added-face :foreground green)
(neo-vc-removed-face :foreground red :strike-through t)
(neo-vc-conflict-face :foreground magenta :weight 'bold)
(neo-vc-ignored-face :foreground comments)
(doom-neotree-dir-face :foreground highlight)
(doom-neotree-file-face :foreground base8)
(doom-neotree-hidden-file-face :foreground comments)
(doom-neotree-text-file-face :foreground fg)
(doom-neotree-data-file-face :foreground violet)
(doom-neotree-media-file-face
:inherit 'doom-neotree-hidden-file-face)
;;;; nerd-icons
(nerd-icons-blue :foreground blue)
(nerd-icons-blue-alt :foreground teal)
(nerd-icons-cyan :foreground cyan)
(nerd-icons-cyan-alt :foreground cyan)
(nerd-icons-dblue :foreground dark-blue)
(nerd-icons-dcyan :foreground dark-cyan)
(nerd-icons-dgreen :foreground (doom-darken green 0.3))
(nerd-icons-dmaroon :foreground (doom-darken magenta 0.3))
(nerd-icons-dorange :foreground (doom-darken orange 0.3))
(nerd-icons-dpink :foreground (doom-lighten red 0.15))
(nerd-icons-dpurple :foreground (doom-darken violet 0.3))
(nerd-icons-dred :foreground (doom-darken red 0.3))
(nerd-icons-dsilver :foreground (doom-lighten grey 0.1))
(nerd-icons-dyellow :foreground (doom-darken yellow 0.3))
(nerd-icons-green :foreground green)
(nerd-icons-lblue :foreground (doom-lighten blue 0.3))
(nerd-icons-lcyan :foreground (doom-lighten cyan 0.3))
(nerd-icons-lgreen :foreground (doom-lighten green 0.3))
(nerd-icons-lmaroon :foreground (doom-lighten magenta 0.3))
(nerd-icons-lorange :foreground (doom-lighten orange 0.3))
(nerd-icons-lpink :foreground (doom-lighten red 0.55))
(nerd-icons-lpurple :foreground (doom-lighten violet 0.3))
(nerd-icons-lred :foreground (doom-lighten red 0.3))
(nerd-icons-lsilver :foreground (doom-lighten grey 0.7))
(nerd-icons-lyellow :foreground (doom-lighten yellow 0.3))
(nerd-icons-maroon :foreground magenta)
(nerd-icons-orange :foreground orange)
(nerd-icons-pink :foreground (doom-lighten red 0.35))
(nerd-icons-purple :foreground violet)
(nerd-icons-purple-alt :foreground (doom-blend violet grey 0.15))
(nerd-icons-red :foreground red)
(nerd-icons-red-alt :foreground (doom-blend red grey 0.15))
(nerd-icons-silver :foreground (doom-lighten grey 0.45))
(nerd-icons-yellow :foreground yellow)
;;;; nerd-icons-completion
(nerd-icons-completion-dir-face :foreground doc-comments)
;;;; nerd-icons-dired
(nerd-icons-dired-dir-face :foreground doc-comments)
;;;; nlinum
((nlinum-current-line &inherit line-number-current-line))
;;;; nlinum-hl
((nlinum-hl-face &inherit line-number-current-line))
;;;; nlinum-relative
((nlinum-relative-current-face &inherit line-number-current-line))
;;;; notmuch
;; (notmuch-crypto-decryption :foreground blue-l)
;; (notmuch-crypto-part-header :foreground yellow-l)
;; (notmuch-crypto-signature-bad :foreground red-l)
;; (notmuch-crypto-signature-good :foreground base1)
;; (notmuch-crypto-signature-good-key :foreground aqua-l)
;; (notmuch-crypto-signature-unknown :foreground yellow)
;; (notmuch-hello-logo-background :foreground fg)
(notmuch-message-summary-face :foreground grey)
(notmuch-search-count :foreground comments)
(notmuch-search-date :foreground numbers)
(notmuch-search-flagged-face
:foreground (doom-blend red base4 0.5))
(notmuch-search-matching-authors :foreground blue)
(notmuch-search-non-matching-authors :foreground fg)
(notmuch-search-subject :foreground fg)
(notmuch-search-unread-face :weight 'bold)
(notmuch-tag-added :foreground green :weight 'normal)
(notmuch-tag-deleted :foreground red :weight 'normal)
(notmuch-tag-face :foreground yellow :weight 'normal)
(notmuch-tag-flagged :foreground yellow :weight 'normal)
(notmuch-tag-unread :foreground yellow :weight 'normal)
(notmuch-tree-match-author-face :foreground blue :weight 'bold)
(notmuch-tree-match-date-face :foreground numbers :weight 'bold)
(notmuch-tree-match-face :foreground fg)
(notmuch-tree-match-subject-face :foreground fg)
(notmuch-tree-match-tag-face :foreground yellow)
(notmuch-tree-match-tree-face :foreground comments)
(notmuch-tree-no-match-author-face :foreground blue)
(notmuch-tree-no-match-date-face :foreground numbers)
(notmuch-tree-no-match-face :foreground base5)
(notmuch-tree-no-match-subject-face :foreground base5)
(notmuch-tree-no-match-tag-face :foreground yellow)
(notmuch-tree-no-match-tree-face :foreground yellow)
(notmuch-wash-cited-text :foreground base4)
(notmuch-wash-toggle-button :foreground fg)
;;;; lsp-mode
(lsp-face-highlight-textual
(&all :weight 'bold)
(&light
:background base3
:foreground base0
:distant-foreground base8)
(&dark
:background (doom-blend highlight bg 0.3)
:foreground base8
:distant-foreground base0))
(lsp-face-highlight-read :inherit 'lsp-face-highlight-textual)
(lsp-face-highlight-write :inherit 'lsp-face-highlight-textual)
(lsp-headerline-breadcrumb-separator-face :inherit 'shadow)
;;;; lsp-ui
(lsp-ui-doc-background :inherit 'tooltip)
(lsp-ui-peek-filename :inherit 'mode-line-buffer-id)
(lsp-ui-peek-header
:foreground fg
:background (doom-lighten bg 0.1)
:bold bold)
(lsp-ui-peek-selection :foreground bg :background blue :bold bold)
(lsp-ui-peek-list :background (doom-darken bg 0.1))
(lsp-ui-peek-peek :background (doom-darken bg 0.1))
(lsp-ui-peek-highlight :inherit 'isearch :box t)
(lsp-ui-peek-line-number :foreground success)
(lsp-ui-sideline-code-action
:foreground (doom-blend highlight bg 0.85))
(lsp-ui-sideline-current-symbol :inherit 'highlight)
(lsp-ui-sideline-symbol-info
:foreground (doom-blend comments bg 0.85)
:background bg-alt
:extend t)
;;;; objed
(objed-mode-line :inherit 'warning :weight 'bold)
(objed-hl :inherit 'region :background (doom-blend region bg 0.5))
;;;; orderless
(orderless-match-face-0
:weight 'bold
:foreground (doom-blend blue fg 0.6)
:background (doom-blend blue bg 0.1))
(orderless-match-face-1
:weight 'bold
:foreground (doom-blend magenta fg 0.6)
:background (doom-blend magenta bg 0.1))
(orderless-match-face-2
:weight 'bold
:foreground (doom-blend green fg 0.6)
:background (doom-blend green bg 0.1))
(orderless-match-face-3
:weight 'bold
:foreground (doom-blend yellow fg 0.6)
:background (doom-blend yellow bg 0.1))
;;;; org <built-in> <modes:org-mode>
(org-archived :foreground doc-comments)
(org-block :background base3 :extend t)
(org-block-background :background base3 :extend t)
(org-block-begin-line :inherit 'org-block :foreground comments)
(org-block-end-line :inherit 'org-block-begin-line)
(org-checkbox :inherit 'org-todo)
(org-checkbox-statistics-done :inherit 'org-done)
(org-checkbox-statistics-todo :inherit 'org-todo)
(org-cite :foreground (doom-blend teal fg 0.9))
(org-cite-key :foreground (doom-blend teal fg 0.6) :underline t)
(org-code :inherit 'org-block :foreground orange)
(org-date :foreground yellow)
(org-default :inherit 'variable-pitch)
(org-document-info :foreground builtin)
(org-document-title :foreground builtin :weight 'bold)
(org-done
:inherit 'org-headline-done
:strike-through nil
:weight 'bold)
(org-drawer :foreground comments)
(org-ellipsis :foreground comments :underline nil)
(org-footnote :foreground orange)
(org-formula :foreground cyan)
(org-headline-done :foreground base5)
(org-hide :foreground bg)
(org-latex-and-related :foreground base8 :weight 'bold)
(org-link :inherit 'link :foreground highlight)
(org-list-dt :foreground highlight)
(org-meta-line :foreground doc-comments)
(org-priority :foreground red)
(org-property-value :foreground doc-comments)
(org-quote :inherit 'org-block :slant 'italic)
(org-special-keyword :foreground doc-comments)
(org-table :foreground violet)
(org-tag :foreground doc-comments :weight 'normal)
(org-todo :foreground green :bold 'inherit)
(org-verbatim :foreground green)
(org-warning :foreground warning)
;; Omitted because we rely on style they inherit from the outline-N faces
;;(org-level-1)
;;(org-level-2)
;;(org-level-3)
;;(org-level-4)
;;(org-level-5)
;;(org-level-6)
;;(org-level-7)
;;(org-level-8)
;;;; org-agenda <built-in>
(org-agenda-done :inherit 'org-done)
(org-agenda-dimmed-todo-face :foreground comments)
(org-agenda-date :foreground violet :weight 'ultra-bold)
(org-agenda-date-today
:foreground (doom-lighten violet 0.4)
:weight 'ultra-bold)
(org-agenda-date-weekend
:foreground (doom-darken violet 0.4)
:weight 'ultra-bold)
(org-agenda-structure :foreground fg :weight 'ultra-bold)
(org-agenda-clocking :background (doom-blend blue bg 0.2))
(org-upcoming-deadline :foreground (doom-blend fg bg 0.8))
(org-upcoming-distant-deadline :foreground (doom-blend fg bg 0.5))
(org-scheduled :foreground fg)
(org-scheduled-today :foreground base7)
(org-scheduled-previously :foreground base8)
(org-time-grid :foreground comments)
(org-sexp-date :foreground fg)
;;;; org-habit
(org-habit-clear-face :weight 'bold :background base4)
(org-habit-clear-future-face :weight 'bold :background base3)
(org-habit-ready-face
:weight 'bold
:background (doom-blend blue bg-alt 0.5))
(org-habit-ready-future-face
:weight 'bold
:background (doom-blend blue bg-alt 0.3))
(org-habit-alert-face
:weight 'bold
:background (doom-blend yellow bg-alt 0.5))
(org-habit-alert-future-face
:weight 'bold
:background (doom-blend yellow bg-alt 0.3))
(org-habit-overdue-face
:weight 'bold
:background (doom-blend red bg-alt 0.5))
(org-habit-overdue-future-face
:weight 'bold
:background (doom-blend red bg-alt 0.3))
;;;; org-journal <modes:org-journal-mode>
(org-journal-highlight :foreground highlight)
(org-journal-calendar-entry-face
:foreground magenta
:slant 'italic)
(org-journal-calendar-scheduled-face
:foreground red
:slant 'italic)
;;;; org-pomodoro
(org-pomodoro-mode-line :foreground red)
(org-pomodoro-mode-line-overtime
:foreground warning
:weight 'bold)
;;;; org-ref
(org-ref-acronym-face :foreground violet)
(org-ref-cite-face :foreground yellow :weight 'light :underline t)
(org-ref-glossary-face :foreground magenta)
(org-ref-label-face :foreground blue)
(org-ref-ref-face :inherit 'link :foreground teal)
;;;; outline <built-in>
;; NOTE org-mode's org-level-N faces inherit these outline-N faces.
(outline-1 :foreground blue :weight 'bold :extend t)
(outline-2 :foreground magenta :weight 'bold :extend t)
(outline-3 :foreground violet :weight 'bold :extend t)
(outline-4
:foreground (doom-lighten blue 0.25)
:weight 'bold
:extend t)
(outline-5
:foreground (doom-lighten magenta 0.25)
:weight 'bold
:extend t)
(outline-6
:foreground (doom-lighten blue 0.5)
:weight 'bold
:extend t)
(outline-7
:foreground (doom-lighten magenta 0.5)
:weight 'bold
:extend t)
(outline-8
:foreground (doom-lighten blue 0.8)
:weight 'bold
:extend t)
;;;; parenface
(paren-face :foreground comments)
;;;; parinfer
(parinfer-pretty-parens:dim-paren-face :foreground base5)
(parinfer-smart-tab:indicator-face :foreground base5)
;;;; perspective
(persp-selected-face :foreground blue :weight 'bold)
;;;; persp-mode
(persp-face-lighter-default :foreground highlight :weight 'bold)
(persp-face-lighter-buffer-not-in-persp :foreground doc-comments)
(persp-face-lighter-nil-persp :foreground comments)
;;;; pkgbuild-mode <modes:pkgbuild-mode>
(pkgbuild-error-face :underline `(:style wave :color ,red))
;;;; popup
(popup-face :inherit 'tooltip)
(popup-tip-face
:inherit 'popup-face
:foreground violet
:background base0)
(popup-selection-face :background selection)
;;;; power
(powerline-active0 :inherit 'mode-line :background bg)
(powerline-active1
:inherit 'mode-line
:background (doom-lighten 'bg 0.025))
(powerline-active2
:inherit 'mode-line
:foreground base8
:background (doom-lighten 'bg 0.08))
(powerline-inactive0
:inherit 'mode-line-inactive
:background base2)
(powerline-inactive1
:inherit 'mode-line-inactive
:background (doom-lighten 'base2 0.02))
(powerline-inactive2
:inherit 'mode-line-inactive
:background (doom-lighten 'base2 0.04))
;;;; rainbow-delimiters
(rainbow-delimiters-depth-1-face :foreground blue)
(rainbow-delimiters-depth-2-face :foreground magenta)
(rainbow-delimiters-depth-3-face :foreground green)
(rainbow-delimiters-depth-4-face :foreground violet)
(rainbow-delimiters-depth-5-face :foreground teal)
(rainbow-delimiters-depth-6-face :foreground blue)
(rainbow-delimiters-depth-7-face :foreground magenta)
(rainbow-delimiters-depth-8-face :foreground green)
(rainbow-delimiters-depth-9-face :foreground violet)
(rainbow-delimiters-base-error-face
:inherit 'rainbow-delimiters-base-face
:foreground error)
(rainbow-delimiters-base-face :inherit 'default)
(rainbow-delimiters-unmatched-face
:foreground red
:weight 'bold
:inverse-video t)
(rainbow-delimiters-mismatched-face
:inherit 'rainbow-delimiters-unmatched-face)
;;;; re-builder <built-in>
(reb-match-0 :foreground orange :inverse-video t)
(reb-match-1 :foreground magenta :inverse-video t)
(reb-match-2 :foreground green :inverse-video t)
(reb-match-3 :foreground yellow :inverse-video t)
;;;; rjsx-mode <modes:rjsx-mode>
(rjsx-tag :foreground type)
(rjsx-attr :foreground functions)
;;;; rpm-spec-mode <modes:rpm-spec-mode>
(rpm-spec-macro-face :foreground yellow)
(rpm-spec-var-face :foreground violet)
(rpm-spec-tag-face :foreground blue)
(rpm-spec-obsolete-tag-face :foreground red)
(rpm-spec-package-face :foreground orange)
(rpm-spec-dir-face :foreground green)
(rpm-spec-doc-face :foreground orange)
(rpm-spec-ghost-face :foreground comments)
(rpm-spec-section-face :foreground magenta)
;;;; rst <built-in> <modes:rst-mode>
(rst-block :inherit 'font-lock-constant-face)
(rst-level-1 :inherit 'rst-adornment :weight 'bold)
(rst-level-2 :inherit 'rst-adornment :weight 'bold)
(rst-level-3 :inherit 'rst-adornment :weight 'bold)
(rst-level-4 :inherit 'rst-adornment :weight 'bold)
(rst-level-5 :inherit 'rst-adornment :weight 'bold)
(rst-level-6 :inherit 'rst-adornment :weight 'bold)
;;;; sh-script <built-in> <modes:sh-mode,shell-script-mode>
(sh-heredoc :inherit 'font-lock-string-face :weight 'normal)
(sh-quoted-exec :inherit 'font-lock-preprocessor-face)
;;;; show-paren <built-in>
((show-paren-match &inherit paren-face-match))
((show-paren-mismatch &inherit paren-face-mismatch))
;;;; smart-mode-line
(sml/charging :foreground green)
(sml/discharging :foreground yellow :weight 'bold)
(sml/filename :foreground violet :weight 'bold)
(sml/git :foreground blue)
(sml/modified :foreground cyan)
(sml/outside-modified :foreground cyan)
(sml/process :weight 'bold)
(sml/read-only :foreground cyan)
(sml/sudo :foreground orange :weight 'bold)
(sml/vc-edited :foreground green)
;;;; smartparens
(sp-pair-overlay-face :background region)
((sp-show-pair-match-face &inherit show-paren-match))
((sp-show-pair-mismatch-face &inherit show-paren-mismatch))
;;;; smerge-tool
(smerge-lower :background (doom-blend green bg 0.2))
(smerge-upper :background (doom-blend red base3 0.2))
(smerge-base :background (doom-blend blue bg 0.2))
(smerge-markers
:background comments
:foreground bg
:distant-foreground fg
:weight 'bold)
(smerge-refined-added :inherit 'diff-added :inverse-video t)
(smerge-refined-removed :inherit 'diff-removed :inverse-video t)
;; Emacs <25 compatibility
((smerge-mine &inherit smerge-upper))
((smerge-other &inherit smerge-lower))
;;;; solaire-mode
(solaire-default-face :inherit 'default :background bg-alt)
(solaire-hl-line-face :inherit 'hl-line :background bg :extend t)
(solaire-org-hide :inherit 'org-hide :foreground bg-alt)
;;;; spaceline
(spaceline-highlight-face :background highlight)
(spaceline-modified :background vc-modified)
(spaceline-unmodified :background constants)
(spaceline-python-venv
:foreground magenta
:distant-foreground violet)
(spaceline-flycheck-error
:inherit 'error
:distant-background base0)
(spaceline-flycheck-warning
:inherit 'warning
:distant-background base0)
(spaceline-flycheck-info
:inherit 'success
:distant-background base0)
(spaceline-evil-normal :background blue)
(spaceline-evil-insert :background green)
(spaceline-evil-emacs :background cyan)
(spaceline-evil-replace :background orange)
(spaceline-evil-visual :background grey)
(spaceline-evil-motion :background magenta)
;;;; spell-fu
(spell-fu-incorrect-face
`((((supports :underline (:style wave)))
(:underline (:style wave :color ,(car error))))
(t (:inherit error :underline t))))
;;;; stripe-buffer
(stripe-highlight
(&light :background base5) (&dark :background base3))
;;;; symbol-overlay
(symbol-overlay-default-face
(&dark
:background (doom-lighten region 0.1)
:distant-foreground fg-alt)
(&light
:background (doom-darken region 0.1)
:distant-foreground fg-alt))
(symbol-overlay-face-1
:background (doom-blend blue bg 0.4)
:distant-foreground fg-alt)
(symbol-overlay-face-2
:background (doom-blend violet bg 0.4)
:distant-foreground fg-alt)
(symbol-overlay-face-3
:background (doom-blend yellow bg 0.3)
:distant-foreground fg-alt)
(symbol-overlay-face-4
:background (doom-blend orange bg 0.3)
:distant-foreground fg-alt)
(symbol-overlay-face-5
:background (doom-blend red bg 0.3)
:distant-foreground fg-alt)
(symbol-overlay-face-6
:background (doom-blend magenta bg 0.3)
:distant-foreground fg-alt)
(symbol-overlay-face-7
:background (doom-blend green bg 0.4)
:distant-foreground fg-alt)
(symbol-overlay-face-8
:background (doom-blend cyan bg 0.2)
:distant-foreground fg-alt)
;;;; swiper
(swiper-line-face :background blue :foreground base0)
(swiper-match-face-1
:inherit 'unspecified
:background base0
:foreground base5)
(swiper-match-face-2
:inherit 'unspecified
:background orange
:foreground base0
:weight 'bold)
(swiper-match-face-3
:inherit 'unspecified
:background magenta
:foreground base0
:weight 'bold)
(swiper-match-face-4
:inherit 'unspecified
:background green
:foreground base0
:weight 'bold)
;;;; tabbar
(tabbar-default :foreground bg :background bg :height 1.0)
(tabbar-highlight
:foreground fg
:background selection
:distant-foreground bg)
(tabbar-button :foreground fg :background bg)
(tabbar-button-highlight :inherit 'tabbar-button :inverse-video t)
(tabbar-modified
:inherit 'tabbar-default
:foreground red
:weight 'bold)
(tabbar-unselected :inherit 'tabbar-default :foreground base5)
(tabbar-unselected-modified :inherit 'tabbar-modified)
(tabbar-selected
:inherit 'tabbar-default
:weight 'bold
:foreground fg
:background bg-alt)
(tabbar-selected-modified
:inherit 'tabbar-selected
:foreground green)
;;;; telephone-line
(telephone-line-accent-active :foreground fg :background base4)
(telephone-line-accent-inactive :foreground fg :background base2)
(telephone-line-projectile :foreground green)
(telephone-line-evil :foreground fg :weight 'bold)
(telephone-line-evil-insert
:background (doom-blend green bg 0.5)
:weight 'bold)
(telephone-line-evil-normal
:background (doom-blend red bg 0.5)
:weight 'bold)
(telephone-line-evil-visual
:background (doom-blend orange bg 0.5)
:weight 'bold)
(telephone-line-evil-replace
:background (doom-color bg-alt)
:weight 'bold)
(telephone-line-evil-motion
:background (doom-blend blue bg 0.5)
:weight 'bold)
(telephone-line-evil-operator
:background (doom-blend violet bg 0.5)
:weight 'bold)
(telephone-line-evil-emacs
:background (doom-blend magenta bg 0.5)
:weight 'bold)
;;;; term <built-in>
(term :foreground fg)
(term-bold :weight 'bold)
(term-color-black :background base0 :foreground base0)
(term-color-red :background red :foreground red)
(term-color-green :background green :foreground green)
(term-color-yellow :background yellow :foreground yellow)
(term-color-blue :background blue :foreground blue)
(term-color-magenta :background magenta :foreground magenta)
(term-color-cyan :background cyan :foreground cyan)
(term-color-white :background base8 :foreground base8)
;;;; terraform-mode
(terraform--resource-type-face :foreground type)
(terraform--resource-name-face :foreground strings)
;;;; tldr
(tldr-command-itself
:foreground bg
:background green
:weight 'semi-bold)
(tldr-title :foreground yellow :bold t :height 1.4)
(tldr-description :foreground fg :weight 'semi-bold)
(tldr-introduction
:foreground (doom-blend blue bg 0.8)
:weight 'semi-bold)
(tldr-code-block
:foreground green
:background region
:weight 'semi-bold)
(tldr-command-argument :foreground fg :background region)
;;;; typescript-mode <modes:typescript-mode,typescript-tsx-mode>
(typescript-jsdoc-tag :foreground doc-comments)
(typescript-jsdoc-type
:foreground (doom-darken doc-comments 0.15))
(typescript-jsdoc-value
:foreground (doom-lighten doc-comments 0.15))
;;;; treemacs
(treemacs-directory-face :foreground fg)
(treemacs-file-face :foreground fg)
(treemacs-fringe-indicator-face :foreground highlight)
(treemacs-git-added-face :foreground vc-added)
(treemacs-git-conflict-face :foreground red)
(treemacs-git-modified-face :foreground violet)
(treemacs-git-untracked-face :inherit 'font-lock-doc-face)
(treemacs-on-failure-pulse-face
:foreground base0
:background error
:extend t)
(treemacs-on-success-pulse-face
:foreground base0
:background success
:extend t)
(treemacs-root-face
:inherit 'font-lock-string-face
:weight 'bold
:height 1.2)
(treemacs-tags-face :foreground highlight)
;;;; treemacs-nerd-icons
(treemacs-nerd-icons-file-face :foreground doc-comments)
(treemacs-nerd-icons-root-face
:inherit 'font-lock-string-face
:weight 'bold
:height 1.2)
;;;; ts-fold
(ts-fold-fringe-face)
((ts-fold-replacement-face &inherit +fold-hideshow-folded-face))
((ts-fold-replacement-mouse-face
&inherit +fold-hideshow-folded-face)
:box '(:line-width -1 :style released-button))
;;;; twittering-mode
(twitter-divider ; custom face in Doom Emacs
(&light :underline `(:color ,(doom-lighten vertical-bar 0.2)))
(&dark :underline `(:color ,(doom-darken vertical-bar 0.2))))
;;;; undo-tree
(undo-tree-visualizer-default-face :foreground base5)
(undo-tree-visualizer-current-face
:foreground green
:weight 'bold)
(undo-tree-visualizer-unmodified-face :foreground base5)
(undo-tree-visualizer-active-branch-face :foreground blue)
(undo-tree-visualizer-register-face :foreground yellow)
;;;; vimish-fold
(vimish-fold-overlay
:inherit 'font-lock-comment-face
:background base0
:weight 'light)
(vimish-fold-fringe :foreground magenta)
;;;; visual-regexp
(vr/group-0 :background blue :foreground bg)
(vr/group-1 :background magenta :foreground bg)
(vr/group-2 :background green :foreground bg)
(vr/match-0 :background (doom-blend green bg 0.2) :foreground fg)
(vr/match-1 :background (doom-blend green bg 0.4) :foreground fg)
(vr/match-separator-face :inherit 'bold :foreground red)
;;;; volatile-highlights
(vhl/default-face :background grey)
;;;; vterm
(vterm-color-black
:background (doom-lighten base0 0.25)
:foreground base0)
(vterm-color-red
:background (doom-lighten red 0.25)
:foreground red)
(vterm-color-green
:background (doom-lighten green 0.25)
:foreground green)
(vterm-color-yellow
:background (doom-lighten yellow 0.25)
:foreground yellow)
(vterm-color-blue
:background (doom-lighten blue 0.25)
:foreground blue)
(vterm-color-magenta
:background (doom-lighten magenta 0.25)
:foreground magenta)
(vterm-color-cyan
:background (doom-lighten cyan 0.25)
:foreground cyan)
(vterm-color-white
:background (doom-lighten base8 0.25)
:foreground base8)
;;;; web-mode <modes:web-mode>
(web-mode-block-control-face :foreground builtin)
(web-mode-block-delimiter-face :foreground builtin)
(web-mode-css-property-name-face :foreground type)
(web-mode-doctype-face :foreground comments)
(web-mode-html-tag-face :foreground methods)
(web-mode-html-tag-bracket-face :foreground methods)
(web-mode-html-attr-name-face :foreground type)
(web-mode-html-attr-value-face :foreground strings)
(web-mode-html-entity-face :foreground cyan :inherit 'italic)
(web-mode-block-control-face :foreground orange)
(web-mode-html-tag-bracket-face :foreground operators)
(web-mode-json-key-face :foreground strings)
(web-mode-json-context-face :foreground strings)
(web-mode-keyword-face :foreground keywords)
(web-mode-string-face :foreground strings)
(web-mode-type-face :foreground type)
;;;; wgrep <built-in>
(wgrep-face :weight 'bold :foreground green :background base5)
(wgrep-delete-face :foreground base3 :background red)
(wgrep-done-face :foreground blue)
(wgrep-file-face :foreground comments)
(wgrep-reject-face :foreground red :weight 'bold)
;;;; which-func
(which-func :foreground blue)
;;;; which-key
(which-key-key-face :foreground green)
(which-key-group-description-face :foreground violet)
(which-key-command-description-face :foreground blue)
(which-key-local-map-description-face :foreground magenta)
;;;; whitespace <built-in>
(whitespace-empty :background base3)
(whitespace-space :foreground base4)
(whitespace-newline :foreground base4)
(whitespace-tab
:foreground base4
:background
(if (default-value 'indent-tabs-mode)
'unspecified
base3))
(whitespace-indentation
:foreground base4
:background
(if (default-value 'indent-tabs-mode)
base3
'unspecified))
(whitespace-trailing :inherit 'trailing-whitespace)
(whitespace-line :background base0 :foreground red :weight 'bold)
;;;; widget
(widget-button-pressed :foreground red)
(widget-documentation :foreground green)
(widget-single-line-field
:background base3
:distant-foreground bg)
(widget-field
:background base3
:distant-foreground bg
:box `(:line-width -1 :color ,grey)
:extend t)
;;;; window-divider
(window-divider :inherit 'vertical-border)
(window-divider-first-pixel :inherit 'window-divider)
(window-divider-last-pixel :inherit 'window-divider)
;;;; window-tool-bar
(window-tool-bar-button :background bg :foreground fg)
(window-tool-bar-button-hover
:inherit 'highlight
:distant-foreground bg)
(window-tool-bar-button-disabled
:background bg-alt
:foreground fg-alt)
;;;; winum
(winum-face :inherit 'bold :foreground highlight)
;;;; woman <built-in>
(woman-bold :inherit 'Man-overstrike)
(woman-italic :inherit 'Man-underline)
;;;; xah-elisp-mode
(xah-elisp-at-symbol :inherit 'font-lock-warning-face)
(xah-elisp-cap-variable :inherit 'font-lock-preprocessor-face)
(xah-elisp-command-face :inherit 'font-lock-type-face)
(xah-elisp-dollar-symbol :inherit 'font-lock-variable-name-face)
;;;; workgroups2
(wg-current-workgroup-face
:foreground base0
:background highlight)
(wg-other-workgroup-face :foreground base5)
(wg-divider-face :foreground grey)
(wg-brace-face :foreground highlight)
;;;; yasnippet
(yas-field-highlight-face :inherit 'match)
;;;; xref <built-in>
((xref-file-header &inherit compilation-info))
((xref-line-number &inherit compilation-line-number))
((xref-match &inherit match)))
;;;; --- END Package faces ------------------
"TODO")
;;;; --- Package variables ------------------
(defvar doom-themes-base-vars
'(
;;;; ansi-color <built-in> DEPRECATED
(ansi-color-names-vector
(vconcat
(mapcar
#'doom-color '(bg red green yellow blue magenta cyan fg))))
;;;; rustic <modes:rustic-mode>
(rustic-ansi-faces
(vconcat
(mapcar
#'doom-color '(bg red green yellow blue magenta cyan fg))))
;;;; exwm
(exwm-floating-border-color (doom-color 'vertical-bar))
;;;; fill-column-indicator
(fci-rule-color (doom-color 'base5))
;;;; jdee <modes:jdee-mode>
(jdee-db-spec-breakpoint-face-colors
`(cons ,(doom-color 'base0) ,(doom-color 'grey)))
(jdee-db-requested-breakpoint-face-colors
`(cons ,(doom-color 'base0) ,(doom-color 'green)))
(jdee-db-active-breakpoint-face-colors
`(cons ,(doom-color 'base0) ,(doom-color 'highlight)))
;;;; highlight-tail
(highlight-tail-colors
`((,(doom-blend green bg 0.1) . 0)
(,(doom-blend cyan bg 0.1) . 20)))
;;;; objed
(objed-cursor-color (doom-color 'red))
;;;; pdf-tools
(pdf-view-midnight-colors
`(cons ,(doom-color 'fg) ,(doom-color 'bg)))
;;;; vc <built-in>
(vc-annotate-color-map
`(list
(cons 20 ,(doom-color 'green))
(cons 40 ,(doom-blend 'yellow 'green (/ 1.0 3)))
(cons 60 ,(doom-blend 'yellow 'green (/ 2.0 3)))
(cons 80 ,(doom-color 'yellow))
(cons 100 ,(doom-blend 'orange 'yellow (/ 1.0 3)))
(cons 120 ,(doom-blend 'orange 'yellow (/ 2.0 3)))
(cons 140 ,(doom-color 'orange))
(cons 160 ,(doom-blend 'magenta 'orange (/ 1.0 3)))
(cons 180 ,(doom-blend 'magenta 'orange (/ 2.0 3)))
(cons 200 ,(doom-color 'magenta))
(cons 220 ,(doom-blend 'red 'magenta (/ 1.0 3)))
(cons 240 ,(doom-blend 'red 'magenta (/ 2.0 3)))
(cons 260 ,(doom-color 'red))
(cons 280 ,(doom-blend 'grey 'red (/ 1.0 4)))
(cons 300 ,(doom-blend 'grey 'red (/ 2.0 4)))
(cons 320 ,(doom-blend 'grey 'red (/ 3.0 4)))
(cons 340 ,(doom-color 'base5))
(cons 360 ,(doom-color 'base5))))
(vc-annotate-very-old-color nil)
(vc-annotate-background (doom-color 'bg)))
;;;; --- END Package variables --------------
"TODO")
(provide 'doom-themes-base)
;;; doom-themes-base.el ends here
;;; doom-themes.el --- an opinionated pack of modern color-themes -*- lexical-binding: t; -*-
;; aaaaaaaaa
;; Copyright (C) 2016-2024 Henrik Lissner
;;
;; Author: Henrik Lissner <contact@henrik.io>
;; Maintainer: Henrik Lissner <contact@henrik.io>
;; Maintainer: Emmanuel Bustos Torres <ema2159@gmail.com>
;; Created: May 22, 2016
;; Version: 2.3.0
;; Keywords: themes faces
;; Homepage: https://github.com/doomemacs/themes
;; Package-Requires: ((emacs "25.1") (cl-lib "0.5"))
;;
;; This file is not part of GNU Emacs.
;;
;;; Commentary:
;;
;; doomemacs/themes is an megapack of popular themes, including aesthetic
;; extensions for popular packages.
;;
;; Themes in this pack:
;; - doom-1337 -- ported from VSCode's 1337 theme (ported by @ccmywish)
;; - doom-acario-dark -- an original dark theme (ported by @gagbo)
;; - doom-acario-light -- an original light theme (ported by @gagbo)
;; - doom-ayu-dark -- inspired by Ayu Dark (ported by @ashton)
;; - doom-ayu-light -- inspirted by Ayu Light (ported by @LoveSponge)
;; - doom-ayu-mirage -- inspired by Ayu Mirage (ported by @LoveSponge)
;; - doom-badger -- inspired by cann's Badger colorscheme (ported by @jsoa)
;; - doom-challenger-deep -- inspired by Vim's Challenger Deep theme (ported by @fuxialexander)
;; - doom-city-lights -- inspired by Atom's City Lights theme (ported by @fuxialexander)
;; - doom-dark+ -- ported from equinusocio's VSCode Theme, dark+ (ported by @ema2159)
;; - doom-dracula -- inspired by the popular Dracula theme (ported by @fuxialexander)
;; - doom-earl-grey -- a gentle color scheme, for code (ported by @JuneKelly)
;; - doom-ephemeral -- inspired by the Ephemeral Theme from elenapan's dotfiles (ported by @karetsu)
;; - doom-fairy-floss -- a candy colored theme by sailorhg (ported by @ema2159)
;; - doom-feather-dark -- a purple-tinted theme, inspired by doom-one (by @Plunne)
;; - doom-feather-light -- a light variable of feather-dark, inspired by doom-one (by @Plunne)
;; - doom-flatwhite -- inspired by Atom's Flatwhite Syntax theme (ported by @JuneKelly)
;; - doom-gruvbox -- inspired by morhetz's Gruvbox (ported by @JongW)
;; - doom-gruvbox-light -- inspired by morhetz's Gruvbox (light) (ported by @jsoa)
;; - doom-henna -- based on VSCode's Henna theme (ported by @jsoa)
;; - doom-homage-black -- a minimalistic, colorless theme inspired by eziam, tao, and jbeans (ported by @mskorzhinskiy)
;; - doom-homage-white -- minimal white theme inspired by editors from 2000s (ported by @mskorzhinskiy)
;; - doom-horizon -- ported from VSCode Horizon (ported by @karetsu)
;; - doom-Iosvkem -- ported from the default dark theme for Adobe Brackets (ported by @neutaaaaan)
;; - doom-ir-black -- ported from Vim's ir_black colorscheme (ported by @legendre6891)
;; - doom-lantern -- based on Gitleptune's Lantern theme (ported by @paladhammika)
;; - doom-laserwave -- a clean synthwave/outrun theme inspired by VSCode's Laserwave (ported by @hyakt)
;; - doom-manegarm -- an original autumn-inspired dark theme (ported by @kenranunderscore)
;; - doom-material -- adapted from equinusocio's Material themes (ported by @tam5)
;; - doom-material-dark -- inspired by Material Theme by xrei (ported by @trev-dev)
;; - doom-meltbus -- a dark (mostly) monochromatic theme (ported by @spacefrogg)
;; - doom-miramare -- a port of Franbach's Miramare theme; a variant of Grubox (ported by @sagittaros)
;; - doom-molokai -- inspired by Tomas Restrepo's Molokai (ported by @hlissner)
;; - doom-monokai-classic -- port of Monokai Classic (ported by @ema2159)
;; - doom-monokai-machine -- port of Monokai Classic (ported by @minikN)
;; - doom-monokai-octagon -- port of Monokai Octagon (ported by @minikN)
;; - doom-monokai-pro -- Port of Monokai Pro (ported by @minikN)
;; - doom-monokai-ristretto -- Port of Monokai Ristretto (ported by @minikN)
;; - doom-monokai-spectrum -- port of Monokai Spectrum (ported by @minikN)
;; - doom-moonlight -- inspired by VS code's Moonlight (ported by @Brettm12345)
;; - doom-nord -- dark variant of Nord (ported by @fuxialexander)
;; - doom-nord-aurora -- a light variant of Nord (ported by @MoskitoHero)
;; - doom-nord-light -- light variant of Nord (ported by @fuxialexander)
;; - doom-nova -- inspired by Trevord Miller's Nova (ported by @bigardone)
;; - doom-oceanic-next -- inspired by Oceanic Next (ported by @juanwolf)
;; - doom-oksolar-dark -- an OKLab variant of Solarized dark (ported by @logc)
;; - doom-oksolar-light -- an OKLab variant of Solarized light (ported by @logc)
;; - doom-old-hope -- inspired by An Old Hope, in a galaxy far far away (ported by @teesloane)
;; - doom-one -- inspired by Atom One Dark (ported by @hlissner)
;; - doom-one-light -- inspired by Atom One Light (ported by @ztlevi)
;; - doom-opera -- an original light theme (ported by @jwintz)
;; - doom-opera-light -- an original light theme (ported by @jwintz)
;; - doom-outrun-electric -- a high contrast, neon theme inspired by Outrun Electric on VSCode (ported by @ema2159)
;; - doom-palenight -- adapted from equinusocio's Material themes (ported by @Brettm12345)
;; - doom-peacock -- inspired by daylerees' Peacock (ported by @teesloane)
;; - doom-pine -- a green flavor of doom-gruvbox (by @RomanHargrave)
;; - doom-plain -- inspired by gko's plain theme for VSCode (ported by @das-s)
;; - doom-plain-dark -- inspired by gko's plain theme for VSCode (ported by @das-s)
;; - doom-rouge -- ported from VSCode's Rouge Theme (ported by @das-s)
;; - doom-shades-of-purple -- a port of VSCode's Shades of Purple (ported by @jwbaldwin)
;; - doom-snazzy -- inspired by Hyper Snazzy (ported by @ar1a)
;; - doom-solarized-dark -- a dark variant of Solarized (ported by @ema2159)
;; - doom-solarized-dark-high-contrast -- a high-contrast variant of Solarized Dark (ported by @jmorag)
;; - doom-solarized-light -- a light variant of Solarized (ported by @fuxialexander)
;; - doom-sourcerer -- a port of xero's Sourcerer (ported by @fm0xb)
;; - doom-spacegrey -- I'm sure you've heard of it (ported by @teesloane)
;; - doom-tokyo-night -- inspired by VSCode's Tokyo Night theme (ported by @FosterHangdaan)
;; - doom-tomorrow-day -- a light variant of Tomorrow (ported by @emacswatcher)
;; - doom-tomorrow-night -- One of the dark variants of Tomorrow (ported by @hlissner)
;; - doom-vibrant -- a more vibrant variant of doom-one (ported by @hlissner)
;; - doom-wilmersdorf -- port of Ian Pan's Wilmersdorf (ported by @ema2159)
;; - doom-xcode -- based off of Apple's Xcode Dark Theme (ported by @kadenbarlow)
;; - doom-zenburn -- port of the popular Zenburn theme (ported by @jsoa)
;;
;; ## Install
;;
;; `M-x package-install RET doom-themes`
;;
;; A comprehensive configuration example:
;;
;; (require 'doom-themes)
;;
;; ;; Global settings (defaults)
;; (setq doom-themes-enable-bold t ; if nil, bold is universally disabled
;; doom-themes-enable-italic t) ; if nil, italics is universally disabled
;;
;; ;; Load the theme (doom-one, doom-molokai, etc); keep in mind that each
;; ;; theme may have their own settings.
;; (load-theme 'doom-one t)
;;
;; ;; Enable flashing mode-line on errors
;; (doom-themes-visual-bell-config)
;;
;; ;; Enable custom neotree theme
;; (doom-themes-neotree-config) ; all-the-icons fonts must be installed!
;;
;;; Code:
(require 'cl-lib)
(require 'doom-themes-base "~/.config/emacs/themes/doom-themes-base.el")
(defgroup doom-themes nil
"Options for doom-themes."
:group 'faces)
(defcustom doom-themes-padded-modeline nil
"Default value for padded-modeline setting for themes that support it."
:group 'doom-themes
:type '(choice integer boolean))
;;
(defcustom doom-themes-enable-bold t
"If nil, bold will be disabled across all faces."
:group 'doom-themes
:type 'boolean)
(defcustom doom-themes-enable-italic t
"If nil, italics will be disabled across all faces."
:group 'doom-themes
:type 'boolean)
;;
;;; API
(defvar doom-themes--colors nil)
(defvar doom--min-colors '(257 256 16))
(defvar doom--quoted-p nil)
(defvar doom-themes--faces nil)
(defun doom-themes--colors-p (item)
(declare (pure t) (side-effect-free t))
(when item
(cond
((listp item)
(let ((car (car item)))
(cond
((memq car '(quote doom-color))
nil)
((memq car '(backquote \`))
(let ((doom--quoted-p t))
(doom-themes--colors-p (cdr item))))
((eq car '\,)
(let (doom--quoted-p)
(doom-themes--colors-p (cdr item))))
((or (doom-themes--colors-p car)
(doom-themes--colors-p (cdr-safe item)))))))
((and (symbolp item)
(not (keywordp item))
(not doom--quoted-p)
(not (equal (substring (symbol-name item) 0 1) "-"))
(assq item doom-themes--colors))))))
(defun doom-themes--apply-faces (new-faces &optional default-faces)
(declare (pure t) (side-effect-free t))
(let ((default-faces (or default-faces doom-themes-base-faces))
(faces
(make-hash-table
:test #'eq
:size
(+ (length default-faces) (length new-faces))))
(directives (make-hash-table :test #'eq)))
(dolist (spec
(append
(mapcar #'copy-sequence default-faces) new-faces))
(if (listp (car spec))
(cl-destructuring-bind
(face action &optional arg) (car spec)
(unless (assq face new-faces)
(puthash face (list action arg (cdr spec)) directives)))
(puthash (car spec) (cdr spec) faces)))
(cl-loop
for
face
being
the
hash-keys
of
directives
for
(action target spec)
=
(gethash face directives)
unless
(memq action '(&inherit &extend &override))
do
(error "Invalid operation (%s) for '%s' face" action face)
if
(eq (car spec) 'quote)
do
(error "Can't extend literal face spec (for '%s')" face)
;; TODO Add &all/&light/&dark extension support
else
if
(memq (car spec) '(&all &light &dark))
do
(error
"Can't extend face with &all, &light or &dark specs (for '%s')"
face)
else
do
(puthash
face
(let ((old-spec (gethash (or target face) faces))
(plist spec))
;; remove duplicates
(while (keywordp (car plist))
(setq
old-spec (plist-put old-spec (car plist) (cadr plist))
plist (cddr plist)))
old-spec)
faces))
(let (results)
(maphash
(lambda (face plist)
(when (keywordp (car plist))
;; TODO Clean up duplicates in &all/&light/&dark blocks
(dolist (prop
(append
(unless doom-themes-enable-bold
'(:weight normal :bold unspecified))
(unless doom-themes-enable-italic
'(:slant normal :italic unspecified))))
(when (and (plist-member plist prop)
(not (eq (plist-get plist prop) 'inherit)))
(plist-put
plist prop
(if (memq prop '(:weight :slant))
(quote 'normal))))))
(push (cons face plist) results))
faces)
(nreverse results))))
(defun doom-themes--colorize (item type)
(declare (pure t) (side-effect-free t))
(when item
(let ((doom--quoted-p doom--quoted-p))
(cond
((listp item)
(cond
((memq (car item) '(quote doom-color))
item)
((eq (car item) 'doom-ref)
(doom-themes--colorize (apply #'doom-ref (cdr item)) type))
((let* ((item (append item nil))
(car (car item))
(doom--quoted-p
(cond
((memq car '(backquote \`))
t)
((eq car '\,)
nil)
(t
doom--quoted-p))))
(cons
car
(cl-loop
for
i
in
(cdr item)
collect
(doom-themes--colorize i type)))))))
((and (symbolp item)
(not (keywordp item))
(not doom--quoted-p)
(not (equal (substring (symbol-name item) 0 1) "-"))
(assq item doom-themes--colors))
`(doom-color ',item ',type))
(item)))))
(defun doom-themes--build-face (face)
(declare (pure t) (side-effect-free t))
`(list
',(car face)
,(let ((face-body (cdr face)))
(cond
((keywordp (car face-body))
(let ((real-attrs face-body)
defs)
(if (doom-themes--colors-p real-attrs)
(dolist (cl
doom--min-colors `(list ,@ (nreverse defs)))
(push `(list
'((class color) (min-colors ,cl))
(list
,@ (doom-themes--colorize real-attrs cl)))
defs))
`(list (list 't (list ,@real-attrs))))))
((memq
(car-safe (car face-body))
'(quote backquote
\`))
(car face-body))
((let (all-attrs
defs)
(dolist (attrs face-body `(list ,@ (nreverse defs)))
(cond
((eq (car attrs) '&all)
(setq all-attrs (append all-attrs (cdr attrs))))
((memq (car attrs) '(&dark &light))
(let ((bg
(if (eq (car attrs) '&dark)
'dark
'light))
(real-attrs (append all-attrs (cdr attrs) '())))
(cond
((doom-themes--colors-p real-attrs)
(dolist (cl doom--min-colors)
(push `(list
'((class color)
(min-colors ,cl)
(background ,bg))
(list
,@
(doom-themes--colorize real-attrs cl)))
defs)))
((push `(list
'((background ,bg)) (list ,@real-attrs))
defs)))))))))))))
;;
;;; Color helper functions
;; Shamelessly *borrowed* from solarized
;;;###autoload
(defun doom-name-to-rgb (color)
"Retrieves the hexadecimal string repesented the named COLOR (e.g. \"red\")
for FRAME (defaults to the current frame)."
(cl-loop
with
div
=
(float (car (tty-color-standard-values "#ffffff")))
for
x
in
(tty-color-standard-values (downcase color))
collect
(/ x div)))
;;;###autoload
(defun doom-blend (color1 color2 alpha)
"Blend two colors (hexidecimal strings) together by a coefficient ALPHA (a
float between 0 and 1)"
(when (and color1 color2)
(cond
((and color1 color2 (symbolp color1) (symbolp color2))
(doom-blend (doom-color color1) (doom-color color2) alpha))
((or (listp color1) (listp color2))
(cl-loop
for x in color1 when
(if (listp color2)
(pop color2)
color2)
collect (doom-blend x it alpha)))
((and (string-prefix-p "#" color1) (string-prefix-p "#" color2))
(apply (lambda (r g b)
(format "#%02x%02x%02x" (* r 255) (* g 255) (* b 255)))
(cl-loop
for
it
in
(doom-name-to-rgb color1)
for
other
in
(doom-name-to-rgb color2)
collect
(+ (* alpha it) (* other (- 1 alpha))))))
(color1))))
;;;###autoload
(defun doom-darken (color alpha)
"Darken a COLOR (a hexidecimal string) by a coefficient ALPHA (a float between
0 and 1)."
(cond
((and color (symbolp color))
(doom-darken (doom-color color) alpha))
((listp color)
(cl-loop for c in color collect (doom-darken c alpha)))
((doom-blend color "#000000" (- 1 alpha)))))
;;;###autoload
(defun doom-lighten (color alpha)
"Brighten a COLOR (a hexidecimal string) by a coefficient ALPHA (a float
between 0 and 1)."
(cond
((and color (symbolp color))
(doom-lighten (doom-color color) alpha))
((listp color)
(cl-loop for c in color collect (doom-lighten c alpha)))
((doom-blend color "#FFFFFF" (- 1 alpha)))))
;;;###autoload
(defun doom-color (name &optional type)
"Retrieve a specific color named NAME (a symbol) from the current theme."
(let ((colors
(if (listp name)
name
(cdr-safe (assq name doom-themes--colors)))))
(and colors
(cond
((listp colors)
(let ((i (or (plist-get '(256 1 16 2 8 3) type) 0)))
(if (> i (1- (length colors)))
(car (last colors))
(nth i colors))))
(t
colors)))))
;;;###autoload
(defun doom-ref (face prop &optional class)
"TODO"
(let ((spec
(or (cdr (assq face doom-themes--faces))
(error "Couldn't find the '%s' face" face))))
(when (memq
(car spec)
'(quote backquote
\`))
(user-error "Can't fetch the literal spec for '%s'" face))
(when class
(setq spec (cdr (assq class spec)))
(unless spec
(error
"Couldn't find the '%s' class in the '%s' face" class face)))
(unless (plist-member spec prop)
(error
"Couldn't find the '%s' property in the '%s' face%s" prop face
(if class
(format "'s '%s' class" class)
"")))
(plist-get spec prop)))
;;
;;; Defining themes
(defun doom-themes-prepare-facelist (custom-faces)
"Return an alist of face definitions for `custom-theme-set-faces'.
Faces in EXTRA-FACES override the default faces."
(declare (pure t) (side-effect-free t))
(setq doom-themes--faces (doom-themes--apply-faces custom-faces))
(mapcar #'doom-themes--build-face doom-themes--faces))
(defun doom-themes-prepare-varlist (vars)
"Return an alist of variable definitions for `custom-theme-set-variables'.
Variables in EXTRA-VARS override the default ones."
(declare (pure t) (side-effect-free t))
(cl-loop
for
(var val)
in
(append doom-themes-base-vars vars)
collect
`(list ',var ,val)))
;;;###autoload
(defun doom-themes-set-faces (theme &rest faces)
"Customize THEME (a symbol) with FACES.
If THEME is nil, it applies to all themes you load. FACES is a list of Doom
theme face specs. These is a simplified spec. For example:
(doom-themes-set-faces \\='user
\\='(default :background red :foreground blue)
\\='(doom-modeline-bar :background (if -modeline-bright modeline-bg highlight))
\\='(doom-modeline-buffer-file :inherit \\='mode-line-buffer-id :weight \\='bold)
\\='(doom-modeline-buffer-path :inherit \\='mode-line-emphasis :weight \\='bold)
\\='(doom-modeline-buffer-project-root :foreground green :weight \\='bold))"
(declare (indent defun))
(apply #'custom-theme-set-faces
(or theme 'user)
(eval
`(let* ((bold ,doom-themes-enable-bold)
(italic ,doom-themes-enable-italic)
,@
(cl-loop
for
(var . val)
in
doom-themes--colors
collect
`(,var ',val)))
(list ,@ (mapcar #'doom-themes--build-face faces))))))
(defmacro def-doom-theme
(name docstring defs &optional extra-faces extra-vars)
"Define a DOOM theme, named NAME (a symbol)."
(declare (doc-string 2))
(let ((doom-themes--colors defs))
`(let* ((bold doom-themes-enable-bold)
(italic doom-themes-enable-italic)
,@defs)
(setq doom-themes--colors
(list
,@
(cl-loop
for (var val) in defs collect `(cons ',var ,val))))
(deftheme ,name
,docstring)
(custom-theme-set-faces ',name
,@
(doom-themes-prepare-facelist
extra-faces))
(custom-theme-set-variables ',name
,@
(doom-themes-prepare-varlist
extra-vars))
(unless bold
(set-face-bold 'bold 'unspecified))
(unless italic
(set-face-italic 'italic 'unspecified))
(provide-theme ',name))))
;;;###autoload
(when (and (boundp 'custom-theme-load-path) load-file-name)
(let* ((base (file-name-directory load-file-name))
(dir (expand-file-name "themes/" base)))
(add-to-list
'custom-theme-load-path
(or (and (file-directory-p dir) dir) base))))
(provide 'doom-themes)
;;; doom-themes.el ends here
;;; doom-tokyo-night-theme.el --- inspired by VSCode's Tokyo Night theme -*- lexical-binding: t; no-byte-compile: t; -*-
;;
;; Added: December 15, 2021 (#650)
;; Author: FosterHangdaan <https://github.com/FosterHangdaan>
;; Maintainer:
;; Source: https://github.com/enkia/tokyo-night-vscode-theme
;;
;;; Commentary:
;;; Code:
(require 'doom-themes "~/.config/emacs/themes/doom-themes.el")
;;
;;; Variables
(defgroup doom-tokyonight-black-theme nil
"Options for doom-themes"
:group 'doom-themes)
(defcustom doom-tokyo-night-brighter-modeline nil
"If non-nil, more vivid colors will be used to style the mode-line."
:group 'doom-tokyo-night-theme
:type 'boolean)
(defcustom doom-tokyo-night-brighter-comments nil
"If non-nil, comments will be highlighted in more vivid colors."
:group 'doom-tokyo-night-theme
:type 'boolean)
(defcustom doom-tokyo-night-comment-bg
doom-tokyo-night-brighter-comments
"If non-nil, comments will have a subtle, darker background. Enhancing their legibility."
:group 'doom-tokyo-night-theme
:type 'boolean)
(defcustom doom-tokyo-night-padded-modeline nil
"If non-nil, adds a 4px padding to the mode-line. Can be an integer to determine the exact padding."
:group 'doom-tokyo-night-theme
:type '(or integer boolean))
;; Theme definition
(def-doom-theme
doom-tokyonight-black
"A clean, dark theme that celebrates the lights of downtown Tokyo at night."
; Color Scheme
; gui 256
; "#f7768e" "#f7768e" => This keyword, HTML elements, Regex group symbol, CSS units, Terminal Red
; "#ff9e64" "#ff9e64" => Number and Boolean constants, Language support constants
; "#e0af68" "#e0af68" => Function parameters, Regex character sets, Terminal Yellow
; "#9ece6a" "#9ece6a" => Strings, CSS class names
; "#73daca" "#73daca" => Object literal keys, Markdown links, Terminal Green
; "#b4f9f8" "#b4f9f8" => Regex literal strings
; "#2ac3de" "#2ac3de" => Language support functions, CSS HTML elements
; "#7dcfff" "#7dcfff" => Object properties, Regex quantifiers and flags, Markdown headings, Terminal Cyan, Markdown code, Import/export keywords
; "#7aa2f7" "#7aa2f7" => Function names, CSS property names, Terminal Blue
; "#bb9af7" "#bb9af7" => Control Keywords, Storage Types, Regex symbols and operators, HTML Attributes, Terminal Magenta
; "#c0caf5" "#c0caf5" => Variables, Class names, Terminal White
; "#a9b1d6" "#a9b1d6" => Editor foreground
; "#9aa5ce" "#9aa5ce" => Markdown Text, HTML Text
; "#cfc9c2" "#cfc9c2" => Parameters inside functions (semantic highlighting only)
; "#565f89" "#565f89" => Comments
; "#414868" "#414868" => Terminal black
; "#24283b" "#24283b" => Editor background (Storm)
; "#1a1b26" "#1a1b26" => Editor background (Night)
;; name default 256 16
((bg '("#0a0a0a" nil nil))
(bg-alt '("#0c0c0c" nil nil))
(base0 '("#1c1c1c" "#1c1c1c" "black"))
(base1 '("#51587a" "#51587a" "brightblack"))
(base2 '("#61698b" "#61698b" "brightblack"))
(base3 '("#71799d" "#71799d" "brightblack"))
(base4 '("#8189af" "#8189af" "brightblack"))
(base5 '("#9099c0" "#9099c0" "brightblack"))
(base6 '("#a0aad2" "#a0aad2" "brightblack"))
(base7 '("#b0bae3" "#b0bae3" "brightblack"))
(base8 '("#c0caf5" "#c0caf5" "white"))
(fg-alt '("#c0caf5" "#c0caf5" "brightwhite"))
(fg '("#a9b1d6" "#a9b1d6" "white"))
(grey base4)
(red '("#f7768e" "#f7768e" "red"))
(orange '("#ff9e64" "#ff9e64" "brightred"))
(green '("#73daca" "#73daca" "green"))
(teal '("#2ac3de" "#2ac3de" "brightgreen"))
(yellow '("#e0af68" "#e0af68" "yellow"))
(blue '("#7aa2f7" "#7aa2f7" "brightblue"))
(dark-blue '("#565f89" "#565f89" "blue"))
(magenta '("#bb9af7" "#bb9af7" "magenta"))
(violet '("#9aa5ce" "#9aa5ce" "brightmagenta"))
(cyan '("#b4f9f8" "#b4f9f8" "brightcyan"))
(dark-cyan '("#7dcfff" "#7dcfff" "cyan"))
; Additional custom colors
(slate-gray '("dark slate gray" nil nil))
(dark-green '("#9ece6a" "#9ece6a" "green"))
(brown '("#cfc9c2" "#cfc9c2" "yellow"))
;; face categories -- required for all themes
(highlight cyan)
(vertical-bar (doom-lighten bg 0.05))
(selection base0)
(builtin red)
(comments
(if doom-tokyo-night-brighter-comments
base5
base1))
(doc-comments
(doom-lighten
(if doom-tokyo-night-brighter-comments
base5
base1)
0.25))
(constants orange)
(functions magenta)
(keywords blue)
(methods yellow)
(operators dark-cyan)
(type base8)
(strings dark-green)
(variables base8)
(numbers orange)
(region base0)
(error red)
(warning yellow)
(success green)
(vc-modified orange)
(vc-added green)
(vc-deleted red)
;; custom categories
(hidden `(,(car bg) "black" "black"))
(-modeline-bright doom-tokyo-night-brighter-modeline)
(-modeline-pad
(when doom-tokyo-night-padded-modeline
(if (integerp doom-tokyo-night-padded-modeline)
doom-tokyo-night-padded-modeline
4)))
(modeline-fg 'unspecified)
(modeline-fg-alt base5)
(modeline-bg
(if -modeline-bright
base3
`(,(doom-darken (car bg) 0.15) ,@ (cdr base0))))
(modeline-bg-l
(if -modeline-bright
base3
`(,(doom-darken (car bg) 0.1) ,@ (cdr base0))))
(modeline-bg-inactive (doom-darken bg 0.1))
(modeline-bg-inactive-l `(,(car bg) ,@ (cdr base1))))
;; --- Extra Faces ------------------------
(((line-number-current-line &override) :foreground base8)
((line-number &override) :foreground comments :background "#101010")
(font-lock-comment-face
:foreground comments
:background
(if doom-tokyo-night-comment-bg
(doom-lighten bg 0.05)
'unspecified))
(font-lock-doc-face
:inherit 'font-lock-comment-face
:foreground doc-comments)
;;; Doom Modeline
(doom-modeline-bar
:background
(if -modeline-bright
modeline-bg
highlight))
(doom-modeline-buffer-path :foreground base8 :weight 'normal)
(doom-modeline-buffer-file :foreground brown :weight 'normal)
(mode-line
:background modeline-bg
:foreground modeline-fg
:box
(if -modeline-pad
`(:line-width ,-modeline-pad :color ,modeline-bg)))
(mode-line-inactive
:background modeline-bg-inactive
:foreground modeline-fg-alt
:box
(if -modeline-pad
`(:line-width ,-modeline-pad :color ,modeline-bg-inactive)))
(mode-line-emphasis
:foreground
(if -modeline-bright
base8
highlight))
(mode-line-buffer-id :foreground highlight)
;;; Indentation
(whitespace-indentation :background bg)
(whitespace-tab :background bg)
;;; Ivy
(ivy-subdir :foreground blue)
(ivy-minibuffer-match-face-1 :foreground green :background bg-alt)
(ivy-minibuffer-match-face-2 :foreground orange :background bg-alt)
(ivy-minibuffer-match-face-3 :foreground red :background bg-alt)
(ivy-minibuffer-match-face-4 :foreground yellow :background bg-alt)
;;; Elscreen
(elscreen-tab-other-screen-face
:background "#353a42"
:foreground "#1e2022")
;;; Solaire
(solaire-mode-line-face
:inherit 'mode-line
:background modeline-bg-l
:box
(if -modeline-pad
`(:line-width ,-modeline-pad :color ,modeline-bg-l)))
(solaire-mode-line-inactive-face
:inherit 'mode-line-inactive
:background modeline-bg-inactive-l
:box
(if -modeline-pad
`(:line-width ,-modeline-pad :color ,modeline-bg-inactive-l)))
;;; Telephone
(telephone-line-accent-active
:inherit 'mode-line
:background (doom-lighten bg 0.2))
(telephone-line-accent-inactive
:inherit 'mode-line
:background (doom-lighten bg 0.05))
(telephone-line-evil-emacs
:inherit 'mode-line
:background dark-blue)
;;;; rainbow-delimiters
(rainbow-delimiters-depth-1-face :foreground fg)
(rainbow-delimiters-depth-2-face :foreground blue)
(rainbow-delimiters-depth-3-face :foreground orange)
(rainbow-delimiters-depth-4-face :foreground green)
(rainbow-delimiters-depth-5-face :foreground cyan)
(rainbow-delimiters-depth-6-face :foreground yellow)
(rainbow-delimiters-depth-7-face :foreground teal)
;;; Treemacs
(treemacs-root-face :foreground magenta :weight 'bold :height 1.2)
(doom-themes-treemacs-root-face
:foreground magenta
:weight 'ultra-bold
:height 1.2)
(doom-themes-treemacs-file-face :foreground fg-alt)
(treemacs-directory-face :foreground base8)
(treemacs-file-face :foreground fg)
(treemacs-git-modified-face :foreground green)
(treemacs-git-renamed-face :foreground yellow)
;;; Magit
(magit-section-heading :foreground blue)
(magit-branch-remote :foreground orange)
(magit-diff-our
:foreground (doom-darken red 0.2)
:background (doom-darken red 0.7))
(magit-diff-our-highlight
:foreground red
:background (doom-darken red 0.5)
:weight 'bold)
(magit-diff-removed
:foreground (doom-darken red 0.2)
:background (doom-darken red 0.7))
(magit-diff-removed-highlight
:foreground red
:background (doom-darken red 0.5)
:weight 'bold)
;; --- Major-Mode Faces -------------------
;;; elisp
(highlight-quoted-symbol :foreground yellow)
;;; js2-mode
(js2-function-param :foreground yellow)
(js2-object-property :foreground green)
;;; typescript-mode
(typescript-this-face :foreground red)
(typescript-access-modifier-face :foreground brown)
;;; rjsx-mode
(rjsx-tag :foreground red)
(rjsx-text :foreground violet)
(rjsx-attr :foreground magenta :slant 'italic :weight 'medium)
(rjsx-tag-bracket-face :foreground (doom-darken red 0.3))
;;; css-mode / scss-mode
(css-property :foreground blue)
(css-selector :foreground teal)
(css-pseudo-class :foreground orange)
;;; markdown-mode
(markdown-markup-face :foreground violet)
(markdown-header-face :inherit 'bold :foreground dark-cyan)
(markdown-blockquote-face
:foreground violet
:background (doom-lighten bg 0.04))
(markdown-table-face
:foreground violet
:background (doom-lighten bg 0.04))
((markdown-code-face &override)
:foreground dark-cyan
:background (doom-lighten bg 0.04))
;;; org-mode
(org-hide :foreground hidden)
(org-block :background (doom-darken base2 0.65))
(org-block-begin-line
:background (doom-darken base2 0.65)
:foreground comments
:extend t)
(solaire-org-hide-face :foreground hidden)
;;; web-mode
(web-mode-json-context-face :foreground brown)
(web-mode-json-key-face :foreground teal)
;;;; Block
(web-mode-block-delimiter-face :foreground yellow)
;;;; Code
(web-mode-constant-face :foreground constants)
(web-mode-variable-name-face :foreground variables)
;;;; CSS
(web-mode-css-pseudo-class-face :foreground orange)
(web-mode-css-property-name-face :foreground blue)
(web-mode-css-selector-face :foreground teal)
(web-mode-css-function-face :foreground yellow)
;;;; HTML
(web-mode-html-attr-engine-face :foreground yellow)
(web-mode-html-attr-equal-face :foreground operators)
(web-mode-html-attr-name-face :foreground magenta)
(web-mode-html-tag-bracket-face :foreground (doom-darken red 0.3))
(web-mode-html-tag-face :foreground red))
;; --- extra variables ---------------------
;; ()
)
;;; doom-tokyo-night-theme.el ends here
Fastfetch
// Note that you must replace the image path to an existing image to display it.
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"source": "~/.config/fastfetch/logo.txt",
"width": 28,
"height": 28
},
"display": {
"separator": " "
},
"modules": [
{
"type": "custom", // HardwareStart
// {#1} is equivalent to `\u001b[1m`. {#} is equivalent to `\u001b[m`
"format": "┌─────────── {#1}Hardware Information{#} ───────────┐"
},
{
"type": "host",
"key": " "
},
{
"type": "cpu",
"key": " "
},
{
"type": "gpu",
"key": " "
},
{
"type": "disk",
"key": " "
},
{
"type": "memory",
"key": " "
},
{
"type": "swap",
"key": " "
},
{
"type": "display",
"key": " "
},
{
"type": "brightness",
"key": " "
},
{
"type": "battery",
"key": " "
},
{
"type": "poweradapter",
"key": " "
},
{
"type": "bluetooth",
"key": " "
},
{
"type": "sound",
"key": " "
},
{
"type": "gamepad",
"key": " "
},
{
"type": "custom", // SoftwareStart
"format": "├─────────── {#1}Software Information{#} ───────────┤"
},
{
"type": "title",
"key": " ",
"format": "{1}@{2}"
},
{
"type": "os",
"key": " " // Just get your distro's logo off nerdfonts.com
},
{
"type": "kernel",
"key": " ",
"format": "{1} {2}"
},
{
"type": "lm",
"key": " "
},
{
"type": "de",
"key": " "
},
{
"type": "wm",
"key": " "
},
{
"type": "shell",
"key": " "
},
{
"type": "terminal",
"key": " "
},
{
"type": "terminalfont",
"key": " "
},
{
"type": "theme",
"key": " "
},
{
"type": "icons",
"key": " "
},
{
"type": "wallpaper",
"key": " "
},
{
"type": "packages",
"key": " "
},
{
"type": "uptime",
"key": " "
},
{
"type": "media",
"key": " "
},
{
"type": "localip",
"key": " ",
"compact": true
},
{
"type": "wifi",
"key": " ",
"format": "{4}" // ssid
},
{
"type": "locale",
"key": " "
},
{
"type": "custom", // InformationEnd
"format": "└────────────────────────────────────────────┘"
},
{
"type": "colors",
"paddingLeft": 2,
"symbol": "circle"
}
]
}
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣶⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⠀⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⠀⠀⠀⠀⠆⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣧⠀⠀⠠⠀⠀⠀⠐⠀⠀⠀⠀⠀⠀⠀⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠰⠀⠀⠀⠀
⠀⠀⠀⠀⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠁⠠⠀⠀⢀⠀⠡⠄⠀⡄⠀⠀⠤⠄⠀⢠⣿⣿⣿⣿⣿⣆⠀⢠⠤⠁⠀⠠⠀⠠⠌⠀⠁⠀⠀⡄⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⢠⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠁⠀⠀⠀⠀⢀⣿⣿⣿⣿⣿⣿⣿⡆⠀⠀⠄⠀⠀⠀⠀⠠⠀⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⠀⠀⠈⠀⠀⠀⠀
⠀⠀⠀⠀⠇⠀⠀⠀⠀⠀⠀⠐⠀⠀⠀⠀⠀⠀⠐⠀⡀⢀⠀⠃⠀⢀⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⡌⠀⡀⠀⠸⠀⠀⢀⠀⠀⠀⠀⠂⠀⠀⠀⠀⠀⠀⠀⢀⠀⠀⠘⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⠀⠀⠀⡄⠀⠀⢀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠁⠀⢀⠀⠀⠈⠀⠁⠀⠀⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⠀⠀⠀⠀
⠀⠀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠀⠀⠁⠀⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡀⡀⠀⡀⠀⠠⠀⠆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠃⠀⠀⠀⠀⠀⠀⠸⠀⠀⠀⠘⠀⠀⠠⠀⠀⠀⠀⠇⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠸⠀⠀⠀⠀⠀⠀⠀⠃⠀⠀⠀⠃⠀⠀⠀⠀⠀⠀⠸⠀⠀⠀⠀
⠀⠀⠀⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⠁⠀⠀⡄⠰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⢠⠀⠀⠘⠀⠁⠀⠀⡀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⢠⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⠀⠀⠀⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⢳⡀⠈⠛⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇⠀⠀⠠⠀⡄⠀⠀⠁⠀⠀⠀⠀⠀⠀⠀⢠⠀⠀⠈⠀⠀⠀⠀
⠀⠀⠀⠀⠇⠀⠀⡀⠀⠀⠀⡐⠀⠀⡀⠀⡀⠀⠐⠀⡀⠀⢠⣿⣿⣷⣤⡀⠛⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇⠀⢀⠀⡀⠀⢀⠆⠀⠀⠀⢀⠀⠀⠀⢀⠀⠀⠸⠀⠀⠀⠀
⠀⠀⠀⠀⡀⠀⠀⠀⠀⠀⠀⢀⠀⠀⠀⠀⠀⠀⢠⠀⠁⢠⣿⣿⣿⣿⣿⣿⣷⣦⣍⡻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇⠈⠀⠁⠀⠀⡀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⢠⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠁⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀⠈⠀⠀⠈⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣆⠁⠀⠀⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠀⠀⠀⠀
⠀⠀⠀⠀⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⠀⠀⠀⠀
⠀⠀⠀⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇⠀⡀⠀⠀⠀⠀⠀⠀⠀⠰⠀⠀⢀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀⠀
⠀⠀⠀⠀⡄⠀⠀⠀⠀⠀⠀⠠⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⠀⠀⠀⠀
⠀⠀⠀⠀⡀⠀⠀⠀⠀⠀⠀⢀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠋⠉⠉⠉⠙⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠠⠀⡀⠀⠀⠀⠘⠀⠀⢀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠁⠀⠃⠀⠀⠄⠀⠀⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⠀⠀⠀⠀⠀⢀⠀⠀⠈⠀⠀⠀⠀
⠀⠀⠀⠀⠆⠀⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠀⠉⠀⠆⠀⠀⠀⠀⠀⠀⢀⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡈⠁⠀⠀⠀⠀⠀⠰⠀⠀⠀⠀
⠀⠀⠀⠀⡄⠀⠀⠁⠈⠀⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠁⠄⠀⠀⡀⠀⠀⠁⠀⠀⠀⢠⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡀⠄⠀⠘⠀⠀⢠⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠂⢀⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣺⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡀⠂⢠⠀⠀⠈⠀⠀⠀⠀
⠀⠀⠀⠀⡆⠀⠀⠀⠀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠂⠀⠀⠀⠀⠀⠀⢠⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣦⠉⠛⠛⣿⣷⡄⠀⠀⠀⠐⠀⠀⠀⠀
⠀⠀⠀⠀⡀⠀⡀⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⣀⡈⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⠫⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣤⠈⠉⠳⠼⢀⠀⢀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣄⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⣄⠠⠀⠀⠈⠀⠀⠀⠀
⠀⠀⠀⠀⠆⢁⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⡿⠿⠛⠋⠀⠀⠀⠀⠄⠀⠀⠀⠀⠀⠀⠐⠀⠘⠛⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⡈⠱⠀⠀⠀⠀
⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠛⠉⠁⠀⠀⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠃⠀⢀⠀⠀⠈⠉⠛⠻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡀⠄⠀⠀⠀
⠀⠀⠀⢠⣿⣿⣿⣿⣿⣿⣿⣿⠟⠛⡉⠀⠀⠀⠐⠀⠄⠀⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀⠈⠀⠀⠰⠀⡄⠀⠀⠀⠉⠛⠻⣿⣿⣿⣿⣿⣿⣿⣿⡄⠂⠀⠀
⠀⠀⢠⣿⣿⣿⣿⣿⠟⠛⢁⡠⠀⠀⡀⠀⡀⠀⠐⠀⡀⢀⠀⠆⠀⢀⠀⢀⠀⠀⠂⠀⠀⠀⠀⠀⠀⠠⠀⡀⠀⠰⡀⠀⢀⠀⡀⠀⠀⠆⢀⠀⠀⢀⡈⠙⠻⢿⣿⣿⣿⣿⡆⠀⠀
⠀⣰⣿⣿⠟⠋⠁⠀⠐⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⠀⠀⠀⡄⠀⠀⠀⠀⠀⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠁⠀⢀⠀⠀⠈⠀⠁⠀⠀⠄⠀⠀⠀⠀⠀⠀⠀⠐⠈⠛⠻⣿⣿⣆⠀
⡰⠟⠉⠁⠀⠀⠀⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠰⠀⠀⠀⠀⠉⠻⢆
Fontconfig
Make sure Fira code is installed on your system.
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<alias>
<family>monospace</family>
<prefer><family>FiraCode</family></prefer>
</alias>
</fontconfig>
Gammastep
[general]
temp-day=6500
temp-night=3500
fade=0
dawn-time=5:00-6:45
dusk-time=18:35-20:15
gamma-day=1.0
gamma-night=0.7
adjustment-method=wayland
GDB
GDB Early Init
Quiet startup
set startup-quietly on
GDB init
You'd need to put gef's script in place. It is too large to be added here.
set disassembly-flavor intel
set debuginfod enabled off
source ~/.gdbinit_gef.py
GIT
The main config
[user]
email = 1nn0c3n7z3r0@proton.me
name = innocentzero
signingKey = ~/.ssh/id_ed25519_signing.pub
[core]
pager = delta
compression = 0
sparsecheckout = false
[interactive]
diffFilter = delta --color-only
[delta]
line-numbers = true
side-by-side = true
navigate = true # use n and N to move between diff sections
light = false # set to true if you're in a terminal w/ a light background color (e.g. the default macOS terminal)
[merge]
conflictstyle = diff3
[diff]
colorMoved = default
[init]
defaultBranch = main
[commit]
gpgsign = true
[http]
postBuffer = 1048576000
maxRequestBuffer = 100M
[tag]
gpgSign = true
[gpg]
format = ssh
[gpg "ssh"]
allowedSignersFile = /home/innocentzero/.config/git/allowedsigners
The allowed signers file
1nn0c3n7z3r0@proton.me ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE6iEpL/U7cN9TMV0in6X1H/LonWK4hfGI4qvDbbgZC9 1nn0c3n7z3r0@proton.me
GTK
3.0
This defines the colors for most part
@define-color accent_color #dddddd;
@define-color accent_bg_color #0a0a0a;
@define-color accent_fg_color #ffffff;
@define-color destructive_color #ff7b63;
@define-color destructive_bg_color #c01c28;
@define-color destructive_fg_color #dddddd;
@define-color success_color #8ff0a4;
@define-color success_bg_color #26a269;
@define-color success_fg_color #dddddd;
@define-color warning_color #f8e45c;
@define-color warning_bg_color #cd9309;
@define-color warning_fg_color rgba(0, 0, 0, 0.8);
@define-color error_color #ff7b63;
@define-color error_bg_color #c01c28;
@define-color error_fg_color #dddddd;
@define-color window_bg_color #0A0A0A;
@define-color window_fg_color #dddddd;
@define-color view_bg_color #0A0A0A;
@define-color view_fg_color @window_fg_color;
@define-color headerbar_bg_color @window_bg_color;
@define-color headerbar_fg_color @window_fg_color;
@define-color headerbar_border_color #dddddd;
@define-color headerbar_backdrop_color @window_bg_color;
@define-color headerbar_shade_color rgba(0, 0, 0, 0.36);
@define-color card_bg_color rgba(255, 255, 255, 0.08);
@define-color card_fg_color @window_fg_color;
@define-color card_shade_color rgba(0, 0, 0, 0.36);
@define-color dialog_bg_color @popover_bg_color;
@define-color dialog_fg_color @popover_fg_color;
@define-color popover_bg_color #202020;
@define-color popover_fg_color @view_fg_color;
@define-color shade_color rgba(0,0,0,0.36);
@define-color scrollbar_outline_color rgba(0,0,0,0.5);
@define-color blue_1 #99c1f1;
@define-color blue_2 #62a0ea;
@define-color blue_3 #3584e4;
@define-color blue_4 #1c71d8;
@define-color blue_5 #1a5fb4;
@define-color green_1 #8ff0a4;
@define-color green_2 #57e389;
@define-color green_3 #33d17a;
@define-color green_4 #2ec27e;
@define-color green_5 #26a269;
@define-color yellow_1 #f9f06b;
@define-color yellow_2 #f8e45c;
@define-color yellow_3 #f6d32d;
@define-color yellow_4 #f5c211;
@define-color yellow_5 #e5a50a;
@define-color orange_1 #ffbe6f;
@define-color orange_2 #ffa348;
@define-color orange_3 #ff7800;
@define-color orange_4 #e66100;
@define-color orange_5 #c64600;
@define-color red_1 #f66151;
@define-color red_2 #ed333b;
@define-color red_3 #e01b24;
@define-color red_4 #c01c28;
@define-color red_5 #a51d2d;
@define-color purple_1 #dc8add;
@define-color purple_2 #c061cb;
@define-color purple_3 #9141ac;
@define-color purple_4 #813d9c;
@define-color purple_5 #613583;
@define-color brown_1 #cdab8f;
@define-color brown_2 #b5835a;
@define-color brown_3 #986a44;
@define-color brown_4 #865e3c;
@define-color brown_5 #63452c;
@define-color light_1 #ffffff;
@define-color light_2 #f6f5f4;
@define-color light_3 #deddda;
@define-color light_4 #c0bfbc;
@define-color light_5 #9a9996;
@define-color dark_1 #77767b;
@define-color dark_2 #5e5c64;
@define-color dark_3 #3d3846;
@define-color dark_4 #241f31;
@define-color dark_5 #000000;
This defines other random stuff
[Settings]
gtk-cursor-theme-name=breeze_cursors
gtk-cursor-theme-size=24
gtk-decoration-layout=':'
gtk-enable-animations=true
gtk-font-name=Noto Sans, 13
gtk-theme-name=adw-gtk3-dark
gtk-primary-button-warps-slider=false
gtk-xft-dpi=127872
[AdwStyleManager]
color-scheme=ADW_COLOR_SCHEME_PREFER_DARK
4.0
This defines the colors for most part
@define-color accent_color #dddddd;
@define-color accent_bg_color #0a0a0a;
@define-color accent_fg_color #ffffff;
@define-color destructive_color #ff7b63;
@define-color destructive_bg_color #c01c28;
@define-color destructive_fg_color #dddddd;
@define-color success_color #8ff0a4;
@define-color success_bg_color #26a269;
@define-color success_fg_color #dddddd;
@define-color warning_color #f8e45c;
@define-color warning_bg_color #cd9309;
@define-color warning_fg_color rgba(0, 0, 0, 0.8);
@define-color error_color #ff7b63;
@define-color error_bg_color #c01c28;
@define-color error_fg_color #dddddd;
@define-color window_bg_color #0A0A0A;
@define-color window_fg_color #dddddd;
@define-color view_bg_color #0A0A0A;
@define-color view_fg_color @window_fg_color;
@define-color headerbar_bg_color @window_bg_color;
@define-color headerbar_fg_color @window_fg_color;
@define-color headerbar_border_color #dddddd;
@define-color headerbar_backdrop_color @window_bg_color;
@define-color headerbar_shade_color rgba(0, 0, 0, 0.36);
@define-color card_bg_color rgba(255, 255, 255, 0.08);
@define-color card_fg_color @window_fg_color;
@define-color card_shade_color rgba(0, 0, 0, 0.36);
@define-color dialog_bg_color @popover_bg_color;
@define-color dialog_fg_color @popover_fg_color;
@define-color popover_bg_color #202020;
@define-color popover_fg_color @view_fg_color;
@define-color shade_color rgba(0,0,0,0.36);
@define-color scrollbar_outline_color rgba(0,0,0,0.5);
@define-color blue_1 #99c1f1;
@define-color blue_2 #62a0ea;
@define-color blue_3 #3584e4;
@define-color blue_4 #1c71d8;
@define-color blue_5 #1a5fb4;
@define-color green_1 #8ff0a4;
@define-color green_2 #57e389;
@define-color green_3 #33d17a;
@define-color green_4 #2ec27e;
@define-color green_5 #26a269;
@define-color yellow_1 #f9f06b;
@define-color yellow_2 #f8e45c;
@define-color yellow_3 #f6d32d;
@define-color yellow_4 #f5c211;
@define-color yellow_5 #e5a50a;
@define-color orange_1 #ffbe6f;
@define-color orange_2 #ffa348;
@define-color orange_3 #ff7800;
@define-color orange_4 #e66100;
@define-color orange_5 #c64600;
@define-color red_1 #f66151;
@define-color red_2 #ed333b;
@define-color red_3 #e01b24;
@define-color red_4 #c01c28;
@define-color red_5 #a51d2d;
@define-color purple_1 #dc8add;
@define-color purple_2 #c061cb;
@define-color purple_3 #9141ac;
@define-color purple_4 #813d9c;
@define-color purple_5 #613583;
@define-color brown_1 #cdab8f;
@define-color brown_2 #b5835a;
@define-color brown_3 #986a44;
@define-color brown_4 #865e3c;
@define-color brown_5 #63452c;
@define-color light_1 #ffffff;
@define-color light_2 #f6f5f4;
@define-color light_3 #deddda;
@define-color light_4 #c0bfbc;
@define-color light_5 #9a9996;
@define-color dark_1 #77767b;
@define-color dark_2 #5e5c64;
@define-color dark_3 #3d3846;
@define-color dark_4 #241f31;
@define-color dark_5 #000000;
This defines other random stuff
[Settings]
gtk-cursor-theme-name=breeze_cursors
gtk-cursor-theme-size=24
gtk-decoration-layout=':'
gtk-enable-animations=true
gtk-font-name=Noto Sans, 13
gtk-icon-theme-name=adwaita-dark
gtk-primary-button-warps-slider=false
gtk-xft-dpi=127872
[AdwStyleManager]
color-scheme=ADW_COLOR_SCHEME_PREFER_DARK
Helix
Editor Config
Editor settings
theme = "tokyonight"
[editor]
scrolloff = 10
line-number = "relative"
mouse = false
scroll-lines = 5
completion-replace = true
true-color = true
rulers = [81]
bufferline = "multiple"
cursorline = true
end-of-line-diagnostics = "hint"
default-yank-register = "+"
[editor.inline-diagnostics]
cursor-line = "warning"
[editor.statusline]
left = ["mode", "spinner", "diagnostics"]
center = [
"version-control",
"file-name",
"read-only-indicator",
"file-modification-indicator",
]
right = [
"selections",
"register",
"position",
"primary-selection-length",
"file-encoding",
]
separator = "⟩"
mode.normal = "NORMAL"
mode.insert = "INSERT"
mode.select = "SELECT"
[editor.cursor-shape]
insert = "bar"
normal = "block"
select = "underline"
[editor.file-picker]
hidden = false
[editor.indent-guides]
character = "┊"
render = true
[editor.lsp]
display-messages = true
display-inlay-hints = true
Keybinds - spacelix lmao
[keys.normal]
X = ["extend_line_up", "extend_to_line_bounds"]
G = "goto_last_line"
0 = "goto_line_start"
H = "goto_previous_buffer"
L = "goto_next_buffer"
[keys.normal.m]
r = "no_op"
d = "no_op"
a = "no_op"
i = "no_op"
[keys.normal." "]
" " = "file_picker"
r = ":config-reload"
t = "file_picker_in_current_buffer_directory"
x = "command_palette"
h = "no_op"
o = "no_op"
f = "no_op"
p = "no_op"
c = "no_op"
[keys.normal." ".b]
b = "buffer_picker"
d = ":buffer-close"
r = ":reload"
[keys.normal." ".d]
n = "goto_next_diag"
p = "goto_prev_diag"
[keys.normal." ".g]
g = "no_op"
l = "no_op"
n = "goto_next_change"
p = "goto_prev_change"
[keys.normal." ".l]
a = "code_action"
q = ":lsp-stop"
r = "rename_symbol"
R = "goto_reference"
i = "goto_implementation"
g = "goto_definition"
f = ":fmt"
d = "goto_declaration"
c = "toggle_comments"
[keys.normal." ".w]
v = ":vsplit-new"
b = ":hsplit-new"
l = "jump_view_right"
h = "jump_view_left"
j = "jump_view_down"
k = "jump_view_up"
q = "wclose"
[keys.select]
X = ["extend_line_up", "extend_to_line_bounds"]
G = "goto_last_line"
0 = "goto_line_start"
[keys.select.m]
r = "no_op"
d = "no_op"
a = "no_op"
i = "no_op"
[keys.select." "]
" " = "file_picker"
r = ":config-reload"
t = "file_picker_in_current_buffer_directory"
H = "goto_previous_buffer"
L = "goto_next_buffer"
x = "command_palette"
h = "no_op"
o = "no_op"
f = "no_op"
p = "no_op"
c = "no_op"
[keys.select." ".b]
b = "buffer_picker"
d = ":buffer-close"
r = ":reload"
[keys.select." ".d]
n = "goto_next_diag"
j = "goto_prev_diag"
[keys.select." ".l]
a = "code_action"
q = ":lsp-stop"
r = "rename_symbol"
R = "goto_reference"
i = "goto_implementation"
g = "goto_definition"
f = ":fmt"
d = "goto_declaration"
c = "toggle_comments"
[keys.select." ".w]
v = ":vsplit-new"
b = ":hsplit-new"
l = "jump_view_right"
h = "jump_view_left"
j = "jump_view_down"
k = "jump_view_up"
q = "wclose"
Language config
Tree-sitter config
# Language support configuration.
# See the languages documentation:
# https://docs.helix-editor.com/master/languages.html
use-grammars = { only = [
"rust",
"sway",
"c",
"cpp",
"bash",
"cmake",
"make",
"markdown",
"latex",
"toml",
"json",
"json5",
"javascript",
"css",
"html",
"python",
"typst",
"ocaml",
"yaml",
"nasm",
"gas",
] }
Rust
[language-server.rust-analyzer.config]
inlayHints.bindingModeHints.enable = true
check.command = "clippy"
[[language]]
name = "rust"
Web
[[language]]
name = "json"
formatter = { command = 'prettier', args = ["--parser", "jsonc"] }
[[language]]
name = "javascript"
formatter = { command = 'prettier', args = ["--parser", "typescript"] }
[[language]]
name = "css"
formatter = { command = "prettier", args = ["--parser", "css"] }
[[language]]
name = "html"
formatter = { command = "prettier", args = ["--parser", "html"] }
Python
[language-server.pylsp.config.pylsp]
plugins.black.enabled = true
plugins.pylint.enabled = true
plugins.pyflakes.enabled = false
plugins.pyls_mypy.enabled = false
plugins.pyls_mypy.live_mode = false
plugins.isort.enabled = false
plugins.rope_autoimport.enabled = false
[[language]]
name = "python"
language-servers = ["pylsp"]
Remaining
[[language]]
name = "bash"
auto-format = true
formatter = { command = "shfmt", args = ["-i", "4", "-ci", "-sr", "-kp"] }
indent = { tab-width = 4, unit = " " }
[[language]]
name = "make"
auto-format = true
[[language]]
name = "ocaml"
auto-format = true
formatter = { command = "ocamlformat", args = ["-", "--impl"] }
[[language]]
name = "markdown"
auto-format = true
[[language]]
name = "typst"
auto-format = true
language-servers = ["tinymist"]
[language-server.tinymist]
command = "tinymist"
[language-server.tinymist.config]
exportPdf = "onSave"
outputPath = "$root/target/$dir/$name"
fontPaths = ["./fonts/"]
typstExtraArgs = ["main.typ"]
formatterMode = "typstyle"
Themes
# Author: Paul Graydon <untimely.creation97@proton.me>
attribute = { fg = "cyan" }
comment = { fg = "comment", modifiers = ["italic"] }
"comment.block.documentation" = { fg = "yellow" }
constant = { fg = "orange" }
"constant.builtin" = { fg = "aqua" }
"constant.character" = { fg = "light-green" }
"constant.character.escape" = { fg = "magenta" }
constructor = { fg = "aqua" }
function = { fg = "blue", modifiers = ["italic"] }
"function.builtin" = { fg = "aqua" }
"function.macro" = { fg = "cyan" }
"function.special" = { fg = "cyan" }
keyword = { fg = "purple", modifiers = ["italic"] }
"keyword.control" = { fg = "magenta" }
"keyword.control.import" = { fg = "cyan" }
"keyword.control.return" = { fg = "purple", modifiers = ["italic"] }
"keyword.directive" = { fg = "cyan" }
"keyword.function" = { fg = "magenta" }
"keyword.operator" = { fg = "magenta" }
label = { fg = "blue" }
namespace = { fg = "cyan" }
operator = { fg = "turquoise" }
punctuation = { fg = "turquoise" }
special = { fg = "aqua" }
string = { fg = "light-green" }
"string.regexp" = { fg = "light-cyan" }
"string.special" = { fg = "aqua" }
tag = { fg = "magenta" }
type = { fg = "aqua" }
"type.builtin" = { fg = "aqua" }
"type.enum.variant" = { fg = "orange" }
variable = { fg = "fg" }
"variable.builtin" = { fg = "red" }
"variable.other.member" = { fg = "green" }
"variable.parameter" = { fg = "yellow", modifiers = ["italic"] }
"markup.bold" = { modifiers = ["bold"] }
"markup.heading" = { fg = "blue", modifiers = ["bold"] }
"markup.heading.completion" = { bg = "bg-menu", fg = "fg" }
"markup.heading.hover" = { bg = "fg-selected" }
"markup.italic" = { modifiers = ["italic"] }
"markup.link" = { fg = "blue", underline = { style = "line" } }
"markup.link.label" = { fg = "teal" }
"markup.link.text" = { fg = "teal" }
"markup.link.url" = { underline = { style = "line" } }
"markup.list" = { fg = "orange", modifiers = ["bold"] }
"markup.normal.completion" = { fg = "comment" }
"markup.normal.hover" = { fg = "fg-dark" }
"markup.raw" = { fg = "teal" }
"markup.raw.inline" = { bg = "black", fg = "blue" }
"markup.strikethrough" = { modifiers = ["crossed_out"] }
"diff.delta" = { fg = "change" }
"diff.delta.moved" = { fg = "blue" }
"diff.minus" = { fg = "delete" }
"diff.plus" = { fg = "add" }
error = { fg = "error" }
warning = { fg = "yellow" }
info = { fg = "info" }
hint = { fg = "hint" }
"diagnostic.error" = { underline = { style = "curl", color = "error" } }
"diagnostic.warning" = { underline = { style = "curl", color = "yellow"} }
"diagnostic.info" = { underline = { style = "curl", color = "info"} }
"diagnostic.hint" = { underline = { style = "curl", color = "hint" } }
"diagnostic.unnecessary" = { modifiers = ["dim"] }
"diagnostic.deprecated" = { modifiers = ["crossed_out"] }
# "ui.background" = { bg = "bg", fg = "fg" }
"ui.cursor" = { modifiers = ["reversed"] }
"ui.cursor.match" = { fg = "orange", modifiers = ["bold"] }
"ui.cursorline.primary" = { bg = "bg-menu" }
"ui.help" = { bg = "bg-menu", fg = "fg" }
"ui.linenr" = { fg = "fg-gutter" }
"ui.linenr.selected" = { fg = "fg-linenr" }
"ui.menu" = { bg = "bg-menu", fg = "fg" }
"ui.menu.selected" = { bg = "fg-selected" }
"ui.popup" = { bg = "bg-menu", fg = "border-highlight" }
"ui.selection" = { bg = "bg-selection" }
"ui.selection.primary" = { bg = "bg-selection" }
"ui.statusline" = { bg = "bg-menu", fg = "fg-dark" }
"ui.statusline.inactive" = { bg = "bg-menu", fg = "fg-gutter" }
"ui.statusline.normal" = { bg = "blue", fg = "bg", modifiers = ["bold"] }
"ui.statusline.insert" = { bg = "light-green", fg = "bg", modifiers = ["bold"] }
"ui.statusline.select" = { bg = "magenta", fg = "bg", modifiers = ["bold"] }
"ui.text" = { bg = "bg", fg = "fg" }
"ui.text.focus" = { bg = "bg-focus" }
"ui.text.inactive" = { fg = "comment", modifiers = ["italic"] }
"ui.text.info" = { bg = "bg-menu", fg = "fg" }
"ui.text.directory" = { fg = "cyan" }
"ui.virtual.ruler" = { bg = "fg-gutter" }
"ui.virtual.whitespace" = { fg = "fg-gutter" }
"ui.virtual.inlay-hint" = { bg = "bg-inlay", fg = "teal" }
"ui.virtual.jump-label" = { fg = "orange", modifiers = ["bold"] }
"ui.window" = { fg = "border", modifiers = ["bold"] }
[palette]
red = "#f7768e"
orange = "#ff9e64"
yellow = "#e0af68"
light-green = "#9ece6a"
green = "#73daca"
aqua = "#2ac3de"
teal = "#1abc9c"
turquoise = "#89ddff"
light-cyan = "#b4f9f8"
cyan = "#7dcfff"
blue = "#7aa2f7"
purple = "#9d7cd8"
magenta = "#bb9af7"
comment = "#565f89"
black = "#414868"
add = "#449dab"
change = "#6183bb"
delete = "#914c54"
error = "#db4b4b"
info = "#0db9d7"
hint = "#1abc9c"
fg = "#c0caf5"
fg-dark = "#a9b1d6"
fg-gutter = "#3b4261"
fg-linenr = "#737aa2"
fg-selected = "#343a55"
border = "#15161e"
border-highlight = "#27a1b9"
bg = "#0a0a0a"
bg-inlay = "#1a2b32"
bg-selection = "#283457"
bg-menu = "#16161e"
bg-focus = "#292e42"
/etc/issue
Manually copy paste it, to, well /etc/issue
\e[1;31m▀▀▀▀▀▀▀ \e[1;32m▀▀▀▀▀▀▀▀▀▀ \e[1;36m▀▀▀▀▀ ▀▀▀▀▀
\e[1;31m▀▀▀▀▀▀▀ \e[1;32m▀▀▀▀▀▀▀▀▀▀▀▀ \e[1;36m▀▀▀▀▀▀ ▀▀▀▀▀▀
\e[1;31m ▀▀▀ \e[1;32m ▀▀▀ ▀▀▀ \e[1;36m ▀▀▀▀▀ ▀▀▀▀▀
\e[1;31m ▀▀▀ \e[1;32m ▀▀▀▀▀▀▀▀ \e[1;36m ▀▀▀▀▀▀ ▀▀▀▀▀▀
\e[1;31m ▀▀▀ \e[1;32m ▀▀▀▀▀▀▀▀ \e[1;36m ▀▀▀ ▀▀▀▀▀ ▀▀▀
\e[1;31m ▀▀▀ \e[1;32m ▀▀▀ ▀▀▀ \e[1;36m ▀▀▀ ▀▀▀ ▀▀▀
\e[1;31m▀▀▀▀▀▀▀ \e[1;32m▀▀▀▀▀▀▀▀▀▀▀▀ \e[1;36m▀▀▀▀▀ ▀ ▀▀▀▀▀
\e[1;31m▀▀▀▀▀▀▀ \e[1;32m▀▀▀▀▀▀▀▀▀▀ \e[1;36m▀▀▀▀▀ ▀▀▀▀▀
\e[1;97m██████ ██ \e[1;31m▓▓\e[1;97m ██ ████▄ ██
██ ██▄▄ ▄▄ ▄▄▄▄ ██ ▄▄ ██ ██ ▄▄▄ ▄▄██
██ ██▀██ ██ ██▀██ ██ ██ ██ ██ ██▀██ ██▀██
██ ██ ██ ██ ██ ██ ██▐█▌ ██▄██ ▀▀ ██ ██ ██
██ ██ ██ ██ ██ ██ ████ ██▀▀ ▄████ ██ ██
██ ██ ██ ██ ██ ██ ██▐█▌ ██ ██ ██ ██ ██
██ ██ ██ ██ ██ ██ ██ ██ ██ ██▄██ ██▄██
▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀▀▀ ▀▀▀▀
Kanshi
let image = (/usr/bin/swww query | /usr/bin/sed "s|^.*image: ||")
swww img $image
profile {
output eDP-1
output HDMI-A-1
exec /home/innocentzero/.config/kanshi/script.nu
exec systemctl restart --user waybar
exec systemctl restart --user nwg_agenda
exec systemctl restart --user nwg_todos
}
profile {
output eDP-1
exec systemctl restart --user nwg_agenda
exec systemctl restart --user nwg_todos
}
[Unit]
PartOf=graphical-session.target
After=graphical-session.target
Requisite=graphical-session.target
[Service]
ExecStart=/usr/bin/kanshi
Restart=on-failure
Kitty
Font and cursor settings
font_family Fira Code Retina
bold_font Fira Code Bold
italic_font Source Code Pro Italic
font_size 12.0
force_ltr no
disable_ligatures cursor
font_features FiraCode-Retina +ss05 +ss03 +ss09 +ss07 +zero +ss06
font_features FiraCode-Bold +ss05 +ss03 +ss09 +ss07 +zero +ss06
box_drawing_scale 0.001, 1, 1.5, 2
cursor #cccccc
cursor_text_color #111111
cursor_shape beam
cursor_beam_thickness 1.5
cursor_underline_thickness 2.0
cursor_blink_interval -1
cursor_stop_blinking_after 15.0
Basic actions + mouse mapping
scrollback_lines 1000
scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER
scrollback_pager_history_size 1000
url_color #0087bd
url_style curly
open_url_with default
url_prefixes file ftp ftps gemini git gopher http https irc ircs kitty mailto news sftp ssh
detect_urls no
copy_on_select no
paste_actions quote-urls-at-prompt
strip_trailing_spaces never
select_by_word_characters @-./_~?&=%+#
click_interval -1.0
focus_follows_mouse no
pointer_shape_when_grabbed arrow
default_pointer_shape beam
pointer_shape_when_dragging beam
mouse_map left click ungrabbed mouse_handle_click selection link prompt
mouse_map shift+left click grabbed,ungrabbed mouse_handle_click selection link prompt
mouse_map ctrl+shift+left release grabbed,ungrabbed mouse_handle_click link
mouse_map ctrl+shift+left press grabbed discard_event
mouse_map middle release ungrabbed paste_from_selection
mouse_map left press ungrabbed mouse_selection normal
mouse_map ctrl+alt+left press ungrabbed mouse_selection rectangle
mouse_map left doublepress ungrabbed mouse_selection word
mouse_map left triplepress ungrabbed mouse_selection line
mouse_map ctrl+alt+left triplepress ungrabbed mouse_selection line_from_point
mouse_map right press ungrabbed mouse_selection extend
mouse_map shift+middle release ungrabbed,grabbed paste_selection
mouse_map shift+middle press grabbed discard_event
mouse_map shift+left press ungrabbed,grabbed mouse_selection normal
mouse_map ctrl+shift+alt+left press ungrabbed,grabbed mouse_selection rectangle
mouse_map shift+left doublepress ungrabbed,grabbed mouse_selection word
mouse_map shift+left triplepress ungrabbed,grabbed mouse_selection line
mouse_map ctrl+shift+alt+left triplepress ungrabbed,grabbed mouse_selection line_from_point
mouse_map shift+right press ungrabbed,grabbed mouse_selection extend
mouse_map ctrl+shift+right press ungrabbed mouse_show_command_output
rendering and colors
repaint_delay 10
input_delay 3
sync_to_monitor yes
enable_audio_bell no
visual_bell_duration 0
visual_bell_color none
window_alert_on_bell yes
bell_on_tab " "
command_on_bell none
bell_path none
remember_window_size yes
initial_window_width 960
initial_window_height 540
enabled_layouts all
window_resize_step_cells 2
window_resize_step_lines 2
window_border_width 0.5pt
draw_minimal_borders yes
window_margin_width 0
single_window_margin_width -1
window_padding_width 0
placement_strategy center
active_border_color #ffffff
inactive_border_color #ffffff
bell_border_color #ff5a00
inactive_text_alpha 1.0
resize_debounce_time 0.1
resize_in_steps no
visual_window_select_characters 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ
confirm_os_window_close -1
hide_window_decorations yes
window_logo_path none
window_logo_position bottom-right
window_logo_alpha 0.5
tab_bar_edge top
tab_bar_margin_width 0.0
tab_bar_margin_height 0.0 0.0
tab_bar_style powerline
tab_bar_align left
tab_bar_min_tabs 1
tab_switch_strategy previous
tab_fade 0.25 0.5 0.75 1
tab_separator "┋"
tab_powerline_style slanted
tab_activity_symbol ""
active_tab_foreground #ffffff
active_tab_background #999999
active_tab_font_style bold
inactive_tab_foreground #ccc
inactive_tab_background #0A0A0A
inactive_tab_font_style normal
tab_bar_background none
tab_bar_margin_color none
foreground #999999
background #0A0A0A
background_opacity 1.00
dim_opacity 0.75
selection_foreground #000000
selection_background #cccccc
color0 #000000
color8 #767676
color1 #cc0403
color9 #f2201f
color2 #19cb00
color10 #23fd00
color3 #cecb00
color11 #fffd00
color4 #0d73cc
color12 #1a8fff
color5 #cb1ed1
color13 #fd28ff
color6 #0dcdcd
color14 #14ffff
color7 #dddddd
color15 #ffffff
mark1_foreground black
mark1_background #98d3cb
mark2_foreground black
mark2_background #f2dcd3
mark3_foreground black
mark3_background #f274bc
Random BS
shell /usr/bin/nu
editor .
close_on_child_death no
allow_remote_control no
listen_on none
update_check_interval 24
clipboard_control write-clipboard write-primary read-clipboard-ask read-primary-ask
clipboard_max_size 64
allow_hyperlinks yes
shell_integration no-cursor
notify_on_cmd_finish unfocused 1.0 command notify-send "job finished with status: %s" %c
allow_cloning ask
clone_source_strategies venv,conda,env_var,path
term xterm-kitty
display settings
linux_display_server wayland
wayland_titlebar_color #0A0A0A
macos_titlebar_color system
macos_option_as_alt no
macos_hide_from_tasks no
macos_quit_when_last_window_closed no
macos_window_resizable yes
macos_thicken_font 0
macos_traditional_fullscreen no
macos_show_window_title_in all
macos_menubar_title_max_length 0
macos_custom_beam_cursor no
macos_colorspace srgb
Keybinds
kitty_mod alt
map kitty_mod+c copy_to_clipboard
map kitty_mod+v paste_from_clipboard
map kitty_mod+s paste_from_selection
map kitty_mod+up scroll_line_up
map kitty_mod+k scroll_line_up
map kitty_mod+down scroll_line_down
map kitty_mod+j scroll_line_down
map kitty_mod+u scroll_page_up
map kitty_mod+d scroll_page_down
map kitty_mod+z scroll_to_prompt -1
map kitty_mod+g show_last_command_output
map kitty_mod+enter new_window
map kitty_mod+shift+enter launch --cwd=current
map kitty_mod+x close_window
map kitty_mod+] next_window
map kitty_mod+[ previous_window
map kitty_mod+r start_resizing_window
map kitty_mod+n focus_visible_window
map kitty_mod+l next_tab
map kitty_mod+h previous_tab
map kitty_mod+t launch --type=tab
map kitty_mod+w close_tab
map kitty_mod+q close_os_window
map kitty_mod+. move_tab_forward
map kitty_mod+, move_tab_backward
map kitty_mod+i set_tab_title
map kitty_mod+y next_layout
map kitty_mod+equal change_font_size all +2.0
map kitty_mod+minus change_font_size all -2.0
map kitty_mod+backspace change_font_size all 0
Mako
max-history=4
sort=-time
text-color=#EEEEEEFF
border-color=#555555
background-color=#0A0A0A
icons=1
on-button-middle=exec makoctl dismiss -a
[app-name=screenlockwarning]
anchor=center
font=monospace 16
default-timeout=3000
[app-name="NetworkManager Applet"]
default-timeout=5000
[app-name="wfrec"]
on-button-middle=exec makoctl menu -n "$id" -- rofi -dmenu 'Select action: '
[app-name="mirror"]
on-button-middle=exec makoctl menu -n "$id" -- rofi -dmenu 'Select action: '
Mimeapps
[Default Applications]
application/pdf=org.pwmt.zathura.desktop
image/jpeg=swappy.desktop
image/png=swappy.desktop
text/plain=emacsclient.desktop
text/x-csrc=emacsclient.desktop
[Added Associations]
application/pdf=org.pwmt.zathura.desktop;
image/jpeg=swappy.desktop;
application/x-qemu-disk=org.gnome.Boxes.desktop;
image/png=swappy.desktop;
text/plain=emacsclient.desktop;
text/x-csrc=emacsclient.desktop;
Niri
WM Config
Input config
// https://github.com/YaLTeR/niri/wiki/Configuration:-Input
input {
touchpad {
tap
dwt
natural-scroll
accel-speed 0.2
accel-profile "adaptive"
}
warp-mouse-to-focus
}
Output configuration
// https://github.com/YaLTeR/niri/wiki/Configuration:-Outputs
output "eDP-1" {
mode "1920x1080@60.0"
scale 1
transform "normal"
position x=1280 y=0
}
spawn-at-startup "swww-daemon"
Layout config
// https://github.com/YaLTeR/niri/wiki/Configuration:-Layout
layout {
gaps 5
empty-workspace-above-first
// center-focused-column "always"
background-color "#ffffff"
default-column-display "tabbed"
tab-indicator {
hide-when-single-tab
}
preset-column-widths {
proportion 0.33333
proportion 0.5
proportion 0.66667
}
default-column-width { proportion 0.5; }
focus-ring {
width 3
active-gradient from="#7fc8ff" to="#ffcc00" angle=45
inactive-gradient from="#505050" to="#eeeeee" angle=45
}
border {
off
width 4
active-color "#ffc87f"
inactive-color "#505050"
}
struts {
left 15
right 15
}
}
Other random window rules
prefer-no-csd
screenshot-path "~/Pictures/Screenshots/screenshot-%Y-%m-%d-%H-%M-%S.png"
animations {
slowdown 0.5
}
window-rule {
match app-id=r#"firefox$"# title="^Picture-in-Picture$"
open-floating true
}
window-rule {
match app-id=r#"floating_kitty$"#
open-floating true
}
window-rule {
match app-id=r#"^org\.keepassxc\.KeePassXC$"#
match app-id=r#"^org\.gnome\.World\.Secrets$"#
block-out-from "screen-capture"
}
window-rule {
geometry-corner-radius 7
clip-to-geometry true
}
hotkey-overlay {
skip-at-startup
}
WM Keybinds
binds {
Mod+Shift+Slash { show-hotkey-overlay; }
Mod+Return { spawn "kitty"; }
Mod+Shift+Return { spawn "kitty" "--app-id=floating_kitty"; }
Mod+D { spawn "rofi" "-show" "drun"; }
Super+Alt+L { spawn "systemctl" "suspend"; }
Mod+E { spawn "emacsclient" "-nc"; }
Mod+B { spawn "flatpak" "run" "io.gitlab.librewolf-community"; }
XF86AudioRaiseVolume allow-when-locked=true { spawn "~/.config/niri/media-control" "volume_up"; }
XF86AudioLowerVolume allow-when-locked=true { spawn "~/.config/niri/media-control" "volume_down"; }
XF86AudioMute allow-when-locked=true { spawn "~/.config/niri/media-control" "volume_mute"; }
XF86AudioMicMute allow-when-locked=true { spawn "~/.config/niri/media-control" "mic_mute"; }
XF86MonBrightnessUp allow-when-locked=true { spawn "~/.config/niri/media-control" "brightness_up"; }
XF86MonBrightnessDown allow-when-locked=true { spawn "~/.config/niri/media-control" "brightness_down"; }
Mod+Q { close-window; }
Mod+H { focus-column-left; }
Mod+J { focus-window-down; }
Mod+K { focus-window-up; }
Mod+L { focus-column-right; }
Mod+Shift+H { move-column-left; }
Mod+Shift+J { move-window-down; }
Mod+Shift+K { move-window-up; }
Mod+Shift+L { move-column-right; }
Mod+Ctrl+H { focus-monitor-left; }
Mod+Ctrl+J { focus-monitor-down; }
Mod+Ctrl+K { focus-monitor-up; }
Mod+Ctrl+L { focus-monitor-right; }
Mod+Alt+Ctrl+H { move-column-to-monitor-left; }
Mod+Alt+Ctrl+J { move-column-to-monitor-down; }
Mod+Alt+Ctrl+K { move-column-to-monitor-up; }
Mod+Alt+Ctrl+L { move-column-to-monitor-right; }
Mod+N { focus-workspace-down; }
Mod+P { focus-workspace-up; }
Mod+Shift+U { move-column-to-workspace-down; }
Mod+Shift+I { move-column-to-workspace-up; }
Mod+Ctrl+Page_Down { move-workspace-down; }
Mod+Ctrl+Page_Up { move-workspace-up; }
Mod+Ctrl+U { move-workspace-down; }
Mod+Ctrl+I { move-workspace-up; }
Mod+Shift+Space { consume-window-into-column; }
Mod+Space { expel-window-from-column; }
Mod+M { toggle-column-tabbed-display; }
Mod+BracketLeft { consume-or-expel-window-left; }
Mod+BracketRight { consume-or-expel-window-right; }
Mod+R { switch-preset-column-width; }
Mod+Shift+R { switch-preset-window-height; }
Mod+F { maximize-column; }
Mod+Shift+F { fullscreen-window; }
Mod+C { center-column; }
Mod+Minus { set-column-width "-10%"; }
Mod+Equal { set-column-width "+10%"; }
Mod+Shift+Minus { set-window-height "-10%"; }
Mod+Shift+Equal { set-window-height "+10%"; }
Print { screenshot; }
Ctrl+Print { screenshot-screen; }
Alt+Print { screenshot-window; }
Mod+Ctrl+Print { spawn "~/.config/niri/swayrec"; }
Mod+Alt+Print { spawn "~/.config/niri/swaymirror"; }
Mod+Shift+N { spawn "~/.config/rofi/network/rofi-network-manager.sh"; }
Mod+Shift+B { spawn "blueman-manager"; }
Mod+Escape { spawn "~/.config/rofi/shutdown/shutdown"; }
Mod+U { spawn "makoctl" "dismiss" "-a"; }
Mod+Shift+S { spawn "kitty" "pulsemixer"; }
Mod+Shift+V { spawn "nwg-clipman"; }
Mod+Shift+P { power-off-monitors; }
}
Overview
overview {
backdrop-color "#0a0a0a"
zoom 0.33
}
Helper scripts
volume_step=5
mic_volume_step=5
brightness_step=5
max_volume=100
mic_max_volume=100
notification_timeout=-1
download_album_art=true
show_album_art=true
show_music_in_volume_indicator=true
function get_volume {
pactl get-sink-volume @DEFAULT_SINK@ | grep -Po '[0-9]{1,3}(?=%)' | head -1
}
function get_mute {
pactl get-sink-mute @DEFAULT_SINK@ | grep -Po '(?<=Mute: )(yes|no)'
}
function get_mic_volume {
pactl get-source-volume @DEFAULT_SOURCE@ | grep -Po '[0-9]{1,3}(?=%)' | head -1
}
function get_mic_mute {
pactl get-source-mute @DEFAULT_SOURCE@ | grep -Po '(?<=Mute: )(yes|no)'
}
function get_brightness {
declare -i absb
declare -i relb
absb=$(brightnessctl g)
maxb=$(brightnessctl m)
absb=$((absb * 100))
echo $((absb / maxb))
}
function get_volume_icon {
volume=$(get_volume)
mute=$(get_mute)
if [ "$volume" -eq 0 ] || [ "$mute" == "yes" ]; then
volume_icon="🔇"
elif [ "$volume" -lt 50 ]; then
volume_icon=" "
else
volume_icon=" "
fi
}
function get_mic_icon {
mute=$(get_mic_mute)
if [ "$mute" == "yes" ]; then
mic_icon=" "
else
mic_icon=""
fi
}
function get_brightness_icon {
brightness_icon=""
}
function get_album_art {
url=$(playerctl -f "{{mpris:artUrl}}" metadata)
if [[ $url == "file://"* ]]; then
album_art="${url/file:\/\//}"
elif [[ $url == "http://"* ]] && [[ $download_album_art == "true" ]]; then
# Identify filename from URL
filename="$(echo $url | sed "s/.*\///")"
# Download file to /tmp if it doesn't exist
if [ ! -f "/tmp/$filename" ]; then
wget -O "/tmp/$filename" "$url"
fi
album_art="/tmp/$filename"
elif [[ $url == "https://"* ]] && [[ $download_album_art == "true" ]]; then
# Identify filename from URL
filename="$(echo $url | sed "s/.*\///")"
# Download file to /tmp if it doesn't exist
if [ ! -f "/tmp/$filename" ]; then
wget -O "/tmp/$filename" "$url"
fi
album_art="/tmp/$filename"
else
album_art=""
fi
}
function show_volume_notif {
volume=$(get_mute)
get_volume_icon
if [[ $show_music_in_volume_indicator == "true" ]]; then
current_song=$(playerctl -f "{{title}} - {{artist}}" metadata)
if [[ $show_album_art == "true" ]]; then
get_album_art
fi
notify-send -e -t $notification_timeout -h string:x-canonical-private-synchronous:test -h int:value:$volume -i "$album_art" "$volume_icon $volume%" "$current_song"
else
notify-send -e -t $notification_timeout -h string:x-canonical-private-synchronous:test -h int:value:$volume "$volume_icon $volume%"
fi
}
function show_music_notif {
song_title=$(playerctl -f "{{title}}" metadata)
song_artist=$(playerctl -f "{{artist}}" metadata)
song_album=$(playerctl -f "{{album}}" metadata)
if [[ $show_album_art == "true" ]]; then
get_album_art
fi
notify-send -e -t $notification_timeout -h string:x-canonical-private-synchronous:test -i "$album_art" "$song_title" "$song_artist - $song_album"
}
function show_mic_notif {
volume=$(get_mic_volume)
get_mic_icon
notify-send -e -t $notification_timeout -h string:x-canonical-private-synchronous:test -h int:value:$volume "$mic_icon $volume%"
}
function show_brightness_notif {
brightness=$(get_brightness)
get_brightness_icon
notify-send -e -t $notification_timeout -h string:x-canonical-private-synchronous:test -h int:value:$brightness "$brightness_icon $brightness%"
}
case $1 in
volume_up)
pactl set-sink-mute @DEFAULT_SINK@ 0
volume=$(get_volume)
if [ $(("$volume" + "$volume_step")) -gt $max_volume ]; then
pactl set-sink-volume @DEFAULT_SINK@ $max_volume%
else
pactl set-sink-volume @DEFAULT_SINK@ +$volume_step%
fi
show_volume_notif
;;
volume_down)
# Lowers volume and displays the notification
pactl set-sink-volume @DEFAULT_SINK@ -$volume_step%
show_volume_notif
;;
volume_mute)
# Toggles mute and displays the notification
pactl set-sink-mute @DEFAULT_SINK@ toggle
show_volume_notif
;;
# Brightness =========================================================
brightness_up)
# Increases brightness and displays the notification
brightnessctl s +$brightness_step%
show_brightness_notif
;;
brightness_down)
# Decreases brightness and displays the notification
brightnessctl s $brightness_step%-
show_brightness_notif
;;
# Media keys =========================================================
next)
# Skips to the next song and displays the notification
playerctl next
sleep 0.5 && show_music_notif
;;
prev)
# Skips to the previous song and displays the notification
playerctl previous
sleep 0.5 && show_music_notif
;;
play_pause)
# Pauses/resumes playback and displays the notification
playerctl play-pause
show_music_notif
;;
# Microphone =========================================================
mic_up)
# Unmutes and increases volume, then displays the notification
pactl set-source-mute @DEFAULT_SOURCE@ 0
mic_volume=$(get_mic_volume)
if [ $(("$mic_volume" + "$mic_volume_step")) -gt $mic_max_volume ]; then
pactl set-source-volume @DEFAULT_SOURCE@ $mic_max_volume%
else
pactl set-source-volume @DEFAULT_SOURCE@ +$mic_volume_step%
fi
show_mic_notif
;;
mic_down)
# Lowers volume and displays the notification
pactl set-source-volume @DEFAULT_SOURCE@ -$mic_volume_step%
show_mic_notif
;;
mic_mute)
pactl set-source-mute @DEFAULT_SOURCE@ toggle
show_mic_notif
;;
esac
pipectl -o -n mirror | wl-mirror -S eDP-1 &
psid=$!
while ps -C wl-mirror; do
cmd=$(notify-send --app-name="mirror" --action="freeze=Freeze Screen" --action="default=Stop Sharing" --action="unfreeze=Unfreeze Screen" "Options")
case "$cmd" in
"unfreeze")
echo --unfreeze | pipectl -i -n mirror
;;
"freeze")
echo --freeze | pipectl -i -n mirror
;;
"default")
kill -s TERM $psid
;;
esac
done
TIMESTAMP=$(date +%+4Y_%m_%d_%H_%M_%S_%N)
SCREENCAST_PATH="/home/innocentzero/Videos/recording_$TIMESTAMP.mp4"
geometry="$(slurp -b '#AFAFAFAF' -c '#3F3F3FAF' -s '#00000000' -w 3 -d)"
wf-recorder -g "$geometry" --audio=Combined.monitor -c h264_vaapi -d /dev/dri/renderD128 --file="$SCREENCAST_PATH" &
sleep 1
psid=$(ps -C wf-recorder | tail -n1 | awk '{print $1;}')
notify-send --app-name="wfrec" --action="default=Finish recording" "Finish recording"
kill -s TERM "$psid"
Nushell config
env
Prompt
$env.PROMPT_COMMAND = {|| }
$env.PROMPT_COMMAND_RIGHT = {|| }
$env.PROMPT_INDICATOR = {|| "> " }
$env.PROMPT_INDICATOR_VI_INSERT = {|| ": " }
$env.PROMPT_INDICATOR_VI_NORMAL = {|| "> " }
$env.PROMPT_MULTILINE_INDICATOR = {|| "::: " }
Env variables are converted from and to strings in nushell
$env.ENV_CONVERSIONS = {
"PATH": {
from_string: { |s| $s | split row (char esep) | path expand --no-symlink }
to_string: { |v| $v | path expand --no-symlink | str join (char esep) }
}
"Path": {
from_string: { |s| $s | split row (char esep) | path expand --no-symlink }
to_string: { |v| $v | path expand --no-symlink | str join (char esep) }
}
}
Library and plugin paths
$env.NU_LIB_DIRS = [
($nu.default-config-dir | path join 'scripts')
($nu.data-dir | path join 'completions')
]
$env.NU_PLUGIN_DIRS = [
($nu.default-config-dir | path join 'plugins')
]
tty support for GPG key signing
$env.GPG_TTY = (tty)
These help set the color for nmtui (and anything else that uses newt)
$env.NEWT_COLORS = "root=#EEEEEE,#0A0A0A
border=#a9b1d6,#0A0A0A
window=#a9b1d6,#0A0A0A
shadow=#0A0A0A,#0A0A0A
title=#a9b1d6,#0A0A0A
button=#a9b1d6,#0A0A0A
button_active=#7aa2f7,#0A0A0A
actbutton=#7aa2f7,#0A0A0A
compactbutton=#7aa2f7,#0A0A0A
checkbox=#a9b1d6,#0A0A0A
actcheckbox=#7aa2f7,#0A0A0A
entry=#a9b1d6,#0A0A0A
actentry=#7aa2f7,#0A0A0A
disentry=#7aa2f7,#0A0A0A
textbox=#a9b1d6,#0A0A0A
acttextbox=#7aa2f7,#0A0A0A
label=#a9b1d6,#0A0A0A
listbox=#a9b1d6,#0A0A0A
actlistbox=#7aa2f7,#0A0A0A
sellistbox=#7aa2f7,#0A0A0A
actsellistbox=#7aa2f7,#0A0A0A"
theme
let tokyonight = {
binary: '#bb9af7'
block: '#7aa2f7'
cell-path: '#a9b1d6'
closure: '#7dcfff'
custom: '#c0caf5'
duration: '#e0af68'
float: '#f7768e'
glob: '#c0caf5'
int: '#bb9af7'
list: '#7dcfff'
nothing: '#f7768e'
range: '#e0af68'
record: '#7dcfff'
string: '#9ece6a'
bool: {|| if $in { '#7dcfff' } else { '#e0af68' } }
datetime: {|| (date now) - $in |
if $in < 1hr {
{ fg: '#f7768e' attr: 'b' }
} else if $in < 6hr {
'#f7768e'
} else if $in < 1day {
'#e0af68'
} else if $in < 3day {
'#9ece6a'
} else if $in < 1wk {
{ fg: '#9ece6a' attr: 'b' }
} else if $in < 6wk {
'#7dcfff'
} else if $in < 52wk {
'#7aa2f7'
} else { 'dark_gray' }
}
filesize: {|e|
if $e == 0b {
'#a9b1d6'
} else if $e < 1mb {
'#7dcfff'
} else {{ fg: '#7aa2f7' }}
}
shape_and: { fg: '#bb9af7' attr: 'b' }
shape_binary: { fg: '#bb9af7' attr: 'b' }
shape_block: { fg: '#7aa2f7' attr: 'b' }
shape_bool: '#7dcfff'
shape_closure: { fg: '#7dcfff' attr: 'b' }
shape_custom: '#9ece6a'
shape_datetime: { fg: '#7dcfff' attr: 'b' }
shape_directory: '#7dcfff'
shape_external: '#7dcfff'
shape_external_resolved: '#7dcfff'
shape_externalarg: { fg: '#9ece6a' attr: 'b' }
shape_filepath: '#7dcfff'
shape_flag: { fg: '#7aa2f7' attr: 'b' }
shape_float: { fg: '#f7768e' attr: 'b' }
shape_garbage: { fg: '#FFFFFF' bg: '#FF0000' attr: 'b' }
shape_glob_interpolation: { fg: '#7dcfff' attr: 'b' }
shape_globpattern: { fg: '#7dcfff' attr: 'b' }
shape_int: { fg: '#bb9af7' attr: 'b' }
shape_internalcall: { fg: '#7dcfff' attr: 'b' }
shape_keyword: { fg: '#bb9af7' attr: 'b' }
shape_list: { fg: '#7dcfff' attr: 'b' }
shape_literal: '#7aa2f7'
shape_match_pattern: '#9ece6a'
shape_matching_brackets: { attr: 'u' }
shape_nothing: '#f7768e'
shape_operator: '#e0af68'
shape_or: { fg: '#bb9af7' attr: 'b' }
shape_pipe: { fg: '#bb9af7' attr: 'b' }
shape_range: { fg: '#e0af68' attr: 'b' }
shape_raw_string: { fg: '#c0caf5' attr: 'b' }
shape_record: { fg: '#7dcfff' attr: 'b' }
shape_redirection: { fg: '#bb9af7' attr: 'b' }
shape_signature: { fg: '#9ece6a' attr: 'b' }
shape_string: '#9ece6a'
shape_string_interpolation: { fg: '#7dcfff' attr: 'b' }
shape_table: { fg: '#7aa2f7' attr: 'b' }
shape_vardecl: { fg: '#7aa2f7' attr: 'u' }
shape_variable: '#bb9af7'
foreground: '#c0caf5'
background: '#24283b'
cursor: '#c0caf5'
empty: '#7aa2f7'
header: { fg: '#9ece6a' attr: 'b' }
hints: '#414868'
leading_trailing_space_bg: { attr: 'n' }
row_index: { fg: '#9ece6a' attr: 'b' }
search_result: { fg: '#f7768e' bg: '#a9b1d6' }
separator: '#a9b1d6'
}
shell config
Meta stuff
$env.config.show_banner = false
$env.config.error_style = "fancy"
$env.config.filesize.unit = "metric"
$env.config.color_config = $tokyonight
$env.config.footer_mode = 25
$env.config.float_precision = 2
$env.config.buffer_editor = ""
$env.config.use_ansi_coloring = true
$env.config.bracketed_paste = true
$env.config.edit_mode = "vi"
$env.config.use_kitty_protocol = true
$env.config.highlight_resolved_externals = false
$env.config.recursion_limit = 50
ls and rm
$env.config.ls = {use_ls_colors: true, clickable_links: false}
$env.config.rm = {always_trash: true}
table definitions
$env.config.table = {
mode: rounded
index_mode: always
show_empty: true
padding: {left: 1, right: 1}
trim: {
methodology: truncating
truncating_suffix: "..."
}
header_on_separator: false
}
History
$env.config.history = {
max_size: 100_000
sync_on_enter: false
file_format: "sqlite"
isolation: true
}
Cursor shape
$env.config.cursor_shape = {
vi_insert: line
vi_normal: block
}
Shell protocols
$env.config.shell_integration = {
osc2: true
osc7: true
osc8: true
osc9_9: false
osc133: true
osc633: true
reset_application_mode: true
}
garbage collection
$env.config.plugin_gc = {
default: {
enabled: true
stop_after: 10sec
}
}
completions
$env.config.completions = {
case_sensitive: false
quick: true
partial: true
algorithm: "prefix"
external: {
enable: true
max_results: 100
completer: null
}
use_ls_colors: true
}
let fish_completer = {|spans|
fish --command $"complete '--do-complete=($spans | str join ' ')'"
| from tsv --flexible --noheaders --no-infer
| rename value description
| update value {
if ($in | path exists) {$'"($in | str replace "\"" "\\\"" )"'} else {$in}
}
}
let external_completer = {|spans|
let expanded_alias = scope aliases
| where name == $spans.0
| get -o 0.expansion
let spans = if $expanded_alias != null {
$spans
| skip 1
| prepend ($expanded_alias | split row ' ' | take 1)
} else {
$spans
}
do $fish_completer $spans
}
$env.config.completions.external.completer = $external_completer
Hooks
⠀⠀⠀⠀⠀⠀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠹⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠘⢷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠈⢿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠻⣆⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣠⣤⣴⣶⣦⡀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣽⣿⣶⣶⣶⣶⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⣠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀
⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀
⠀⠀⠀⢀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⠀⠀
⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠀⠀⠀
⠀⠀⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⢿⣿⣿⣿⣿⣿⠟⠀⠀⠀⠀
⠀⠀⠀⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠙⠻⠿⠋⠁⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠈⠛⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠙⠉⠉⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
$env.config.hooks = {
# pre_prompt: [{ cat ~/.config/nushell/ginkgo.txt }]
display_output: "if (term size).columns >= 100 { table -e } else { table }"
}
Keybinds
$env.config.keybindings = [
{
name: completion_menu
modifier: none
keycode: tab
mode: [emacs vi_normal vi_insert]
event: {
until: [
{ send: menu name: completion_menu }
{ send: menunext }
{ edit: complete }
]
}
}
{
name: ide_completion_menu
modifier: control
keycode: char_n
mode: [emacs vi_normal vi_insert]
event: {
until: [
{ send: menu name: ide_completion_menu }
{ send: menunext }
{ edit: complete }
]
}
}
{
name: history_menu
modifier: control
keycode: char_r
mode: [emacs, vi_insert, vi_normal]
event: { send: menu name: history_menu }
}
{
name: help_menu
modifier: none
keycode: f1
mode: [emacs, vi_insert, vi_normal]
event: { send: menu name: help_menu }
}
{
name: completion_previous_menu
modifier: shift
keycode: backtab
mode: [emacs, vi_normal, vi_insert]
event: { send: menuprevious }
}
{
name: next_page_menu
modifier: control
keycode: char_x
mode: emacs
event: { send: menupagenext }
}
{
name: undo_or_previous_page_menu
modifier: control
keycode: char_z
mode: emacs
event: {
until: [
{ send: menupageprevious }
{ edit: undo }
]
}
}
{
name: escape
modifier: none
keycode: escape
mode: [emacs, vi_normal, vi_insert]
event: { send: esc } # NOTE: does not appear to work
}
{
name: cancel_command
modifier: control
keycode: char_c
mode: [emacs, vi_normal, vi_insert]
event: { send: ctrlc }
}
{
name: quit_shell
modifier: control
keycode: char_d
mode: [emacs, vi_normal, vi_insert]
event: { send: ctrld }
}
{
name: clear_screen
modifier: control
keycode: char_l
mode: [emacs, vi_normal, vi_insert]
event: [
{
send: clearscreen
}
]
}
{
name: search_history
modifier: control
keycode: char_q
mode: [emacs, vi_normal, vi_insert]
event: { send: searchhistory }
}
{
name: open_command_editor
modifier: control
keycode: char_o
mode: [emacs, vi_normal, vi_insert]
event: { send: openeditor }
}
{
name: move_up
modifier: none
keycode: up
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{ send: menuup }
{ send: up }
]
}
}
{
name: move_down
modifier: none
keycode: down
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{ send: menudown }
{ send: down }
]
}
}
{
name: move_left
modifier: none
keycode: left
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{ send: menuleft }
{ send: left }
]
}
}
{
name: move_right_or_take_history_hint
modifier: none
keycode: right
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{ send: historyhintcomplete }
{ send: menuright }
{ send: right }
]
}
}
{
name: move_one_word_left
modifier: control
keycode: left
mode: [emacs, vi_normal, vi_insert]
event: { edit: movewordleft }
}
{
name: move_one_word_right_or_take_history_hint
modifier: control
keycode: right
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{ send: historyhintwordcomplete }
{ edit: movewordright }
]
}
}
{
name: move_to_line_start
modifier: none
keycode: home
mode: [emacs, vi_normal, vi_insert]
event: { edit: movetolinestart }
}
{
name: move_to_line_start
modifier: control
keycode: char_a
mode: [emacs, vi_normal, vi_insert]
event: { edit: movetolinestart }
}
{
name: move_to_line_end_or_take_history_hint
modifier: none
keycode: end
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{ send: historyhintcomplete }
{ edit: movetolineend }
]
}
}
{
name: move_to_line_end_or_take_history_hint
modifier: control
keycode: char_e
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{ send: historyhintcomplete }
{ edit: movetolineend }
]
}
}
{
name: move_to_line_start
modifier: control
keycode: home
mode: [emacs, vi_normal, vi_insert]
event: { edit: movetolinestart }
}
{
name: move_to_line_end
modifier: control
keycode: end
mode: [emacs, vi_normal, vi_insert]
event: { edit: movetolineend }
}
{
name: move_up
modifier: control
keycode: char_p
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{ send: menuup }
{ send: up }
]
}
}
{
name: move_down
modifier: control
keycode: char_t
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{ send: menudown }
{ send: down }
]
}
}
{
name: delete_one_character_backward
modifier: none
keycode: backspace
mode: [emacs, vi_insert]
event: { edit: backspace }
}
{
name: delete_one_word_backward
modifier: control
keycode: backspace
mode: [emacs, vi_insert]
event: { edit: backspaceword }
}
{
name: delete_one_character_forward
modifier: none
keycode: delete
mode: [emacs, vi_insert]
event: { edit: delete }
}
{
name: delete_one_character_forward
modifier: control
keycode: delete
mode: [emacs, vi_insert]
event: { edit: delete }
}
{
name: delete_one_character_backward
modifier: control
keycode: char_h
mode: [emacs, vi_insert]
event: { edit: backspace }
}
{
name: delete_one_word_backward
modifier: control
keycode: char_w
mode: [emacs, vi_insert]
event: { edit: backspaceword }
}
{
name: move_left
modifier: none
keycode: backspace
mode: vi_normal
event: { edit: moveleft }
}
{
name: newline_or_run_command
modifier: none
keycode: enter
mode: emacs
event: { send: enter }
}
{
name: move_left
modifier: control
keycode: char_b
mode: emacs
event: {
until: [
{ send: menuleft }
{ send: left }
]
}
}
{
name: move_right_or_take_history_hint
modifier: control
keycode: char_f
mode: emacs
event: {
until: [
{ send: historyhintcomplete }
{ send: menuright }
{ send: right }
]
}
}
{
name: redo_change
modifier: control
keycode: char_g
mode: emacs
event: { edit: redo }
}
{
name: undo_change
modifier: control
keycode: char_z
mode: emacs
event: { edit: undo }
}
{
name: paste_before
modifier: control
keycode: char_y
mode: emacs
event: { edit: pastecutbufferbefore }
}
{
name: cut_word_left
modifier: control
keycode: char_w
mode: emacs
event: { edit: cutwordleft }
}
{
name: cut_line_to_end
modifier: control
keycode: char_k
mode: emacs
event: { edit: cuttoend }
}
{
name: cut_line_from_start
modifier: control
keycode: char_u
mode: emacs
event: { edit: cutfromstart }
}
{
name: swap_graphemes
modifier: control
keycode: char_t
mode: emacs
event: { edit: swapgraphemes }
}
{
name: move_one_word_left
modifier: alt
keycode: left
mode: emacs
event: { edit: movewordleft }
}
{
name: move_one_word_right_or_take_history_hint
modifier: alt
keycode: right
mode: emacs
event: {
until: [
{ send: historyhintwordcomplete }
{ edit: movewordright }
]
}
}
{
name: move_one_word_left
modifier: alt
keycode: char_b
mode: emacs
event: { edit: movewordleft }
}
{
name: move_one_word_right_or_take_history_hint
modifier: alt
keycode: char_f
mode: emacs
event: {
until: [
{ send: historyhintwordcomplete }
{ edit: movewordright }
]
}
}
{
name: delete_one_word_forward
modifier: alt
keycode: delete
mode: emacs
event: { edit: deleteword }
}
{
name: delete_one_word_backward
modifier: alt
keycode: backspace
mode: emacs
event: { edit: backspaceword }
}
{
name: delete_one_word_backward
modifier: alt
keycode: char_m
mode: emacs
event: { edit: backspaceword }
}
{
name: cut_word_to_right
modifier: alt
keycode: char_d
mode: emacs
event: { edit: cutwordright }
}
{
name: upper_case_word
modifier: alt
keycode: char_u
mode: emacs
event: { edit: uppercaseword }
}
{
name: lower_case_word
modifier: alt
keycode: char_l
mode: emacs
event: { edit: lowercaseword }
}
{
name: capitalize_char
modifier: alt
keycode: char_c
mode: emacs
event: { edit: capitalizechar }
}
# The following bindings with `*system` events require that Nushell has
# been compiled with the `system-clipboard` feature.
# This should be the case for Windows, macOS, and most Linux distributions
# Not available for example on Android (termux)
# If you want to use the system clipboard for visual selection or to
# paste directly, uncomment the respective lines and replace the version
# using the internal clipboard.
{
name: copy_selection
modifier: control_shift
keycode: char_c
mode: emacs
event: { edit: copyselection }
# event: { edit: copyselectionsystem }
}
{
name: cut_selection
modifier: control_shift
keycode: char_x
mode: emacs
event: { edit: cutselection }
}
{
name: select_all
modifier: control_shift
keycode: char_a
mode: emacs
event: { edit: selectall }
}
]
Menus
$env.config.menus = [
{
name: completion_menu
only_buffer_difference: false
marker: "| "
type: {
layout: columnar
columns: 4
col_width: 20
col_padding: 2
}
style: {
text: cyan
selected_text: { attr: b }
description_text: violet
match_text: { attr: u }
selected_match_text: { attr: ub }
}
}
{
name: ide_completion_menu
only_buffer_difference: false
marker: "| "
type: {
layout: ide
min_completion_width: 0,
max_completion_width: 50,
max_completion_height: 10,
padding: 0,
border: true,
cursor_offset: 0,
description_mode: "prefer_right"
min_description_width: 0
max_description_width: 50
max_description_height: 10
description_offset: 1
correct_cursor_pos: false
}
style: {
text: cyan
selected_text: { attr: b }
description_text: violet
match_text: { attr: u }
selected_match_text: { attr: ub }
}
}
{
name: history_menu
only_buffer_difference: true
marker: "? "
type: {
layout: list
page_size: 10
}
style: {
text: cyan
selected_text: { attr: b }
description_text: violet
}
}
{
name: help_menu
only_buffer_difference: true
marker: "? "
type: {
layout: description
columns: 4
col_width: 20
col_padding: 2
selection_rows: 4
description_rows: 10
}
style: {
text: cyan
selected_text: { attr: b }
description_text: violet
}
}
]
meta stuff
def gl [] {
git log --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD -n 5 | lines
| split column "»¦«" commit subject name email date
| upsert date {|d| $d.date | into datetime}
}
External scripts
get all of the below in config
source zoxide.nu
source typst-completions.nu
source cargo-completions.nu
source hx.nu
cat ~/.config/nushell/ginkgo.txt
zoxide
Add cd hooks
export-env {
$env.config = (
$env.config?
| default {}
| upsert hooks { default {} }
| upsert hooks.env_change { default {} }
| upsert hooks.env_change.PWD { default [] }
)
let __zoxide_hooked = (
$env.config.hooks.env_change.PWD | any { try { get __zoxide_hook } catch { false } }
)
if not $__zoxide_hooked {
$env.config.hooks.env_change.PWD = ($env.config.hooks.env_change.PWD | append {
__zoxide_hook: true,
code: {|_, dir| zoxide add -- $dir}
})
}
}
Define direct jumping
def --env --wrapped __zoxide_z [...rest: string] {
let path = match $rest {
[] => {'~'},
[ '-' ] => {'-'},
[ $arg ] if ($arg | path expand | path type) == 'dir' => {$arg}
_ => {
zoxide query --exclude $env.PWD -- ...$rest | str trim -r -c "\n"
}
}
cd $path
}
Completer and functions
def "nu-complete zoxide path" [context: string] {
let parts = $context | split row " " | skip 1
{
options: {
sort: false
completion_algorithm: prefix
positional: false
case_sensitive: false
}
completions: (zoxide query --list --exclude $env.PWD -- ...$parts | lines)
}
}
def --env --wrapped z [...rest: string@"nu-complete zoxide path"] {
__zoxide_z ...$rest
}
Typst completions
Verbosity and commands
def verbosity [] {
[
{value:0, description:"none"}
{value:1, description:"warning & error"}
{value:2, description:"info"}
{value:3, description:"debug"}
{value:4, description:"trace"}
]
}
def commands [] {
[
"compile"
"watch"
"fonts"
"help"
]
}
main command completions
export extern "typst" [
command?: string@commands
--font-path: path
--root: path
--verbosity(-v): number@"verbosity"
--help(-h)
--version(-V)
]
compile command completions
export extern "typst compile" [
input: path # Path to the input file
output?: path # Path to the output file
--open # Opens the output file after compilation using the default PDF viewer
--flamegraph # Produces a flamegraph of the compilation process and saves it to the given file or to `flamegraph.svg` in the current working directory
--help(-h) # Print help
]
watch command completions
export extern "typst watch" [
input: path
output?: path
--open
--flamegraph
--help(-h)
]
fonts command completion
export extern "typst fonts" [
--variants
--help(-h)
]
help completions
export extern "typst help" [
command?: string@commands
]
Aliases
alias "typst c" = typst compile
alias "typst w" = typst watch
Cargo
def "nu-complete cargo targets" [type: string] {
^cargo metadata --format-version=1 --offline --no-deps | from json | get packages.targets | flatten | where ($type in $it.kind) | get name
}
def "nu-complete cargo bins" [] { nu-complete cargo targets bin }
def "nu-complete cargo examples" [] { nu-complete cargo targets example }
def "nu-complete cargo packages" [] {
let metadata = (^cargo metadata --format-version=1 --offline --no-deps)
if $metadata == '' {
[]
} else {
$metadata | from json | get workspace_members | split column ' ' | get column1
}
}
def "nu-complete cargo color" [] {
['auto', 'always', 'never']
}
def "nu-complete cargo profiles" [] {
open Cargo.toml | get profile | transpose | get column0
}
def "nu-complete cargo features" [] {
open Cargo.toml | get features | transpose | get column0
}
def "nu-complete cargo subcommands" [] {
^cargo --list | lines | skip 1 | str join "\n" | from ssv --noheaders | get column1
}
def "nu-complete cargo vcs" [] {
[
'git',
'hg',
'pijul',
'fossil',
'none'
]
}
export extern "cargo build" [
--package(-p): string@"nu-complete cargo packages"
--workspace
--exclude: string@"nu-complete cargo packages"
--lib
--bin: string@"nu-complete cargo bins"
--bins
--example: string@"nu-complete cargo examples"
--examples
--test: string
--tests
--bench: string
--benches
--all-targets
--features(-F): string@"nu-complete cargo features"
--all-features
--no-default-features
--target: string
--release(-r)
--profile: string@"nu-complete cargo profiles"
--ignore-rust-version
--timings: string
--target-dir: path
--out-dir: path
--verbose(-v)
--quiet(-q)
--color: string@"nu-complete cargo color"
--message-format: string
--build-plan
--manifest-path: path
--frozen
--locked
--offline
-Z: any
-h, --help
--jobs(-j): number
--future-incompat-report
]
export extern "cargo check" [
--package(-p): string@"nu-complete cargo packages"
--workspace
--all
--exclude: string@"nu-complete cargo packages"
--lib
--bin: string@"nu-complete cargo bins"
--example: string@"nu-complete cargo examples"
--examples
--test: string
--tests
--bench: string
--benches
--all-targets
--features(-F): string@"nu-complete cargo features"
--all-features
--no-default-features
--target: string
--release(-r)
--profile: string@"nu-complete cargo profiles"
--ignore-rust-version
--timings: string
--target-dir: path
--verbose(-v)
--quiet(-q)
--color: string@"nu-complete cargo color"
--message-format: string
--manifest-path: path
--frozen
--locked
--offline
-Z: any
-h, --help
--jobs(-j): number
--keep-going
--future-incompat-report
]
export extern "cargo clean" [
--package(-p): string@"nu-complete cargo packages"
--doc
--release
--profile
--target-dir: path
--target: string
--verbose(-v)
--quiet(-q)
--color: string@"nu-complete cargo color"
--message-format: string
--manifest-path: path
--frozen
--locked
--offline
-Z: any
-h, --help
]
export extern "cargo doc" [
--open
--no-deps
--document-private-items
--package(-p): string@"nu-complete cargo packages"
--workspace
--exclude: string@"nu-complete cargo packages"
--lib: string
--bin: string@"nu-complete cargo bins"
--bins
--example: string@"nu-complete cargo examples"
--examples
--features(-F): string@"nu-complete cargo features"
--all-features
--no-default-features
--target: string
--release(-r)
--profile: string@"nu-complete cargo profiles"
--ignore-rust-version
--timings: string
--target-dir: path
--verbose(-v)
--quiet(-q)
--color: string@"nu-complete cargo color"
--message-format: string
--manifest-path: path
--frozen
--locked
--offline
-Z: any
-h, --help
--jobs(-j): number
--keep-going
]
export extern "cargo new" [
path: path
--bin
--lib
--edition: number
--name: string
--vcs: string@"nu-complete cargo vcs"
--registry: string
--verbose(-v)
--quiet(-q)
--color: string@"nu-complete cargo color"
-Z: any
-h, --help
]
export extern "cargo init" [
path: path
--bin
--lib
--edition: number
--name: string
--vcs: string@"nu-complete cargo vcs"
--registry: string
--verbose(-v)
--quiet(-q)
--color: string@"nu-complete cargo color"
-Z: any
-h, --help
]
export extern "cargo run" [
...args: any
--bin: string@"nu-complete cargo bins"
--example: string@"nu-complete cargo examples"
--quiet(-q)
--package(-p): string@"nu-complete cargo packages"
--jobs(-j): number
--release
--profile: string@"nu-complete cargo profiles"
--features(-F): string@"nu-complete cargo features"
--all-features
--no-default-features
--target: string
--target-dir: path
--manifest-path: path
--message-format: string
--unit-graph
--ignore-rust-version
--verbose(-v)
--color: string@"nu-complete cargo color"
--frozen
--locked
--offline
--config: string
-Z: string
--help(-h)
]
export extern "cargo test" [
test_arg_separator?: string
...args: any
--no-run
--no-fail-fast
--package(-p): string@"nu-complete cargo packages"
--workspace
--exclude: string@"nu-complete cargo packages"
--lib
--bin: string@"nu-complete cargo bins"
--bins
--example: string@"nu-complete cargo examples"
--examples
--test: string
--tests
--bench: string
--benches
--all-targets
--doc
--features(-F): string@"nu-complete cargo features"
--all-features
--no-default-features
--target: string
--release(-r)
--profile: string@"nu-complete cargo profiles"
--ignore-rust-version
--timings: string
--target-dir: path
--verbose(-v)
--quiet(-q)
--color: string@"nu-complete cargo color"
--message-format: string
--manifest-path: path
--frozen
--locked
--offline
--help(-h)
-Z: any
--jobs(-j): number
--keep-going
--future-incompat-report
]
export extern "cargo bench" [
bench_option_separator?: string
...options: any
--no-run
--no-fail-fast
--package(-p): string@"nu-complete cargo packages"
--workspace
--exclude: string@"nu-complete cargo packages"
--lib
--bin: string@"nu-complete cargo bins"
--bins
--example: string@"nu-complete cargo examples"
--examples
--test: string
--tests
--bench: string
--benches
--all-targets
--features(-F): string@"nu-complete cargo features"
--all-features
--no-default-features
--target: string
--profile: string@"nu-complete cargo profiles"
--ignore-rust-version
--timings: string
--target-dir: path
--verbose(-v)
--quiet(-q)
--color: string@"nu-complete cargo color"
--message-format: string
--build-plan
--manifest-path: path
--frozen
--locked
--offline
-Z: any
-h, --help
--jobs(-j): number
--keep-going
]
export extern "cargo update" [
--package(-p): string@"nu-complete cargo packages"
--aggressive
--precise: any
--workspace(-w)
--dry-run
--verbose(-v)
--quiet(-q)
--color: string@"nu-complete cargo color"
--manifest-path: path
--frozen
--locked
--offline
--help(-h)
-Z: any
]
export extern "cargo search" [
query: string
--limit: number
--index: string
--registry: string
--verbose(-v)
--quiet(-q)
--color: string@"nu-complete cargo color"
--help(-h)
-Z: any
]
export extern "cargo publish" [
--dry-run
--token: any
--no-verify
--allow-dirty
--index: string
--registry: string
--package(-p): string@"nu-complete cargo packages"
--target: string
--target-dir: path
--features(-F): string@"nu-complete cargo features"
--all-features
--no-default-features
--verbose(-v)
--quiet(-q)
--color: string@"nu-complete cargo color"
--manifest-path: path
--frozen
--locked
--offline
--help(-h)
-Z: any
--jobs(-j): number
--keep-going
]
export extern "cargo install" [
crate?: string
--version: string
--vers: string
--git: string
--branch: string
--tag: string
--rev: string
--path: path
--list
--force(-f)
--no-track
--bin: string@"nu-complete cargo bins"
--bins
--example: string@"nu-complete cargo examples"
--examples
--root: path
--registry: string
--index: string
--features(-F): string@"nu-complete cargo features"
--all-features
--no-default-features
--target: string
--target-dir: path
--debug
--profile: string@"nu-complete cargo profiles"
--timings: string
--frozen
--locked
--offline
--jobs(-j): number
--verbose(-v)
--quiet(-q)
--color: string@"nu-complete cargo color"
--message-format: string
-Z: any
-h, --help
]
export extern "cargo uninstall" [
package?: string@"nu-complete cargo packages"
--package(-p): string@"nu-complete cargo packages"
--bin: string@"nu-complete cargo bins"
--root: path
--verbose(-v)
--quiet(-q)
--color: string@"nu-complete cargo color"
-Z: any
-h, --help
]
export extern "cargo metadata" [
--no-deps
--format-version: number
--filter-platform: string
--features(-F): string@"nu-complete cargo features"
--all-features
--no-default-features
--verbose(-v)
--quiet(-q)
--color: string@"nu-complete cargo color"
--manifest-path: path
--frozen
--locked
--offline
--help(-h)
-Z: any
]
export extern "cargo help" [
subcommand: string@"nu-complete cargo subcommands"
--color: string@"nu-complete cargo color"
--config: string
--frozen
--locked
--offline
--verbose(-v)
-Z: any
]
export extern "cargo clippy" [
--no-deps
--fix
--version(-V)
--help(-h)
--warn(-W)
--allow(-A)
--deny(-D)
--forbid(-F)
--package(-p): string@"nu-complete cargo packages"
--workspace
--all
--exclude: string@"nu-complete cargo packages"
--lib
--bin: string@"nu-complete cargo bins"
--example: string@"nu-complete cargo examples"
--examples
--test: string
--tests
--bench: string
--benches
--all-targets
--features(-F): string@"nu-complete cargo features"
--all-features
--no-default-features
--target: string
--release(-r)
--profile: string@"nu-complete cargo profiles"
--ignore-rust-version
--timings: string
--target-dir: path
--verbose(-v)
--quiet(-q)
--color: string@"nu-complete cargo color"
--message-format: string
--manifest-path: path
--frozen
--locked
--offline
-Z: any
-h, --help
--jobs(-j): number
--keep-going
--future-incompat-report
-Z: any
]
export extern "cargo install-update" [
--all(-a)
--allow-no-update(-i)
--downdate(-d)
--force(-f)
--git(-g)
--help(-h)
--list(-l)
--quiet(-q)
--version(-V)
--cargo-dir(-c)
--filter(-s)
--install-cargo(-r)
--temp-dir(-t)
]
export extern "cargo add" [
--no-default-features
--default-features
--features(-F)
--optional
--verbose(-v)
--no-optional
--color: string@"nu-complete cargo color"
--rename
--locked
--package(-p)
--offline
--quiet(-q)
--config
--dry-run
--help(-h)
--path
--git
--branch
--tag
--rev
--registry
--dev
--build
--target
...args
]
Helix completions
Health categories
def health_categories [] {
let languages = ^hx --health languages | detect columns | get Language | where { $in != null }
let completions = [ "all", "clipboard", "languages" ] | append $languages
return $completions
}
grammar categories
def grammar_categories [] { ["fetch", "build"] }
completion
export extern helix [
--help(-h),
--tutor,
--health: string@health_categories,
--grammar(-g): string@grammar_categories,
--config(-c): glob,
-v,
--log: glob,
--version(-V),
--vsplit,
--hsplit,
--working-dir(-w): glob,
...files: glob,
]
Aliasing
export alias hx = helix
Rofi
Gen config
configuration {
show-icons: true;
sidebar-mode: true;
hover-select: true;
me-select-entry: "";
modi: "drun,filebrowser,window";
me-accept-entry: [MousePrimary];
kb-mode-next: "Alt+l";
kb-mode-previous: "Alt+h";
}
*{
font: "ProFontWindows Nerd Font 19"; //Font
//Colors
foreground:#CCCCCC; //Text
background:#0A0A0A; //Background
accent:#EEEEEE; //Highlight
foreground-selection:@foreground; //Selection_fg
background-selection:#555555; //Selection_bg
transparent: #ffffff00;
background-color: @transparent;
text-color: @foreground;
selected-normal-foreground: @foreground-selection;
normal-foreground: @foreground;
alternate-normal-background: @transparent;
selected-urgent-foreground: @foreground;
urgent-foreground: @foreground;
alternate-urgent-background: @background;
active-foreground: @accent;
selected-active-foreground: @background-selection;
alternate-normal-foreground: @foreground;
alternate-active-background: @background;
bordercolor: @background;
normal-background: @transparent;
selected-normal-background: @background-selection;
separatorcolor: @accent;
urgent-background: @accent;
alternate-urgent-foreground: @foreground;
selected-urgent-background: @accent;
alternate-active-foreground: @foreground;
selected-active-background: @transparent;
active-background: @transparent;
}
window {
text-color: @foreground;
background-color: @background;
border-radius: 6px;
padding: 10;
}
mainbox {
border: 0;
padding: 0;
}
textbox {
text-color: @foreground;
background-color: #0A0A0A;
}
listview {
spacing: 4px;
dynamic: true;
columns: 2;
fixed-height: false;
border: 0;
scrollbar: false;
text-color: @separatorcolor;
}
element {
border: 0;
padding: 0;
border-radius: 4px;
}
element-text {
background-color: inherit;
text-color: inherit;
}
element.normal.normal {
text-color: @normal-foreground;
background-color: @normal-background;
}
element.normal.urgent {
text-color: @urgent-foreground;
background-color: @urgent-background;
}
element.normal.active {
text-color: @active-foreground;
background-color: @active-background;
}
element.selected.normal {
text-color: @selected-normal-foreground;
background-color: @selected-normal-background;
}
element.selected.urgent {
text-color: @selected-urgent-foreground;
background-color: @selected-urgent-background;
}
element.selected.active {
text-color: @selected-active-foreground;
background-color: @selected-active-background;
}
element.alternate.normal {
text-color: @alternate-normal-foreground;
background-color: @alternate-normal-background;
}
element.alternate.urgent {
text-color: @alternate-urgent-foreground;
background-color: @alternate-urgent-background;
}
element.alternate.active {
text-color: @alternate-active-foreground;
background-color: @alternate-active-background;
}
mode-switcher {
border: 0;
}
button selected {
text-color: @selected-normal-foreground;
background-color: @selected-normal-background;
}
button normal {
text-color: @foreground;
}
inputbar {
children: [textbox-prompt-colon,entry];
}
textbox-prompt-colon{
expand: false;
margin: 0 10px 0 0;
border-radius: 5px;
str: " Type ";
background-color: #cccccc;
text-color: #0a0a0a;
}
entry {
placeholder: "Begin Typing";
}
Network
# Default Values
LOCATION=0
QRCODE_LOCATION=$LOCATION
Y_AXIS=0
X_AXIS=0
NOTIFICATIONS="off"
QRCODE_DIR="/tmp/"
WIDTH_FIX_MAIN=1
WIDTH_FIX_STATUS=10
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PASSWORD_ENTER="if connection is stored,hit enter/esc."
WIRELESS_INTERFACES=($(nmcli device | awk '$2=="wifi" {print $1}'))
WIRELESS_INTERFACES_PRODUCT=()
WLAN_INT=0
WIRED_INTERFACES=($(nmcli device | awk '$2=="ethernet" {print $1}'))
WIRED_INTERFACES_PRODUCT=()
ASCII_OUT=false
CHANGE_BARS=false
SIGNAL_STRENGTH_0="0"
SIGNAL_STRENGTH_1="1"
SIGNAL_STRENGTH_2="12"
SIGNAL_STRENGTH_3="123"
SIGNAL_STRENGTH_4="1234"
VPN_PATTERN='(wireguard|vpn)'
function initialization() {
for i in "${WIRELESS_INTERFACES[@]}"; do WIRELESS_INTERFACES_PRODUCT+=("$(nmcli -f general.product device show "$i" | awk '{print $2}')"); done
for i in "${WIRED_INTERFACES[@]}"; do WIRED_INTERFACES_PRODUCT+=("$(nmcli -f general.product device show "$i" | awk '{print $2}')"); done
wireless_interface_state && ethernet_interface_state
}
function notification() {
[[ "$NOTIFICATIONS" == "true" && -x "$(command -v notify-send)" ]] && notify-send -r "5" -u "normal" $1 "$2"
}
function wireless_interface_state() {
[[ ${#WIRELESS_INTERFACES[@]} -eq "0" ]] || {
ACTIVE_SSID=$(nmcli device status | grep "^${WIRELESS_INTERFACES[WLAN_INT]}." | awk '{print $4}')
WIFI_CON_STATE=$(nmcli device status | grep "^${WIRELESS_INTERFACES[WLAN_INT]}." | awk '{print $3}')
{ [[ "$WIFI_CON_STATE" == "unavailable" ]] && WIFI_LIST="***Wi-Fi Disabled***" && WIFI_SWITCH="~Wi-Fi On" && OPTIONS="${WIFI_LIST}\n${WIFI_SWITCH}\n~Scan\n"; } || { [[ "$WIFI_CON_STATE" =~ "connected" ]] && {
PROMPT=${WIRELESS_INTERFACES_PRODUCT[WLAN_INT]}[${WIRELESS_INTERFACES[WLAN_INT]}]
WIFI_LIST=$(nmcli --fields SSID,SECURITY,BARS device wifi list ifname "${WIRELESS_INTERFACES[WLAN_INT]}")
wifi_list
[[ "$ACTIVE_SSID" == "--" ]] && WIFI_SWITCH="~Scan\n~Manual/Hidden\n~Wi-Fi Off" || WIFI_SWITCH="~Scan\n~Disconnect\n~Manual/Hidden\n~Wi-Fi Off"
OPTIONS="${WIFI_LIST}\n${WIFI_SWITCH}\n"
}; }
}
}
function ethernet_interface_state() {
[[ ${#WIRED_INTERFACES[@]} -eq "0" ]] || {
WIRED_CON_STATE=$(nmcli device status | grep "ethernet" | head -1 | awk '{print $3}')
{ [[ "$WIRED_CON_STATE" == "disconnected" ]] && WIRED_SWITCH="~Eth On"; } || { [[ "$WIRED_CON_STATE" == "connected" ]] && WIRED_SWITCH="~Eth Off"; } || { [[ "$WIRED_CON_STATE" == "unavailable" ]] && WIRED_SWITCH="***Wired Unavailable***"; } || { [[ "$WIRED_CON_STATE" == "connecting" ]] && WIRED_SWITCH="***Wired Initializing***"; }
OPTIONS="${OPTIONS}${WIRED_SWITCH}\n"
}
}
function rofi_menu() {
{ [[ ${#WIRELESS_INTERFACES[@]} -gt "1" ]] && OPTIONS="${OPTIONS}~Change Wifi Interface\n~More Options"; } || { OPTIONS="${OPTIONS}~More Options"; }
{ [[ "$WIRED_CON_STATE" == "connected" ]] && PROMPT="${WIRED_INTERFACES_PRODUCT}[$WIRED_INTERFACES]"; } || PROMPT="${WIRELESS_INTERFACES_PRODUCT[WLAN_INT]}[${WIRELESS_INTERFACES[WLAN_INT]}]"
SELECTION=$(echo -e "$OPTIONS" | rofi_cmd "$OPTIONS" $WIDTH_FIX_MAIN "-a 0")
SSID=$(echo "$SELECTION" | sed "s/\s\{2,\}/\|/g" | awk -F "|" '{print $1}')
selection_action
}
function rofi_cmd() {
{ [[ -n "${1}" ]] && WIDTH=$(echo -e "$1" | awk '{print length}' | sort -n | tail -1) && ((WIDTH += $2)) && ((WIDTH = WIDTH / 2)); } || { ((WIDTH = $2 / 2)); }
rofi -dmenu -mesg
}
function change_wireless_interface() {
{ [[ ${#WIRELESS_INTERFACES[@]} -eq "2" ]] && { [[ $WLAN_INT -eq "0" ]] && WLAN_INT=1 || WLAN_INT=0; }; } || {
LIST_WLAN_INT=""
for i in "${!WIRELESS_INTERFACES[@]}"; do LIST_WLAN_INT=("${LIST_WLAN_INT[@]}${WIRELESS_INTERFACES_PRODUCT[$i]}[${WIRELESS_INTERFACES[$i]}]\n"); done
LIST_WLAN_INT[-1]=${LIST_WLAN_INT[-1]::-2}
CHANGE_WLAN_INT=$(echo -e "${LIST_WLAN_INT[@]}" | rofi_cmd "${LIST_WLAN_INT[@]}" $WIDTH_FIX_STATUS)
for i in "${!WIRELESS_INTERFACES[@]}"; do [[ $CHANGE_WLAN_INT == "${WIRELESS_INTERFACES_PRODUCT[$i]}[${WIRELESS_INTERFACES[$i]}]" ]] && WLAN_INT=$i && break; done
}
wireless_interface_state && ethernet_interface_state
rofi_menu
}
function scan() {
[[ "$WIFI_CON_STATE" =~ "unavailable" ]] && change_wifi_state "Wi-Fi" "Enabling Wi-Fi connection" "on" && sleep 2
notification "-t 0 Wifi" "Please Wait Scanning"
WIFI_LIST=$(nmcli --fields SSID,SECURITY,BARS device wifi list ifname "${WIRELESS_INTERFACES[WLAN_INT]}" --rescan yes)
wifi_list
wireless_interface_state && ethernet_interface_state
notification "-t 1 Wifi" "Please Wait Scanning"
rofi_menu
}
function wifi_list() {
WIFI_LIST=$(echo -e "$WIFI_LIST" | awk -F' +' '{ if (!seen[$1]++) print}' | awk '$1!="--" {print}' | awk '$1 !~ "^'"${ACTIVE_SSID}"'"')
[[ $ASCII_OUT == "true" ]] && WIFI_LIST=$(echo -e "$WIFI_LIST" | sed 's/\(..*\)\*\{4,4\}/\1▂▄▆█/g' | sed 's/\(..*\)\*\{3,3\}/\1▂▄▆_/g' | sed 's/\(..*\)\*\{2,2\}/\1▂▄__/g' | sed 's/\(..*\)\*\{1,1\}/\1▂___/g')
[[ $CHANGE_BARS == "true" ]] && WIFI_LIST=$(echo -e "$WIFI_LIST" | sed 's/\(.*\)▂▄▆█/\1'$SIGNAL_STRENGTH_4'/' | sed 's/\(.*\)▂▄▆_/\1'$SIGNAL_STRENGTH_3'/' | sed 's/\(.*\)▂▄__/\1'$SIGNAL_STRENGTH_2'/' | sed 's/\(.*\)▂___/\1'$SIGNAL_STRENGTH_1'/' | sed 's/\(.*\)____/\1'$SIGNAL_STRENGTH_0'/')
}
function change_wifi_state() {
notification "$1" "$2"
nmcli radio wifi "$3"
}
function change_wired_state() {
notification "$1" "$2"
nmcli device "$3" "$4"
}
function net_restart() {
notification "$1" "$2"
nmcli networking off && sleep 3 && nmcli networking on
}
function disconnect() {
ACTIVE_SSID=$(nmcli -t -f GENERAL.CONNECTION dev show "${WIRELESS_INTERFACES[WLAN_INT]}" | cut -d ':' -f2)
notification "$1" "You're now disconnected from Wi-Fi network '$ACTIVE_SSID'"
nmcli con down id "$ACTIVE_SSID"
}
function check_wifi_connected() {
[[ "$(nmcli device status | grep "^${WIRELESS_INTERFACES[WLAN_INT]}." | awk '{print $3}')" == "connected" ]] && disconnect "Connection_Terminated"
}
function connect() {
check_wifi_connected
notification "-t 0 Wi-Fi" "Connecting to $1"
{ [[ $(nmcli dev wifi con "$1" password "$2" ifname "${WIRELESS_INTERFACES[WLAN_INT]}" | grep -c "successfully activated") -eq "1" ]] && notification "Connection_Established" "You're now connected to Wi-Fi network '$1'"; } || notification "Connection_Error" "Connection can not be established"
}
function enter_passwword() {
PROMPT="Enter_Password" && PASS=$(echo "$PASSWORD_ENTER" | rofi_cmd "$PASSWORD_ENTER" 4 "-password")
}
function enter_ssid() {
PROMPT="Enter_SSID" && SSID=$(rofi_cmd "" 40)
}
function stored_connection() {
check_wifi_connected
notification "-t 0 Wi-Fi" "Connecting to $1"
{ [[ $(nmcli dev wifi con "$1" ifname "${WIRELESS_INTERFACES[WLAN_INT]}" | grep -c "successfully activated") -eq "1" ]] && notification "Connection_Established" "You're now connected to Wi-Fi network '$1'"; } || notification "Connection_Error" "Connection can not be established"
}
function ssid_manual() {
enter_ssid
[[ -n $SSID ]] && {
enter_passwword
{ [[ -n "$PASS" ]] && [[ "$PASS" != "$PASSWORD_ENTER" ]] && connect "$SSID" "$PASS"; } || stored_connection "$SSID"
}
}
function ssid_hidden() {
enter_ssid
[[ -n $SSID ]] && {
enter_passwword && check_wifi_connected
[[ -n "$PASS" ]] && [[ "$PASS" != "$PASSWORD_ENTER" ]] && {
nmcli con add type wifi con-name "$SSID" ssid "$SSID" ifname "${WIRELESS_INTERFACES[WLAN_INT]}"
nmcli con modify "$SSID" wifi-sec.key-mgmt wpa-psk
nmcli con modify "$SSID" wifi-sec.psk "$PASS"
} || [[ $(nmcli -g NAME con show | grep -c "$SSID") -eq "0" ]] && nmcli con add type wifi con-name "$SSID" ssid "$SSID" ifname "${WIRELESS_INTERFACES[WLAN_INT]}"
notification "-t 0 Wifi" "Connecting to $SSID"
{ [[ $(nmcli con up id "$SSID" | grep -c "successfully activated") -eq "1" ]] && notification "Connection_Established" "You're now connected to Wi-Fi network '$SSID'"; } || notification "Connection_Error" "Connection can not be established"
}
}
function interface_status() {
local -n INTERFACES=$1 && local -n INTERFACES_PRODUCT=$2
for i in "${!INTERFACES[@]}"; do
CON_STATE=$(nmcli device status | grep "^${INTERFACES[$i]}." | awk '{print $3}')
INT_NAME=${INTERFACES_PRODUCT[$i]}[${INTERFACES[$i]}]
[[ "$CON_STATE" == "connected" ]] && STATUS="$INT_NAME:\n\t$(nmcli -t -f GENERAL.CONNECTION dev show "${INTERFACES[$i]}" | awk -F '[:]' '{print $2}') ~ $(nmcli -t -f IP4.ADDRESS dev show "${INTERFACES[$i]}" | awk -F '[:/]' '{print $2}')" || STATUS="$INT_NAME: ${CON_STATE^}"
echo -e "${STATUS}"
done
}
function status() {
OPTIONS=""
[[ ${#WIRED_INTERFACES[@]} -ne "0" ]] && ETH_STATUS="$(interface_status WIRED_INTERFACES WIRED_INTERFACES_PRODUCT)" && OPTIONS="${OPTIONS}${ETH_STATUS}"
[[ ${#WIRELESS_INTERFACES[@]} -ne "0" ]] && WLAN_STATUS="$(interface_status WIRELESS_INTERFACES WIRELESS_INTERFACES_PRODUCT)" && { [[ -n ${OPTIONS} ]] && OPTIONS="${OPTIONS}\n${WLAN_STATUS}" || OPTIONS="${OPTIONS}${WLAN_STATUS}"; }
ACTIVE_VPN=$(nmcli -g NAME,TYPE con show --active | awk '/:'$VPN_PATTERN'/ {sub(/:'$VPN_PATTERN'.*/, ""); print}')
[[ -n $ACTIVE_VPN ]] && OPTIONS="${OPTIONS}\n${ACTIVE_VPN}[VPN]: $(nmcli -g ip4.address con show "${ACTIVE_VPN}" | awk -F '[:/]' '{print $1}')"
echo -e "$OPTIONS" | rofi_cmd "$OPTIONS" $WIDTH_FIX_STATUS "" "mainbox{children:[listview];}"
}
function share_pass() {
SSID=$(nmcli dev wifi show-password | grep -oP '(?<=SSID: ).*' | head -1)
PASSWORD=$(nmcli dev wifi show-password | grep -oP '(?<=Password: ).*' | head -1)
OPTIONS="SSID: ${SSID}\nPassword: ${PASSWORD}"
[[ -x "$(command -v qrencode)" ]] && OPTIONS="${OPTIONS}\n~QrCode"
SELECTION=$(echo -e "$OPTIONS" | rofi_cmd "$OPTIONS" $WIDTH_FIX_STATUS "-a -1" "mainbox{children:[listview];}")
selection_action
}
function gen_qrcode() {
DIRECTIONS=("Center" "Northwest" "North" "Northeast" "East" "Southeast" "South" "Southwest" "West")
TMP_SSID="${SSID// /_}"
[[ -e $QRCODE_DIR$TMP_SSID.png ]] || qrencode -t png -o $QRCODE_DIR$TMP_SSID.png -l H -s 25 -m 2 --dpi=192 "WIFI:S:""$SSID"";T:""$(nmcli dev wifi show-password | grep -oP '(?<=Security: ).*' | head -1)"";P:""$PASSWORD"";;"
rofi_cmd "" "0" "" "entry{enabled:false;}window{location:""${DIRECTIONS[QRCODE_LOCATION]}"";border-radius:6mm;padding:1mm;width:100mm;height:100mm;
background-image:url(\"$QRCODE_DIR$TMP_SSID.png\",both);}"
}
function manual_hidden() {
OPTIONS="~Manual\n~Hidden" && SELECTION=$(echo -e "$OPTIONS" | rofi_cmd "$OPTIONS" $WIDTH_FIX_STATUS "" "mainbox{children:[listview];}")
selection_action
}
function vpn() {
ACTIVE_VPN=$(nmcli -g NAME,TYPE con show --active | awk '/:'$VPN_PATTERN'/ {sub(/:'$VPN_PATTERN'.*/, ""); print}')
[[ $ACTIVE_VPN ]] && OPTIONS="~Deactive $ACTIVE_VPN" || OPTIONS="$(nmcli -g NAME,TYPE connection | awk '/:'$VPN_PATTERN'/ {sub(/:'$VPN_PATTERN'.*/, ""); print}')"
VPN_ACTION=$(echo -e "$OPTIONS" | rofi_cmd "$OPTIONS" "$WIDTH_FIX_STATUS" "" "mainbox {children:[listview];}")
[[ -n "$VPN_ACTION" ]] && { { [[ "$VPN_ACTION" =~ "~Deactive" ]] && nmcli connection down "$ACTIVE_VPN" && notification "VPN_Deactivated" "$ACTIVE_VPN"; } || {
notification "-t 0 Activating_VPN" "$VPN_ACTION"
VPN_OUTPUT=$(nmcli connection up "$VPN_ACTION" 2> /dev/null)
{ [[ $(echo "$VPN_OUTPUT" | grep -c "Connection successfully activated") -eq "1" ]] && notification "VPN_Successfully_Activated" "$VPN_ACTION"; } || notification "Error_Activating_VPN" "Check your configuration for $VPN_ACTION"
}; }
}
function more_options() {
OPTIONS=""
[[ "$WIFI_CON_STATE" == "connected" ]] && OPTIONS="~Share Wifi Password\n"
OPTIONS="${OPTIONS}~Status\n~Restart Network"
[[ $(nmcli -g NAME,TYPE connection | awk '/:'$VPN_PATTERN'/ {sub(/:'$VPN_PATTERN'.*/, ""); print}') ]] && OPTIONS="${OPTIONS}\n~VPN"
[[ -x "$(command -v nm-connection-editor)" ]] && OPTIONS="${OPTIONS}\n~Open Connection Editor"
SELECTION=$(echo -e "$OPTIONS" | rofi_cmd "$OPTIONS" "$WIDTH_FIX_STATUS" "" "mainbox {children:[listview];}")
selection_action
}
function selection_action() {
case "$SELECTION" in
"~Disconnect") disconnect "Connection_Terminated" ;;
"~Scan") scan ;;
"~Status") status ;;
"~Share Wifi Password") share_pass ;;
"~Manual/Hidden") manual_hidden ;;
"~Manual") ssid_manual ;;
"~Hidden") ssid_hidden ;;
"~Wi-Fi On") change_wifi_state "Wi-Fi" "Enabling Wi-Fi connection" "on" ;;
"~Wi-Fi Off") change_wifi_state "Wi-Fi" "Disabling Wi-Fi connection" "off" ;;
"~Eth Off") change_wired_state "Ethernet" "Disabling Wired connection" "disconnect" "${WIRED_INTERFACES}" ;;
"~Eth On") change_wired_state "Ethernet" "Enabling Wired connection" "connect" "${WIRED_INTERFACES}" ;;
"***Wi-Fi Disabled***") ;;
"***Wired Unavailable***") ;;
"***Wired Initializing***") ;;
"~Change Wifi Interface") change_wireless_interface ;;
"~Restart Network") net_restart "Network" "Restarting Network" ;;
"~QrCode") gen_qrcode ;;
"~More Options") more_options ;;
"~Open Connection Editor") nm-connection-editor ;;
"~VPN") vpn ;;
*)
[[ -n "$SELECTION" ]] && [[ "$WIFI_LIST" =~ .*"$SELECTION".* ]] && {
[[ "$SSID" == "*" ]] && SSID=$(echo "$SELECTION" | sed "s/\s\{2,\}/\|/g " | awk -F "|" '{print $3}')
{ [[ "$ACTIVE_SSID" == "$SSID" ]] && nmcli con up "$SSID" ifname "${WIRELESS_INTERFACES[WLAN_INT]}"; } || {
[[ "$SELECTION" =~ "WPA2" ]] || [[ "$SELECTION" =~ "WEP" ]] && enter_passwword
{ [[ -n "$PASS" ]] && [[ "$PASS" != "$PASSWORD_ENTER" ]] && connect "$SSID" "$PASS"; } || stored_connection "$SSID"
}
}
;;
esac
}
function main() {
initialization && rofi_menu
}
main
Shutdown
declare -A opts
opts[shutdown]=" Shutdown"
opts[suspend]=" Suspend"
opts[logout]=" Logout"
opts[reboot]=" Restart"
gen_list() {
printf '%s\n' "${opts[@]}"
}
opt=$(gen_list | rofi -dmenu -mesg)
case "$opt" in
"${opts[shutdown]}")
systemctl poweroff
;;
"${opts[suspend]}")
systemctl suspend
;;
"${opts[logout]}")
niri msg action quit
;;
"${opts[reboot]}")
systemctl reboot
;;
esac
Starship
In nushell
export-env { $env.STARSHIP_SHELL = "nu"; load-env {
STARSHIP_SESSION_KEY: (random chars -l 16)
PROMPT_INDICATOR: ""
PROMPT_INDICATOR_VI_INSERT: ": "
PROMPT_INDICATOR_VI_NORMAL: "> "
PROMPT_MULTILINE_INDICATOR: "::: "
PROMPT_COMMAND: {||
# jobs are not supported
(
^/usr/bin/starship prompt
--cmd-duration $env.CMD_DURATION_MS
$"--status=($env.LAST_EXIT_CODE)"
--terminal-width (term size).columns
)
}
config: ($env.config? | default {} | merge {
render_right_prompt_on_last_line: true
})
PROMPT_COMMAND_RIGHT: {||
(
^/usr/bin/starship prompt
--right
--cmd-duration $env.CMD_DURATION_MS
$"--status=($env.LAST_EXIT_CODE)"
--terminal-width (term size).columns
)
}
}}
Import it in config
use starship.nu
prompt config
essential stuff
[status]
disabled = false
symbol = ''
format = '[\[$symbol$common_meaning$signal_name$maybe_int\]]($style) '
not_executable_symbol = ''
not_found_symbol = ''
sigint_symbol = ''
signal_symbol = ''
map_symbol = true
[cmd_duration]
format = '\[[⏱ $duration]($style)\]'
[git_branch]
symbol = " "
format = '\[[$symbol $branch]($style)\]'
[git_status]
disabled = false
format = '([\[$stashed$deleted$renamed$modified$staged$untracked\]]($style))'
[os]
disabled = false
format = '\[[$symbol]($style)\]'
[os.symbols]
Arch = " "
[directory]
read_only = " "
[custom.jj]
ignore_timeout = true
description = "The current jj status"
detect_folders = [".jj"]
symbol = "🥋 "
command = '''
jj log --revisions @ --no-graph --ignore-working-copy --color always --limit 1 --template '
separate(" ",
change_id.shortest(4),
bookmarks,
"|",
concat(
if(conflict, "💥"),
if(divergent, "🚧"),
if(hidden, "👻"),
if(immutable, "🔒"),
),
raw_escape_sequence("\x1b[1;32m") ++ if(empty, "(empty)"),
raw_escape_sequence("\x1b[1;32m") ++ coalesce(
truncate_end(29, description.first_line(), "…"),
"(no description set)",
) ++ raw_escape_sequence("\x1b[0m"),
)
'
'''
disable everything else
[typst]
disabled = true
[aws]
disabled = true
[bun]
disabled = true
[c]
disabled = true
[cmake]
disabled = true
[cobol]
disabled = true
[conda]
disabled = true
[crystal]
disabled = true
[daml]
disabled = true
[dart]
disabled = true
[deno]
disabled = true
[docker_context]
disabled = true
[dotnet]
disabled = true
[elixir]
disabled = true
[elm]
disabled = true
[erlang]
disabled = true
[fennel]
disabled = true
[fossil_branch]
disabled = true
[gcloud]
disabled = true
[golang]
disabled = true
[gradle]
disabled = true
[guix_shell]
disabled = true
[haskell]
disabled = true
[haxe]
disabled = true
[helm]
disabled = true
[hg_branch]
disabled = true
[java]
disabled = true
[julia]
disabled = true
[kotlin]
disabled = true
[kubernetes]
disabled = true
[lua]
disabled = true
[memory_usage]
disabled = true
[meson]
disabled = true
[nim]
disabled = true
[nix_shell]
disabled = true
[nodejs]
disabled = true
[ocaml]
disabled = true
[opa]
disabled = true
[openstack]
disabled = true
[package]
disabled = true
[perl]
disabled = true
[php]
disabled = true
[pijul_channel]
disabled = true
[pulumi]
disabled = true
[purescript]
disabled = true
[python]
disabled = true
[raku]
disabled = true
[red]
disabled = true
[ruby]
disabled = true
[rust]
disabled = true
[scala]
disabled = true
[spack]
disabled = true
[sudo]
disabled = true
[swift]
disabled = true
[terraform]
disabled = true
[username]
disabled = true
[vagrant]
disabled = true
[vlang]
disabled = true
[zig]
disabled = true
[solidity]
disabled = true
[rlang]
disabled = true
[buf]
disabled = true
[hostname]
disabled = true
Swappy
[Default]
save_dir=$HOME/Pictures/Swappy
save_filename_format=swappy_%Y_%m_%d_%H_%M_%S.png
show_panel=false
line_size=5
text_size=20
text_font=sans-serif
paint_mode=brush
early_exit=false
fill_shape=false
Systemd
Symlink all of them, including waybar.service , to niri.service.wants
Start cliphist
[Unit]
PartOf=graphical-session.target
After=graphical-session.target
Requisite=graphical-session.target
[Service]
ExecStart=/usr/bin/wl-paste --watch /usr/bin/cliphist store
Restart=on-failure
Start server
[Unit]
PartOf=graphical-session.target
After=graphical-session.target
Requisite=graphical-session.target
[Service]
ExecStart=/usr/bin/python3 -m http.server -d /home/innocentzero/innocentzeros_coven/age -b 127.0.0.1 8080
Restart=on-failure
Start zulip
[Unit]
PartOf=graphical-session.target
After=graphical-session.target
Requisite=graphical-session.target
[Service]
ExecStart=/usr/bin/flatpak run org.zulip.Zulip
Restart=on-failure
Start signal
[Unit]
PartOf=graphical-session.target
After=graphical-session.target
Requisite=graphical-session.target
[Service]
ExecStart=/usr/bin/flatpak run org.signal.Signal --start-in-tray --use-tray-icon
Restart=on-failure
Start gammastep
[Unit]
PartOf=graphical-session.target
After=graphical-session.target
Requisite=graphical-session.target
[Service]
ExecStart=/usr/bin/gammastep-indicator
Restart=on-failure
Screen locking
Set idle lock. Symlink to niri.service.wants
[Unit]
PartOf=graphical-session.target
After=graphical-session.target
Requisite=graphical-session.target
[Service]
ExecStart=/usr/bin/swayidle -w timeout 45 'notify-send --app-name=screenlockwarning "Screen will lock soon"' timeout 60 'systemctl suspend'
Restart=on-failure
let image = (/usr/bin/swww query | sed "s|^.*image: ||")
cp $image /tmp/lock.png
/usr/bin/gtklock -c /home/innocentzero/.config/gtklock/style.css
Corresponding css for gtklock
window {
background-image: url("/tmp/lock.png");
background-position: center;
background-size: cover;
}
copy this to /etc/systemd/system/lock@.service then run systemctl enable lock@$(id -u) in bash.
[Unit]
Description=Lock
After=sleep.target
After=suspend.target
[Service]
User=%i
Type=forking
Environment=WAYLAND_DISPLAY=wayland-1
Environment=XDG_RUNTIME_DIR=/run/user/%i
ExecStart=/home/innocentzero/bin/lock
[Install]
WantedBy=sleep.target
WantedBy=suspend.target
NWG agendas and todos
Enable todo and agenda on the screen. Symlink to niri.service.wants
window {
font-family: "Monospace";
color: rgba(255, 255, 255, 1)
}
#box-outer {
/* Define attributes of the box surrounding icons here */
background-color: rgba(255, 255, 255, 0);
}
#box-inner {
background-color: rgba(10, 10, 10, 0.5);
border-radius: 15px; /* Applies to all corners */
padding: 10px;
}
[Unit]
PartOf=graphical-session.target
After=graphical-session.target
Requisite=graphical-session.target
[Service]
ExecStart=/usr/bin/nwg-wrapper -p left -a start -ml 15 -mt 10 -j center -r 60000 -s /home/innocentzero/.config/nwg-wrapper/agenda.nu -c /home/innocentzero/.config/nwg-wrapper/agenda.css
Restart=on-failure
emacs -batch -Q -l /home/innocentzero/.config/nwg-wrapper/agenda.el | if ($in | is-empty) { "Nothing to do" } else { $in | from csv --noheaders | reject column0 column5 column7 column8 column9 column10 | rename timeline type status tags time | update timeline {|it| $it.timeline | str substring 0..15} | table --theme dots }
(require 'org)
(setq org-agenda-files
'("/home/innocentzero/innocentzeros_coven/org_home/"))
(setq org-todo-keywords
'((""
"TODO(t)"
"DREAM(D)"
"ONGOING(o)"
"NEXT(n)"
"|"
"DONE(d!)"
"CANCELLED(c@)")))
(setq org-agenda-custom-commands
'(("X" agenda ""
((org-agenda-span (quote day))
(org-agenda-with-colors nil))
("agenda"))))
(setq org-element-use-cache nil)
(org-batch-agenda-csv "X")
[Unit]
PartOf=graphical-session.target
After=graphical-session.target
Requisite=graphical-session.target
[Service]
ExecStart=/usr/bin/nwg-wrapper -a end -ml 15 -mb 10 -p left -r 60000 -s /home/innocentzero/.config/nwg-wrapper/todos.nu -c /home/innocentzero/.config/nwg-wrapper/agenda.css
Restart=on-failure
emacs -batch -Q -l /home/innocentzero/.config/nwg-wrapper/todos.el | if ($in | is-empty) { "Nothing to do" } else { $in | from csv --noheaders | reject column0 column2 column5 column6 column7 column8 column9 column10 | rename todo status tags | table --theme dots }
(require 'org)
(setq org-agenda-files
'("/home/innocentzero/innocentzeros_coven/org_home/"))
(setq org-todo-keywords
'((""
"TODO(t)"
"DREAM(D)"
"ONGOING(o)"
"NEXT(n)"
"|"
"DONE(d!)"
"CANCELLED(c@)")))
(setq org-element-use-cache nil)
(org-batch-agenda-csv "t")
Waybar
Colors
Gen settings
* {
/* `otf-font-awesome` is required to be installed for icons */
font-family:
FontAwesome, SymbolsNerdFontMono, ProfontWindowsNerdFontMono, FiraCode,
Roboto, Helvetica, Arial, sans-serif;
font-size: 15px;
min-height: 20px;
border-radius: 15px;
}
#window {
margin: 0 2px 0 2px;
}
window#waybar {
background-color: transparent;
color: #ffffff;
font-weight: 800;
transition-property: background-color;
transition-duration: 0.5s;
border: none;
padding: 0px 0px 0px 0px;
margin: 0px;
}
window#waybar.hidden {
opacity: 0.2;
}
Button settings
button {
/* Use box-shadow instead of border so the text isn't offset */
box-shadow: inset 0 -3px transparent;
/* Avoid rounded borders under each button name */
border: none;
/* border-radius: 7px; */
}
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
button:hover {
background: inherit;
box-shadow: inset 0 -3px #ffffff;
}
Workspaces
#workspaces {
border: 2px solid #00aaaa;
margin-top: 2px;
margin-bottom: 2px;
}
/* If workspaces is the leftmost module, omit left margin */
.modules-left > widget:first-child > #workspaces {
margin-left: 0;
}
Workspace buttons
#workspaces button {
padding: 0 5px;
background-color: transparent;
color: #ccc;
}
#workspaces button.persistent {
padding: 0 5px;
background-color: transparent;
color: #222;
}
#workspaces button:hover {
background: rgba(0, 0, 0, 0.2);
}
#workspaces button.focused {
background-color: transparent;
/* box-shadow: inset 0 -3px #ffffff; */
color: #00aa00;
}
#workspaces button.urgent {
background-color: #999999;
}
#workspaces button.active {
color: #0000aa;
}
Almost gen settings for everything else
#workspaces,
#mode,
#clock,
#battery,
#cpu,
#memory,
#disk,
#temperature,
#backlight,
#network,
#pulseaudio,
#wireplumber,
#privacy,
#mpd,
#cava,
#user,
#tray,
#mode,
#idle_inhibitor,
#scratchpad,
#custom-dnd,
#custom-orgclock,
#custom-cpubars,
#custom-audio_idle_inhibitor {
border: 2px solid #00aaaa;
padding: 0 10px;
margin-top: 2px;
margin-bottom: 2px;
background-color: #222;
color: #ccc;
margin-left: 2px;
}
Battery
#battery.charging,
#battery.plugged {
color: #ffffff;
background-color: #224422;
}
@keyframes blink {
to {
background-color: #ffffff;
color: #000000;
}
}
#battery.critical:not(.charging) {
background-color: #442222;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
label:focus {
background-color: #000000;
}
Network and audio
#network.disconnected {
background-color: #442222;
}
#pulseaudio.muted {
background-color: #223333;
}
#wireplumber.muted {
background-color: #222233;
}
temp and tray
#temperature.critical {
background-color: #442222;
}
#tray > .passive {
-gtk-icon-effect: dim;
}
#tray > .needs-attention {
-gtk-icon-effect: highlight;
background-color: #eb4d4b;
}
idle inhibitor
#idle_inhibitor.activated {
background-color: #555555;
}
bar Config
// starting brace lmao
{
Gen settings
// Waybar at top layer
"layer": "top",
// Waybar position (top|bottom|left|right)
"position": "top",
//margin from top
"margin-top": 5,
//margin left and right
"margin-left": 5,
"margin-right": 5,
// Gaps between modules (px)
"spacing": 1,
Module orders
// Choose the order of the modules
"modules-left": ["niri/workspaces", "idle_inhibitor", "user", "pulseaudio", "backlight", "clock"],
"modules-center": ["custom/orgclock"],
"modules-right": [ "network", "cpu", "memory", "temperature", "battery", "tray"],
Sway module configs
// Modules configuration
"sway/workspaces": {
"disable-scroll": false,
"all-outputs": false,
"warp-on-scroll": false,
"format": "{icon}",
"format-icons": {
"1": "一",
"2": "二",
"3": "三",
"4": "四",
"5": "五",
"6": "六",
"7": "七",
"8": "八",
"9": "九",
"10": "十"
},
"persistent-workspaces": {
"1": [],
"2": [],
"3": [],
"4": [],
"5": [],
"6": [],
"7": [],
"8": [],
"9": [],
"10": []
}
},
"sway/mode": {
"format": " "
},
"sway/window": {
"format": "{}",
"max-length": 15,
},
"sway/scratchpad": {
"format": "{icon} {count}",
"show-empty": false,
"format-icons": ["", " "],
"tooltip": true,
"tooltip-format": "{app}: {title}"
},
Left stuff - regular
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": " ",
"deactivated": " "
}
},
"clock": {
"format": "{:%H%M %a, %d-%m-%Y}",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
},
"user": {
"format": "{work_H}h ↑",
"interval": 60,
"height": 20,
"width": 30,
"icon": true
},
"backlight": {
// "device": "acpi_video1",
"format": "{percent}% {icon}",
"format-icons": [" ", " ", " ", " ", " ", " ", " ", " ", " "]
},
"wireplumber": {
"format": "{volume}% {icon}",
"format-muted": "",
"format-bluetooth": "{volume}% {icon} ",
"format-bluetooth-muted": " {icon} ",
"format-muted": " {format_source}",
"on-click": "pavucontrol",
"format-icons": {
"headphone": " ",
"hands-free": " ",
"headset": " ",
"phone": " ",
"portable": " ",
"car": " ",
"default": [" ", " ", " "]
}
},
"pulseaudio": {
"scroll-step": 1, // %, can be a float
"format": "{volume}% {icon} {format_source}",
"format-bluetooth": "{volume}% {icon} {format_source}",
"format-bluetooth-muted": " {icon} {format_source}",
"format-muted": " {format_source}",
"format-source": "{volume}% ",
"format-source-muted": " ",
"format-icons": {
"headphone": " ",
"hands-free": " ",
"headset": " ",
"phone": " ",
"portable": " ",
"car": " ",
"default": [" ", " ", " "]
}
},
right stuff - regular
"tray": {
"icon-size": 21,
"spacing": 10
},
"cpu": {
"interval": 1,
"format": "{icon0}{icon1}{icon2}{icon3}{icon4}{icon5}{icon6}{icon7}{icon8}{icon9}{icon10}{icon11}",
"format-icons": [
"<span color='#69ff94'>▁</span>", // green
"<span color='#2aa9ff'>▂</span>", // blue
"<span color='#f8f8f2'>▃</span>", // white
"<span color='#f8f8f2'>▄</span>", // white
"<span color='#ffffa5'>▅</span>", // yellow
"<span color='#ffffa5'>▆</span>", // yellow
"<span color='#ff9977'>▇</span>", // orange
"<span color='#dd532e'>█</span>" // red
]
},
"memory": {
"format": "{:3}% "
},
"temperature": {
// "thermal-zone": 2,
"hwmon-path": "/sys/class/hwmon/hwmon5/temp1_input",
"critical-threshold": 60,
"format-critical": "{temperatureC}°C {icon}",
"format": "{temperatureC}°C {icon}",
"format-icons": ["" ,"", "", "", ""]
},
"battery": {
"states": {
"warning": 30,
"critical": 15
},
"format": "{capacity}% {icon} {time}",
"format-charging": "{capacity}% {time}",
"format-plugged": "{capacity}% {time}",
"format-icons": [" ", " ", " ", " ", " "],
"format-time": "{H}:{m}",
"interval" : 3
},
"network": {
"format-wifi": "{essid} ({signalStrength}%) ",
"format-ethernet": "{ipaddr}/{cidr} ",
"tooltip-format": "{ifname} via {gwaddr} ",
"format-linked": "{ifname} (No IP) ",
"format-disconnected": "Disconnected ⚠",
"format-alt": "{ifname}: {ipaddr}/{cidr}"
},
"niri/workspaces": {
"format": "{icon}",
"format-icons": {
// Named workspaces
// (you need to configure them in niri)
// Icons by state
"active": "",
"default": ""
}
},
"custom/orgclock": {
"exec": "/home/innocentzero/.config/waybar/orgclock.sh",
"interval": 60
}
// end brace lmao
}
XDG Desktop Portal
[preferred]
default=gnome;
org.freedesktop.impl.portal.Access=gnome;
org.freedesktop.impl.portal.Secret=gnome-keyring;
Zathura
set recolor-darkcolor "#eeeeee"
set recolor-lightcolor "#0a0a0a"
set statusbar-bg "#0a0a0a"
set recolor-keephue true
map i recolor
\(\alpha\)
\(\alpha\beta\gamma\epsilon\delta\)
