diff options
Diffstat (limited to 'home')
| -rw-r--r-- | home/age-recipients | 3 | ||||
| -rw-r--r-- | home/hushlogin | 0 | ||||
| -rw-r--r-- | home/nethackrc | 16 | ||||
| -rw-r--r-- | home/plan | 25 | ||||
| -rw-r--r-- | home/rgignore | 1 | ||||
| -rw-r--r-- | home/skhdrc | 225 | ||||
| -rw-r--r-- | home/tmuxp/main.yml | 23 | ||||
| -rwxr-xr-x | home/yabairc | 13 | ||||
| -rw-r--r-- | home/zlogin | 18 | ||||
| -rw-r--r-- | home/zlogout | 0 | ||||
| -rw-r--r-- | home/zprofile | 67 | ||||
| -rw-r--r-- | home/zshenv | 4 | ||||
| -rw-r--r-- | home/zshrc | 108 |
13 files changed, 503 insertions, 0 deletions
diff --git a/home/age-recipients b/home/age-recipients new file mode 100644 index 0000000..c59cd10 --- /dev/null +++ b/home/age-recipients @@ -0,0 +1,3 @@ +age1r42nded7xmvfanq5mqqa0ld6v666f3mxtfqjstfygqg5yj2nte6s2tssjf +age1yubikey1qtdpuvjq6ywtnsxz55ugjlmhquewkzccqyyafr5ngw0w5433cjw7zr6nd2v +age1yubikey1q2wnvc90uqjfwu8pxwxexnzsue72m3xjpur73hr3ndcf9d69zq6rvsgmd9w diff --git a/home/hushlogin b/home/hushlogin new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/home/hushlogin diff --git a/home/nethackrc b/home/nethackrc new file mode 100644 index 0000000..cc03822 --- /dev/null +++ b/home/nethackrc @@ -0,0 +1,16 @@ +OPTIONS=color +OPTIONS=catname:Pure +OPTIONS=dogname:Juan +OPTIONS=horsename:Juan +OPTIONS=symset:curses +OPTIONS=windowtype:curses +OPTIONS=align_status:bottom +OPTIONS=align_message:bottom +OPTIONS=popup_dialog +OPTIONS=perm_invent +OPTIONS=lit_corridor +DUNGEONSYMBOLS = 0x0020 0x2502 0x2500 0x250C 0x2510 0x2514 0x2518 0x253C \ + 0x2534 0x252C 0x2524 0x251C 0x00B7 0x25A0 0x25A0 0x002B \ + 0x002B 0x2261 0x00B1 0x00B7 0x2591 0x2592 0x003C 0x003E \ + 0x003C 0x003E 0x005F 0x007C 0x005C 0x0023 0x2320 0x2248 \ + 0x00B7 0x2248 0x00B7 0x00B7 0x0023 0x0023 0x0020 0x0023 0x2248 diff --git a/home/plan b/home/plan new file mode 100644 index 0000000..cc13990 --- /dev/null +++ b/home/plan @@ -0,0 +1,25 @@ +# My plan for now, roughly + +- Continue filling out wiki + + There's now 46 pages at https://wiki.r.bdr.sh. Most are stubs, but + the format is great! I should have done this ages ago. + + I'm thinking of writing a plugin to use `wmap` syntax and render + wardley maps. + +- Create videos + + In order to promote my freelance business, I want to create some videos + about topics I know. One series will be around reading code, and the + other around my three process model. + + I've been learning apple motion as part of this, and it's a fun tool. + +- Set up my freelance business. + + The finanzamt never responded to my first request, which I did through + Sorted. Who knows if it actually went through. I did another one directly + through Elster, and hopefully we'll know soon. + +[2025-12-02] diff --git a/home/rgignore b/home/rgignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/home/rgignore @@ -0,0 +1 @@ +node_modules diff --git a/home/skhdrc b/home/skhdrc new file mode 100644 index 0000000..d49ec4e --- /dev/null +++ b/home/skhdrc @@ -0,0 +1,225 @@ +# NOTE(koekeishiya): A list of all built-in modifier and literal keywords can +# be found at https://github.com/koekeishiya/skhd/issues/1 +# +# A hotkey is written according to the following rules: +# +# hotkey = <mode> '<' <action> | <action> +# +# mode = 'name of mode' | <mode> ',' <mode> +# +# action = <keysym> '[' <proc_map_lst> ']' | <keysym> '->' '[' <proc_map_lst> ']' +# <keysym> ':' <command> | <keysym> '->' ':' <command> +# <keysym> ';' <mode> | <keysym> '->' ';' <mode> +# +# keysym = <mod> '-' <key> | <key> +# +# mod = 'modifier keyword' | <mod> '+' <mod> +# +# key = <literal> | <keycode> +# +# literal = 'single letter or built-in keyword' +# +# keycode = 'apple keyboard kVK_<Key> values (0x3C)' +# +# proc_map_lst = * <proc_map> +# +# proc_map = <string> ':' <command> | <string> '~' | +# '*' ':' <command> | '*' '~' +# +# string = '"' 'sequence of characters' '"' +# +# command = command is executed through '$SHELL -c' and +# follows valid shell syntax. if the $SHELL environment +# variable is not set, it will default to '/bin/bash'. +# when bash is used, the ';' delimeter can be specified +# to chain commands. +# +# to allow a command to extend into multiple lines, +# prepend '\' at the end of the previous line. +# +# an EOL character signifies the end of the bind. +# +# -> = keypress is not consumed by skhd +# +# * = matches every application not specified in <proc_map_lst> +# +# ~ = application is unbound and keypress is forwarded per usual, when specified in a <proc_map> +# +# NOTE(koekeishiya): A mode is declared according to the following rules: +# +# mode_decl = '::' <name> '@' ':' <command> | '::' <name> ':' <command> | +# '::' <name> '@' | '::' <name> +# +# name = desired name for this mode, +# +# @ = capture keypresses regardless of being bound to an action +# +# command = command is executed through '$SHELL -c' and +# follows valid shell syntax. if the $SHELL environment +# variable is not set, it will default to '/bin/bash'. +# when bash is used, the ';' delimeter can be specified +# to chain commands. +# +# to allow a command to extend into multiple lines, +# prepend '\' at the end of the previous line. +# +# an EOL character signifies the end of the bind. + +# add an on_enter command to the default mode +# :: default : chunkc border::color 0xff775759 +# +# defines a new mode 'test' with an on_enter command, that captures keypresses +# :: test @ : chunkc border::color 0xff24ccaa +# +# from 'default' mode, activate mode 'test' +# cmd - x ; test +# +# from 'test' mode, activate mode 'default' +# test < cmd - x ; default +# +# launch a new terminal instance when in either 'default' or 'test' mode +# default, test < cmd - return : open -na /Applications/Terminal.app + +# application specific bindings +# +# cmd - n [ +# "kitty" : echo "hello kitty" +# * : echo "hello everyone" +# "qutebrowser" : echo "hello qutebrowser" +# "terminal" ~ +# "finder" : false +# ] + +# specify a file that should be included as an additional config-file. +# treated as an absolutepath if the filename begins with '/' otherwise +# the file is relative to the path of the config-file it was loaded from. +# +# .load "/Users/Koe/.config/partial_skhdrc" +# .load "partial_skhdrc" + +# prevent skhd from monitoring events for specific applications. +# +# .blacklist [ +# "kitty" +# "terminal" +# "qutebrowser" +# ] + +# open terminal, blazingly fast compared to iTerm/Hyper +shift + alt - return : /Applications/kitty.app/Contents/MacOS/kitty --single-instance -d ~ + +# open qutebrowser +# cmd + shift - return : ~/Scripts/qtb.sh + +# open mpv +# cmd - m : open -na /Applications/mpv.app $(pbpaste) + +# focus window +alt - h : yabai -m window --focus west +alt - j : yabai -m window --focus south +alt - k : yabai -m window --focus north +alt - l : yabai -m window --focus east + +# swap managed window +shift + alt - h : yabai -m window --swap west +shift + alt - j : yabai -m window --swap south +shift + alt - k : yabai -m window --swap north +shift + alt - l : yabai -m window --swap east + +# move managed window +shift + ctrl + alt - h : yabai -m window --warp west +shift + ctrl + alt - j : yabai -m window --warp south +shift + ctrl + alt - k : yabai -m window --warp north +shift + ctrl + alt - l : yabai -m window --warp east + +# balance size of windows +shift + ctrl + alt - 0 : yabai -m space --balance + +# make floating window fill screen +shift + alt - up : yabai -m window --grid 1:1:0:0:1:1 + +# make floating window fill left-half of screen +shift + alt - left : yabai -m window --grid 1:2:0:0:1:1 +shift + alt - right : yabai -m window --grid 1:2:1:0:1:1 + +# create desktop, move window and follow focus - uses jq for parsing json (brew install jq) +# shift + cmd - n : yabai -m space --create && \ +# index="$(yabai -m query --spaces --display | jq 'map(select(."is-native-fullscreen" == false))[-1].index')" && \ +# yabai -m window --space "${index}" && \ +# yabai -m space --focus "${index}" + +# fast focus desktop +# cmd + alt - x : yabai -m space --focus recent +# cmd + alt - 1 : yabai -m space --focus 1 + +# send window to desktop and follow focus +# shift + cmd - z : yabai -m window --space next; yabai -m space --focus next +shift + alt - 1 : yabai -m window --space 1; yabai -m space --focus 1 +shift + alt - 2 : yabai -m window --space 2; yabai -m space --focus 2 +shift + alt - 3 : yabai -m window --space 3; yabai -m space --focus 3 +shift + alt - 4 : yabai -m window --space 4; yabai -m space --focus 4 +shift + alt - 5 : yabai -m window --space 5; yabai -m space --focus 5 +shift + alt - 6 : yabai -m window --space 6; yabai -m space --focus 6 +shift + alt - 7 : yabai -m window --space 7; yabai -m space --focus 7 +shift + alt - 8 : yabai -m window --space 8; yabai -m space --focus 8 +shift + alt - 9 : yabai -m window --space 9; yabai -m space --focus 9 +shift + alt - 0 : yabai -m window --space 10; yabai -m space --focus 10 + +# focus monitor +# ctrl + alt - z : yabai -m display --focus prev +shift + ctrl - 1 : yabai -m display --focus 1 +shift + ctrl - 2 : yabai -m display --focus 2 +shift + ctrl - 3 : yabai -m display --focus 3 + +# send window to monitor and follow focus +# ctrl + cmd - c : yabai -m window --display next; yabai -m display --focus next +# ctrl + cmd - 1 : yabai -m window --display 1; yabai -m display --focus 1 +shift + ctrl + alt - 1 : yabai -m window --display 1; yabai -m display --focus 1 +shift + ctrl + alt - 2 : yabai -m window --display 2; yabai -m display --focus 2 +shift + ctrl + alt - 3 : yabai -m window --display 3; yabai -m display --focus 3 + +# move floating window +# shift + ctrl - a : yabai -m window --move rel:-20:0 +# shift + ctrl - s : yabai -m window --move rel:0:20 + +# increase window size +shift + alt - a : yabai -m window --resize left:-20:0 +shift + alt - s : yabai -m window --resize bottom:0:20 +shift + alt - w : yabai -m window --resize top:0:-20 +shift + alt - d : yabai -m window --resize right:20:0 + +# decrease window size +# shift + cmd - s : yabai -m window --resize bottom:0:-20 +# shift + cmd - w : yabai -m window --resize top:0:20 +shift + ctrl+ alt - a : yabai -m window --resize right:-20:0 +shift + ctrl+ alt - s : yabai -m window --resize top:0:20 +shift + ctrl+ alt - w : yabai -m window --resize bottom:0:-20 +shift + ctrl+ alt - d : yabai -m window --resize left:20:0 + +# set insertion point in focused container +ctrl + alt - h : yabai -m window --insert west +ctrl + alt - j : yabai -m window --insert south +ctrl + alt - k : yabai -m window --insert north +ctrl + alt - l : yabai -m window --insert east + +# toggle window zoom +shift + alt - z : yabai -m window --toggle zoom-parent +shift + ctrl + alt - z : yabai -m window --toggle zoom-fullscreen + +# toggle window split type +shift + alt - e : yabai -m window --toggle split + +# float / unfloat window and center on screen +shift + alt - t : yabai -m window --toggle float --grid 4:4:1:1:2:2 + +# toggle sticky(+float), topmost, picture-in-picture +shift + alt - p : yabai -m window --toggle sticky --toggle topmost --toggle pip + +# rotate tree +shift + alt - r : yabai -m space --rotate 90 + +# mirror tree y-axis +shift + alt - y : yabai -m space --mirror y-axis + +# mirror tree x-axis +shift + alt - x : yabai -m space --mirror x-axis diff --git a/home/tmuxp/main.yml b/home/tmuxp/main.yml new file mode 100644 index 0000000..a41de4d --- /dev/null +++ b/home/tmuxp/main.yml @@ -0,0 +1,23 @@ +session_name: main + +windows: + - window_name: mail + start_directory: '~/projects' + panes: + - aerc + - window_name: notes + start_directory: '~/.local/share/nota' + panes: + - nvim + - window_name: util + start_directory: '~' + focus: true + layout: '9c05,158x41,0,0{79x41,0,0,21,78x41,80,0[78x20,80,0,22,78x20,80,21,23]}' + panes: + - figlet welcome + - figlet to + - figlet computer + - window_name: proj + start_directory: '~/Projects' + panes: + - figlet projects diff --git a/home/yabairc b/home/yabairc new file mode 100755 index 0000000..fc3774d --- /dev/null +++ b/home/yabairc @@ -0,0 +1,13 @@ +# for this to work you must configure sudo such that +# it will be able to run the command without password + +yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa" +sudo yabai --load-sa + +yabai -m config layout bsp +yabai -m config window_shadow float +yabai -m config window_border on +yabai -m config window_border_width 2 +yabai -m config window_border_radius 0 +yabai -m config active_window_border_color 0xFF55FF55 +yabai -m config window_border_blur off diff --git a/home/zlogin b/home/zlogin new file mode 100644 index 0000000..60876ac --- /dev/null +++ b/home/zlogin @@ -0,0 +1,18 @@ +# Execute code that does not affect the current session in the background. +{ + # Compile the completion dump to increase startup speed. + zcompdump="${ZDOTDIR:-$HOME}/.zcompdump" + if [[ -s "$zcompdump" && (! -s "${zcompdump}.zwc" || "$zcompdump" -nt "${zcompdump}.zwc") ]]; then + zcompile "$zcompdump" + fi +} &! + +# Print a random, hopefully interesting, adage. +if (( $+commands[fortune] )); then + echo -en "\033[30m" + if [[ -t 0 || -t 1 ]]; then + fortune -s + print + fi + echo -en "\033[m" +fi diff --git a/home/zlogout b/home/zlogout new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/home/zlogout diff --git a/home/zprofile b/home/zprofile new file mode 100644 index 0000000..a079fab --- /dev/null +++ b/home/zprofile @@ -0,0 +1,67 @@ +# +# Browser +# + +if [[ "$OSTYPE" == darwin* ]]; then + export BROWSER='open' +fi + +# +# Editors +# + +export EDITOR='nvim' +export VISUAL='nvim' +export PAGER='less' + +# +# Language +# + +if [[ -z "$LANG" ]]; then + export LANG='en_US.UTF-8' +fi + +# +# Paths +# + +# Ensure path arrays do not contain duplicates. +typeset -gU cdpath fpath mailpath path + +# Set the the list of directories that cd searches. +# cdpath=( +# $cdpath +# ) + +# Set the list of directories that Zsh searches for programs. +path=( + /opt/homebrew/{bin,sbin} + $path +) + +# +# Less +# + +# Set the default Less options. +# Mouse-wheel scrolling has been disabled by -X (disable screen clearing). +# Remove -X and -F (exit if the content fits on one screen) to enable it. +export LESS='-F -g -i -M -R -S -w -X -z-4' + +# Set the Less input preprocessor. +# Try both `lesspipe` and `lesspipe.sh` as either might exist on a system. +if (( $#commands[(i)lesspipe(|.sh)] )); then + export LESSOPEN="| /usr/bin/env $commands[(i)lesspipe(|.sh)] %s 2>&-" +fi + +# +# Temporary Files +# + +if [[ ! -d "$TMPDIR" ]]; then + export TMPDIR="/tmp/$LOGNAME" + mkdir -p -m 700 "$TMPDIR" +fi + +TMPPREFIX="${TMPDIR%/}/zsh" diff --git a/home/zshenv b/home/zshenv new file mode 100644 index 0000000..c23f284 --- /dev/null +++ b/home/zshenv @@ -0,0 +1,4 @@ +# Ensure that a non-login, non-interactive shell has a defined environment. +if [[ "$SHLVL" -eq 1 && ! -o LOGIN && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then + source "${ZDOTDIR:-$HOME}/.zprofile" +fi diff --git a/home/zshrc b/home/zshrc new file mode 100644 index 0000000..2383af3 --- /dev/null +++ b/home/zshrc @@ -0,0 +1,108 @@ +################################################################################ +# Load Functions +################################################################################ +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/dotenv.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/graphviz.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/short-uptime.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/figlet-sample.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/prettify-json.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/status.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/sync-repos.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/check-repos.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/ssh-key-helpers.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/todoist.zsh" + +################################################################################ +# Load Modules +################################################################################ +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/environment.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/editor.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/history.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/directory.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/prompt.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/vendor/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/completion.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/aliases.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/color.zsh" + +################################################################################ +# ENV VARIABLES +################################################################################ +# Terminal related +export TERM=xterm-256color + +# Paths +# export JAVA_HOME=$(/usr/libexec/java_home) # Enable if using JDK, otherwise disable for performance +export XDG_CONFIG_HOME=$HOME/.config +export GOPATH=$HOME/projects/go +export ANDROID_HOME=$HOME/Library/Android/sdk +export ANDROID_NDK_HOME=$HOME/Library/Android/sdk/ndk-bundle +export PATH=$PATH:$HOME:${GOPATH//://bin:}/bin +export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$ANDROID_NDK_HOME:/Applications/calibre.app/Contents/MacOS +export PATH=~/.local/bin:$PATH + +# GPG +export GPG_TTY=$(tty) + +# FZF Config +[ -x "$(command -v fzf)" ] && source <(fzf --zsh) + +export FZF_DEFAULT_COMMAND='/usr/bin/env rg --color never --files --hidden -g \!.git' +export FZF_DEFAULT_OPTS='--preview ''bat --style=numbers --color=always {} | head -500''' + +export MANPAGER='nvim +Man!' +[ -x "$(command -v jj)" ] && source <(COMPLETE=zsh jj) + +################################################################################ +# SECRET ENV VARS!! +################################################################################ + +if [[ -s "${ZDOTDIR:-$HOME}/.secrets.zsh" ]]; then + source "${ZDOTDIR:-$HOME}/.secrets.zsh" +fi + +# Load a local config + +if [[ -s "${ZDOTDIR:-$HOME}/.zshrc.local" ]]; then + source "${ZDOTDIR:-$HOME}/.zshrc.local" +fi + +if [[ -s "/opt/homebrew/bin/brew" ]]; then + # Brew Setup + export PATH=/opt/homebrew/bin:/opt/homebrew/sbin:$PATH + export FZF_VIM_PATH=/opt/homebrew/opt/fzf + . /opt/homebrew/etc/profile.d/z.sh +else + # Z (Linux) + if [[ -s "/usr/libexec/z.sh" ]]; then + . /usr/libexec/z.sh + else + if [[ -s "/usr/share/z/z.sh" ]]; then + . /usr/share/z/z.sh + else + . /usr/local/etc/profile.d/z.sh + fi + fi +fi + +# ASDF +export PATH="${ASDF_DATA_DIR:-$HOME/.asdf}/shims:$PATH" + +if [[ -s "$HOME/.cargo/env" ]]; then +. "$HOME/.cargo/env" +fi + +if [[ -s "~/.asdf/plugins/java/set-java-home.zsh" ]]; then + . ~/.asdf/plugins/java/set-java-home.zsh +fi + +# Difftastic +export DFT_BACKGROUND=light + +# pnpm +export PNPM_HOME="/Users/rbdr/Library/pnpm" +case ":$PATH:" in + *":$PNPM_HOME:"*) ;; + *) export PATH="$PNPM_HOME:$PATH" ;; +esac +# pnpm end |