Compare commits

...

111 Commits

Author SHA1 Message Date
8a2fbc92ff remove unused binaries 2025-11-19 10:39:51 +01:00
1cd7f4f8a8 remove unused configurations 2025-11-19 10:39:51 +01:00
d7dc99c004 fix: use the satalite workspace update script in PATH, rather than direct path 2025-11-19 10:39:51 +01:00
4994241a7a remove xprofile file, since it is unsed, and causes issues with bash_profile being sourced multiple times 2025-11-19 10:39:51 +01:00
84359d914d include i3 and nvim configuration in the central repository, rather than keep them in their seperate respective ones. 2025-11-19 10:39:51 +01:00
a50ead749a move xdg directories to the default location.
a lot of applications seem to hardcode this location, so it's better to
have something default, or default-adjasoned.
2025-11-19 10:39:51 +01:00
f6b93d5126 fix: rework error code writing / simplify it 2025-11-19 10:39:51 +01:00
3555219aa1 fix: POSIX compatibility case written incorrectly 2025-11-19 10:39:51 +01:00
a0b972d106 rework bash scripts to be completely, or mostly POSIX-compliant 2025-11-19 10:39:51 +01:00
cc07925346 remove a bunch of crap I don't use 2025-11-19 10:39:51 +01:00
18549ab4b9 move alias definitions to a seperate file to decrease clutter 2025-11-19 10:39:51 +01:00
7e1c0dc937 remove vcpkg crap we no longer use 2025-11-19 10:39:51 +01:00
a9f8e39373 rework the bash PS1 prompt 2025-11-19 10:39:51 +01:00
50d75707a0 fix: shbangs in bash configuration files 2025-11-19 10:39:51 +01:00
8df76cc477 remove git modules 2025-11-19 10:39:51 +01:00
398d5d8316 update nvim 2025-11-19 10:39:51 +01:00
da95e3e657 add another arch ascii art, but with lower resolution to be usable in a tty 2025-11-19 10:39:51 +01:00
0f9f565362 flip flop java prime 2025-11-19 10:39:51 +01:00
10a046a20d define an alias for info 2025-11-19 10:39:51 +01:00
e0e280d296 use command for detection over which 2025-11-19 10:39:51 +01:00
8802bc1a7f write comment 2025-11-19 10:39:51 +01:00
840a258e12 add shrug to xcompose 2025-11-19 10:39:51 +01:00
5e259b841f add indentical to sybol to xcompose 2025-11-19 10:39:51 +01:00
7465658a84 rework volume control 2025-11-19 10:39:51 +01:00
fa77ae3f7a edit editorconfig to have JSON have tab width of eight 2025-11-19 10:39:51 +01:00
71d38679c8 fix keybind to open 2025-11-19 10:39:51 +01:00
fbdd43b161 update submodules 2025-11-19 10:39:51 +01:00
71ddd81bb3 update lazygit 2025-11-19 10:39:51 +01:00
2088afe587 add LF configuration 2025-11-19 10:39:51 +01:00
3a5922d362 add roman numerals to xcompose 2025-11-19 10:39:51 +01:00
e37a28f5cb update i3 2025-11-19 10:39:51 +01:00
0c2aca8e39 add W.I.P. projection for europe. 2025-11-19 10:39:51 +01:00
7f7a907612 update i3 2025-11-19 10:39:51 +01:00
9e6a64346b fix typo in satalite wp update 2025-11-19 10:39:51 +01:00
50dfae9ddd update nvim 2025-11-19 10:39:51 +01:00
655f2fc889 comment out rando lines in actrc 2025-11-19 10:39:51 +01:00
04001d4530 add lines to fastfetch 2025-11-19 10:39:51 +01:00
7b2b61d2ca set a font size in kitty to what I am comfortable with
Kitty did not have a font size set, and I kept accedentally zooming in,
and then not knowing what it was set as and what I was comfortable with.
This ensures the window always opens with my preffered scale.
2025-11-19 10:39:51 +01:00
8a48629300 update i3 2025-11-19 10:39:51 +01:00
8b8135ad44 update nvim 2025-11-19 10:39:51 +01:00
a5ff706dbb update clang-format to be more in line with my current preferences / guidelines 2025-11-19 10:39:51 +01:00
0d028ac000 show the cursor in the the shell prompt 2025-11-19 10:39:51 +01:00
b45367b194 fix: spelling 2025-11-19 10:39:51 +01:00
6eb7ffafa5 fix: MULTI+.+= does not give DOT OPERATOR, as I expected, but BULLET. BULLET has been moved to ** and DOT OPERATOR set at .= 2025-11-19 10:39:51 +01:00
4643ef0d8f fix: OMEGA is using the wrong UTF code 2025-11-19 10:39:51 +01:00
54d606a00c minor symbol name fixes 2025-11-19 10:39:51 +01:00
a96e0bf7e2 expand the greek alphabet, now all symbols have been added.
note: I thought I did this last time.
2025-11-19 10:39:51 +01:00
c4e8803003 set NVIDIA as primary gpu 2025-11-19 10:39:51 +01:00
99d4b527ad modify inputrc to have completions to be coloured, and case-insensitive. 2025-11-19 10:39:51 +01:00
a47ceb6eb8 remove setting the tab width for makefile to four 2025-11-19 10:39:51 +01:00
69b21a4372 comment out the java-prime exported envs, since we're now running on just dedicated graphics 2025-11-19 10:39:51 +01:00
1e10ed0052 update nvim 2025-11-19 10:39:51 +01:00
8dea8ab696 rewrite polybar networks once again 2025-11-19 10:39:51 +01:00
0e4dd1d9cf removal of hyfetch, and preferring to use a more customised fastfetch configuration 2025-11-19 10:39:51 +01:00
773f494a22 add lls alias 2025-11-19 10:39:51 +01:00
c546d1c3b2 modify history settings 2025-11-19 10:39:51 +01:00
e1387b2dca update submodules 2025-11-19 10:39:51 +01:00
61976629ea fix: polybar ethernet connections 2025-11-19 10:39:51 +01:00
38112b8277 update cpusetcores binary 2025-11-19 10:39:51 +01:00
9f2dec9534 update nvim 2025-11-19 10:39:51 +01:00
18c94a7621 update feh on errors with satalite-wp-update 2025-11-19 10:39:51 +01:00
19305ad9be add another definition for USB ethernet device 2025-11-19 10:39:51 +01:00
895da1eeeb update submodules 2025-11-19 10:39:51 +01:00
e2c314ae11 fix double comment 2025-11-19 10:39:51 +01:00
1b7d5537f8 add an alias for rm to set -I, which is less intruisive than -i 2025-11-19 10:39:51 +01:00
3a586f187a fix: formatting 2025-11-19 10:39:51 +01:00
6fee92f45a enable globstar in bashrc 2025-11-19 10:39:51 +01:00
a61a223cff update i3 2025-11-19 10:39:51 +01:00
27cc9a379b fix: submodule paths were incorrect 2025-11-19 10:39:51 +01:00
5f9d1758ca fix: git modules url's weren't reflective of what they actually are 2025-11-19 10:39:51 +01:00
d918dd43ea change projection settings to be better parameterised 2025-11-19 10:39:51 +01:00
2e1eb80047 update nvim 2025-11-19 10:39:51 +01:00
faf1c37f99 make UTF-8 and LF uppercase 2025-11-19 10:39:51 +01:00
c6197743fb add some extra languages around the C-based languages 2025-11-19 10:39:51 +01:00
e59d65b8e4 remove redundant indent_size=tab 2025-11-19 10:39:51 +01:00
f2255cd499 add comments 2025-11-19 10:39:51 +01:00
77fce2e707 update nvim 2025-11-19 10:39:51 +01:00
cd8174e281 add cs to the forcibly use category 2025-11-19 10:39:51 +01:00
cc6007ebac add a comment for a forces 4 spaces catagory 2025-11-19 10:39:51 +01:00
9b889178a7 correct definition order 2025-11-19 10:39:51 +01:00
4eebf67f80 split apart the web languages into it's own definition 2025-11-19 10:39:51 +01:00
434a9a7c9a remove markdown from the json/jsonc/css/scss column 2025-11-19 10:39:51 +01:00
d374003757 set tab width to 4 for those that were <4 2025-11-19 10:39:51 +01:00
a9b3840c63 edit clang-format to be on-par with my current preferred style 2025-11-19 10:39:51 +01:00
b45ee0960e add notifications for audio (they're rubbish, but eh) 2025-11-19 10:39:51 +01:00
63c90d6009 move some desktop i3 behaviour into different shell scripts 2025-11-19 10:39:51 +01:00
aeafbab5ca make shell scripts more POSIX-compatible, and use tabs instead of spaces 2025-11-19 10:39:51 +01:00
7e4a40d7c4 we don't need to specify user 2025-11-19 10:39:51 +01:00
ca446dfd45 remove include header warnings, as they're often incorrect 2025-11-19 10:39:51 +01:00
5882849282 add some clang-tidy options to clangd config 2025-11-19 10:39:51 +01:00
9875c36db5 add parameters to be able to fill the whole screen 2025-11-19 10:39:51 +01:00
43dd74625d modify parameters to fit within my monitor 2025-11-19 10:39:51 +01:00
424202d50c parameterise the projection settings 2025-11-19 10:39:51 +01:00
0767e30fab set the output directory to static due to cronnie problems 2025-11-19 10:39:50 +01:00
b001d9ef83 update submodules 2025-11-19 10:39:18 +01:00
9bdd6826bc make background image transparent 2025-11-19 10:39:18 +01:00
82a9bc823b convert is deprecated, use magick 2025-11-19 10:39:18 +01:00
a704635f33 add background removal 2025-11-19 10:39:18 +01:00
287482b052 update satalite-wp-update script to use the proper API ends 2025-11-19 10:39:15 +01:00
235d53dd2e update nvim 2025-11-19 10:37:21 +01:00
c3b0685ab6 add jsonc to editorconfig 2025-11-19 10:37:21 +01:00
faaa81d0fa change default tab_width to 8 2025-11-19 10:37:21 +01:00
ca0db5f3d4 remove inconsistent tab widths form editorconfig 2025-11-19 10:37:21 +01:00
396c9dd83b add gitea key to SSH_AUTH_SOCK 2025-11-19 10:37:21 +01:00
75073f9de6 configure gitconfig to only use gpgSign on tags. 2025-11-19 10:37:21 +01:00
dbe1c45d02 update nvim 2025-11-19 10:37:21 +01:00
9f7a1b594f update clang format formatting rules to be up to par with my current preferences 2025-11-19 10:37:21 +01:00
2f31b9c6e8 strip end of line comments from clang-format 2025-11-19 10:37:21 +01:00
b451626950 include xprofile 2025-11-19 10:37:21 +01:00
d9aec282c8 remove localtmp 2025-11-19 10:37:21 +01:00
1832c25a18 write satalite connect script 2025-11-19 10:37:16 +01:00
127 changed files with 2438 additions and 3634 deletions

View File

@@ -4,32 +4,56 @@ include "%L"
# greek alphabet small
<Multi_key> <a> <l> <p> : "α" U03B1 # GREEK SMALL LETTER ALPHA
<Multi_key> <b> <e> <t> : "β" U03B2 # GREEK SMALL LETTER BETA
<Multi_key> <g> <a> <m> : "γ" U03B3 # GREEK SMALL GAMMA
<Multi_key> <d> <e> <l> : "δ" U03B4 # GREEK SMALL DELTA
<Multi_key> <g> <a> <m> : "γ" U03B3 # GREEK SMALL LETTER GAMMA
<Multi_key> <d> <e> <l> : "δ" U03B4 # GREEK SMALL LETTER DELTA
<Multi_key> <e> <p> <s> : "ε" U03B5 # GREEK SMALL LETTER EPSILON
<Multi_key> <z> <e> <t> : "ζ" U03B6 # GREEK SMALL LETTER ZETA
<Multi_key> <e> <t> <a> : "η" U03B7 # GREEK SMALL LETTER ETA
<Multi_key> <t> <h> <e> : "θ" U03B8 # GREEK SMALL LETTER THETA
<Multi_key> <i> <o> <t> : "ι" U03B9 # GREEK SMALL LETTER IOTA
<Multi_key> <k> <a> <p> : "κ" U03BA # GREEK SMALL LETTER KAPPA
<Multi_key> <l> <a> <m> : "λ" U03BB # GREEK SMALL LETTER LAMBDA
<Multi_key> <m> <u> : "μ" U03BC # GREEK SMALL LETTER MU
<Multi_key> <n> <u> : "ν" U03BD # GREEK SMALL LETTER NU
<Multi_key> <x> <i> : "ξ" U03BE # GREEK SMALL LETTER XI
<Multi_key> <o> <m> <i> : "ο" U03BF # GREEK SMALL LETTER OMICRON
<Multi_key> <p> <i> : "π" U03C0 # GREEK SMALL LETTER PI
<Multi_key> <r> <h> <o> : "ρ" U03C1 # GREEK SMALL LETTER RHO
<Multi_key> <s> <i> <g> : "σ" U03C3 # GREEK SMALL LETTER SIGMA
<Multi_key> <t> <a> <u> : "τ" U03C4 # GREEK SMALL LETTER TAU
<Multi_key> <u> <p> <s> : "υ" U03C5 # GREEK SMALL LETTER UPSILON
<Multi_key> <p> <h> <i> : "φ" U03C6 # GREEK SMALL LETTER PHI
<Multi_key> <c> <h> <i> : "χ" U03C7 # GREEK SMALL LETTER CHI
<Multi_key> <p> <s> <i> : "ψ" U03C8 # GREEK SMALL LETTER PSI
<Multi_key> <o> <m> <e> : "ω" U02C9 # GREEK SMALL LETTER OMEGA
<Multi_key> <o> <m> <e> : "ω" U03C9 # GREEK SMALL LETTER OMEGA
# greek alphabet capital
<Multi_key> <A> <L> <P> : "Α" U0391 # GREEK CAPITAL LETTER ALPHA
<Multi_key> <B> <E> <T> : "Β" U0392 # GREEK CAPITAL LETTER BETA
<Multi_key> <G> <A> <M> : "Γ" U0393 # GREEK CAPITAL GAMMA
<Multi_key> <D> <E> <L> : "Δ" U0394 # GREEK CAPITAL DELTA
<Multi_key> <G> <A> <M> : "Γ" U0393 # GREEK CAPITAL LETTER GAMMA
<Multi_key> <D> <E> <L> : "Δ" U0394 # GREEK CAPITAL LETTER DELTA
<Multi_key> <E> <P> <S> : "Ε" U0395 # GREEK CAPITAL LETTER EPSILON
<Multi_key> <Z> <E> <T> : "Ζ" U0396 # GREEK CAPITAL LETTER ZETA
<Multi_key> <E> <T> <A> : "Η" U0397 # GREEK CAPITAL LETTER ETA
<Multi_key> <T> <H> <E> : "Θ" U0398 # GREEK CAPITAL LETTER THETA
<Multi_key> <M> <U> : "Μ" U039C # GREEK SMALL LETTER MU
<Multi_key> <I> <O> <T> : "Ι" U0399 # GREEK CAPITAL LETTER IOTA
<Multi_key> <K> <A> <P> : "Κ" U039A # GREEK CAPITAL LETTER KAPPA
<Multi_key> <L> <A> <M> : "Λ" U039B # GREEK CAPITAL LETTER LAMBDA
<Multi_key> <M> <U> : "Μ" U039C # GREEK CAPITAL LETTER MU
<Multi_key> <N> <U> : "Ν" U039D # GREEK CAPITAL LETTER NU
<Multi_key> <X> <I> : "Ξ" U039E # GREEK CAPITAL LETTER XI
<Multi_key> <O> <M> <I> : "Ο" U039F # GREEK CAPITAL LETTER OMICRON
<Multi_key> <P> <I> : "∏" U03A0 # GREEK CAPITAL LETTER PI
<Multi_key> <R> <H> <O> : "Ρ" U03A1 # GREEK CAPITAL LETTER RHO
<Multi_key> <S> <I> <G> : "∑" U03A3 # GREEK CAPITAL LETTER SIGMA
<Multi_key> <T> <A> <U> : "Τ" U03A4 # GREEK CAPITAL LETTER TAU
<Multi_key> <U> <P> <S> : "Υ" U03A5 # GREEK CAPITAL LETTER UPSILON
<Multi_key> <P> <H> <I> : "Φ" U03A6 # GREEK CAPITAL LETTER PHI
<Multi_key> <C> <H> <I> : "Χ" U0000 # GREEK CAPITAL LETTER CHI
<Multi_key> <P> <S> <I> : "Ψ" U03A8 # GREEK CAPITAL LETTER PSI
<Multi_key> <O> <M> <E> : "Ω" U03A9 # GREEK CAPITAL LETTER OMEGA
# misc mathematical symbols
# misc mathematical/scientific symbols
<Multi_key> <i> <n> <t> : "∫" U222B # INTEGRAL
<Multi_key> <s> <q> <r> <t> : "√" U221A # SQUARE ROOT
<Multi_key> <asciitilde> <equal> : "≈" U2248 # ALMOST EQUAL TO
@@ -39,6 +63,7 @@ include "%L"
<Multi_key> <r> <c> <e> : "⌉" U2309 # RIGHT CEILING
<Multi_key> <l> <f> <l> : "⌊" U230A # LEFT FLOOR
<Multi_key> <r> <f> <l> : "⌋" U230B # RIGHT FLOOR
<Multi_key> <equal> <equal> : "≡" U2261 # IDENTICAL TO
# superscript
<Multi_key> <asciicircum> <2> : "²" U00B2 # SUPERSCRIPT TWO
@@ -104,5 +129,23 @@ include "%L"
<Multi_key> <underscore> <t> : "ₜ" U209C # LATIN SUBSCRIPT SMALL LETTER T
<Multi_key> <underscore> <j> : "ⱼ" U2C7C # LATIN SUBSCRIPT SMALL LETTER J
# roman numerals
<Multi_key> <r> <1> : "" U2160 # ROMAN NUMERAL ONE
<Multi_key> <r> <2> : "Ⅱ" U2161 # ROMAN NUMERAL TWO
<Multi_key> <r> <3> : "Ⅲ" U2162 # ROMAN NUMERAL THREE
<Multi_key> <r> <4> : "Ⅳ" U2163 # ROMAN NUMERAL FOUR
<Multi_key> <r> <5> : "" U2164 # ROMAN NUMERAL FIVE
<Multi_key> <r> <6> : "Ⅵ" U2165 # ROMAN NUMERAL SIX
<Multi_key> <r> <7> : "Ⅶ" U2166 # ROMAN NUMERAL SEVEN
<Multi_key> <r> <8> : "Ⅷ" U2167 # ROMAN NUMERAL EIGHT
<Multi_key> <r> <9> : "Ⅸ" U2168 # ROMAN NUMERAL NINE
<Multi_key> <r> <0> : "" U2169 # ROMAN NUMERAL TEN
<Multi_key> <r> <minus> : "Ⅺ" U216A # ROMAN NUMERAL ELEVEN
<Multi_key> <r> <equal> : "Ⅻ" U216B # ROMAN NUMERAL TWELVE
<Multi_key> <period> <equal> : "⋅" U22C5 # DOT OPERATOR
<Multi_key> <asterisk> <asterisk> : "•" U2219 # BULLET
<Multi_key> <space> <space> : "\x09" U0009 # CHARACTER TABULATION
<Multi_key> <s> <h> <r> <u> <g> : "¯\_(ツ)_/¯"

42
.bash_aliases Normal file
View File

@@ -0,0 +1,42 @@
#!/bin/bash
#
# ~/.bash_aliases
# this file is sourced in ~/.bashrc and defines aliases used by the shell.
#
# replace some default tools with different ones
alias grep='rg'
alias ls='eza -Abhg --colour=auto'
# set default options
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias diff='diff --color'
alias info='info --vi-keys'
alias make='make -j'
alias ip='ip -c'
# aliases to avoid mistakes
alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -I'
# aliases for quitting
alias :qa='exit'
alias :q='exit'
alias qa='exit'
alias q='exit'
alias quit='exit'
# alternate versions of writing the same thing
alias lls='ls -l'
alias ll='ls -l'
# aliases basically for things that I am too lazy to type fully
alias py3='python3'
alias batman='bat -l man'
alias icat='kitten icat'
alias ..='cd ..'
alias ....='cd ../..'
alias ......='cd ../../..'
alias ........='cd ../../../..'

View File

@@ -1,4 +1,4 @@
# shellcheck shell=bash
#!/bin/sh
#
# ~/.bash_logout
# sourced when an interactive login shell exits, or a non-interactive login shell executes `exit`

View File

@@ -1,4 +1,4 @@
# shellcheck shell=bash
#!/bin/sh
# shellcheck disable=1091
#
# ~/.bash_profile
@@ -6,14 +6,14 @@
#
# https://specifications.freedesktop.org/basedir-spec/latest/
export XDG_CONFIG_HOME="$HOME/etc" # configuration files are stored (default: ~/.config)
export XDG_DATA_HOME="$HOME/usr/share" # data files are stored (default: ~/.local/share)
export XDG_BIN_HOME="$HOME/usr/bin" # binary executable files, not within the specification, but added for consistency
export XDG_STATE_HOME="$HOME/var/lib" # state data that should persist between (application) restarts, but not important enough to be stored in XDG_DATA_HOME (default: ~/.local/state)
export XDG_CACHE_HOME="$HOME/var/cache" # TODO: comment
export PATH="$XDG_BIN_HOME:$PATH" # add our bin in front of PATH, making it take precedence
export XDG_CONFIG_HOME="$HOME/.config" # configuration files are stored (default: ~/.config)
export XDG_DATA_HOME="$HOME/.local/share" # data files are stored (default: ~/.local/share)
export XDG_BIN_HOME="$HOME/.local/bin" # binary executable files, not within the specification, but added for consistency
export XDG_STATE_HOME="$HOME/.var/lib" # state data that should persist between (application) restarts, but not important enough to be stored in XDG_DATA_HOME (default: ~/.local/state)
export XDG_CACHE_HOME="$HOME/.var/cache" # user-specific non-essential (cached) data.
export PATH="$XDG_BIN_HOME:$PATH" # add our bin in front of PATH, making it take precedence
if which nvim 1>/dev/null; then
if command -v nvim >/dev/null; then
export EDITOR=nvim # use neovim as an editor
export VISUAL=nvim # use neovim for visual-based editors
export MANPAGER='nvim +Man!' # use neovim as a manual pager
@@ -22,14 +22,17 @@ fi
# coloured GCC warnings and errors
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
# # export Microsoft's bullshit outta here
# Microsoft bullshit
export DOTNET_CLI_TELEMETRY_OPTOUT=1
export VCPKG_DISABLE_METRICS=1
export VCPKG_ROOT="$XDG_DATA_HOME/vcpkg"
export PATH+=":$VCPKG_ROOT"
export PATH="$PATH:$VCPKG_ROOT"
# if executing interactively
# execute .bashrc in the current login context
[[ $- != *i* ]] && return
[[ -z ${PS1-} ]] && retrun
[[ -f $HOME/.bashrc ]] && . "$HOME/.bashrc"
case $- in
*i*) ;;
*) return ;;
esac
[ -z "${PS1-}" ] && return
[ -f "$HOME/.bashrc" ] && . "$HOME/.bashrc"

129
.bashrc
View File

@@ -1,107 +1,78 @@
# shellcheck shell=bash
# shellcheck disable=SC1090,SC1091
#!/bin/bash
# shellcheck disable=SC1091,SC2155
#
# ~/.bashrc
# sourced upon launch of an interactive shell, which isn't a login shell has been executed
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
[[ -z "${PS1-}" ]] && return
# wrapper for lazily loading __git_ps1 whenever it is actually needed
_lazy_git_ps1() {
if [[ -z $__GIT_PROMPT_SOURCED ]]; then
. /usr/share/bash-completion/completions/git &>/dev/null
. /usr/share/git/completion/git-prompt.sh &>/dev/null
if [ -d .git ] || git worktree list &>/dev/null; then
export __GIT_PROMPT_SOURCED=1
__git_ps1 "$@"
fi
else
__git_ps1 "$@"
fi
}
case $- in
*i*) ;;
*) return ;;
esac
[ -z "${PS1-}" ] && return
# lazy loading of ssh agents
_lazy_ssh() {
if [[ -z $SSH_AUTH_SOCK ]]; then
eval "$(ssh-agent -s)" &>/dev/null
ssh-add "$HOME/.ssh/github" &>/dev/null
ssh-add "$HOME/.ssh/admin@homeserver" &>/dev/null
if [ -z "$SSH_AUTH_SOCK" ]; then
eval "$(ssh-agent -s)" >/dev/null
ssh-add "$HOME/.ssh/github" >/dev/null
ssh-add "$HOME/.ssh/gitea" >/dev/null
ssh-add "$HOME/.ssh/admin@homeserver" >/dev/null
fi
}
# aliases so the function is called beforehand
alias ssh='_lazy_ssh; ssh'
alias sudo='_lazy_ssh; sudo'
# alias to colourize make output
# alias to colourise make output
_make() {
make "$@" 2> >(sed -E \
-e "s/^([Mm]akefile:[0-9]+:.*)/\x1b[33m\1\x1b[0m/" \
-e "s/^.*error.*$/\x1b[31m&\x1b[0m/I" >&2)
}
alias make='_make'
#
# envs
#
# set PS1
PS1=
PS1="$PS1"'\[\033[01;35m\]\u@\h' # user@host
PS1="$PS1"'\[\033[00m\]:' # separator
PS1="$PS1"'\[\033[01;34m\]\w' # working directory
PS1="$PS1"'\[\033[01;93m\]$(_lazy_git_ps1)' # github branch
PS1="$PS1"'\[\033[00m\]\$ ' # shell sign
# lazily loads the git utilities, to prevent slowdowns
__lazy_git_ps1() {
if [ -z "$__GIT_PROMPT_SOURCED__" ]; then
if [ -d .git ] || git worktree list &>/dev/null; then
. /usr/share/bash-completion/completions/git &>/dev/null
. /usr/share/git/completion/git-prompt.sh &>/dev/null
export __GIT_PROMPT_SOURCED__=1
__git_ps1
fi
else __git_ps1; fi
return 0
}
# regenerates the PS1 prompt
__regenprompt() {
local err=$? # acquire the error code of the last executed command
local git=$(__lazy_git_ps1)
if [ $err -ne 0 ]; then
err="\[\033[$((COLUMNS - 4))G\033[01;31m\]${err}\[\033[0G\]"
else unset err; fi
PS1="$err" # error code
PS1="$PS1\[\033[?25h\]" # show cursor
PS1="$PS1\[\033[01;35m\]\u@\h" # user@host
PS1="$PS1\[\033[00m\]:" # separator
PS1="$PS1\[\033[01;34m\]\w" # working directory
PS1="$PS1\[\033[01;93m\]${git}" # git branch
PS1="$PS1\[\033[00m\]\$ " # shell sign
}
PROMPT_COMMAND=__regenprompt
# history settings
HISTSIZE=2048
HISTFILESIZE=2048
HISTCONTROL=erasedups:ignoredups:ignorespace
HISTIGNORE='exit*:clear*:\:*:echo*'
#
# bash completion
#
. /home/user/.local/share/vcpkg/scripts/vcpkg_completion.bash &>/dev/null # fucking vcpkg
shopt -s checkwinsize # check the window size after each command (and if necessary, the values of LINES and COLUMNS)
shopt -s globstar # enable globstar (**/*)
# check the window size after each command (and if necessary, the values of LINES and COLUMNS)
shopt -s checkwinsize
#
# aliases
#
# aliases for colour
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias ls='eza -Abhg --colour=auto'
alias grep='rg'
alias diff='diff --color'
alias ip='ip -c'
# application aliases
alias ncdu='ncdu --color=dark -t 16'
alias hyfetch='hyfetch --ascii-file $XDG_CONFIG_HOME/hyfetch-ascii --config-file $XDG_CONFIG_HOME/hyfetch.json'
alias bat='bat --wrap never --tabs 4 --theme gruvbox-dark'
alias make='_make -j'
# aliases to avoid mistakes
alias cp='cp -i'
alias mv='mv -i'
#alias rm='rm -i'
alias :qa='exit'
alias qa='exit'
alias :q='exit'
alias q='exit'
alias py3='python3'
alias batman='bat -l man'
# quality of life short-hands
alias ..='cd ..'
alias ....='cd ../..'
alias ......='cd ../../..'
alias ........='cd ../../../..'
alias ll="ls -l"
[ -f "$HOME/.bash_aliases" ] && . .bash_aliases
# cute lil hyfetch :3
[[ $TERM == "xterm-kitty" ]] && hyfetch
[ "$TERM" == "xterm-kitty" ] && fastfetch

View File

@@ -2,35 +2,38 @@
# ---------------------------
# general style settings
# ---------------------------
BasedOnStyle: '' # (LLVM,Google,Chromium,Mozilla,WebKit,Microsoft,GNU,InheritParentConfig)
Standard: Auto # automatically detect the language version
ColumnLimit: 0 # 0: disable column limit
LineEnding: LF # use LF line endings
UseTab: ForContinuationAndIndentation # (Never,ForIndentation,ForContinuationAndIndentation,Always)
TabWidth: 4 # recommended to set this equal to IndentWidth
IndentWidth: 4 # how wide each indent is
ContinuationIndentWidth: 4 # width for a line continuation
BasedOnStyle: GNU
Standard: Auto
ColumnLimit: 0
LineEnding: LF
UseTab: ForContinuationAndIndentation
TabWidth: 8
IndentWidth: 8
ContinuationIndentWidth: 8
AccessModifierOffset: -4
# ---------------------------
# alignment options
# ---------------------------
AlignAfterOpenBracket: DontAlign # (Align,DontAlign,AlwaysBreak,BlockIndent)
AlignArrayOfStructures: Left # (Left,Right,None)
AlignConsecutiveMacros: AcrossEmptyLines # (None,Consecutive,AcrossEmptyLines,AcrossComments,AcrossEmptyLinesAndComments)
AlignConsecutiveAssignments: None # (None,Consecutive,AcrossEmptyLines,AcrossComments,AcrossEmptyLinesAndComments)
AlignConsecutiveBitFields: AcrossEmptyLines # (None,Consecutive,AcrossEmptyLines,AcrossComments,AcrossEmptyLinesAndComments)
AlignConsecutiveDeclarations: None # (None,Consecutive,AcrossEmptyLines,AcrossComments,AcrossEmptyLinesAndComments)
AlignEscapedNewlines: Left # (DontAlign,Left,LeftWithLastLine,Right)
AlignOperands: DontAlign # (DontAlign,Align,AlignAfterOperator)
AlignTrailingComments: Always # (Leave,Always,Never)
AlignAfterOpenBracket: DontAlign
AlignOperands: DontAlign
AlignTrailingComments: true
AlignConsecutiveMacros: AcrossEmptyLines
AlignEscapedNewlines: Left
AlignArrayOfStructures: Left
AlignConsecutiveAssignments: Consecutive
AlignConsecutiveBitFields: AcrossEmptyLines
AlignConsecutiveDeclarations: Consecutive
AlignConsecutiveShortCaseStatements:
Enabled: true
# ---------------------------
# short constructs on a single line
# ---------------------------
AllowShortBlocksOnASingleLine: Always # (Never,Empty,Always)
AllowShortFunctionsOnASingleLine: All # (None,InlineOnly,Empty,All)
AllowShortLambdasOnASingleLine: All # (None,Empty,Inline,All)
AllowShortIfStatementsOnASingleLine: AllIfsAndElse # (Never,WithoutElse,OnlyFirstIf,AllIfsAndElse)
AllowShortBlocksOnASingleLine: Always
AllowShortFunctionsOnASingleLine: All
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: AllIfsAndElse
AllowShortCaseLabelsOnASingleLine: true
AllowShortEnumsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
@@ -38,26 +41,24 @@ AllowShortLoopsOnASingleLine: true
# ---------------------------
# break and wrapping options
# ---------------------------
AlwaysBreakBeforeMultilineStrings: true # when defining multi-line strings, linebreak should be inserted
BreakAfterReturnType: Automatic # is decided by PenaltyReturnTypeOnItsOwnLine
BreakTemplateDeclarations: MultiLine # (Leave,No,MultiLine,Yes)
BreakBeforeBinaryOperators: None # (None,NonAssignment,All)
BreakBeforeConceptDeclarations: Never # (Never,Allowed,Always)
BreakBeforeBraces: Attach # (Attach,Linux,Mozilla,Stroustrup,Allman,Whitesmiths,GNU,WebKit,Custom)
BreakInheritanceList: BeforeColon # (BeforeColon,BeforeComma,AfterColon)
BreakConstructorInitializers: BeforeColon # (BeforeColon,BeforeComma,AfterColon)
BreakBeforeTernaryOperators: true
BreakStringLiterals: true
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakAfterReturnType: Automatic
BreakTemplateDeclarations: false
BreakBeforeBinaryOperators: None
BreakBeforeConceptDeclarations: Never
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: false
BreakStringLiterals: false
# ---------------------------
# brace wrapping configuration
# ---------------------------
BraceWrapping:
AfterControlStatement: Never # (Never,MultiLine,Always)
AfterControlStatement: Never
AfterCaseLabel: false
AfterClass: false
AfterEnum: false
AfterFunction: false
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
@@ -68,104 +69,73 @@ BraceWrapping:
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
# ---------------------------
# constructor initializer and parameter packing options
# ---------------------------
ConstructorInitializerIndentWidth: 4
PackConstructorInitializers: BinPack # (Never,BinPack,CurrentLine,NextLine,NextLineOnly)
BinPackParameters: true # use bin-packing for paramter lists
BinPackArguments: false # false: function calls either on one line or one per line
ConstructorInitializerIndentWidth: 8
PackConstructorInitializers: NextLine
BinPackParameters: true
BinPackArguments: true
# ---------------------------
# pointer alignment
# ---------------------------
DerivePointerAlignment: false # automatically detect pointer alignment
PointerAlignment: Right # (Left,Right,Middle)
ReferenceAlignment: Pointer # (Pointer,Left,Right,Middle)
QualifierAlignment: Right # (Leave,Left,Right,Custom)
DerivePointerAlignment: false
PointerAlignment: Right
ReferenceAlignment: Pointer
QualifierAlignment: Left
# ---------------------------
# include settings and sorting
# ---------------------------
IncludeIsMainSourceRegex: '' # only [*.{c,cc,cpp,c++,cxx,m,mm}] are considered to be "main"
IncludeIsMainRegex: '([-_](test|unittest))?$' # regex used for identifying an include as "main", to assign catagory 0
IncludeBlocks: Regroup # (Preserve,Merge,Regroup)
IncludeIsMainSourceRegex: ''
IncludeIsMainRegex: '([-_](test|unittest))?$'
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^<.*\.h>' # system headers
- Regex: '^<.*\.h>'
Priority: 2
SortPriority: 0
CaseSensitive: true
- Regex: '^".*' # custom headers
- Regex: '^".*'
Priority: 3
SortPriority: 0
CaseSensitive: true
# ---------------------------
# macro and language-specific settings
# ---------------------------
AttributeMacros:
- __capability
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IfMacros:
- KJ_IF_MAYBE
StatementAttributeLikeMacros:
- Q_EMIT
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
WhitespaceSensitiveMacros:
- STRINGIZE
- PP_STRINGIZE
- BOOST_PP_STRINGIZE
- NS_SWIFT_NAME
- CF_SWIFT_NAME
# ---------------------------
# additional formatting and sorting details
# ---------------------------
FixNamespaceComments: false
MaxEmptyLinesToKeep: 2
ReflowComments: true
RemoveBracesLLVM: false
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
EmptyLineAfterAccessModifier: Never # (Never,Leave,Always)
EmptyLineBeforeAccessModifier: LogicalBlock # (Never,Leave,LogicalBlock,Always)
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true # adds comments at namespace delimiters
MaxEmptyLinesToKeep: 4 # what the maximum amount of empty lines that we're allowed to keep
ReflowComments: true # reflow comment text to match column limits
RemoveBracesLLVM: false # don't automatically remove braces
SeparateDefinitionBlocks: Leave # (Leave,Always.Never)
ShortNamespaceLines: 1 # how many lines a namespaces can be to be regarded "short"
SortIncludes: CaseSensitive # (Never,CaseSensitive,CaseInsensitive)
SortJavaStaticImport: Before # (After,Before)
SortUsingDeclarations: LexicographicNumeric # (Never,Lexicographic,LexicographicNumeric)
SeparateDefinitionBlocks: Leave
ShortNamespaceLines: 1
SortIncludes: CaseSensitive
SortJavaStaticImport: Before
SortUsingDeclarations: false
# ---------------------------
# spacing options
# ---------------------------
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
Cpp11BracedListStyle: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements # (ControlStatements,ControlStatementsExceptControlMacros,NonEmptyParentheses,Always,Custom)
SpaceBeforeParensOptions:
AfterControlStatements: true
AfterForeachMacros: true
AfterFunctionDefinitionName: false
AfterFunctionDeclarationName: false
AfterIfMacros: true
AfterOverloadedOperator: false
BeforeNonEmptyParentheses: false
SpaceAroundPointerQualifiers: Default # (Default,Before,After,Both) recommend to use Default and let PointerAlignment decide
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: true
SpacesInParens: Custom
@@ -175,16 +145,28 @@ SpacesInParensOptions:
InCStyleCasts: false
Other: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: Never # (Never,Always,Leave)
SpacesInAngles: Never
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: 1
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
BitFieldColonSpacing: Both # (Both,None,Before,After)
BitFieldColonSpacing: Both
# ---------------------------
# penalty settings
# ---------------------------
PenaltyBreakAssignment: 10
PenaltyBreakBeforeFirstCallParameter: 30
PenaltyBreakComment: 10
PenaltyBreakFirstLessLess: 0
PenaltyBreakString: 10
PenaltyExcessCharacter: 100
PenaltyReturnTypeOnItsOwnLine: 60
# ---------------------------
# indentation details
@@ -193,19 +175,8 @@ IndentAccessModifiers: false
IndentCaseLabels: false
IndentCaseBlocks: false
IndentGotoLabels: false
IndentExternBlock: AfterExternBlock # (AfterExternBlock,NoIndent,Indent)
IndentExternBlock: AfterExternBlock
IndentRequiresClause: false
IndentPPDirectives: None # preprocessor indent style (None,AfterHash,BeforeHash)
IndentPPDirectives: None
PPIndentWidth: 1
---
# ---------------------------
# Objective-C specific settings
# ---------------------------
Language: ObjC
ObjCBinPackProtocolList: Never
ObjCBlockIndentWidth: 4
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
...

View File

@@ -15,6 +15,7 @@ Checks:
- '-bugprone-switch-missing-default-case'
- '-bugprone-easily-swappable-parameters'
- '-clang-analyzer-security.insecureAPI.*'
- '-misc-include-cleaner'
WarningsAsErrors: ''
HeaderFileExtensions:
- ''
@@ -29,7 +30,6 @@ ImplementationFileExtensions:
- cxx
HeaderFilterRegex: ''
FormatStyle: none
User: user
CheckOptions:
cert-dcl16-c.NewSuffixes: 'L;LL;LU;LLU'
cert-err33-c.AllowCastToVoid: 'true'

7
.config/act/actrc Normal file
View File

@@ -0,0 +1,7 @@
-P ubuntu-latest=catthehacker/ubuntu:act-latest
#-P ubuntu-24.04-arm=catthehacker/ubuntu:act-latest
#-P windows-latest=catthehacker/ubuntu:act-latest
#-P windows-11-arm=catthehacker/ubuntu:act-latest
#-P macos-latest=catthehacker/ubuntu:act-latest
--artifact-server-path $PWD/.act/artifacts
--cache-server-path=$PWD/.act/cache

View File

@@ -0,0 +1,22 @@
---
CompileFlags:
Compiler: gcc
Index:
Background: Build
StandardLibrary: true
Diagnostics:
UnusedIncludes: None
MissingIncludes: None
ClangTidy:
FastCheckFilter: Strict
Add:
- clang-analyzer*
- bugprone*
- misc*
- performance*
Remove:
- bugprone-narrowing-conversions
- bugprone-integer-division
- bugprone-implicit-widening-of-multiplication-result
- bugprone-switch-missing-default-case
- bugprone-easily-swappable-parameters

View File

@@ -0,0 +1,19 @@
$1 ▄
▄█▄
▄███▄
▄█████▄
▄███████▄
$2 ▄ ▀▀██████▄
▄██▄▄ ▀█████▄
▄█████████████▄
▄███████████████▄
$3 ▄█████████████████▄
▄███████████████████▄
▄█████████▀▀▀▀████████▄
▄████████▀ ▀███████▄
▄█████████ ████▀▀██▄
$4 ▄██████████ █████▄▄▄
▄██████████▀ ▀█████████▄
▄██████▀▀▀ ▀▀██████▄
▄███▀▀ ▀▀███▄

View File

@@ -1,18 +1,18 @@
$1
▟█▙
▟███▙
▟█████▙
▟███████▙
▂▔▀▜██████▙
$2 ▂▔▀▜██████▙
▟██▅▂▝▜█████▙
▟█████████████▙
▟███████████████▙
▟█████████████████▙
$3 ▟█████████████████▙
▟███████████████████▙
▟█████████▛▀▀▜████████▙
▟████████▛ ▜███████▙
▟█████████ ████████▙
▟██████████ █████▆▅▄▃▂
$4 ▟██████████ █████▆▅▄▃▂
▟██████████▛ ▜█████████▙
▟██████▀▀▀ ▀▀██████▙
▟███▀▘ ▝▀███▙

View File

@@ -1,5 +1,15 @@
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"source": "$XDG_CONFIG_HOME/fastfetch/arch-custom.txt",
"type": "file",
"color": {
"1": "light_yellow",
"2": "light_white",
"3": "bright_magenta",
"4": "black"
}
},
"modules": [
"title",
"separator",
@@ -26,7 +36,9 @@
"cursor",
"icons",
"theme",
"font",
"terminal",
"terminalfont",
"locale"
],
"display": {

21
.config/i3/config Normal file
View File

@@ -0,0 +1,21 @@
# define modifier keys
set $mod mod4
set $alt mod1
# define workspaces
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
set $ws11 "11"
set $ws12 "12"
# include different modules (may not include definitions shared across multiple units)
include $XDG_CONFIG_HOME/i3/config.d/*.conf
exec --no-startup-id i3-msg 'workspace $ws1'

View File

@@ -0,0 +1,28 @@
# assign custom classes to specific workspaces
# to more easily assign apps to specific workspaces temporarily
assign [class="app-ws1"] $ws1
assign [class="app-ws2"] $ws2
assign [class="app-ws3"] $ws3
assign [class="app-ws4"] $ws4
assign [class="app-ws5"] $ws5
assign [class="app-ws6"] $ws6
assign [class="app-ws7"] $ws7
assign [class="app-ws8"] $ws8
assign [class="app-ws9"] $ws9
assign [class="app-ws10"] $ws10
assign [class="app-ws11"] $ws11
assign [class="app-ws12"] $ws12
# assign applications to specific workspaces
# TODO: I'd prefer to switch to the designated workspace when it's launched in another workspace.
# assign [class="Spotify"] $ws8
assign [class="vesktop"] $ws9
# autostart applications on a specific workspace
exec --no-startup-id i3-msg 'workspace $ws2; exec firefox --new-window'
exec --no-startup-id i3-msg 'workspace $ws1; exec kitty --single-instance'
# autostart applications in general (usually always assigned to a workspace)
exec --no-startup-id flatpak run dev.vencord.Vesktop
# exec --no-startup-id spotify
exec --no-startup-id blueman-applet

View File

@@ -0,0 +1,36 @@
# set the font
font pango:JetBrainsMonoNLNerdFont-Regular 10
# launch polybar
exec_always --no-startup-id $XDG_CONFIG_HOME/polybar/launch.sh
# set the border width (and remove title bars)
default_orientation vertical
for_window [class=".*"] border pixel 1
# for_window [floating] border pixel 5
for_window [class=".*"] split toggle
set $scr1 "eDP-1"
set $scr2 "HDMI-1"
# set xrandr settings
exec_always xrandr --auto \
--output $scr1 --dpi 96 --primary \
--output $scr2 --dpi 96 --above $scr1
# attach each workspace to a specific screen
workspace $ws1 output $scr1
workspace $ws2 output $scr1
workspace $ws3 output $scr1
workspace $ws4 output $scr1
workspace $ws5 output $scr1
workspace $ws6 output $scr1
workspace $ws7 output $scr1
workspace $ws8 output $scr1
workspace $ws9 output $scr1
workspace $ws10 output $scr2
workspace $ws11 output $scr2
workspace $ws12 output $scr2
# update the satellite render
exec_always satallite-wp-update

View File

@@ -0,0 +1,79 @@
#
# OS-shortcuts
#
# workspace navigation
bindsym $mod+ctrl+h workspace prev
# TODO: multi-monitor setup using J/K?
bindsym $mod+ctrl+l workspace next
# window navigation
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
# move windows
bindsym $mod+shift+h move left
bindsym $mod+shift+j move down
bindsym $mod+shift+k move up
bindsym $mod+shift+l move right
# closing windows (kill uses WM_DELETE, if available) (split is toggled for quasi alternating layout)
bindsym $mod+q split toggle kill
bindsym $alt+F4 split toggle kill
# toggle between the different possible splits
bindsym $mod+F10 fullscreen toggle
bindsym $mod+e layout toggle split
# system commands
bindsym $mod+shift+c reload
bindsym $mod+shift+r restart
bindsym $mod+shift+e exit
bindsym $mod+shift+f floating toggle
bindsym $mod+o exec --no-startup-id xlock -mode petri -delay 20000 -size 2 -ncolors 16 -saturation 0.4 -echokeys -echokey '*' -usefirst
#
# XF86 key actions
#
# volume control
bindsym XF86AudioRaiseVolume exec --no-startup-id x-volume up
bindsym XF86AudioLowerVolume exec --no-startup-id x-volume down
bindsym XF86AudioMute exec --no-startup-id x-volume mute
bindsym XF86AudioMicMute exec --no-startup-id x-mic-mute
# brightness control
bindsym XF86MonBrightnessUp exec --no-startup-id x-brightness-up
bindsym XF86MonBrightnessDown exec --no-startup-id x-brightness-down
# media controls
bindsym XF86AudioPlay exec playerctl play-pause
bindsym XF86AudioPause exec playerctl play-pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
# app launchers and such
bindsym XF86Calculator exec --no-startup-id kitty -e 'calc'
#
# apps
#
# pickers
bindsym $mod+F5 exec --no-startup-id rofi -show window
bindsym $mod+space exec --no-startup-id rofi -show drun
bindsym $mod+period exec --no-startup-id rofi -show emoji -config emoji
# terminal
bindsym $mod+Return exec --no-startup-id kitty --single-instance
bindsym $mod+t exec --no-startup-id kitty --single-instance
bindsym $mod+backslash exec --no-startup-id kitty --single-instance
# internet browser
bindsym $mod+b exec --no-startup-id firefox --new-window
bindsym $mod+shift+b exec --no-startup-id firefox --new-window --private-window
# screenshot
bindsym $mod+shift+s exec --no-startup-id maim -f png -s | xclip -selection clipboard -t image/png
bindsym Print exec --no-startup-id maim -f png | xclip -selection clipboard -t image/png
bindsym $mod+ctrl+shift+s exec --no-startup-id maim -f png -s > $(xdg-user-dir PICTURES)/screenshot.png
bindsym $mod+Print+s exec --no-startup-id maim -f png > $(xdg-user-dir PICTURES)/screenshot.png

View File

@@ -0,0 +1,27 @@
# workspace switch keybinds
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
bindsym $mod+0 workspace $ws10
bindsym $mod+minus workspace $ws11
bindsym $mod+equal workspace $ws12
# move containers to workspaces
bindsym $mod+shift+1 move container to workspace $ws1
bindsym $mod+shift+2 move container to workspace $ws2
bindsym $mod+shift+3 move container to workspace $ws3
bindsym $mod+shift+4 move container to workspace $ws4
bindsym $mod+shift+5 move container to workspace $ws5
bindsym $mod+shift+6 move container to workspace $ws6
bindsym $mod+shift+7 move container to workspace $ws7
bindsym $mod+shift+8 move container to workspace $ws8
bindsym $mod+shift+9 move container to workspace $ws9
bindsym $mod+shift+0 move container to workspace $ws10
bindsym $mod+shift+minus move container to workspace $ws11
bindsym $mod+shift+equal move container to workspace $ws12

View File

@@ -10,6 +10,7 @@ background_opacity 0.90
# BEGIN_KITTY_FONTS
font_family family="JetBrainsMonoNL Nerd Font Mono"
font_size 11.0
bold_font auto
italic_font auto
bold_italic_font auto

View File

@@ -10,10 +10,10 @@ gui:
showCommandLog: false
git:
fetchAll: true
paging:
colorArg: always
pager: diff-so-fancy
useConfig: false
pagers:
- colorArg: always
pager: diff-so-fancy
useConfig: false
overrideGpg: true
update:
method: never

1
.config/lf/colors Symbolic link
View File

@@ -0,0 +1 @@
colours

168
.config/lf/colours Normal file
View File

@@ -0,0 +1,168 @@
# vim:ft=dircolors
# (This is not a dircolors file but it helps to highlight colors and comments)
#
# Set the colours to match EZA's default colours.
#
# file types
fi 00 # FILE
di 34;01 # DIR
ln 36 # LINK
pi 33 # FIFO
so 31;01 # SOCK
bd 33;01 # BLK
cd 33;01 # CHR
or 31 # ORPHAN
su 31;04 # SETUID
sg 33;04 # SETGID
tw 34;04 # STICKY_OTHER_WRITABLE
ow 34 # OTHER_WRITABLE
st 34;04 # STICKY
ex 32;01 # EXEC
# build files all lowercase
*makefile 33;04
*cmakelists.txt 33;04
*cargo.toml 33;04
*package.json 33;04
# build files case sensitive variation
*Makefile 33;04
*CMakeLists.txt 33;04
*Cargo.toml 33;04
# cryptographic files
*.pub 33
*.asc 33
*.enc 33
*.p12 33
# documents
*.pdf 02;32
*.docx 02;32
*.doc 02;32
*.dvi 02;32
# TODO: doesn't do anything?
# temporary files
*~ 02
*.tmp 02
*.swp 02
# archives or compressed
*.tar 31
*.tgz 31
*.arc 31
*.arj 31
*.taz 31
*.lha 31
*.lz4 31
*.lzh 31
*.lzma 31
*.tlz 31
*.txz 31
*.tzo 31
*.t7z 31
*.zip 31
*.z 31
*.dz 31
*.gz 31
*.lrz 31
*.lz 31
*.lzo 31
*.xz 31
*.zst 31
*.tzst 31
*.bz2 31
*.bz 31
*.tbz 31
*.tbz2 31
*.tz 31
*.deb 31
*.rpm 31
*.jar 31
*.war 31
*.ear 31
*.sar 31
*.rar 31
*.alz 31
*.ace 31
*.zoo 31
*.cpio 31
*.7z 31
*.rz 31
*.cab 31
*.wim 31
*.swm 31
*.dwm 31
*.esd 31
# image formats
*.jpg 35
*.jpeg 35
*.mjpg 35
*.mjpeg 35
*.gif 35
*.bmp 35
*.pbm 35
*.pgm 35
*.ppm 35
*.tga 35
*.xbm 35
*.xpm 35
*.tif 35
*.tiff 35
*.png 35
*.svg 35
*.svgz 35
*.mng 35
*.pcx 35
*.mov 35
*.mpg 35
*.mpeg 35
*.m2v 35
*.mkv 35
*.webm 35
*.ogm 35
*.mp4 35
*.m4v 35
*.mp4v 35
*.vob 35
*.qt 35
*.nuv 35
*.wmv 35
*.asf 35
*.rm 35
*.rmvb 35
*.flc 35
*.avi 35
*.fli 35
*.flv 35
*.gl 35
*.dl 35
*.xcf 35
*.xwd 35
*.yuv 35
*.cgm 35
*.emf 35
*.ogv 35
*.ogx 35
# audio formats
*.aac 36
*.au 36
*.flac 36
*.m4a 36
*.mid 36
*.midi 36
*.mka 36
*.mp3 36
*.mpc 36
*.ogg 36
*.ra 36
*.wav 36
*.oga 36
*.opus 36
*.spx 36
*.xspf 36

342
.config/lf/icons Normal file
View File

@@ -0,0 +1,342 @@
# vim:ft=conf
# file types (with matching order)
ln 󰌹 # LINK
or 󰌺 # ORPHAN
tw t # STICKY_OTHER_WRITABLE
ow  # OTHER_WRITABLE
st t # STICKY
di  # DIR
pi p # FIFO
so s # SOCK
bd b # BLK
cd c # CHR
su u # SETUID
sg g # SETGID
ex  # EXEC
fi  # FILE
# file extensions (vim-devicons)
*.styl 
*.sass 
*.scss 
*.htm 
*.html 
*.slim 
*.haml 
*.ejs 
*.css 
*.less 
*.md 
*.mdx 
*.markdown 
*.rmd 
*.json 
*.webmanifest 
*.js 
*.mjs 
*.jsx 
*.rb 
*.gemspec 
*.rake 
*.php 
*.py 
*.pyc 
*.pyo 
*.pyd 
*.coffee 
*.mustache 
*.hbs 
*.conf 
*.ini 
*.yml 
*.yaml 
*.toml 
*.bat 
*.mk 
*.jpg 
*.jpeg 
*.bmp 
*.png 
*.webp 
*.gif 
*.ico 
*.twig 
*.cpp 
*.c++ 
*.cxx 
*.cc 
*.cp 
*.c 
*.cs 󰌛
*.h 
*.hh 
*.hpp 
*.hxx 
*.hs 
*.lhs 
*.nix 
*.lua 
*.java 
*.sh 
*.fish 
*.bash 
*.zsh 
*.ksh 
*.csh 
*.awk 
*.ps1 
*.ml λ
*.mli λ
*.diff 
*.db 
*.sql 
*.dump 
*.clj 
*.cljc 
*.cljs 
*.edn 
*.scala 
*.go 
*.dart 
*.xul 
*.sln 
*.suo 
*.pl 
*.pm 
*.t 
*.rss 
'*.f#' 
*.fsscript 
*.fsx 
*.fs 
*.fsi 
*.rs 
*.rlib 
*.d 
*.erl 
*.hrl 
*.ex 
*.exs 
*.eex 
*.leex 
*.heex 
*.vim 
*.ai 
*.psd 
*.psb 
*.ts 
*.tsx 
*.jl 
*.pp 
*.vue 
*.elm 
*.swift 
*.xcplayground 
*.tex 󰙩
*.r 󰟔
*.rproj 󰗆
*.sol 󰡪
*.pem 
# file names (vim-devicons) (case-insensitive not supported in lf)
*gruntfile.coffee 
*gruntfile.js 
*gruntfile.ls 
*gulpfile.coffee 
*gulpfile.js 
*gulpfile.ls 
*mix.lock 
*dropbox 
*.ds_store 
*.gitconfig 
*.gitignore 
*.gitattributes 
*.gitlab-ci.yml 
*.bashrc 
*.zshrc 
*.zshenv 
*.zprofile 
*.vimrc 
*.gvimrc 
*_vimrc 
*_gvimrc 
*.bashprofile 
*favicon.ico 
*license 
*node_modules 
*react.jsx 
*procfile 
*dockerfile 
*docker-compose.yml 
*docker-compose.yaml 
*compose.yml 
*compose.yaml 
*rakefile 
*config.ru 
*gemfile 
*makefile 
*cmakelists.txt 
*robots.txt 󰚩
# file names (case-sensitive adaptations)
*Gruntfile.coffee 
*Gruntfile.js 
*Gruntfile.ls 
*Gulpfile.coffee 
*Gulpfile.js 
*Gulpfile.ls 
*Dropbox 
*.DS_Store 
*LICENSE 
*React.jsx 
*Procfile 
*Dockerfile 
*Docker-compose.yml 
*Docker-compose.yaml 
*Rakefile 
*Gemfile 
*Makefile 
*CMakeLists.txt 
# file patterns (vim-devicons) (patterns not supported in lf)
# .*jquery.*\.js$ 
# .*angular.*\.js$ 
# .*backbone.*\.js$ 
# .*require.*\.js$ 
# .*materialize.*\.js$ 
# .*materialize.*\.css$ 
# .*mootools.*\.js$ 
# .*vimrc.* 
# Vagrantfile$ 
# file patterns (file name adaptations)
*jquery.min.js 
*angular.min.js 
*backbone.min.js 
*require.min.js 
*materialize.min.js 
*materialize.min.css 
*mootools.min.js 
*vimrc 
Vagrantfile 
# archives or compressed (extensions from dircolors defaults)
*.tar 
*.tgz 
*.arc 
*.arj 
*.taz 
*.lha 
*.lz4 
*.lzh 
*.lzma 
*.tlz 
*.txz 
*.tzo 
*.t7z 
*.zip 
*.z 
*.dz 
*.gz 
*.lrz 
*.lz 
*.lzo 
*.xz 
*.zst 
*.tzst 
*.bz2 
*.bz 
*.tbz 
*.tbz2 
*.tz 
*.deb 
*.rpm 
*.jar 
*.war 
*.ear 
*.sar 
*.rar 
*.alz 
*.ace 
*.zoo 
*.cpio 
*.7z 
*.rz 
*.cab 
*.wim 
*.swm 
*.dwm 
*.esd 
# image formats (extensions from dircolors defaults)
*.jpg 
*.jpeg 
*.mjpg 
*.mjpeg 
*.gif 
*.bmp 
*.pbm 
*.pgm 
*.ppm 
*.tga 
*.xbm 
*.xpm 
*.tif 
*.tiff 
*.png 
*.svg 
*.svgz 
*.mng 
*.pcx 
*.mov 
*.mpg 
*.mpeg 
*.m2v 
*.mkv 
*.webm 
*.ogm 
*.mp4 
*.m4v 
*.mp4v 
*.vob 
*.qt 
*.nuv 
*.wmv 
*.asf 
*.rm 
*.rmvb 
*.flc 
*.avi 
*.fli 
*.flv 
*.gl 
*.dl 
*.xcf 
*.xwd 
*.yuv 
*.cgm 
*.emf 
*.ogv 
*.ogx 
# audio formats (extensions from dircolors defaults)
*.aac 
*.au 
*.flac 
*.m4a 
*.mid 
*.midi 
*.mka 
*.mp3 
*.mpc 
*.ogg 
*.ra 
*.wav 
*.oga 
*.opus 
*.spx 
*.xspf 
# other formats
*.pdf 

13
.config/lf/lfrc Normal file
View File

@@ -0,0 +1,13 @@
# enable hidden files by default
set hidden!
# set the displayed info
# TODO: also show file permissions/owner, if room or whatever
set info size
set icons
map <esc> quit
map <enter> open
map d delete
map x cut

View File

@@ -0,0 +1,11 @@
[*]
charset = UTF-8
end_of_line = LF
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab
indent_size = tab
[*.lua]
indent_style = tab
indent_size = tab

5
.config/nvim/.gitignore vendored Normal file
View File

@@ -0,0 +1,5 @@
.luarc.json
nvim
*.vim
lazy-lock.json

View File

@@ -1,7 +1,5 @@
MIT License
Copyright (c) 2021 okarin001
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights

13
.config/nvim/README.md Normal file
View File

@@ -0,0 +1,13 @@
# Quinn's NeoVim configuration
### Required/Recommended tools:
- cURL
- git
- C compiler
- Rust toolchain
- lf
- fd
- clang-format
- rustfmt
- shfmt
- yq
- lua5.1

10
.config/nvim/docs/TODO.md Normal file
View File

@@ -0,0 +1,10 @@
# TODO
- [X] keybind to edit multiple lines at once (have multiple cursors)
- [ ] keybind to rename symbol
- [ ] have TAB in insert mode automatically bring me up to the right indentation.
- [X] debugger
- [X] launch on f5
- [x] breakpoints
- [X] can set breakpoints
- [X] breakpoints look nice
- [ ] plugin for markdown to make taking notes like these easier?

11
.config/nvim/init.lua Normal file
View File

@@ -0,0 +1,11 @@
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
Autocmd = vim.api.nvim_create_autocmd
Map = vim.keymap.set
---@class userdata
---@field palette GruvboxPalette
_G.userdat = {}
require('config')

View File

@@ -0,0 +1,73 @@
-- highlight when yanking text
Autocmd('TextYankPost', {
desc = 'highlight when yanking text',
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
callback = function()
vim.highlight.on_yank()
end,
})
-- disable new line comment
Autocmd("BufEnter", {
desc = "disable bew line comment",
callback = function()
vim.opt.formatoptions:remove({ "c", "r", "o" })
end,
})
-- go to last location when opening a buffer
Autocmd("BufReadPost", {
desc = "go to last location when opening a buffer",
callback = function()
local mark = vim.api.nvim_buf_get_mark(0, '"')
local lcount = vim.api.nvim_buf_line_count(0)
if mark[1] > 0 and mark[1] <= lcount then
pcall(vim.api.nvim_win_set_cursor, 0, mark)
end
end,
})
-- close certain windows with q
Autocmd('FileType', {
desc = 'close certain windows with q',
pattern = { 'help', 'man', 'qf', 'query', 'messages', 'netrw' },
callback = function(evt)
vim.bo[evt.buf].buflisted = false
Map('n', 'q', '<cmd>close<cr>')
end
})
-- disable spellcheck in terminal
Autocmd('TermOpen', {
callback = function()
vim.opt.spell = false
end,
})
-- closes the first buffer if it is empty
Autocmd('BufEnter', {
pattern = '*',
callback = function()
local bufs = vim.api.nvim_list_bufs()
-- check if the first buffer is an empty one
if #bufs == 0 and vim.api.nvim_get_option_value('buftype', { buf = bufs[1] }) and vim.api.nvim_buf_get_name(bufs[1]) then
vim.api.nvim_buf_delete(bufs[1], {})
end
end,
})
---@type table<string, string>
local filemap = {
['*.h'] = 'c',
['*/i3/**.conf'] = 'i3config'
}
for pat, file in pairs(filemap) do
Autocmd('BufRead', {
pattern = pat,
callback = function()
vim.bo.filetype = file
end
})
end

View File

@@ -0,0 +1,4 @@
require('config.opts')
require('config.maps')
require('config.autocmds')
require('config.lazy')

View File

@@ -0,0 +1,24 @@
-- bootstrap lazy
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
local out = vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath }
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ 'Failed to clone lazy.nvim:\n', 'ErrorMsg' },
{ out, 'WarningMsg' },
}, true, {})
return 1
end
end
vim.opt.rtp:prepend(lazypath)
require('lazy').setup({
change_detection = { enabled = false },
defaults = {
lazy = true,
},
spec = { { import = 'plugin' } },
})
Map('n', '<leader>L', '<cmd>Lazy<cr>', { desc = 'open Lazy' })

View File

@@ -0,0 +1,45 @@
-- unmap arrow keys in non-insert modes
Map({ 'n', 'v' }, '<up>', '<nop>')
Map({ 'n', 'v' }, '<down>', '<nop>')
Map({ 'n', 'v' }, '<left>', '<nop>')
Map({ 'n', 'v' }, '<right>', '<nop>')
-- tab management / navigation
Map('n', '<c-t>', '<cmd>enew<cr>', { desc = 'create a new tab' })
-- for help exiting certain modes
Map({ 'n', 'i' }, '<esc>', '<cmd>nohlsearch<cr><esc>', { desc = 'cancel search highlighting and escape' })
Map('t', '<c-esc>', '<c-\\><c-n>', { desc = 'exit terminal mode' })
-- window management
Map('n', '<m-s>', '<cmd>wincmd s<cr>', { desc = 'horizontal split' })
Map('n', '<m-v>', '<cmd>wincmd v<cr>', { desc = 'vertical split' })
Map('n', '<c-h>', '<cmd>wincmd h<cr>', { desc = 'move focus to the left window' })
Map('n', '<c-l>', '<cmd>wincmd l<cr>', { desc = 'move focus to the right window' })
Map('n', '<c-j>', '<cmd>wincmd j<cr>', { desc = 'move focus to the lower window' })
Map('n', '<c-k>', '<cmd>wincmd k<cr>', { desc = 'move focus to the upper window' })
Map('n', '<m-H>', '<cmd>wincmd H<cr>', { desc = 'move window to left' })
Map('n', '<m-L>', '<cmd>wincmd L<cr>', { desc = 'move window to right' })
Map('n', '<m-K>', '<cmd>wincmd K<cr>', { desc = 'move window to top' })
Map('n', '<m-J>', '<cmd>wincmd J<cr>', { desc = 'move window to bottom' })
-- diagnostic / lsp key bindings
Map('n', 'K', vim.lsp.buf.hover, { desc = 'symbol hover' })
Map('n', '<F2>', vim.lsp.buf.rename, { desc = 'rename symbol' })
Map('n', '<leader>lm', vim.diagnostic.open_float, { desc = 'view line\'s diagnostic messages' })
Map('n', '<leader>q', vim.lsp.buf.code_action, { desc = 'view quickfix list' })
-- smart tabulation
Map('i', '<tab>', function()
local _, col = unpack(vim.api.nvim_win_get_cursor(0)) -- get cursor position
local isindent = vim.api.nvim_get_current_line():sub(1, col):match('^%s*$')
local tabexpnd = vim.bo.expandtab
local tabwidth = vim.bo.shiftwidth > 0 and vim.bo.shiftwidth or vim.bo.tabstop
if not tabexpnd and isindent then
return '\t'
else
local spaces = tabwidth - col % tabwidth
return string.rep(' ', spaces == 0 and tabwidth or spaces)
end
end, { expr = true, desc = "smart tabulation" })

View File

@@ -0,0 +1,59 @@
local o = vim.opt
-- set options
o.clipboard = "unnamedplus" -- keep the clipboard in sync with the one provided by the OS
o.termguicolors = true -- allows for colour in the terminal
o.number = true -- show line numbers
o.cursorline = true -- highlight the current line
o.cursorcolumn = false -- highlight the current column
o.dir = vim.fn.stdpath('cache') .. '/swp' -- swap directory location for recovery
o.sessionoptions = 'buffers,curdir,folds,help,localoptions,tabpages,terminal'
o.expandtab = false -- whether tabs are expanded to spaces (overridden by .editorconfig)
o.diffopt = 'internal,filler,closeoff,linematch:60' -- diff visualisation
o.foldenable = true -- whether folding is enabled
o.wrap = false -- whether to wrap text to a new line when it goes off-screen
o.breakindent = true -- wrapped lines start at the same location as the start of the line
o.list = true -- shows invisible characters
o.listchars = { -- whitespace characters
eol = nil,
trail = '~',
extends = nil,
precedes = '<',
tab = '•-',
space = '·',
nbsp = '',
}
o.mouse = 'nv' -- which modes the mouse is enabled in 'a:all'
o.relativenumber = true -- whether line numbers are relative to the cursor
o.scrolloff = 10 -- minimal number of screen lines to keep above and below the cursor
o.showtabline = 2 -- whether to show the tab line
o.signcolumn = 'yes' -- always show the signcolumn, otherwise it shifts text all the time
o.tabstop = 8 -- visual spaces per tab
o.softtabstop = 8 -- spaces inserted per tab in insert mode
o.shiftwidth = 8 -- spaces for auto-indent
o.smartindent = true -- behave a bit more nuanced with when to indent
o.ignorecase = true -- whether case should be ignored whilst searching
o.smartcase = true -- overrides the above option if contains capital letters
o.inccommand = 'split' -- split|nosplit whether substitutions should appear whilst typing.
o.splitbelow = true -- force all horizontal splits below the current window
o.splitright = true -- force all vertical splits to the right of this window
o.showmode = false -- don't show mode as this is already in the status line
o.undodir = vim.fn.stdpath('cache') .. '/undo' -- directory for undo files
o.undofile = true -- for saving the undo history
o.undolevels = 1024 -- the amount of changes that can be undone
o.timeoutlen = 300 -- number of MS to wait for a mapped sequence to complete
o.ttimeoutlen = 0 -- number of MS to wait for a key sequence to complete
o.updatetime = 250 -- number of MS of nothing typed to write a swap file to disk.
o.spell = true -- whether spell checking is enabled
o.spelllang = 'en_gb,nl' -- set the spell languages
o.spellfile = vim.fn.stdpath('config') .. '/spell/user.utf-8.add'
vim.diagnostic.config({
underline = true, -- use underline for diagnostics
virtual_text = true, -- shows diagnostics at the end of the line
virtual_lines = false, -- shows one diagnostic per line
severity_sort = true, -- sort diagnostics by severity
update_in_insert = true, -- update diagnostics whilst in insert mode
float = true, -- options for floating windows
signs = true,
})

View File

@@ -0,0 +1,44 @@
---@type LazySpec
return {
"rmagatti/auto-session",
lazy = false,
priority = 100,
---@module "auto-session"
---@type AutoSession.Config
opts = {
enabled = true,
auto_save = true,
auto_create = true,
auto_restore = true,
auto_restore_last_session = false,
cwd_change_handling = true,
single_session_mode = false,
close_unsupported_windows = true,
suppressed_dirs = { '~/', '~/software/', '~/downloads/', '~/desktop/', '/etc/' },
close_filetypes_on_save = { 'checkhealth', 'man', 'oil' },
bypass_save_filetypes = { 'netrw', 'oil' },
auto_delete_empty_sessions = true,
purge_after_minutes = 14 * 24 * 60,
lazy_support = true,
legacy_cmds = false,
args_allow_single_directory = true,
args_allow_files_auto_save = false,
-- log_level = 'debug',
show_auto_restore_notif = true,
},
init = function()
local path = vim.fn.argv(0)
if not path or type(path) ~= 'string' then return end
local realpath = vim.uv.fs_realpath(path)
if not realpath then return end
if vim.fn.isdirectory(realpath) ~= 1 then return end
vim.fn.chdir(realpath)
vim.notify("loaded directory: '" .. realpath .. "'", vim.log.levels.INFO)
end,
}

View File

@@ -0,0 +1,32 @@
---@type LazySpec
return { {
'windwp/nvim-autopairs', -- automatically inserts closing brackets
event = { 'BufReadPre', 'BufNewFile' },
opts = {
enable_moveright = true, -- moves the cursor over existing pairs instead of inserting duplicates
check_ts = true, -- whether to check treesitter for specific nodes
ts_config = {}
},
config = function(_, opts)
local autopairs = require 'nvim-autopairs'
autopairs.setup(opts)
-- customise the rule for [] brackets so it doesn't close when typing ANSI escape codes
local rule = autopairs.get_rule '['
if rule then
rule:with_pair(function(opt)
local ei = math.max(1, opt.col - 1) -- get the end-index
local prev_oct = opt.line:sub(math.max(1, opt.col - 4), ei) -- get the range of an octal escape code
local prev_hex = opt.line:sub(math.max(1, opt.col - 4), ei) -- get the range of a hexadecimal escape code
local prev_cha = opt.line:sub(math.max(1, opt.col - 2), ei) -- get the range of a character escape code
-- check whether we can't match any of the patterns,
-- if so return true, otherwise return false (whether to insert a pair)
return (prev_oct ~= [[\033]] and prev_hex ~= [[\x1b]] and prev_cha ~= [[\e]])
end)
else
vim.notify('could not add a rule for not auto-closing [ when typing an ANSI escape code',
vim.log.levels.WARN)
end
end,
} }

View File

@@ -0,0 +1,69 @@
---@module 'lazy'
---@type LazySpec
return { {
'saghen/blink.cmp',
event = 'InsertEnter',
version = '*',
build = 'cargo build --release',
dependencies = {
'saghen/blink.compat',
},
---@module 'blink.cmp'
---@type blink.cmp.Config
opts = {
keymap = {
preset = 'none',
['<tab>'] = { 'accept', 'fallback' }, -- accept the snippet
['<c-space>'] = { 'show', 'show_documentation', 'hide_documentation' }, -- toggle auto-cmp manually
['<c-k>'] = { 'show_signature', 'hide_signature', 'fallback' }, -- toggle signature
['<c-n>'] = { 'select_next', 'fallback' }, -- next item
['<c-p>'] = { 'select_prev', 'fallback' }, -- previous item
['<c-f>'] = { 'scroll_documentation_down', 'fallback' }, -- forwards into the docs
['<c-b>'] = { 'scroll_documentation_up', 'fallback' }, -- backwards into the docs
['<c-e>'] = { 'cancel', 'fallback' }, -- keybind for cancelling completion
},
snippets = { preset = 'luasnip' },
sources = {
default = { 'lsp', 'path', 'snippets' },
},
completion = {
menu = {
auto_show = true, -- whether to automatically show the window when new completion items are available
border = 'rounded',
draw = {
columns = { { "kind_icon" }, { "label", "label_description", gap = 1 }, { 'kind' } },
treesitter = { 'lsp', 'snippets' },
},
},
documentation = {
auto_show = true, -- whether documentation is automatically shown when selecting a completion item
auto_show_delay_ms = 250,
treesitter_highlighting = true,
window = { border = "rounded" },
},
list = { selection = { preselect = true, auto_insert = true } },
trigger = {
show_on_insert_on_trigger_character = true,
show_on_accept_on_trigger_character = true,
show_in_snippet = false,
},
ghost_text = {
enabled = true,
show_with_selection = false, -- whether the ghost text is shown when an item is selected
show_without_selection = true, -- whether the ghost text is shown when no item is selected
show_with_menu = true, -- show ghost text when the menu is open
show_without_menu = true, -- show ghost text when the menu is closed
}
},
fuzzy = {
use_proximity = true,
frecency = { enabled = true, },
prebuilt_binaries = {
download = false, -- we are building from source
}
}
},
config = function(_, opts)
require("blink.cmp").setup(opts)
end
} }

View File

@@ -0,0 +1,29 @@
---@type LazySpec
return { {
'akinsho/bufferline.nvim', -- shows the opened buffers
event = 'VeryLazy',
dependencies = { 'nvim-tree/nvim-web-devicons', },
---@type bufferline.UserConfig
opts = {
options = {
mode = 'buffers',
separator_style = '',
sort_by = 'directory',
diagnostics = 'nvim_lsp',
diagnostics_indicator = function(c, _, _, _)
return '(' .. c .. ')'
end,
},
},
config = function(_, opts)
require('bufferline').setup(opts)
Map('n', '<tab>', '<cmd>BufferLineCycleNext<cr>', { desc = 'switch to the next tab' })
Map('n', '<s-tab>', '<cmd>BufferLineCyclePrev<cr>', { desc = 'switch to the previous tab' })
Map('n', '<leader>wch', '<cmd>BufferLineCloseLeft<cr>', { desc = 'close the tabs on the left' })
Map('n', '<leader>wcl', '<cmd>BufferLineCloseRight<cr>', { desc = 'close the tabs on the right' })
Map('n', '<leader>wcw', '<cmd>BufferLineCloseOthers<cr>',
{ desc = 'close all tabs except the current one' })
end,
} }

View File

@@ -0,0 +1,38 @@
---@module 'lazy'
---@type LazySpec
return { {
'stevearc/conform.nvim', -- allows you to format a buffer
event = { 'BufWritePre' },
cmd = { 'ConformInfo' },
keys = {
{
'<leader>f',
function()
require('conform').format { async = true, lsp_format = 'fallback' } -- execute the formatter
-- vim.cmd [[keepjumps keeppatterns %s/\s\+$//e]] -- removes trailing whitespace
end,
mode = 'n',
desc = '[f]ormat buffer',
},
},
---@type conform.setupOpts
opts = {
notify_on_error = true,
formatters_by_ft = {
c = { 'clang-format' },
h = { 'clang-format' },
cpp = { 'clang-format' },
hpp = { 'clang-format' },
glsl = { 'clang-format', lsp_format = "first" },
typescript = { 'clang-format', lsp_format = "first" },
css = { 'clang-format' },
rust = { 'rustfmt' },
sh = { 'shfmt' },
python = { 'isort' },
-- json = { 'jq' },
-- yaml = { 'yq' },
toml = { 'yq' },
xml = { 'yq' },
},
}
} }

View File

@@ -0,0 +1,54 @@
---@type LazySpec
return { {
'lewis6991/gitsigns.nvim', -- adds git signs to the signcolumn
event = 'VeryLazy',
opts = {
signs_staged_enable = true, -- whether staged statuses are enabled
signcolumn = true, -- the signs enable/disable based on the signcolumn state
current_line_blame = true, -- show the blame of the current line
current_line_blame_opts = {
delay = 50, -- delay in MS before blame is shown
ignore_whitespace = true, -- whether to ignore whitespace
use_focus = true, -- whether to only enable when the buffer is in focus
},
signs = { -- signs when working
add = { text = '+' },
change = { text = '~' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
untracked = { text = '' },
},
signs_staged = { -- signs when staged
add = { text = 'A' },
change = { text = 'M' },
delete = { text = 'D' },
topdelete = { text = 'D' },
changedelete = { text = 'M' },
untracked = { text = 'U' },
},
attach_to_untracked = true, -- shows untracked files' signcolumn
},
config = function(_, opts)
require('gitsigns').setup(opts)
local palette = _G.userdat.palette
local bg = vim.api.nvim_get_hl(0, { name = 'SignColumn' }).bg
for n, fg in pairs {
GitSignsAdd = palette.bright_green,
GitSignsChange = palette.bright_orange,
GitSignsDelete = palette.bright_red,
GitSignsTopdelete = palette.bright_red,
GitSignsChangedelete = palette.bright_orange,
GitSignsUntracked = palette.bright_aqua,
GitSignsStagedAdd = palette.neutral_green,
GitSignsStagedChange = palette.neutral_orange,
GitSignsStagedDelete = palette.neutral_red,
GitSignsStagedTopDelete = palette.neutral_red,
GitSignsStagedChangedelete = palette.neutral_orange,
GitSignsStagedUntracked = palette.neutral_aqua,
} do
vim.api.nvim_set_hl(0, n, { fg = fg, bg = bg })
end
end,
} }

View File

@@ -0,0 +1,31 @@
---@type LazySpec
return { {
'ellisonleao/gruvbox.nvim',
lazy = false,
dependencies = { 'johnfrankmorgan/whitespace.nvim' },
priority = 1000,
---@type GruvboxConfig
opts = {
styles = {
comments = { italic = true }
}
},
config = function(_, opts)
local colour = require('gruvbox')
colour.setup(opts)
vim.cmd.colorscheme('gruvbox')
_G.userdat.palette = colour.palette
-- non-essential configuration should be put in here
Autocmd('VimEnter', {
callback =
function()
-- spell highlight must be grey
for _, spell in pairs { 'SpellBad', 'SpellCap', 'SpellRare', 'SpellLocal' } do
vim.api.nvim_set_hl(0, spell,
{ fg = nil, bg = nil, sp = _G.userdat.palette.gray, undercurl = true })
end
end
})
end
} }

View File

@@ -0,0 +1,12 @@
---@module 'lazy'
---@type LazySpec
return { {
'folke/lazydev.nvim', -- provides the lua LSP for the neovim config.
event = 'VeryLazy',
ft = 'lua',
opts = {
library = {
{ path = '${3rd}/luv/library', words = { 'vim%.uv' } }, -- load luvit types when the `vim.uv` word is found
},
},
}, }

View File

@@ -0,0 +1,21 @@
---@module 'lazy'
---@type LazySpec
return { {
'lmburns/lf.nvim',
lazy = false,
dependencies = { 'akinsho/toggleterm.nvim' },
---@module 'lf'
---@type Lf.Config
opts = {
direction = 'float',
border = 'rounded',
},
config = function(_, opts)
vim.g.lf_netrw = 1
local lf = require('lf')
lf.setup(opts)
Map({ 'n' }, '<leader>o', lf.start, { desc = 'Shows the LF window' })
end
} }

View File

@@ -0,0 +1,5 @@
---@type LazySpec
return { {
'ray-x/lsp_signature.nvim',
opts = { always_trigger = false }
} }

View File

@@ -0,0 +1,51 @@
---@module 'lazy'
---@type LazySpec
return { {
'neovim/nvim-lspconfig',
event = { "BufReadPre", "BufNewFile" },
dependencies = { 'saghen/blink.cmp' },
---@type table<string, boolean|vim.lsp.Config>
opts = {
['clangd'] = true,
['ccls'] = false,
['glsl_analyzer'] = true,
['rust_analyzer'] = true,
['omnisharp'] = false,
['lua_ls'] = true,
['html'] = true,
['cssls'] = true,
['ts_ls'] = true,
['jsonls'] = true,
['yamlls'] = {
settings = {
yaml = {
schemas = {
["https://json.schemastore.org/github-workflow.json"] =
"/.github/workflows/*",
["https://json.schemastore.org/clang-format"] = ".clang-format",
["https://json.schemastore.org/clang-tidy"] = ".clang-tidy",
},
},
},
},
},
---@param opts table<string,boolean|vim.lsp.Config>
config = function(_, opts)
-- store the default capabilities
local capabilities = require('blink.cmp').get_lsp_capabilities()
-- enable the LSP
for server, config in pairs(opts) do
if type(config) == 'boolean' then
vim.lsp.enable(server, config)
else
vim.lsp.enable(server, true)
vim.lsp.config[server] = vim.tbl_deep_extend('force', {}, vim.lsp.config[server],
config or {})
end
vim.lsp.config[server].capabilities = capabilities
end
end
} }

View File

@@ -0,0 +1,5 @@
return { {
'L3MON4D3/LuaSnip',
build = 'make install_jsregexp',
version = "v2.*",
} }

View File

@@ -0,0 +1,71 @@
---@type LazySpec
return { {
'echasnovski/mini.nvim',
config = function()
require('mini.ai').setup()
require('mini.surround').setup()
require('mini.operators').setup()
require('mini.indentscope').setup({
symbol = '¦',
draw = {
delay = 50, -- delay in MS before writing the indicator
animation = require('mini.indentscope').gen_animation.none(),
},
options = {
try_as_border = false,
},
})
vim.api.nvim_set_hl(0, 'MiniIndentscopeSymbol', { fg = _G.userdat.palette.dark2, bg = nil })
require('mini.move').setup({
mappings = {
-- move visual selection in visual mode
left = '<m-h>',
down = '<m-j>',
up = '<m-k>',
right = '<m-l>',
-- move current line in normal mode
line_left = '<m-h>',
line_down = '<m-j>',
line_up = '<m-k>',
line_right = '<m-l>',
},
options = {
reindent_linewise = true, -- automatically re-indent selection during line vertical move
},
})
require('mini.statusline').setup({
content = {
active = function()
local mode, mode_hl = MiniStatusline.section_mode({ trunc_width = 120 })
local git = MiniStatusline.section_git({ trunc_width = 40 })
local diff = MiniStatusline.section_diff({ trunc_width = 75 })
local diagnostics = MiniStatusline.section_diagnostics({ trunc_width = 75 })
local lsp = MiniStatusline.section_lsp({ trunc_width = 75 })
local filename = MiniStatusline.section_filename({ trunc_width = 140 })
local fileinfo = MiniStatusline.section_fileinfo({ trunc_width = 120 })
return MiniStatusline.combine_groups({
{ hl = mode_hl, strings = { mode } },
{ hl = 'MiniStatuslineDevinfo', strings = { git, diff, diagnostics, lsp } },
'%<', -- general truncation point
{ hl = 'MiniStatuslineFilename', strings = { filename } },
'%=', -- align right
{ hl = 'MiniStatuslineFileInfo', strings = { fileinfo } },
{ hl = mode_hl, strings = { '%3l:%-3c' } }
})
end,
inactive = function()
return MiniStatusline.combine_groups({
{},
})
end
},
use_icons = true,
set_vim_settings = true,
})
end
} }

View File

@@ -0,0 +1,59 @@
---@module 'lazy'
---@type LazySpec
return { {
'mfussenegger/nvim-lint',
event = { 'BufWritePost', 'BufReadPost', 'TextChanged' },
---@module 'lint'
opts = {
---@type table<string, string[]>
linters_by_ft = {
c = { 'clangtidy' },
cpp = { 'clangtidy' },
sh = { 'shellcheck' },
glsl = { 'glslang' },
},
linters = {
glslang = {
cmd = 'glslangValidator',
stdin = false,
args = { '-C' },
ignore_exitcode = true,
parser = function(output)
local diags = {}
for _, line in ipairs(vim.split(output, '\n')) do
local f, lnum, sev, msg = line:match(
'^([^:]+):(%d+):%s+([^:]+):%s+(.+)$') -- file:line: severity: message
if not f then sev, f, lnum, msg = line:match(
'^(%w+):%s+([^:]+):(%d+):%s+(.+)$') end -- severity: file:line: message
if lnum then
local s = sev:lower() == 'error'
and vim.diagnostic.severity.ERROR
or vim.diagnostic.severity.WARN
table.insert(diags, {
lnum = tonumber(lnum) - 1,
col = 0,
message = msg,
source = 'glslang',
severity = s
})
end
end
return diags
end
}
}
},
config = function(_, opts)
local lint = require('lint')
lint.linters_by_ft = opts.linters_by_ft
for name, linter in pairs(opts.linters) do
lint.linters[name] = linter
end
-- autocommand for linting
Autocmd({ 'BufWritePost', 'BufWinEnter', 'TextChanged' },
{ callback = function() lint.try_lint() end });
end
} }

View File

@@ -0,0 +1,74 @@
---@module 'lazy'
---@type LazySpec
return { {
'nvim-treesitter/nvim-treesitter', -- highlight, edit, and navigate code
event = 'BufReadPre',
build = ':TSUpdate',
main = 'nvim-treesitter.configs', -- set main module to use for opts
opts = {
ensure_installed = {
'bash', 'c', 'make', 'rust', 'diff',
'markdown', 'markdown_inline', 'latex',
'vim', 'vimdoc', 'lua', 'luadoc', 'regex',
},
auto_install = true, -- auto-install languages that are not installed
highlight = {
enable = true,
additional_vim_regex_highlighting = { 'ruby' }, -- some languages depend on vim's regex highlighting system for indent rules
},
indent = { enable = true, disable = { 'ruby' } },
},
config = function(_, opts)
require('nvim-treesitter.configs').setup(opts)
-- set the keybind for appending in front of a comment, rather than behind.
Map('n', 'A', function()
local ts = vim.treesitter -- get reference to treesitter
local buf = vim.api.nvim_get_current_buf() -- get the current buffer id
local row, col = unpack(vim.api.nvim_win_get_cursor(0)) -- get cursor position
-- ensure the parser exists
local res = nil
repeat
-- get the parser
if not ts.language.get_lang(vim.bo[buf].filetype) then break end
local parser = ts.get_parser(buf, nil, { error = false })
if not parser then break end
-- query the buffer using the parser
local root = parser:parse()[1]:root()
local ok, dat = pcall(ts.query.parse, parser:lang(), [[(comment) @comment]])
if not ok or not dat then break end
-- set the result
res = { query = dat, root = root }
until true
-- check if we successfully made a query
if res then
-- loop through the captures from the query
for _, node in res.query:iter_captures(res.root, buf, row - 1, row) do
-- ensure the comment is on the same row as the cursor and after the cursor's column
local srow, scol, _, _ = node:range() -- extract the starting row and starting column
if srow ~= row - 1 or col >= scol then goto continue end
-- get the line text and remove trailing whitespace
local txt = vim.api.nvim_buf_get_lines(buf, srow, srow + 1, true)[1]:sub(0, scol)
txt = txt:gsub("%s*$", "")
local len = txt:len()
-- check if we found a match
if len > 0 then
vim.api.nvim_win_set_cursor(0, { row, len })
vim.cmd [[startinsert]]
return
end
::continue:: -- lua is stupid
end
end
-- no comment start was found, behave like normal (moves cursor to the end of the line)
vim.cmd [[startinsert!]]
end, { desc = 'append end of line' })
end,
} }

View File

@@ -0,0 +1,13 @@
---@module 'lazy'
---@type LazySpec
return { {
'MeanderingProgrammer/render-markdown.nvim',
dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' },
---@module 'render-markdown'
---@type render.md.UserConfig
opts = {
completions = {
blink = { enabled = true }
}
}
} }

View File

@@ -0,0 +1,83 @@
---@module 'snacks'
---@module 'lazy'
---@type LazySpec
return { { -- provides quality of life features for neovim
'folke/snacks.nvim',
priority = 1000,
lazy = false,
---@type snacks.Config
opts = {
animate = { enabled = false }, -- efficient animations including over 45 easing functions (library)
bigfile = { enabled = false }, -- deal with big files
bufdelete = { enabled = false }, -- delete buffers without disrupting window layout
dashboard = { enabled = false }, -- beautiful declarative dashboards
debug = { enabled = false }, -- pretty inspect & backtraces for debugging
dim = { enabled = false }, -- focus on the active scope by dimming the rest
explorer = { enabled = false }, -- a file explorer (picker in disguise)
git = { enabled = false }, -- git utilities
gitbrowse = { enabled = false }, -- open the current file, branch, commit, or repo in a browser (e.g. github, gitlab, etc.)
image = { enabled = true }, -- image viewer using kitty graphics protocol
indent = { enabled = false }, -- indent guides and scopes
input = { enabled = false }, -- better vim.ui.input
layout = { enabled = false }, -- window layouts
lazygit = { enabled = false }, -- open lazygit in a float, auto-configure colour scheme and integration with neovim
notifier = { enabled = true }, -- pretty vim.notify
notify = { enabled = true }, -- utility functions to work with neovim's vim.notify
picker = { enabled = false }, -- picker for selecting items
profiler = { enabled = false }, -- neovim lua profiler
quickfile = { enabled = true }, -- when doing nvim somefile.txt, it will render the file as quickly as possible, before loading your plugins.
rename = { enabled = true }, -- LSP-integrated file renaming with support for plugins like and.
scope = { enabled = false }, -- scope detection, text objects and jumping based on treesitter or indent
scratch = { enabled = false }, -- scratch buffers with a persistent file
scroll = { enabled = false }, -- smooth scrolling
statuscolumn = { enabled = false }, -- pretty status column
terminal = { enabled = false }, -- create and toggle floating/split terminals
toggle = { enabled = false }, -- toggle keymaps integrated with which-key icons / colours
util = { enabled = false }, -- utility functions for Snacks (library)
win = { enabled = false }, -- create and manage floating windows or splits
words = { enabled = true }, -- auto-show LSP references and quickly navigate between them
zen = { enabled = false }, -- zen mode; distraction-free coding
},
keys = {
{ '*', function() Snacks.words.jump(-vim.v.count1) end, desc = 'next reference', nowait = true },
{ '#', function() Snacks.words.jump(vim.v.count1) end, desc = 'prev reference', nowait = true },
{ '<c-w>', function() Snacks.bufdelete() end, desc = 'delete buffer', nowait = true },
{ '<leader>N', function() Snacks.notifier.show_history() end, desc = 'show notification history' },
{ '<leader>U', function() Snacks.picker.undo() end, desc = 'undo tree' },
{ '<leader>gB', function() Snacks.git.blame_line() end, desc = 'git blame line' },
{ '<leader>gb', function() Snacks.picker.git_branches() end, desc = 'git branches' },
{ '<leader>@', function() Snacks.picker.lsp_symbols() end, desc = 'workspace symbols' },
{ '<leader>ld', function() Snacks.picker.lsp_definitions() end, desc = 'definition' },
{ '<leader>lr', function() Snacks.picker.lsp_references() end, desc = 'references' },
{ '<leader>li', function() Snacks.picker.lsp_implementations() end, desc = 'implementation' },
{ '<leader>lt', function() Snacks.picker.lsp_type_definitions() end, desc = 'type definition' },
{ '<leader>?', function() Snacks.picker.keymaps() end, desc = 'keymaps' },
{ 'gd', function() Snacks.picker.lsp_definitions() end, desc = 'definition' },
{ 'gr', function() Snacks.picker.lsp_references() end, desc = 'references' },
},
init = function()
Autocmd("User", {
pattern = 'VeryLazy',
callback = function()
local virt_lines = false;
Snacks.toggle.new({
id = "virtual_lines",
name = "diagnostics virtual lines",
get = function() return virt_lines end,
set = function(v)
virt_lines = v
vim.diagnostic.config({ virtual_lines = v })
end,
}):map('<leader>tl')
Snacks.toggle.option('wrap', { name = 'word wrap' }):map('<leader>tw')
Snacks.toggle.option('spell', { name = 'spelling' }):map('<leader>ts')
Snacks.toggle.inlay_hints():map('<leader>th')
end,
})
end,
---@param opts snacks.Config
config = function(_, opts)
require('snacks').setup(opts)
end
} }

View File

@@ -0,0 +1,71 @@
---@module 'lazy'
---@type LazySpec
return { {
'nvim-telescope/telescope.nvim', -- fuzzy finder (files, lsp, etc)
event = 'VeryLazy',
branch = '0.1.x',
dependencies = {
{ 'nvim-lua/plenary.nvim' }, -- contains lua functions for neovim, apparently
{ 'nvim-telescope/telescope-ui-select.nvim' }, -- allows neovim core stuff to enter the telescope picker
{
'nvim-telescope/telescope-fzf-native.nvim',
build = 'make', -- used for when the plugin is installed/updated
cond = function() return vim.fn.executable 'make' == 1 end, -- condition for whether the plugin should be loaded / installed
},
},
opts = {
pickers = {
find_files = {
find_command = { 'fd', '-t', 'f', '-HE', '/.git', '--strip-cwd-prefix' },
},
},
extensions = {
file_browser = {
hijack_netrw = true,
},
},
},
config = function(_, opts)
local tel = require('telescope')
local std = require("telescope.builtin")
local ext = tel.extensions
require('telescope').setup(opts)
-- load telescope extensions, if they are installed
pcall(tel.load_extension, 'fzf')
pcall(tel.load_extension, 'ui-select')
-- set the telescope keymaps
Map({ 'n' }, '<C-g>', std.live_grep, { desc = 'Search by Grep' })
Map({ 'n' }, '<C-s>', std.resume, { desc = 'Search Resume' })
Map({ 'n', 'i' }, '<C-p>', std.find_files, { desc = 'Search Project' })
Map({ 'n' }, '<leader>p', std.find_files, { desc = 'Search Project' })
Map({ 'n' }, '<leader>gf', std.git_status, { desc = 'Search through Git status Files' })
Map({ 'n' }, '<leader>sq', std.quickfix, { desc = 'Search Quickfix' })
Map({ 'n' }, '<leader>sh', std.help_tags, { desc = 'Search Help' })
Map({ 'n' }, '<leader>sk', std.keymaps, { desc = 'Search Keymaps' })
Map({ 'n' }, '<leader>sf', std.find_files, { desc = 'Search Files' })
Map({ 'n' }, '<leader>ss', std.builtin, { desc = 'Sarch Select telescope' })
Map({ 'n' }, '<leader>sw', std.grep_string, { desc = 'Search current Word' })
Map({ 'n' }, '<leader>sg', std.live_grep, { desc = 'Search by Grep' })
Map({ 'n' }, '<leader>sd', std.diagnostics, { desc = 'Search Diagnostics' })
Map({ 'n' }, '<leader>sr', std.resume, { desc = 'Search Resume' })
Map({ 'n' }, '<leader>s.', std.oldfiles, { desc = 'Search recent Files ("." for repeat)' })
Map({ 'n' }, '<leader><leader>', std.buffers, { desc = 'find existing buffers' })
-- for fuzzily searching in the current buffer
Map('n', '<leader>/', function()
std.current_buffer_fuzzy_find(require('telescope.themes').get_dropdown { winblend = 10, previewer = false })
end, { desc = 'fuzzily search in current buffer' })
-- for executing grep
Map('n', '<leader>s/', function()
std.live_grep { grep_open_files = true, prompt_title = 'Live Grep in Open Files' }
end, { desc = 'Search in open files' })
-- shortcut for searching neovim config files
Map('n', '<leader>sn', function()
std.find_files { cwd = vim.fn.stdpath 'config' }
end, { desc = 'Search Neovim files' })
end,
} }

View File

@@ -0,0 +1,22 @@
---@module 'lazy'
---@type LazySpec
return { {
'folke/todo-comments.nvim', -- for highlighting TODO and stuff comments
event = 'VeryLazy',
dependencies = { 'nvim-lua/plenary.nvim' },
---@module 'todo-comments'
---@type TodoOptions
opts = {
signs = false,
colors = {
hint = { "Comment" }
},
},
config = function(_, opts)
local todo = require 'todo-comments'
todo.setup(opts)
Map('n', '<leader>st', '<cmd>TodoTelescope keywords=TODO,FIX,BUG,WARN<cr>',
{ desc = '[S]earch [T]odos]' })
end,
} }

View File

@@ -0,0 +1,53 @@
---@module 'lazy'
---@type LazySpec
return { {
'akinsho/toggleterm.nvim', -- allows to toggle the terminal rather than open one in a separate window
event = 'VeryLazy',
---@type ToggleTermConfig
---@diagnostic disable-next-line: missing-fields
opts = { open_mapping = [[<C-\>]] },
config = function(_, opts)
local tt = require('toggleterm')
local term = require('toggleterm.terminal')
tt.setup(opts)
local term_lazygit = term.Terminal:new({ cmd = "lazygit", hidden = true, direction = 'float' })
-- Set mappings to toggle the above
Map({ 'n' }, '<leader>gg', function() term_lazygit:toggle() end)
-- Add a keymap for executing makefiles, or launch scripts
Map({ 'n', 't', 'v' }, '<c-b>', function()
local cwd = vim.fn.getcwd()
local cmd = nil
local launchcfg = cwd .. '/.launch.sh'
-- If the path is readable, the attached command is executed and no more is checked.
for _, obj in ipairs({
{ launchcfg, launchcfg },
{ cwd .. '/Makefile', 'make -C ' .. cwd },
{ cwd .. '/makefile', 'make -C ' .. cwd },
}) do
local pat = obj[1]
local exec = obj[2]
if (vim.fn.filereadable(pat) == 1) then
cmd = '\r' .. exec -- use \r to override text if it's present
break
end
end
-- If cmd still hasn't been set; edit the file
if (not cmd) then
local buf = vim.api.nvim_create_buf(true, false) -- listed, not scratch
vim.api.nvim_set_current_buf(buf)
vim.api.nvim_buf_set_name(buf, launchcfg)
vim.api.nvim_buf_set_text(0, 0, 0, 0, 0, { '#!/usr/bin/env sh', 'exec ' })
vim.bo.ft = 'sh'
return
end
-- Execute the command in terminal 1
tt.exec(cmd, 1, nil, nil, nil, nil, false, true)
end, { desc = 'compile the program using .buildcofig placed in PWD' })
end
} }

View File

@@ -0,0 +1,51 @@
---@type LazySpec
return { { -- displays pending keybinds, helps with remembering keybinds
'folke/which-key.nvim',
event = 'VeryLazy',
---@module 'which-key'
---@type wk.Opts
opts = {
delay = 0, -- delay in MS between pressing a key and opening which-key
icons = {
mappings = true,
keys = {
Up = '',
Down = '',
Left = '',
Right = '',
C = '󰘴',
M = '󰘵',
D = '󰘳',
S = '󰘶',
CR = '󰌑',
Esc = '󱊷',
ScrollWheelUp = '󱕑',
ScrollWheelDown = '󱕐',
NL = '󰌑',
BS = '󰁮',
Space = '󱁐',
Tab = '󰌒',
F1 = '<F1>',
F2 = '<F2>',
F3 = '<F3>',
F4 = '<F4>',
F5 = '<F5>',
F6 = '<F6>',
F7 = '<F7>',
F8 = '<F8>',
F9 = '<F9>',
F10 = '<F10>',
F11 = '<F11>',
F12 = '<F12>',
},
},
spec = { -- document the key chains we know about
{ '<leader>g', group = 'git' },
{ '<leader>s', group = 'search' },
{ '<leader>t', group = 'toggle' },
{ '<leader>w', group = 'windows' },
{ '<leader>l', group = 'lsp' },
{ '<leader>wc', group = 'close' },
},
},
} }

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,56 @@
binary-formatted
calc
config
const
double-precision
editorconfig
entry-point
github
gitignore
gitlab
half-precision
if
init
inputted
JSON
keymap
LLM
lsp
malloc'd
neovim
non-zero
null-terminated
numlock
nvidia
nvidia-settings
nvim-cmp
OR'd
overworld
parsable
Quinn
re-enable
regex
res
SDL
shader
shaders
single-precision
startup
stderr
stdout
system-wide
TODO
undefine
whitespace
ˣ
xorg
zero-initialise
zero-out
θ
π
τ
φ
ψ
timestamp
tetromino
μs

Binary file not shown.

View File

@@ -19,7 +19,7 @@ separator = |
padding-left = 0
modules-left = workspaces window
modules-center = date time
modules-right = systray enpnative enpusbc wifi volume battery
modules-right = systray enp2s0 enp0s20f0u3u1 enp0s20f0u3 enp0s20f0u2 wifi volume battery
padding-right = 1
[settings]

View File

@@ -22,10 +22,18 @@ interface-type = wired
format-connected = 󰈀
format-disconnected =
[module/enpnative]
[module/enp2s0]
inherit = ethernet
interface = enp2s0
[module/enpusbc]
[module/enp0s20f0u3u1]
inherit = ethernet
interface = enp0s20f0u3u1
[module/enp0s20f0u3]
inherit = ethernet
interface = enp0s20f0u3
[module/enp0s20f0u2]
inherit = ethernet
interface = enp0s20f0u2

View File

@@ -1,29 +1,38 @@
# specifies that the editor needn't look further, since this is the furthest
# .editorconfig file
root = true
# global settings, good/sane defaults for any file.
# where we follow UNIX formatted plain text, and use tabs over spaces
[*]
charset = utf-8
end_of_line = lf
charset = UTF-8
end_of_line = LF
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab
indent_size = tab
tab_width = 4
[*.{sh,bash,bashrc,bash_profile,md,json,css,scss}]
tab_width = 2
[{makefile,Makefile}]
tab_width = 2
[*.{c,cpp,h,hpp}]
tab_width = 8
[*.{py,rs}]
[*.{S,s,asm}]
tab_width = 8
[*.{c,h,cpp,hpp}]
tab_width = 8
[*.{glsl}]
tab_width = 8
# forces the usage of 4 spaces
[*.{py,rs,cs}]
indent_style = space
indent_size = tab
tab_width = 4
[*.{json,jsonc}]
tab_width = 8
[*.{yaml,toml}]
indent_style = space
indent_size = tab
tab_width = 2
tab_width = 4
[*.{html,css,scss}]
tab_width = 8

View File

@@ -2,7 +2,7 @@
name = Quinn
email = quinnthepigeon@proton.me
signingkey = 47378BDBE5E29830
[commit]
[tag]
gpgSign = true
[init]
defaultBranch = main

6
.gitmodules vendored
View File

@@ -1,6 +0,0 @@
[submodule ".config/nvim"]
path = .config/nvim
url = git@github.com:thepigeongenerator/nvim-conf.git
[submodule ".config/i3"]
path = .config/i3
url = git@github.com:thepigeongenerator/i3-conf.git

View File

@@ -1,19 +0,0 @@
# DO NOT EDIT! This file will be overwritten by LXAppearance.
# Any customization should be done in ~/.gtkrc-2.0.mine instead.
include "/home/furry/.gtkrc-2.0.mine"
gtk-theme-name="Gruvbox-Dark"
gtk-icon-theme-name="Gruvbox-Plus-Dark"
gtk-font-name="NotoSans Nerd Font 11"
gtk-cursor-theme-name="Breeze"
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=1
gtk-menu-images=1
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle="hintfull"
gtk-xft-rgba="none"

View File

@@ -1,3 +1,5 @@
"\e[A": history-search-backward
"\e[B": history-search-forward
set completion-ignore-case on
set colored-completion-prefix on

View File

View File

@@ -1,2 +1,2 @@
#!/bin/sh
#!/usr/bin/sh
sudo "$XDG_DATA_HOME/cpusetcores" "$@" -v

View File

@@ -1,2 +1,2 @@
#!/bin/bash
#!/usr/bin/sh
"$HOME/.local/share/emsdk/emsdk" "$@"

11
.local/bin/git-leaderboard Executable file
View File

@@ -0,0 +1,11 @@
#!/usr/bin/sh
if [ -z ${1+x} ]; then
printf "\033[91mdidn't include a file exstension. (eg. \".cs\")\n"
exit 1
fi
# get all the files with the file extension
git ls-files | grep -E ".*\\$1" |
xargs -n 1 git blame --line-porcelain | # run git blame on each file, which shows the commit for each line
grep "^author " | sort | # aquire the authors of this output and sort it
uniq -c | sort -nr # count all the unique authors and sort by number

View File

@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/sh
export __NV_PRIME_RENDER_OFFLOAD=1
export __VK_LAYER_NV_optimus=NVIDIA_only
export __GLX_VENDOR_LIBRARY_NAME=nvidia

64
.local/bin/satallite-wp-update Executable file
View File

@@ -0,0 +1,64 @@
#!/usr/bin/bash
# shellcheck disable=SC1090,SC1091
# set -xv
OUTDIR="$HOME/photos/eumetsat"
# full screen coverage
# PRJ=AUTO:42004,52,5,0
# BBOX=(-6400000 -100000 6400000 7700000)
# full disk
PRJ=AUTO:42003,0,0,0
BBOX=(-12800000 -7200000 12800000 7200000)
# europe
# PRJ=AUTO:42004,0,0,0
# BBOX=(22.5 -45 90 67.5)
# BBOX=(-45 -90 180 135)
# BBOX=(-4500000 2250000 6750000 9000000)
WIDTH=1920
HEIGHT=1080
error() {
printf "\033[31m%s\033[0m\n" "$1"
. "$HOME/.fehbg"
exit 1
}
[ -z "$EUMETSAT_KEY" ] && error 'make sure to set EUMETSAT_KEY to the client key'
[ -z "$EUMETSAT_SECRET" ] && error 'make sure to set EUMETSAT_SECRET to the client secret'
# verify internet
ping -c1 1.1.1.1 >>/dev/null || error "couldn't establish an internet connection!"
# acquire the API key
key=$(
curl -k -d "grant_type=client_credentials" \
-H "Authorization: Basic $(printf "%s:%s" "$EUMETSAT_KEY" "$EUMETSAT_SECRET" | base64)" \
https://api.eumetsat.int/token | jq -r '.["access_token"]'
)
# set url
url="https://view.eumetsat.int/geoserver/wms?"
url+="&service=WMS"
url+="&request=GetMap"
url+="&version=1.3.0"
url+="&layers=mtg_fd:rgb_geocolour"
url+="&width=$WIDTH&height=$HEIGHT"
url+="&bbox=${BBOX[0]},${BBOX[1]},${BBOX[2]},${BBOX[3]}"
url+="&crs=$PRJ"
url+="&styles="
url+="&transparent=true"
url+="&format=image/png"
url+="&access_token=$key"
# process incoming data
[ ! -d "$OUTDIR" ] && { mkdir -p "$OUTDIR" || error "failed to access '$OUTDIR'!"; }
curl "$url" -o "$OUTDIR/tmp.png" || error "failed to download from url='$url'!"
mv -f "$OUTDIR/tmp.png" "$OUTDIR/curr.png"
# update the feh background
. "$HOME/.fehbg"

14
.local/bin/unzip-all Executable file
View File

@@ -0,0 +1,14 @@
#!/usr/bin/sh
if [ -z ${var+2} ]; then
printf "\033[91mno parameters were given!\033[0m\n"
fi
for i in $2; do
readonly fname
fname="$(basename "$i" .*)"
mkdir "$fname"
cd "$fname" || return 1
unzip "../$i"
cd - || return 1
done

6
.local/bin/uwu Executable file
View File

@@ -0,0 +1,6 @@
#!/usr/bin/sh
while true; do
printf "owo "
sleep 0.25
done

4
.local/bin/x-brightness-down Executable file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/sh
br=$(brightnessctl set 5%- |
grep '%' | awk '{print $4}' | sed 's/[^0-9]//g')
notify-send -u low -i display-brightness-symbolic -h int:value:"$br" -h string:x-dunst-stack-tag:'brightnessctl' -a 'brightnessctl' "brightness: $br%"

4
.local/bin/x-brightness-up Executable file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/sh
br=$(brightnessctl set 5%+ |
grep '%' | awk '{print $4}' | sed 's/[^0-9]//g')
notify-send -i display-brightness-symbolic -u low -h int:value:"$br" -h string:x-dunst-stack-tag:'brightnessctl' -a 'brightnessctl' "brightness: $br%"

5
.local/bin/x-mic-mute Executable file
View File

@@ -0,0 +1,5 @@
#!/usr/bin/sh
vol_str=$(wpctl get-volume @DEFAULT_AUDIO_SOURCE@)
vol_int="$(echo "$vol_str" | sed 's/[^0-9]*//g')"
notify-send -i microphone-sensitivity-muted -u low -h int:value:"$vol_int" -h string:x-dunst-stack-tag:'audioctl' -a 'audioctl' "$vol_str"

56
.local/bin/x-volume Executable file
View File

@@ -0,0 +1,56 @@
#!/usr/bin/env sh
# the amount to increase / decrease each time
[ -z "$AMOUNT" ] && AMOUNT=5
# utility for sending notifications easily
notify() {
notify-send "$@" -h string:x-dunst-stack-tag:'audioctl' -a 'audioctl'
}
# get current volume information
vol_str="$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
# Remove leading non-numeric or zero characters, then remove remaining non-numeric characters.
# NOTE: if zero (0.00), the string will be empty. This is fine for arithmetic operations.
vol_int="$(echo "$vol_str" | sed 's/^[^1-9]*//; s/[^0-9]//g')"
# if the string contains MUTED, set the variable accordion
case "$vol_str" in
*MUTED*) vol_off=1 ;;
*) vol_off=0 ;;
esac
# handle what action to perform from the argument
echo $vol_off
case $1 in
up) vol_int=$((vol_int + AMOUNT)) ;;
down) vol_int=$((vol_int - AMOUNT)) ;;
mute) vol_off=$((!vol_off)) ;;
*)
echo 'E: could not decide what audio action to perform!' >&2
notify 'could not decide what audio action to perform!' -u critical -t 5000
exit 1
;;
esac
vol_int=$((vol_int - (vol_int % AMOUNT)))
vol_pcnt=$(echo "scale = 2; $vol_int / 100;" | bc)
echo $vol_off
wpctl set-volume @DEFAULT_AUDIO_SINK@ "$vol_pcnt"
wpctl set-mute @DEFAULT_AUDIO_SINK@ "$vol_off"
play -n synth 0.005 sine 1000 vol 0.2 2>/dev/null
if [ "$vol_int" -eq 0 ] || [ "$vol_off" -eq 1 ]; then
ico=audio-volume-muted
elif [ "$vol_int" -lt 33 ]; then
ico=audio-volume-low
elif [ "$vol_int" -lt 66 ]; then
ico=audio-volume-medium
else
ico=audio-volume-high
fi
str="volume: $vol_int% $([ $vol_off -eq 1 ] && printf '(MUTE)')"
notify -i "$ico" -u low -h "int:value:$vol_int" "$str"

View File

@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/sh
WIN=$(xdotool getwindowfocus)
STATE=$(xprop -id "$WIN" _NET_WM_STATE)

BIN
.local/share/cpusetcores Executable file

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More