Compare commits

...

10 commits

34 changed files with 1155 additions and 574 deletions

56
alacritty/alacritty.toml Normal file
View file

@ -0,0 +1,56 @@
[colors.bright]
black = "#7c6f64"
blue = "#83a598"
cyan = "#8ec07c"
green = "#b8bb26"
magenta = "#d3869b"
red = "#fb4934"
white = "#ebdbb2"
yellow = "#fabd2f"
[colors.normal]
black = "#282828"
blue = "#458588"
cyan = "#689d6a"
green = "#98971a"
magenta = "#b16286"
red = "#cc241d"
white = "#a89984"
yellow = "#d79921"
[colors.primary]
background = "#282828"
foreground = "#fbf1c7"
[font]
size = 14.5
[font.bold]
family = "JetBrains Mono Nerd Font"
style = "Bold"
[font.bold_italic]
family = "JetBrains Mono Nerd Font"
style = "Bold Italic"
[font.italic]
family = "JetBrains Mono Nerd Font"
style = "Italic"
[font.normal]
family = "JetBrains Mono Nerd Font"
style = "Regular"
[font.offset]
x = 0
y = 1
[mouse]
hide_when_typing = true
[window]
opacity = 1
[window.padding]
x = 10
y = 7

View file

@ -1,170 +0,0 @@
font:
normal:
family: JetBrains Mono Nerd Font
style: Regular
bold:
family: JetBrains Mono Nerd Font
style: Bold
italic:
family: JetBrains Mono Nerd Font
style: Italic
bold_italic:
family: JetBrains Mono Nerd Font
style: Bold Italic
size: 11
offset:
x: 0
y: 1
window:
padding:
x: 7
y: 7
# opacity: 0.95
mouse:
hide_when_typing: true
#colors:
# primary:
# background: '#000000'
# foreground: '#ffffff'
#
# normal:
# black: '#000000'
# red: '#B00508'
# green: '#1B8F06'
# yellow: '#E9E700'
# blue: '#0858B5'
# magenta: '#830CB4'
# cyan: '#0CB488'
# white: '#9e9e9e'
#
# bright:
# black: '#373737'
# red: '#FF1313'
# green: '#44FF3A'
# yellow: '#FFAE11'
# blue: '#0095FF'
# magenta: '#D400D2'
# cyan: '#28FCB8'
# white: '#ffffff'
# Colors (Ayu Dark)
#colors:
# Default colors
# primary:
# background: '0x0A0E14'
# foreground: '0xB3B1AD'
# Normal colors
#normal:
# black: '0x01060E'
# red: '0xEA6C73'
# green: '0x91B362'
# yellow: '0xF9AF4F'
# blue: '0x53BDFA'
# magenta: '0xFAE994'
# cyan: '0x90E1C6'
# white: '0xC7C7C7'
# Bright colors
#bright:
# black: '0x686868'
# red: '0xF07178'
# green: '0xC2D94C'
# yellow: '0xFFB454'
# blue: '0x59C2FF'
# magenta: '0xFFEE99'
# cyan: '0x95E6CB'
# white: '0xFFFFFF'
# Gruvbox dark
colors:
primary:
background: '#282828'
# background: '#3c3836'
# background: '#32302f'
# background: '#000000'
foreground: '#fbf1c7'
normal:
black: '#282828'
red: '#cc241d'
green: '#98971a'
yellow: '#d79921'
blue: '#458588'
magenta: '#b16286'
cyan: '#689d6a'
white: '#a89984'
bright:
black: '#928374'
red: '#fb4934'
green: '#b8bb26'
yellow: '#fabd2f'
blue: '#83a598'
magenta: '#d3869b'
cyan: '#8ec07c'
white: '#ebdbb2'
# Colors (Gnome Terminal)
#colors:
# Default colors
# primary:
# background: '#1e1e1e'
# foreground: '#ffffff'
# Normal colors
#normal:
# black: '#171421'
# red: '#c01c28'
# green: '#26a269'
# yellow: '#a2734c'
# blue: '#12488b'
# magenta: '#a347ba'
# cyan: '#2aa1b3'
# white: '#d0cfcc'
# Bright colors
#bright:
# black: '#5e5c64'
# red: '#f66151'
# green: '#33d17a'
# yellow: '#e9ad0c'
# blue: '#2a7bde'
# magenta: '#c061cb'
# cyan: '#33c7de'
# white: '#ffffff'
# Colors (Nord)
#colors:
# Default colors
# primary:
# background: '#2E3440'
# foreground: '#D8DEE9'
# Normal colors
# normal:
# black: '#3B4252'
# red: '#BF616A'
# green: '#A3BE8C'
# yellow: '#EBCB8B'
# blue: '#81A1C1'
# magenta: '#B48EAD'
# cyan: '#88C0D0'
# white: '#E5E9F0'
# # Bright colors
# bright:
# black: '#4C566A'
# red: '#BF616A'
# green: '#A3BE8C'
# yellow: '#EBCB8B'
# blue: '#81A1C1'
# magenta: '#B48EAD'
# cyan: '#8FBCBB'
# white: '#ECEFF4'

View file

@ -1,14 +0,0 @@
#!/bin/bash
#
# 00-global.bash
# define global bash things
#
# expand history size
export HISTSIZE=100000
# source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

View file

@ -1,84 +0,0 @@
#!/bin/bash
#
# 01-aliases.bash
# bryson's bash aliases
#
shopt -s expand_aliases
alias sudo="doas"
# typos
alias l='ls'
alias sl='ls'
# always run with args
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
alias ls='ls --color=auto'
alias la='ls -a'
alias ll='ls -lh'
alias cp='cp -iv'
alias mv='mv -iv'
alias rm='rm -vI'
alias diff='diff --color=auto'
alias g++='g++ --std=c++20'
alias vim='vim -p'
alias gs='gs -dNOSAFER'
# cd shortcuts
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias b='cd -'
# portage aliases
alias emerge-update="sudo emerge --ask --verbose --update --deep --changed-use @world"
alias package.use='sudo vim /etc/portage/package.use'
alias make.conf='sudo vim /etc/portage/make.conf'
alias package.license='sudo vim /etc/portage/package.license'
alias world='vim -R /var/lib/portage/world'
# copy an entire file
alias copy='xclip -sel c <'
# binary substitutions
alias java='/usr/local/java/jdk-18.0.1.1/bin/java'
alias java11='/usr/bin/java'
alias python='python3'
alias ed='fzf --height=15 --layout=reverse | sed "s/^/\"/g;s/$/\"/g" | xargs -ro vim'
# common combinations
alias dj='python manage.py'
alias smci='sudo make clean install'
alias smi='sudo make install'
alias lib='xrandr --output HDMI-A-0 --auto --output eDP --off && xset r rate 300 50 && feh --bg-fill ~/git/wallpapers-exorcist/gruvbox/volcano-landscape.jpg'
alias nolib='xrandr --output HDMI-A-0 --off --output eDP --auto'
alias keys='xset r rate 300 50'
alias gits='git status'
# bash navigation
alias aa='vim ~/.bash/01-aliases.bash; . ~/.bash_profile'
s() {
find . -type f -exec grep ${1} {} \;
}
ssh-pixel() {
ssh -p 8022 uO_14O@${1}
}
# fixes
alias fixwifi='sudo rc-service wpa_supplicant restart'
alias fixaudio='pacmd set-default-sink alsa_output.usb-0c76_USB_PnP_Audio_Device-00.analog-stereo'
alias fixjava='export _JAVA_AWT_WM_NONREPARENTING=1 && export AWT_TOOLKIT=MToolkit && wmname LG3D'
# auto elevate
alias mount='sudo mount'
alias umount='sudo umount'
# other garbage
alias macos="cd /home/bryson/git/macOS-Simple-KVM && ./basic.sh"
alias server="python3 /home/bryson/git/webserver/server.py"

View file

@ -1,119 +0,0 @@
#!/bin/bash
#
# 02-prompt.bash
# bryson's gnarly bash prompt config
#
shopt -s histappend
# color definitions
black='\e[0;30m'
BLACK='\e[1;30m'
dgray='\e[0;90m'
DGRAY='\e[1;90m'
red='\e[0;31m'
RED='\e[1;31m'
lred='\e[0;91m'
LRED='\e[1;91m'
green='\e[0;32m'
GREEN='\e[1;32m'
lgreen='\e[0;92m'
LGREEN='\e[1;92m'
yellow='\e[0;33m'
YELLOW='\e[1;33m'
lyellow='\e[0;93m'
LYELLOW='\e[1;93m'
blue='\e[0;34m'
BLUE='\e[1;34m'
lblue='\e[0;94m'
LBLUE='\e[1;94m'
magenta='\e[0;35m'
MAGENTA='\e[1;35m'
lmagenta='\e[0;95m'
LMAGENTA='\e[1;95m'
cyan='\e[0;36m'
CYAN='\e[1;36m'
lcyan='\e[0;96m'
LCYAN='\e[1;96m'
lgray='\e[0;37m'
LGRAY='\e[1;37m'
NC='\e[0m' # No Color
# 256color prompt variables
color1='\e[38;5;39m'
color2='\e[38;5;81m'
color3='\e[38;5;77m'
color4='\e[38;5;226m'
# return exit code of last program if not 0
function exit_code() {
local ERROR="$?"
if [[ ERROR -ne 0 ]]; then
echo -n '\['"$RED"'\]'"$ERROR"' '
fi
}
# get current git branch and status
# http://www.opinionatedprogrammer.com/2011/01/colorful-bash-prompt-reflecting-git-status/
function _git_prompt() {
local git_status="`git status -unormal 2>&1`"
if ! [[ "$git_status" =~ Not\ a\ git\ repo ]]; then
if [[ "$git_status" =~ nothing\ to\ commit ]]; then
local ansi=""
local color="$lgreen"
elif [[ "$git_status" =~ nothing\ added\ to\ commit\ but\ untracked\ files\ present ]]; then
local ansi="!"
local color="$lred"
else
local ansi="*"
local color="$lyellow"
fi
if [[ "$git_status" =~ On\ branch\ ([^[:space:]]+) ]]; then
branch=${BASH_REMATCH[1]}
else
# Detached HEAD. (branch=HEAD is a faster alternative.)
branch="`git describe --all --contains --abbrev=4 HEAD 2> /dev/null ||
echo local`"
fi
if ! [[ "$branch" =~ local ]]; then
echo -n '\['"$color"'\] ('"$ansi"''"$branch"') '
fi
fi
}
# prompt building
# (2 unicode)[ bryson@hostname ] { /current/path }
# (unicode) $
#export _PS1="\[$dgray\]╭─[ \[$LGREEN\]\u\[$lgray\]@\[$YELLOW\]\h\[$dgray\] ] {\[$LBLUE\] \w\[$dgray\] } "
#export _PS2="\[$dgray\]╰ "
# same as above, no unicode
#export _PS1="\[$dgray\][ \[$GREEN\]\u\[$lgray\]@\[$LRED\]\h\[$dgray\] ] { \[$LCYAN\]\w\[$dgray\] } "
# bryson@hostname /current/path/ bash 10:00:00 PM
#export _PS1="\[\e[1m$color1\]\u\[$color2\]@\[$color3\]\h \[$color4\]\w \[$color3\]\@ \[$color2\]\s "
# [ bryson@hostname /current/path ]
# $
#export _PS1="\[$lgray\][ \[\e[1m$color1\]\u\[$color2\]@\[$color3\]\h \[$color4\]\w \[\e[0m$lgray\]]"
#export _PS1="\[\e[$lgray\][ \[$LBLUE\]\u\[$lcyan\]@\[$GREEN\]\h \[$LYELLOW\]\w \[$lgray\]]"
#export _PS2="\[$dgray\]"
# [ bryson@hostname path ]
# $
#export _PS1="\[\e[$lgray\][ \[$LBLUE\]\u\[$lcyan\]@\[$GREEN\]\h \[$LYELLOW\]\W \[$lgray\]]"
#export _PS2="\[$dgray\]"
#export _PS1="\[\e[$lgray\]\[$LBLUE\]\u\[$lcyan\]@\[$GREEN\]\h \[$LYELLOW\]\W\[$lgray\]"
# [ hostname ] Thu Mar 25, 10:00:00 AM, /dev/pts/0
# { /current/path } 8 files, 64 KB (master)
# $
export _PS1="\[$lgray\][ \[$LBLUE\]\h\[$lgray\] ] \[$LCYAN\]\d, \[$GREEN\]\T"
export _PS2="\[$lgray\]{ \[$LYELLOW\]\w\[$lgray\] }"
# define x titlebar
TITLEBAR='\[\033]0;\u@\h:\w ($(history 1 | cut -c 8-))\]'
# apply prompt and functions
export PROMPT_COMMAND='export PS1="$TITLEBAR$(exit_code)${_PS1}\n${_PS2}$(_git_prompt)\n\[$NC\]\$ ";history -a'

View file

@ -1,51 +0,0 @@
#!/bin/bash
#
# 03-boot.bash
# startup scripts for systems
bat_check() {
TEST=$(acpi | grep "Discharging" | grep -v "rate information")
if [[ $? -eq 0 ]]; then
echo "***********************************************************"
echo " WARNING"
echo "***********************************************************"
echo "Power supply is not plugged in."
echo "Make sure it is plugged in to avoid a random shutdown."
read -rs -N 1 -p "Press [Enter] to continue, any other key to return..." input;
if grep -q "$input" <<< ""; then
echo ""
else
return 1
fi
fi
}
# run startup script if tty
# for dingo
if [[ $TERM == 'linux' && $(hostname) == 'dingo' ]]; then
cat ~/bin/house.txt
printf "\n${CYAN}Welcome back Bryson :)\n\n"
printf "${LGREEN}What should dingo do?\n${magenta}"
echo -e '\td: start docked\n\tn: start not docked\n\tq: shutdown\n\tr: reboot\n\tl: logout\n\tb: bash\n\n'
while read -rs -N 1 key; do
printf "${NC}"
case $key in
d) bat_check && startx ;;
n) nstartx.sh ;;
q) echo "Are you sure you want to shutdown? (y/n)";
read -rs -N 1 key2; case $key2 in y) doas shutdown -Ph now ;; esac; ;;
r) echo "Are you sure you want to reboot? (y/n)";
read -rs -N 1 key3; case $key3 in y) doas reboot ;; esac; ;;
l) logout ;;
b) break ;;
[h?]) echo "$USAGE";;
esac
clear
cat ~/bin/house.txt
printf "\n${LGREEN}What should dingo do now?\n${magenta}"
echo -e '\td: start docked\n\tn: start not docked\n\tq: shutdown\n\tr: reboot\n\tl: logout\n\tb: bash\n\n'
done
fi

View file

@ -1,5 +0,0 @@
#!/bin/bash
# if [[ -z $TMUX ]] && [[ -n $SSH_TTY ]]; then
# exec tmux new-session -A -s ssh
# fi

View file

@ -1,21 +0,0 @@
#!/bin/bash
# .bash_profile
PATH=$PATH:$HOME/.local/bin:$HOME/bin:$HOME/.cargo/bin
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
export EDITOR=/usr/bin/vim
export TERMINAL=/usr/bin/alacritty
export BROWSER=/usr/bin/librewolf-bin
export PATH
export PATH=$PATH:/home/bryson/.spicetify
complete -cf doas
source /usr/share/autojump/autojump.bash
source /usr/share/bash-completion/completions/fzf
source /usr/share/fzf/key-bindings.bash

View file

@ -1,16 +0,0 @@
#!/bin/bash
# get custom bash scripts
if [ -d ~/.bash/ ]; then
for f in ~/.bash/*; do . $f; done
fi
# install asdf
#. $HOME/.asdf/asdf.sh
#. $HOME/.asdf/completions/asdf.bash
# devkitpro
DEVKITPRO=/opt/devkitpro
DEVKITARM=/opt/devkitpro/devkitARM
DEVKITPPC=/opt/devkitpro/devkitPPC
export PATH=$PATH:/home/bryson/.spicetify

76
doom/config.el Normal file
View file

@ -0,0 +1,76 @@
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
;; Place your private configuration here! Remember, you do not need to run 'doom
;; sync' after modifying this file!
;; Some functionality uses this to identify you, e.g. GPG configuration, email
;; clients, file templates and snippets. It is optional.
;; (setq user-full-name "John Doe"
;; user-mail-address "john@doe.com")
;; Doom exposes five (optional) variables for controlling fonts in Doom:
;;
;; - `doom-font' -- the primary font to use
;; - `doom-variable-pitch-font' -- a non-monospace font (where applicable)
;; - `doom-big-font' -- used for `doom-big-font-mode'; use this for
;; presentations or streaming.
;; - `doom-symbol-font' -- for symbols
;; - `doom-serif-font' -- for the `fixed-pitch-serif' face
;;
;; See 'C-h v doom-font' for documentation and more examples of what they
;; accept. For example:
;;
(setq doom-font (font-spec :family "JetBrainsMono Nerd Font" :size 19)
doom-variable-pitch-font (font-spec :family "Inter" :size 17))
;;
;; If you or Emacs can't find your font, use 'M-x describe-font' to look them
;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to
;; refresh your font settings. If Emacs still can't find your font, it likely
;; wasn't installed correctly. Font issues are rarely Doom issues!
;; There are two ways to load a theme. Both assume the theme is installed and
;; available. You can either set `doom-theme' or manually load a theme with the
;; `load-theme' function. This is the default:
(setq doom-theme 'doom-gruvbox)
;; This determines the style of line numbers in effect. If set to `nil', line
;; numbers are disabled. For relative line numbers, set this to `relative'.
(setq display-line-numbers-type 'relative)
;; If you use `org' and don't want your org files in the default location below,
;; change `org-directory'. It must be set before org loads!
(setq org-directory "~/org/")
;; Whenever you reconfigure a package, make sure to wrap your config in an
;; `after!' block, otherwise Doom's defaults may override your settings. E.g.
;;
;; (after! PACKAGE
;; (setq x y))
;;
;; The exceptions to this rule:
;;
;; - Setting file/directory variables (like `org-directory')
;; - Setting variables which explicitly tell you to set them before their
;; package is loaded (see 'C-h v VARIABLE' to look up their documentation).
;; - Setting doom variables (which start with 'doom-' or '+').
;;
;; Here are some additional functions/macros that will help you configure Doom.
;;
;; - `load!' for loading external *.el files relative to this one
;; - `use-package!' for configuring packages
;; - `after!' for running code after a package has loaded
;; - `add-load-path!' for adding directories to the `load-path', relative to
;; this file. Emacs searches the `load-path' when you load packages with
;; `require' or `use-package'.
;; - `map!' for binding new keys
;;
;; To get information about any of these functions/macros, move the cursor over
;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k').
;; This will open documentation for it, including demos of how they are used.
;; Alternatively, use `C-h o' to look up a symbol (functions, variables, faces,
;; etc).
;;
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
;; they are implemented.
(setq scroll-margin 5)

195
doom/init.el Normal file
View file

@ -0,0 +1,195 @@
;;; init.el -*- lexical-binding: t; -*-
;; This file controls what Doom modules are enabled and what order they load
;; in. Remember to run 'doom sync' after modifying it!
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
;; documentation. There you'll find a link to Doom's Module Index where all
;; of our modules are listed, including what flags they support.
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
;; 'C-c c k' for non-vim users) to view its documentation. This works on
;; flags as well (those symbols that start with a plus).
;;
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
;; directory (for easy access to its source code).
(doom! :input
;;bidi ; (tfel ot) thgir etirw uoy gnipleh
;;chinese
;;japanese
;;layout ; auie,ctsrnm is the superior home row
:completion
company ; the ultimate code completion backend
;;(corfu +orderless) ; complete with cap(f), cape and a flying feather!
;;helm ; the *other* search engine for love and life
;;ido ; the other *other* search engine...
;;ivy ; a search engine for love and life
vertico ; the search engine of the future
:ui
;;deft ; notational velocity for Emacs
doom ; what makes DOOM look the way it does
doom-dashboard ; a nifty splash screen for Emacs
;;doom-quit ; DOOM quit-message prompts when you quit Emacs
;;(emoji +unicode) ; 🙂
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;;hydra
;;indent-guides ; highlighted indent columns
;;ligatures ; ligatures and symbols to make your code pretty again
;;minimap ; show a map of the code on the side
modeline ; snazzy, Atom-inspired modeline, plus API
;;nav-flash ; blink cursor line after big motions
neotree ; a project drawer, like NERDTree for vim
ophints ; highlight the region an operation acts on
(popup +defaults) ; tame sudden yet inevitable temporary windows
;;tabs ; a tab bar for Emacs
;; treemacs ; a project drawer, like neotree but cooler
unicode ; extended unicode support for various languages
(vc-gutter +pretty) ; vcs diff in the fringe
vi-tilde-fringe ; fringe tildes to mark beyond EOB
;;window-select ; visually switch windows
;;workspaces ; tab emulation, persistence & separate workspaces
;;zen ; distraction-free coding or writing
:editor
(evil +everywhere); come to the dark side, we have cookies
file-templates ; auto-snippets for empty files
fold ; (nigh) universal code folding
;;(format +onsave) ; automated prettiness
;;god ; run Emacs commands without modifier keys
;;lispy ; vim for lisp, for people who don't like vim
;;multiple-cursors ; editing in many places at once
;;objed ; text object editing for the innocent
;;parinfer ; turn lisp into python, sort of
;;rotate-text ; cycle region at point between text candidates
snippets ; my elves. They type so I don't have to
word-wrap ; soft wrapping with language-aware indent
:emacs
dired ; making dired pretty [functional]
electric ; smarter, keyword-based electric-indent
ibuffer ; interactive buffer management
undo ; persistent, smarter undo for your inevitable mistakes
vc ; version-control and Emacs, sitting in a tree
:term
eshell ; the elisp shell that works everywhere
;;shell ; simple shell REPL for Emacs
;;term ; basic terminal emulator for Emacs
vterm ; the best terminal emulation in Emacs
:checkers
syntax ; tasing you for every semicolon you forget
(spell +flyspell) ; tasing you for misspelling mispelling
grammar ; tasing grammar mistake every you make
:tools
;;ansible
;;biblio ; Writes a PhD for you (citation needed)
;;collab ; buffers with friends
;;debugger ; FIXME stepping through code, to help you add bugs
;;direnv
docker
;;editorconfig ; let someone else argue about tabs vs spaces
;;ein ; tame Jupyter notebooks with emacs
(eval +overlay) ; run code, run (also, repls)
lookup ; navigate your code and its documentation
lsp ; M-x vscode
magit ; a git porcelain for Emacs
make ; run make tasks from Emacs
;;pass ; password manager for nerds
pdf ; pdf enhancements
;;prodigy ; FIXME managing external services & code builders
rgb ; creating color strings
;;taskrunner ; taskrunner for all your projects
;;terraform ; infrastructure as code
;;tmux ; an API for interacting with tmux
;;tree-sitter ; syntax and parsing, sitting in a tree...
;;upload ; map local to remote projects via ssh/ftp
:os
(:if (featurep :system 'macos) macos) ; improve compatibility with macOS
tty ; improve the terminal Emacs experience
:lang
;;agda ; types of types of types of types...
;;beancount ; mind the GAAP
(cc +lsp) ; C > C++ == 1
;;clojure ; java with a lisp
;;common-lisp ; if you've seen one lisp, you've seen them all
;;coq ; proofs-as-programs
;;crystal ; ruby at the speed of c
csharp ; unity, .NET, and mono shenanigans
;;data ; config/data formats
(dart +flutter) ; paint ui and not much else
;;dhall
elixir ; erlang done right
;;elm ; care for a cup of TEA?
emacs-lisp ; drown in parentheses
;;erlang ; an elegant language for a more civilized age
;;ess ; emacs speaks statistics
;;factor
;;faust ; dsp, but you get to keep your soul
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
;;fsharp ; ML stands for Microsoft's Language
;;fstar ; (dependent) types and (monadic) effects and Z3
gdscript ; the language you waited for
(go +lsp) ; the hipster dialect
;;(graphql +lsp) ; Give queries a REST
(haskell +lsp) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python
;;idris ; a language you can depend on
;;json ; At least it ain't XML
(java +lsp) ; the poster child for carpal tunnel syndrome
javascript ; all(hope(abandon(ye(who(enter(here))))))
julia ; a better, faster MATLAB
kotlin ; a better, slicker Java(Script)
(latex +lsp) ; writing papers in Emacs has never been so fun
;;lean ; for folks with too much to prove
;;ledger ; be audit you can be
lua ; one-based indices? one-based indices
markdown ; writing docs for people to ignore
;;nim ; python + lisp at the speed of c
;;nix ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel
org ; organize your plain life in plain text
php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional
(python +lsp +pyright) ; beautiful is better than ugly
;;qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs
raku ; the artist formerly known as perl6
;;rest ; Emacs as a REST client
;;rst ; ReST in peace
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
;;(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;scala ; java, but good
;;(scheme +guile) ; a fully conniving family of lisps
sh ; she sells {ba,z,fi}sh shells on the C xor
;;sml
;;solidity ; do you need a blockchain? No.
;;swift ; who asked for emoji variables?
;;terra ; Earth and Moon in alignment for performance.
web ; the tubes
yaml ; JSON, but readable
;;zig ; C, but simpler
:email
;;(mu4e +org +gmail)
;;notmuch
;;(wanderlust +gmail)
:app
;;calendar
;;emms
;;everywhere ; *leave* Emacs!? You must be joking
;;irc ; how neckbeards socialize
;;(rss +org) ; emacs as an RSS reader
;;twitter ; twitter client https://twitter.com/vnought
:config
;;literate
(default +bindings +smartparens))

50
doom/packages.el Normal file
View file

@ -0,0 +1,50 @@
;; -*- no-byte-compile: t; -*-
;;; $DOOMDIR/packages.el
;; To install a package with Doom you must declare them here and run 'doom sync'
;; on the command line, then restart Emacs for the changes to take effect -- or
;; use 'M-x doom/reload'.
;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror:
;; (package! some-package)
;; To install a package directly from a remote git repo, you must specify a
;; `:recipe'. You'll find documentation on what `:recipe' accepts here:
;; https://github.com/radian-software/straight.el#the-recipe-format
;; (package! another-package
;; :recipe (:host github :repo "username/repo"))
;; If the package you are trying to install does not contain a PACKAGENAME.el
;; file, or is located in a subdirectory of the repo, you'll need to specify
;; `:files' in the `:recipe':
;; (package! this-package
;; :recipe (:host github :repo "username/repo"
;; :files ("some-file.el" "src/lisp/*.el")))
;; If you'd like to disable a package included with Doom, you can do so here
;; with the `:disable' property:
;; (package! builtin-package :disable t)
;; You can override the recipe of a built in package without having to specify
;; all the properties for `:recipe'. These will inherit the rest of its recipe
;; from Doom or MELPA/ELPA/Emacsmirror:
;; (package! builtin-package :recipe (:nonrecursive t))
;; (package! builtin-package-2 :recipe (:repo "myfork/package"))
;; Specify a `:branch' to install a package from a particular branch or tag.
;; This is required for some packages whose default branch isn't 'master' (which
;; our package manager can't deal with; see radian-software/straight.el#279)
;; (package! builtin-package :recipe (:branch "develop"))
;; Use `:pin' to specify a particular commit to install.
;; (package! builtin-package :pin "1a2b3c4d5e")
;; Doom's packages are pinned to a specific commit and updated from release to
;; release. The `unpin!' macro allows you to unpin single packages...
;; (unpin! pinned-package)
;; ...or multiple packages
;; (unpin! pinned-package another-pinned-package)
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
;; (unpin! t)

View file

@ -290,7 +290,7 @@
# * context_all: Open context menu for all notifications.
# These values can be strung together for each mouse event, and
# will be executed in sequence.
mouse_left_click = do_action, close_current
mouse_left_click = close_current
mouse_middle_click = do_action, close_current
mouse_right_click = close_all

View file

@ -1,15 +1,17 @@
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
htop_version=3.2.1
htop_version=3.2.2
config_reader_min_version=3
fields=0 48 17 18 38 39 40 2 46 47 49 1
hide_kernel_threads=1
hide_userland_threads=0
hide_running_in_container=0
shadow_other_users=0
show_thread_names=0
show_program_path=1
highlight_base_name=1
highlight_deleted_exe=1
shadow_distribution_path_prefix=0
highlight_megabytes=1
highlight_threads=1
highlight_changes=0
@ -19,7 +21,7 @@ strip_exe_from_cmdline=1
show_merged_command=0
header_margin=1
screen_tabs=1
detailed_cpu_time=1
detailed_cpu_time=0
cpu_count_from_one=0
show_cpu_usage=1
show_cpu_frequency=1
@ -32,10 +34,10 @@ enable_mouse=1
delay=7
hide_function_bar=0
header_layout=two_50_50
column_meters_0=LeftCPUs Memory Swap
column_meter_modes_0=1 1 1
column_meters_1=RightCPUs Tasks LoadAverage Uptime
column_meter_modes_1=1 2 2 2
column_meters_0=AllCPUs2
column_meter_modes_0=1
column_meters_1=CPU Memory Swap Hostname System DateTime Tasks LoadAverage Uptime
column_meter_modes_1=1 1 1 2 2 2 2 2 2
tree_view=0
sort_key=46
tree_sort_key=0
@ -51,7 +53,7 @@ screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU P
.sort_direction=-1
.tree_sort_direction=1
.all_branches_collapsed=0
screen:I/O=PID USER COMM IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE
screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE Command
.sort_key=IO_RATE
.tree_sort_key=PID
.tree_view=0

15
sh/.profile Normal file
View file

@ -0,0 +1,15 @@
#!/usr/bin/env bash
#
# bryson's shell-agnostic profile
#
# shell variables
PATH=$HOME/.local/bin:$HOME/bin:$HOME/.cargo/bin:$HOME/.dotnet/tools:$HOME/bin:$HOME/.config/emacs/bin:$PATH
EDITOR=/usr/bin/vim
TERMINAL=/usr/bin/alacritty
BROWSER=/usr/bin/librewolf-bin
XZ_OPT='-9 -T0 -M 32000000000'
DOTNET_CLI_TELEMETRY_OPTOUT="true"
# finally export all variables
export PATH EDITOR TERMINAL BROWSER XZ_OPT DOTNET_CLI_TELEMETRY_OPTOUT

53
sh/bash/.bash_profile Normal file
View file

@ -0,0 +1,53 @@
#!/usr/bin/env bash
#
# bryson's bash profile
#
# import shell-agnostic profile
if [ -f ~/.profile ]; then
. ~/.profile
fi
# import global bashrc
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# if login shell, run tty menu
if [[ $TERM == 'linux' ]]; then
while true; do
echo -e "\e[0;35m***** MAIN MENU *****\e[0m"
echo "1: Start XMonad"
echo "2: Exit to Bash"
echo -e "\e[0;35m---\e[0m"
echo "8: Logout"
echo "9: Reboot"
echo "0: Shutdown"
read -rs -N 1 key
case $key in
1) startx ;;
2) break ;;
8) logout ;;
9) echo "Are you sure you want to reboot? (y will reboot)";
read -rs -N 1 confirm; [ "$confirm" = 'y' ] && (doas reboot; break) ;;
0) echo "Are you sure you want to shutdown? (y will shutdown)";
read -rs -N 1 confirm; [ "$confirm" = 'y' ] && (doas reboot; break) ;;
esac
done
fi
# end tty menu
# bash specific variables
HISTSIZE=100000
# enable command completion for doas
complete -cf doas
shopt -s expand_aliases
# export variables
export HISTSIZE black BLACK dgray DGRAY red RED lred LRED green GREEN lgreen LGREEN yellow LYELLOW blue BLUE lblue LBLUE magenta MAGENTA lmagenta LMAGENTA cyan CYAN lcyan LCYAN lgray LGRAY NC
# import bashrc
# if [ -f ~/.bashrc ]; then
# . ~/.bashrc
# fi

167
sh/bash/.bashrc Normal file
View file

@ -0,0 +1,167 @@
#!/usr/bin/env bash
#
# bryson's bashrc
#
### aliases ###
alias sudo="doas"
# typos
alias l='ls'
alias sl='ls'
# always run with args
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
alias ls='ls --color=auto'
alias la='ls -a'
alias ll='ls -lh'
alias lla='ls -lha'
alias cp='cp -iv'
alias mv='mv -iv'
alias rm='rm -vI'
alias diff='diff --color=auto'
alias g++='g++ --std=c++20'
alias vim='vim -p'
alias gs='gs -dNOSAFER'
alias emacsclient='emacsclient -cn'
# cd shortcuts
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias b='cd -'
# copy an entire file
alias copy='xclip -sel c <'
# binary substitutions
# alias ed='fzf --height=15 --layout=reverse | sed "s/^/\"/g;s/$/\"/g" | xargs -ro vim'
# common combinations
alias dj='python manage.py'
alias smci='sudo make clean install'
alias smi='sudo make install'
alias lib='xrandr --output HDMI-A-0 --auto --output eDP --off && xset r rate 300 50 && feh --bg-fill ~/Pictures/Wallpapers/solid-gruvbox-2.png && xmodmap ~/.Xmodmap'
alias laptop='xrandr --output HDMI-A-0 --off --output eDP --auto && feh --bg-fill ~/Pictures/Wallpapers/solid-gruvbox-2.png'
alias mirror='xrandr --output HDMI-A-0 --auto && feh --bg-fill ~/Pictures/Wallpapers/solid-gruvbox-2.png && xmodmap ~/.Xmodmap'
alias hgrep='history | grep'
alias keys='xset r rate 300 50'
alias gits='git status'
alias mac="rm -rf __MACOSX/; rm \$(find . -name '.DS_Store')"
# fixes
alias fixwifi='sudo rc-service wpa_supplicant restart'
alias fixaudio='pacmd set-default-sink alsa_output.usb-0c76_USB_PnP_Audio_Device-00.analog-stereo'
alias fixjava='export _JAVA_AWT_WM_NONREPARENTING=1 && export AWT_TOOLKIT=MToolkit && wmname LG3D'
alias fixkeb='xmodmap ~/.Xmodmap ; xset r rate 200 80 '
# auto elevate
alias mount='sudo mount'
alias umount='sudo umount'
# other garbage
alias server="python3 /home/bryson/git/webserver/server.py"
### colors ###
# capitals are bold
# 'l' is 'light'
# 'd' is 'dark'
black='\e[0;30m'
BLACK='\e[1;30m'
dgray='\e[0;90m'
DGRAY='\e[1;90m'
red='\e[0;31m'
RED='\e[1;31m'
lred='\e[0;91m'
LRED='\e[1;91m'
green='\e[0;32m'
GREEN='\e[1;32m'
lgreen='\e[0;92m'
LGREEN='\e[1;92m'
yellow='\e[0;33m'
YELLOW='\e[1;33m'
lyellow='\e[0;93m'
LYELLOW='\e[1;93m'
blue='\e[0;34m'
BLUE='\e[1;34m'
lblue='\e[0;94m'
LBLUE='\e[1;94m'
magenta='\e[0;35m'
MAGENTA='\e[1;35m'
lmagenta='\e[0;95m'
LMAGENTA='\e[1;95m'
cyan='\e[0;36m'
CYAN='\e[1;36m'
lcyan='\e[0;96m'
LCYAN='\e[1;96m'
lgray='\e[0;37m'
LGRAY='\e[1;37m'
NC='\e[0m' # No Color
### functions galore! ###
# upload item to webserver
function upload() {
scp $1 paul:/home/PUBLIC/upload && echo https://brysonsteck.xyz/pub/upload/$(echo $1 | rev | cut -d '/' -f 1 | rev)
}
# return exit code of last program if not 0
function exit_code() {
local ERROR="$?"
if [[ ERROR -ne 0 ]]; then
# echo -n ''"$dgray"'\]/\['"$RED"'\]'"$ERROR"'\['"$dgray"'\]\\'
echo -n '\['"$dgray"'\]<\['"$RED"'\]'"$ERROR"'\['"$dgray"'\]> '
# else
# # echo -n ''"$dgray"'\]/\['"$LBLUE"'\]'"$ERROR"'\['"$dgray"'\]\\'
# echo -n '\['"$RED"'\]'"$ERROR"' '
fi
}
# get current git branch and status
# http://www.opinionatedprogrammer.com/2011/01/colorful-bash-prompt-reflecting-git-status/
function _git_prompt() {
local git_status="`git status -unormal 2>&1`"
if ! [[ "$git_status" =~ Not\ a\ git\ repo ]]; then
if [[ "$git_status" =~ nothing\ to\ commit ]]; then
local ansi=""
local color="$lcyan"
elif [[ "$git_status" =~ nothing\ added\ to\ commit\ but\ untracked\ files\ present ]]; then
local ansi="!"
local color="$lred"
else
local ansi="*"
local color="$lyellow"
fi
if [[ "$git_status" =~ On\ branch\ ([^[:space:]]+) ]]; then
branch=${BASH_REMATCH[1]}
else
# Detached HEAD. (branch=HEAD is a faster alternative.)
branch="`git describe --all --contains --abbrev=4 HEAD 2> /dev/null ||
echo local`"
fi
if ! [[ "$branch" =~ local ]]; then
# echo -n '\['"$color"'\] ('"$ansi"''"$branch"') '
echo -n '\['"$dgray"'\](\['"$color"'\]'"$branch"''"$ansi"'\['"$dgray"'\])'
fi
fi
}
export -f exit_code
export -f _git_prompt
### shell prompt ###
# bryson@hostname [/current/path] {12:00:00} <255> (master)
# $
export _PS1="\[$LCYAN\]\u\[$dgray\]@\[$LGREEN\]\h \[$dgray\][\[$YELLOW\]\w\[$dgray\]] {\[$LBLUE\]\@\[$dgray\]} "
# define x titlebar
TITLEBAR='\[\033]0;\u@\h \w\]'
# apply prompt and functions
# ignore titlebar if xterm, likely don't need a title anyway
if [[ "$TERM" =~ xterm-256color ]]; then
export PROMPT_COMMAND='export PS1="${_PS1}$(exit_code)$(_git_prompt)\n\[$NC\]\$ ";echo'
else
export PROMPT_COMMAND='export PS1="$TITLEBAR${_PS1}$(exit_code)$(_git_prompt)\n\[$LGRAY\]\$\[$NC\] ";echo'
fi

View file

@ -1,4 +1,4 @@
set -g prefix M-Space
set -g prefix C-a
set -g visual-activity on
set -g status-style fg=white,bg=black
set-window-option -g window-status-bell-style fg=white,bg=red,bold

View file

@ -1,23 +1,30 @@
#!/bin/sh
# important config files
cp ~/.config/alacritty.yml ./alacritty/alacritty.yml
cp -r ~/.bash ./bash
cp ~/.bash_profile ./bash
cp ~/.bashrc ./bash
echo copying files...
cp ~/.config/alacritty.toml ./alacritty/alacritty.toml
cp ~/.config/tmux/tmux.conf ./tmux
cp ~/.vimrc ./vim
cp ~/.vim/coc-settings.json ./vim
cp -r ~/.vim/after ./vim
cp ~/.xinitrc* ./x
cp ~/.Xresources ./x
cp ~/.Xmodmap ./x
cp ~/bin/battery.pl ./x
cp ~/bin/startdwm.sh ./x
# other config files
cp ~/bin/spawn-alacritty ./x
cp ~/bin/quitconf ./x
cp ~/bin/battery ./x
cp ~/bin/startdwm ./x
cp ~/.config/xmobar/xmobar.hs ./xmobar
cp ~/.config/xmonad/xmonad.hs ./xmonad
cp ~/.config/VSCodium/User/settings.json ./vscode
cp ~/.profile ./sh
cp ~/.bash_profile ./sh/bash
cp ~/.bashrc ./sh/bash
cp ~/.config/dunst/dunstrc ./dunst
cp ~/.config/htop/htoprc ./htop
cp ~/.config/doom/* ./doom
# update submodules
echo pulling submodules...
git submodule update --remote --merge

View file

@ -8,13 +8,17 @@ call plug#begin()
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'itchyny/lightline.vim'
Plug 'jceb/vim-orgmode'
Plug 'tpope/vim-speeddating'
Plug 'ryanoasis/vim-devicons'
" Plug 'tpope/vim-speeddating'
Plug 'ryanoasis/vim-devicons'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'lervag/vimtex'
Plug 'preservim/nerdtree'
Plug 'itchyny/vim-gitbranch'
Plug 'tpope/vim-commentary'
Plug 'godlygeek/tabular'
Plug 'preservim/vim-markdown'
" Plug 'Yggdroot/indentLine'
Plug 'junegunn/fzf.vim'
call plug#end()
@ -26,20 +30,23 @@ set relativenumber
set bg:dark
set mouse=a
set tabstop=2 softtabstop=2 shiftwidth=2 expandtab
set formatoptions-=t
set linebreak
set cursorline
" set cursorcolumn
set backspace=indent,eol,start
set laststatus=2
set wildmenu
set scrolloff=5
set incsearch
set ttimeout ttimeoutlen=25
set showtabline=2
" set showtabline=2
set undodir=~/.vim/undo-dir
set undofile
set backupdir=$HOME/.vim/backups
set noshowmode
set showcmd
" set termguicolors
" set clipboard=unnamedplus
" lets
@ -51,12 +58,26 @@ let g:python_recommended_style = 0
let g:NERDTreeFileExtensionHighlightFullName = 1
let g:NERDTreeExactMatchHighlightFullName = 1
let g:NERDTreePatternMatchHighlightFullName = 1
let g:NERDTreeWinPos = 'right'
let g:org_heading_shade_leading_stars = 0
let g:vim_markdown_folding_disabled = 1
let g:vim_markdown_new_list_item_indent = 2
" colorscheme stuff
colorscheme gruvbox
" fix colorscheme colors
" set specific colors
hi Normal ctermbg=NONE
hi Normal guibg=NONE
hi CocUnderline gui=undercurl cterm=underline
hi CocInfoHighlight cterm=underline
hi CocErrorHighlight ctermfg=red gui=underline cterm=underline
hi CocWarningHighlight ctermfg=yellow gui=underline cterm=underline
hi MatchParen cterm=bold ctermfg=cyan
" Custom commands
command Fixtabs :%s/ / /g | echo 'tabs replaced with spaces (like a good programmer)'
command Clipboard :yank + | echo 'Yanked line into system clipboard'
" remaps
nnoremap <SPACE> <Nop>
@ -67,14 +88,17 @@ nnoremap <leader>x :wq<CR>
nnoremap <leader>b :e#<CR>
nnoremap <leader>e :e<CR>
nnoremap <leader>c gcc<CR>
nnoremap <leader>y :noh<CR>
nnoremap <leader>u :tabp<CR>
nnoremap <leader>o :tabn<CR>
nnoremap <leader>r :Clipboard<CR>
nnoremap <leader>h :wincmd h<CR>
nnoremap <leader>j :wincmd j<CR>
nnoremap <leader>k :wincmd k<CR>
nnoremap <leader>l :wincmd l<CR>
nnoremap <leader>n :NERDTreeFocus<CR>
nnoremap <leader>t :NERDTreeToggle<CR>
nnoremap <leader>f :Files .<CR>
nnoremap <leader>p :wincmd p<CR>
nnoremap <leader>v :set paste! number! relativenumber!<CR>
nnoremap <leader>i :CocCommand clangd.switchSourceHeader<CR>
@ -88,12 +112,13 @@ autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTr
" Close the tab if NERDTree is the only window remaining in it.
autocmd BufEnter * if winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif
" Open the existing NERDTree on each new tab.
autocmd BufWinEnter * if getcmdwintype() == '' | silent NERDTreeMirror | endif
" autocmd BufWinEnter * if getcmdwintype() == '' | silent NERDTreeMirror | endif
" turn on spell checker for all markdown files
" turn on spell checker for certain files
autocmd FileType markdown setlocal spell
autocmd FileType org setlocal spell
hi clear SpellBad
hi SpellBad cterm=underline
hi SpellBad cterm=underline ctermfg=red
hi clear SpellRare
hi SpellRare cterm=underline
hi clear SpellCap
@ -103,16 +128,32 @@ hi SpellLocal cterm=underline
" Coc remaps
inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ coc#pum#visible() ? coc#pum#next(1) :
\ CheckBackspace() ? "\<Tab>" :
\ coc#refresh()
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
inoremap <expr><S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"
function! s:check_back_space() abort
" Make <CR> to accept selected completion item or notify coc.nvim to format
" <C-g>u breaks current undo, please make your own choice
inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm()
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
function! CheckBackspace() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
function! HumanSize() abort
let l:bytes = line2byte('$') + len(getline('$'))
let l:sizes = ['B', 'KB', 'MB', 'GB']
let l:i = 0
while l:bytes >= 1024
let l:bytes = l:bytes / 1024.0
let l:i += 1
endwhile
return printf('%.0f%s', l:bytes, l:sizes[l:i])
endfunction
" lightline config
if expand('$UID') == 0
let g:lightline = {
@ -122,11 +163,12 @@ if expand('$UID') == 0
\ [ 'filename', 'readonly', 'modified' ],
\ [ 'gitbranch'] ],
\ 'right': [ [ 'lineinfo' ],
\ [ 'fileformat', 'filetype' ],
\ [ 'filesize', 'fileformat', 'filetype' ],
\ [ 'percent' ] ]
\ },
\ 'component_function': {
\ 'gitbranch': 'gitbranch#name'
\ 'gitbranch': 'gitbranch#name',
\ 'filesize': 'HumanSize'
\ },
\ }
let g:lightline.component = {
@ -140,11 +182,12 @@ else
\ [ 'filename', 'readonly', 'modified' ],
\ [ 'gitbranch'] ],
\ 'right': [ [ 'lineinfo' ],
\ [ 'fileformat', 'filetype' ],
\ [ 'filesize', 'fileformat', 'filetype' ],
\ [ 'percent' ] ]
\ },
\ 'component_function': {
\ 'gitbranch': 'gitbranch#name'
\ 'gitbranch': 'gitbranch#name',
\ 'filesize': 'HumanSize'
\ },
\ }
let g:lightline.component = {

View file

@ -0,0 +1 @@
set tabstop=2 softtabstop=2 shiftwidth=2 expandtab

View file

@ -1,30 +1,66 @@
{
"semanticTokens.filetypes": ["*"],
"semanticTokens.filetypes": ["*"],
"semanticTokens.enable": true,
"documentHighlight.priority": 2049,
"coc.preferences.enableMarkdown": false,
"suggest.completionItemKindLabels": {
"text": "t",
"method": "m",
"function": ""
"text": "",
"method": "",
"function": "",
"constructor": "",
"field": "",
"variable": "",
"class": "",
"interface": "",
"module": "",
"property": "",
"unit": "",
"value": "",
"enum": "",
"keyword": "",
"snippet": "",
"color": "",
"file": "",
"reference": "",
"folder": "",
"enumMember": "",
"constant": "",
"struct": "",
"event": "",
"operator": "",
"typeParameter": "",
"default": ""
},
"java.home": "/usr/java/jdk-17.0.1",
"diagnostic.hintSign": "",
"diagnostic.infoSign": "",
"diagnostic.errorSign": "",
"diagnostic.warningSign": "",
"java.jdt.ls.java.home": "/usr/local/java/jdk-18.0.1.1",
"java.configuration.runtimes": [
{
"name": "JavaSE-12",
"path": "/usr/java/jdk-12.0.2",
"name": "JavaSE-18",
"path": "/usr/local/java/jdk-18.0.1.1",
"default": true
},
{
"name": "JavaSE-16",
"path": "/usr/java/jdk-17.0.1"
}
],
"java.referencesCodeLens.enabled": true,
"java.implementationsCodeLens.enabled": true,
"java.completion.enabled": true,
"colors.enable": true,
"perl": {
"enable": true,
"debugAdapterPort": "13604",
"logLevel": 1
},
"java.jdt.ls.vmargs": "-noverify -Xmx6G -XX:+UseG1GC -XX:+UseStringDeduplication"
"java.jdt.ls.vmargs": "-noverify -Xmx6G -XX:+UseG1GC -XX:+UseStringDeduplication",
"java.project.referencedLibraries": ["*.jar"],
"languageserver": {
"csharp-ls": {
"command": "csharp-ls",
"filetypes": ["cs"],
"rootPatterns": ["*.csproj", ".vim/", ".git/", ".hg/"]
}
},
"suggest.noselect": true,
"inlayHint.display": false
}

@ -1 +1 @@
Subproject commit bf2885a95efdad7bd5e4794dd0213917770d79b7
Subproject commit f1ecde848f0cdba877acb0c740320568252cc482

87
vscode/settings.json Normal file
View file

@ -0,0 +1,87 @@
{
"editor.inlineSuggest.enabled": true,
"window.menuBarVisibility": "hidden",
"telemetry.telemetryLevel": "off",
"telemetry.enableTelemetry": false,
"java.import.gradle.enabled": true,
"workbench.colorCustomizations": {
"statusBarItem.remoteBackground": "#79740e",
"statusBar.debuggingBackground": "#d65d0e",
},
"editor.fontFamily": "'JetBrains Mono'",
"java.configuration.runtimes": [
// {
// "name": "JavaSE-1.8",
// "path": "/usr/local/java/jdk-8",
// },
{
"name": "JavaSE-17",
"path": "/usr/lib/jvm/openjdk-bin-17",
"default": true
}
],
"terminal.integrated.commandsToSkipShell": [
"language-julia.interrupt"
],
"security.workspace.trust.untrustedFiles": "open",
"workbench.settings.enableNaturalLanguageSearch": false,
"extensions.autoCheckUpdates": false,
"extensions.autoUpdate": "onlyEnabledExtensions",
"typescript.disableAutomaticTypeAcquisition": true,
"workbench.colorTheme": "Gruvbox Dark Hard",
"editor.cursorBlinking": "solid",
"editor.tabSize": 2,
"keyboard.dispatch": "keyCode",
"vim.vimrc.enable": true,
"vim.vimrc.path": "~/.vimrc",
"vim.leader": "<space>",
"debug.inlineValues": "on",
"debug.console.collapseIdenticalLines": false,
"glassit.alpha": 225,
"editor.minimap.enabled": false,
"vim.easymotionDimBackground": false,
"vim.hlsearch": true,
"workbench.startupEditor": "none",
"workbench.sideBar.location": "right",
"window.restoreWindows": "none",
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": ["<leader>", "h"],
"commands": [
"workbench.action.navigateLeft"
]
},
{
"before": ["<leader>", "j"],
"commands": [
"workbench.action.navigateDown"
]
},
{
"before": ["<leader>", "k"],
"commands": [
"workbench.action.navigateUp"
]
},
{
"before": ["<leader>", "l"],
"commands": [
"workbench.action.navigateRight"
]
}
],
"debug.onTaskErrors": "showErrors",
"explorer.confirmDelete": false,
"window.zoomLevel": 1,
"avdmanager.sdkPath": "/home/bryson/.android/sdk",
"avdmanager.executable": "/home/bryson/.android/sdk/tools/bin/avdmanager",
"avdmanager.sdkManager": "/home/bryson/.android/sdk/tools/bin/sdkmanager",
"haskell.manageHLS": "GHCup",
"jupyter.widgetScriptSources": [
"jsdelivr.com",
"unpkg.com"
],
"rust-client.engine": "rust-analyzer",
"rust-client.disableRustup": true,
}

View file

@ -1,4 +1,4 @@
clear Lock
remove Lock = Caps_Lock
keycode 66 = Escape
keycode 9 = Caps_Lock
keycode 9 = Escape

View file

@ -1,2 +1,4 @@
Xcursor.theme: Adwaita
Xcursor.size: 24
Sxiv.background: #3c3836
Sxiv.foreground: #fbf1c7

View file

@ -1,8 +1,4 @@
#!/bin/sh
# executed by startx
# for use when dingo is DOCKED
export DOCKED=true
# load xinitrc.d stuff
userresources=$HOME/.Xresources
@ -40,20 +36,22 @@ fi
# start notifications (dunst)
/usr/bin/dunst &
# open picom compositor
#picom --config ~/.config/picom.conf &
# start picom compositor
picom --config ~/.config/picom.conf &
#spotifyd &
# add network, battery, date and time to xsetroot
# slstatus &
# set up monitors
sh ~/.config/screenlayout.sh &
# reset backlight
# light -S 30 &
# set default audio device to be dock audio jack
pulseaudio -k && pacmd set-default-sink alsa_output.usb-0c76_USB_PnP_Audio_Device-00.analog-stereo &
# set default audio device to be laptop speakers
# pacmd set-default-sink alsa_output.pci-0000_03_00.6.HiFi__hw_Generic_1__sink &
# pacmd set-sink-volume alsa_output.pci-0000_03_00.6.HiFi__hw_Generic_1__sink 0 &
# add weather, date and time to xsetroot
#sh ~/bin/xsetloop-docked.sh &
slstatus &
# set up wallpaper
feh --bg-fill ~/Pictures/Wallpapers/solid-gruvbox-2.png &
# sleep 1 && feh --bg-fill ~/Pictures/Wallpapers/solid-gruvbox-2.png &
# apply Xresources
xrdb -merge ~/.Xresources
@ -61,25 +59,33 @@ xrdb -merge ~/.Xresources
# make cursor disappear after typing
xbanish &
# enable numlock
numlockx &
# turn tearfree on
xrandr --output eDP --auto & #--set TearFree on --output HDMI-A-0 --set TearFree on &
# run battery checker
~/bin/battery &
# start keepassxc for passwords
keepassxc ~/.passwords/Passwords.kdbx &
# set up wallpapers
#wallpapers.sh &
feh --bg-fill git/wallpapers-exorcist/gruvbox/canyon.jpg git/wallpapers-exorcist/gruvbox/canyon.jpg &
# start emacs daemon
emacs --daemon &
# if unicomp keyboard detected, turn alt into super
if $(lsusb | grep -qi "Unicomp"); then
# if logitech keyboard detected, turn alt into super
if $(lsusb | grep -qi "Logitech Mechanical Keyboard"); then
xmodmap -e "remove mod1 = Alt_L"
xmodmap -e "remove mod4 = Super_L"
xmodmap -e "add mod1 = Super_L"
xmodmap -e "add mod4 = Alt_L"
fi
# start dwm
# lock screen and suspend after 20 minutes of inactivity
xautolock -time 20 -locker slock -secure &
# start xmonad
redshift &
xset r rate 300 50
exec /home/bryson/bin/startdwm.sh
xmobar &
xset r rate 300 80
# exec /home/bryson/bin/startdwm
exec $HOME/.cache/xmonad/xmonad-x86_64-linux
# exec qtile start

View file

@ -1,7 +1,7 @@
#!/bin/sh
# executed by startx-not-docked
# for use when dingo is NOT docked
export DOCKED=false
# executed by startx
# for use when dingo is DOCKED
export DOCKED=true
# load xinitrc.d stuff
@ -40,23 +40,21 @@ fi
# start notifications (dunst)
/usr/bin/dunst &
# start picom compositor
#picom --config ~/.config/picom.conf &
# open picom compositor
picom --config ~/.config/picom.conf &
#spotifyd &
# add network, battery, date and time to xsetroot
slstatus-not-docked &
# set up monitors
sh ~/.config/screenlayout.sh &
# reset backlight
light -S 25 &
# set default audio device to be dock audio jack
pulseaudio -k &
pacmd set-default-sink alsa_output.usb-0c76_USB_PnP_Audio_Device-00.analog-stereo &
# set default audio device to be laptop speakers
pacmd set-default-sink alsa_output.pci-0000_03_00.6.HiFi__hw_Generic_1__sink &
pacmd set-sink-volume alsa_output.pci-0000_03_00.6.HiFi__hw_Generic_1__sink 0 &
# set up wallpaper
feh --bg-fill ~/git/wallpapers-exorcist/gruvbox/volcano-landscape.jpg
# add weather, date and time to xsetroot
#sh ~/bin/xsetloop-docked.sh &
slstatus &
# apply Xresources
xrdb -merge ~/.Xresources
@ -64,15 +62,24 @@ xrdb -merge ~/.Xresources
# make cursor disappear after typing
xbanish &
# turn tearfree on
xrandr --output eDP --auto --set TearFree on --output HDMI-A-0 --set TearFree on &
# run battery checker
~/bin/battery.pl &
# enable numlock
numlockx &
# start keepassxc for passwords
keepassxc ~/.passwords/Passwords.kdbx &
# set up wallpapers
#wallpapers.sh &
feh --bg-fill git/wallpapers-exorcist/gruvbox/mountains-2.jpg git/wallpapers-exorcist/gruvbox/mountains-2.jpg &
# if unicomp keyboard detected, turn alt into super
if $(lsusb | grep -qi "Unicomp"); then
xmodmap -e "remove mod1 = Alt_L"
xmodmap -e "remove mod4 = Super_L"
xmodmap -e "add mod1 = Super_L"
xmodmap -e "add mod4 = Alt_L"
fi
# start dwm
redshift &
xset r rate 300 50

View file

@ -22,13 +22,13 @@ while (1) {
if (int($battery_level) <= int($CRITICAL_LEVEL)) {
$CRITICAL = 'def';
$sent = 'def';
system "notify-send -i \"battery-empty\" -t 0 -u critical \"BATTERY CRITICAL\" \"Battery level is ${battery_level}%\n\nCharge the system NOW.\""
system "notify-send -i \"battery-empty-symbolic\" -t 0 -u critical \"BATTERY CRITICAL\" \"Battery level is ${battery_level}%\n\nCharge the system NOW.\""
}
} if (!$LOW && !$sent) {
if (int($battery_level) <= int($LOW_LEVEL)) {
$LOW = 'def';
$sent = 'def';
system "notify-send -i \"battery-caution\" -t 0 -u normal \"BATTERY LOW\" \"Battery level is ${battery_level}%\n\nCharge the system soon.\""
system "notify-send -i \"battery-caution-symbolic\" -t 0 -u normal \"BATTERY LOW\" \"Battery level is ${battery_level}%\n\nCharge the system soon.\""
}
} if (int($battery_level) <= int($DEAD_LEVEL)) {
system "notify-send -t 0 -u critical \"SHUTTING DOWN\" \"Battery level is too low. The system will shutdown in 2 minutes to prevent corruption.\n\nCharge the system NOW to cancel the shutdown.\"";
@ -40,7 +40,7 @@ while (1) {
$CRITICAL = undef;
$LOW = undef;
system "doas shutdown -c";
system "notify-send -t 3000 -i \"battery-good-charging\" \"System is now charging\"";
system "notify-send -t 3000 -i \"battery-good-charging-symbolic\" \"System is now charging\"";
}
}

8
x/quitconf Executable file
View file

@ -0,0 +1,8 @@
#!/bin/sh
input=$(printf "no\nyes" | dmenu -m $1 -fn "JetBrains Mono NF:style=medium:size=11" -nb $2 -nf $3 -sb "#cc241d" -sf $4 -p "Quit dwm?")
if [ "$input" = "yes" ]; then
killall dwm
fi

37
x/spawn-alacritty Executable file
View file

@ -0,0 +1,37 @@
#!/bin/bash
# Stole from https://github.com/alacritty/alacritty/issues/808#issuecomment-334200570
#
# Spawn a new instance of Alacritty using the CWD of the currently focused
# Alacritty process.
#
# This is useful in environment like i3 where terminals are opened using a
# key-combination while another terminal is already focused.
#
# If the script is run with a non-Alacritty window in focus or a non-compliant
# version of Alacritty, an instance will be spawned in the user's $HOME.
ACTIVE_WINDOW=$(xdotool getactivewindow)
ACTIVE_WM_CLASS=$(xprop -id $ACTIVE_WINDOW | grep WM_CLASS)
if [[ $ACTIVE_WM_CLASS == *"Alacritty"* ]]
then
# Get PID. If _NET_WM_PID isn't set, bail.
PID=$(xprop -id $ACTIVE_WINDOW | grep _NET_WM_PID | grep -oP "\d+")
if [[ "$PID" == "" ]]
then
WINIT_X11_SCALE_FACTOR=1 alacritty
fi
# Get first child of terminal
CHILD_PID=$(pgrep -P $PID)
if [[ "$PID" == "" ]]
then
WINIT_X11_SCALE_FACTOR=1 alacritty
fi
# Get current directory of child. The first child should be the shell.
pushd "/proc/${CHILD_PID}/cwd"
SHELL_CWD=$(pwd -P)
popd
# Start alacritty with the working directory
WINIT_X11_SCALE_FACTOR=1 alacritty --working-directory "$SHELL_CWD"
else
WINIT_X11_SCALE_FACTOR=1 alacritty
fi

84
xmobar/xmobar.hs Normal file
View file

@ -0,0 +1,84 @@
import Xmobar
green, red, blue, blue2, aqua, purple, yellow, orange, lowWhite, white :: String
green = "#b8bb26"
red = "#fb4934"
blue = "#83a598"
blue2 = "#458588"
purple = "#d3869b"
yellow = "#fabd2f"
orange = "#fe8019"
aqua = "#8ec07c"
lowWhite = "#a89984"
white = "#ebdbb2"
config :: Config
config =
defaultConfig
{ overrideRedirect = False
, font = "xft:JetBrains Mono NF Medium-10"
, bgColor = "#282828"
, fgColor = "#ebdbb2"
, position = Static { xpos=0, ypos=0, width=2256, height=23 }
, commands = [ Run $ Cpu ["--template", "\63521 <total>%"
, "-L", "30"
, "-H", "70"
, "--high", red
, "--normal", yellow
] 10
, Run $ CoreTemp [ "--template" , "\63687 <core0>°C"
, "--Low" , "50" -- units: °C
, "--High" , "80" -- units: °C
, "--low" , aqua
, "--normal" , orange
, "--high" , red
] 20
, Run $ Alsa "default" "Master"
[ "--template", "墳 <volume><status>"
, "--suffix", "True"
, "--"
, "--on", ""
, "--off", "/mute"
, "-c", red
]
, Run $ Memory ["--template", "\57958 <usedratio>%"
, "--High", "60"
, "--high", orange
] 10
, Run $ Swap ["--template", concat ["<fc=", lowWhite, ">[<usedratio>%]</fc>"]
, "--High", "0"
, "--high", orange
] 10
, Run $ Date (concat ["\62956 <fc=", purple, ">%a</fc> %D <fc=", blue2, ">%I:%M %p</fc>"]) "date" 10
, Run $ DynNetwork [ "--template", (concat ["\62722 <dev>: <tx>kB<fc=", lowWhite, ">tx</fc> <rx><fc=", white, ">kB</fc><fc=", lowWhite, ">rx</fc>"])
, "--Low", "5000" -- units: B/s
, "--High", "100000" -- units: B/s
, "--low", green
, "--normal", orange
, "--high", red
] 10
, Run $ Battery [ "--template", "\62840 <acstatus>"
, "--Low", "20" -- units: %
, "--High", "80" -- units: %
, "--low", red
, "--normal", green
, "--high", blue
, "--" -- battery specific options
-- discharging status
, "-o", "<left>% (<timeleft>)"
-- AC "on" status
, "-O", "<fc=#dAA520>+<left>%</fc>"
-- charged status
, "-i", "<fc=#006000>Charged</fc>"
] 50
, Run $ Com "brightness" [] "" 10
, Run XMonadLog
]
, sepChar = "%"
, alignSep = "}{"
, template = " %XMonadLog% }{%alsa:default:Master%|\62941 %brightness%|%battery%|%dynnetwork%|%cpu%|%coretemp%|%memory%%swap%|%date% "
}
main :: IO()
main = xmobar config

129
xmonad/xmonad.hs Normal file
View file

@ -0,0 +1,129 @@
import XMonad
import qualified XMonad.StackSet as W
import XMonad.Actions.UpdatePointer
import XMonad.Actions.CycleWS
import XMonad.Actions.DwmPromote
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageHelpers
import XMonad.Hooks.StatusBar
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.WindowSwallowing
import XMonad.Layout.ThreeColumns
import XMonad.Layout.Spacing
import XMonad.Layout.NoBorders
import XMonad.Layout.Renamed
import XMonad.Layout.Accordion
import XMonad.Layout.Grid
import XMonad.Util.Cursor
import XMonad.Util.EZConfig
import XMonad.Util.Loggers
import System.Exit (exitSuccess)
dmenuFormatting :: String -> String
dmenuFormatting command = command ++ " -fn 'JetBrains Mono NF:style=medium:size=11' -nb '#282828' -nf '#ebdbb2' -sb '#d3869b' -sf '#282828'"
main :: IO ()
main = xmonad
. ewmh
. ewmhFullscreen
. withEasySB (statusBarProp "xmobar" (pure myXmobarPP)) defToggleStrutsKey
$ myConfig
myConfig = def
{ modMask = mod4Mask -- Rebind Mod to the Super key
, layoutHook = lessBorders OnlyFloat $ avoidStruts $ myLayout -- layouts
, manageHook = myManageHook -- float/swallow rules
, startupHook = setDefaultCursor xC_left_ptr -- sets the cursor
, handleEventHook = swallowEventHook (className =? "Alacritty") (return True) -- make alacritty swallowable
, workspaces = myWorkspaces -- workspace names
-- , logHook = dynamicLogWithPP myXmobarPP {
-- ppOutput = hPutStrLn description
-- } >> historyHook
, borderWidth = 2
, normalBorderColor = "#282828"
, focusedBorderColor = "#fe8019"
}
`additionalKeysP`
[ -- executables
("M-S-<Escape>", spawn "slock")
, ("M-S-f", spawn "librewolf-bin")
, ("M-S-k", spawn "keepassxc")
, ("M-<F1>", spawn "volmute")
, ("M-<F2>", spawn "voldown")
, ("M-<F3>", spawn "volup")
, ("M-<F7>", spawn "brightness-down")
, ("M-<F8>", spawn "brightness-up")
, ("M-<F11>", spawn "screenshot")
, ("M-p", spawn (dmenuFormatting "dmenu_run_history"))
, ("M-S-<Return>", spawn "spawn-alacritty")
, ("M-S-e", spawn "emac")
-- XMonad calls
, ("M-<Tab>", toggleWS)
, ("M-<Return>", dwmpromote)
-- layout jumps
, ("M-S-t", sendMessage $ JumpToLayout "Normal")
, ("M-a", sendMessage $ JumpToLayout "Accrdin")
-- rebound quit call
, ("M-S-<Backspace>", io exitSuccess)
]
`removeKeysP`
[ -- default quit keybind, as moved to M-S-<Backspace>
("M-S-q")
]
myWorkspaces :: [String]
myWorkspaces = [ "!", "@", "#", "$", "%", "^", "&", "*", "(" ]
myLayout = tiled ||| full ||| threeCol ||| accordion ||| grid
where
tiled = renamed [Replace "Normal"] $ Tall nmaster delta ratio
full = renamed [Replace "Full"] $ Full
threeCol = renamed [Replace "ThreeCol"] $ ThreeColMid nmaster delta ratio
accordion = renamed [Replace "Accrdin"] $ Accordion
grid = renamed [Replace "Grid"] $ Grid
nmaster = 1 -- Default number of windows in the master pane
ratio = 6/10 -- Default proportion of screen occupied by master pane
delta = 2/100 -- Percent of screen to increment by when resizing panes
-- spaced = spacing 0
myManageHook :: ManageHook
myManageHook = composeAll
[
-- className =? "Gimp" --> doFloat
isDialog --> doFloat
]
myXmobarPP :: PP
myXmobarPP = def
{ ppSep = magenta ""
, ppTitleSanitize = xmobarStrip
, ppCurrent = wrap "" "" . xmobarBorder "Top" "#83a598" 2
, ppUrgent = red . wrap (yellow "!") (yellow "!")
, ppOrder = \[ws, l, _, wins] -> [ws, l, wins]
, ppExtras = [logTitles formatFocused formatUnfocused]
}
where
formatFocused = wrap (blue "{ ") (blue " }") . aqua . ppWindow . shorten 80
formatUnfocused = wrap (lowWhite "<") (lowWhite ">") . lowWhite . ppWindow . shorten 40
-- | Windows should have *some* title, which should not not exceed a
-- sane length.
ppWindow :: String -> String
ppWindow = xmobarRaw . (\w -> if null w then "untitled" else w)
blue, lowWhite, magenta, red, white, yellow :: String -> String
magenta = xmobarColor "#d3869b" ""
blue = xmobarColor "#83a598" ""
white = xmobarColor "#ebdbb2" ""
yellow = xmobarColor "#fabd2f" ""
red = xmobarColor "#fb4934" ""
green = xmobarColor "#b8bb26" ""
lowWhite = xmobarColor "#a89984" ""
aqua = xmobarColor "#8ec07c" ""