Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
c910da7
drop vm, cleaner readme
rwxrob Jan 3, 2025
18d2d89
add changelog
rwxrob Jan 3, 2025
595a3c2
add blog command
rwxrob Jan 3, 2025
9bd6334
add heading to new blog post
rwxrob Jan 3, 2025
f09d27a
add tstamp to blog
rwxrob Jan 4, 2025
dba4f39
save
rwxrob Jan 4, 2025
6c34ae5
move _old to deprecated
rwxrob Jan 4, 2025
77e612b
save
rwxrob Jan 4, 2025
17eb838
add universal termcolors
rwxrob Jan 4, 2025
4039b8e
add other terminal stuff to termcolors
rwxrob Jan 4, 2025
6b55ddd
fix what to be posix
rwxrob Jan 4, 2025
df285cb
add faq command
rwxrob Jan 4, 2025
bb31f22
fix curoff in termcolors
rwxrob Jan 4, 2025
e5c09f8
describe underlying posix shell dep in my perl code
rwxrob Jan 4, 2025
76d062a
lights ported to perl with fork
rwxrob Jan 4, 2025
d734c08
take out some lines
rwxrob Jan 5, 2025
9b573f2
convert allfigl to perl
rwxrob Jan 5, 2025
346b52f
migrate bannerneo to perl
rwxrob Jan 5, 2025
72a2474
add emoji eyes to my cow
rwxrob Jan 6, 2025
7ad8387
truncate weechat names to 10 characters
rwxrob Jan 6, 2025
3880783
add linux and mac battery script in perl
rwxrob Jan 6, 2025
1ce0e1d
shorten readme
rwxrob Jan 6, 2025
42bf993
start list of dot/scripts
rwxrob Jan 6, 2025
ee4d7b7
add desc for f
rwxrob Jan 6, 2025
eaae86a
add links
rwxrob Jan 6, 2025
eb2dd7c
add prepend to scripts
rwxrob Jan 6, 2025
cf12f75
port back to perl
rwxrob Jan 6, 2025
8de61bf
fix back relative path
rwxrob Jan 6, 2025
53cf7cc
fix back currently status
rwxrob Jan 6, 2025
0d472d8
fix back currently status
rwxrob Jan 6, 2025
0238ddb
save
rwxrob Jan 7, 2025
fa80d66
save
rwxrob Jan 7, 2025
a5b4ad3
a bunch more fixes and cleanup
rwxrob Jan 8, 2025
c7acaa9
save
rwxrob Jan 9, 2025
1fb5ac2
add changed
rwxrob Jan 9, 2025
53326c8
checkurls
rwxrob Jan 9, 2025
2839ee6
save
rwxrob Jan 9, 2025
1169310
add install-go
rwxrob Jan 10, 2025
d450d2d
better readme
rwxrob Jan 13, 2025
3a0ea24
save
rwxrob Jan 21, 2025
f0f958b
add cmdhtitles
rwxrob Jan 23, 2025
80eb12e
save
rwxrob Jan 24, 2025
de47a90
fix twitch-status
rwxrob Jan 24, 2025
1d84a8d
fix twitch-id
rwxrob Jan 24, 2025
27b0904
perl v5.26 max and /usr/bin/perl
rwxrob Jan 24, 2025
631006f
fix colorstrip and rename to colortest
rwxrob Jan 24, 2025
3e75f6f
stripesc from sed to perl
rwxrob Jan 24, 2025
21995b0
rm commandfrom
rwxrob Jan 24, 2025
3e8f03a
gpt updated to get token
rwxrob Jan 24, 2025
09a7753
add zstd to ex
rwxrob Jun 5, 2025
2615f93
add redhat/install-gh
rwxrob Jul 6, 2025
d52826b
add k8sroot
rwxrob Jul 7, 2025
519dd7f
save
rwxrob Jul 14, 2025
d10b83e
fix duck
rwxrob Jul 24, 2025
642d9ec
add kuti completion
rwxrob Jul 30, 2025
b7ee4f2
add oci-chart-version-tags
rwxrob Jul 30, 2025
10eae9d
remove default K8SAPP_CLUSTER
rwxrob Aug 6, 2025
b501e56
remove build
rwxrob Aug 7, 2025
0db4acd
add unbase
rwxrob Aug 14, 2025
17f7d2c
add completion for k cnpg
rwxrob Aug 14, 2025
658c75b
save
rwxrob Sep 16, 2025
2b4567c
save
rwxrob Sep 16, 2025
4f4fb90
add redirect
rwxrob Sep 20, 2025
534e040
add python ale fixer and linter
rwxrob Feb 15, 2026
92f42d2
tweaks
rwxrob Mar 7, 2026
85ee110
tweaks
rwxrob Mar 7, 2026
c97fcb9
add toemoji and more
rwxrob Mar 8, 2026
207e588
add title
rwxrob Mar 9, 2026
b1f6f2b
turn on gruvbox
rwxrob Mar 9, 2026
898be2d
add support for af for perl
rwxrob Mar 10, 2026
deb9773
restore — to wezterm
rwxrob Mar 11, 2026
77dcc51
add snodes whatwasidoing
rwxrob Mar 12, 2026
e40e2a6
Add AGENTS.md and ghc alias for gh copilot chat
rwxrob Apr 7, 2026
5316a3f
Refactor scripts, update vim-plug, add ghc context loader
rwxrob Apr 7, 2026
2f3beb4
Fix ghc: remove invalid 'chat' subcommand
rwxrob Apr 7, 2026
b4e3520
Fix ghc: use -i for interactive session with AGENTS.md context
rwxrob Apr 7, 2026
093ad17
tmux: use bell emoji in window chooser, match PS1 colors
rwxrob Apr 11, 2026
5c90235
tmux: strip notes- prefix in window chooser dir display
rwxrob Apr 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 73 additions & 20 deletions .bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,32 @@ case $- in
*) return ;;
esac

export black=""
export red=""
export green=""
export yellow=""
export blue=""
export magenta=""
export cyan=""
export white=""
export blink=""
export reset=""
export clear=""
export curoff="[?25h"
export curon="[?25h"
export top=""

# ---------------------- local utility functions ---------------------

_have() { type "$1" &>/dev/null; }
_source_if() { [[ -r "$1" ]] && source "$1"; }
_source_if() { [[ -r "$2" ]] && source "$1"; }

# ----------------------- environment variables ----------------------

export LANG=en_US.UTF-8
export USER="${USER:-$(whoami)}"
export GITUSER="$USER"
export TWITCH_BROADCASTER_ID=447179030
export TZ=America/New_York
export REPOS="$HOME/Repos"
export GHREPOS="$REPOS/github.com/$GITUSER"
Expand All @@ -39,14 +55,19 @@ export CLIP_VOLUME=0
export CLIP_SCREEN=0
export CLICOLOR=1
export HRULEWIDTH=73
export GOPATH="$HOME/.local/go"
export GOBIN="$HOME/.local/bin"
export GOPROXY=direct
export NVIM_SCREENKEY=1
export CGO_ENABLED=0
export PYTHONDONTWRITEBYTECODE=2
export LC_COLLATE=C
export CFLAGS="-Wall -Wextra -Werror -O0 -g -fsanitize=address -fno-omit-frame-pointer -finstrument-functions"
export BAT_THEME=gruvbox-dark

# explicit to fix wierd defaults (like macOS)
export XDG_STATE_HOME="$HOME/.local/state"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_CONFIG_HOME="$HOME/.config"

# gruvbox-material
export LS_COLORS="di=38;5;245:fi=38;5;223:ln=38;5;179:ex=38;5;108:*.txt=38;5;223"
Expand All @@ -59,13 +80,11 @@ export LESS_TERMCAP_se=$'\e[0m' # end standout
export LESS_TERMCAP_us=$'\e[4m' # start underline
export LESS_TERMCAP_ue=$'\e[0m' # end underline

export ANSIBLE_CONFIG="$HOME/.config/ansible/config.ini"
export ANSIBLE_INVENTORY="$HOME/.config/ansible/inventory.yaml"
export ANSIBLE_CONFIG="$GHREPOS/homelab/ansible.cfg"
export ANSIBLE_INVENTORY="$GHREPOS/homelab/inventory.yaml"
export ANSIBLE_LOAD_CALLBACK_PLUGINS=1
#export ANSIBLE_STDOUT_CALLBACK=json

export K8SAPP_CLUSTER=dev

[[ -d /.vim/spell ]] && export VIMSPELL=("$HOME/.vim/spell/*.add")

# ----------------------------- PostgreSQL ----------------------------
Expand Down Expand Up @@ -210,6 +229,8 @@ __ps1() {
PS1="$short"
fi

[[ "${VENVS[$PWD]}" =~ ^y ]] && PS1="${PS1//\$/🐍}"

if _have tmux && [[ -n "$TMUX" ]]; then
tmux rename-window "$(wd)"
fi
Expand All @@ -222,7 +243,26 @@ wd() {
echo "$parent/$dir"
} && export wd

PROMPT_COMMAND="__ps1"
found-venv() { test -e .venv/bin/activate; }
venv-is-on() { [[ "$(which python)" =~ \.venv\/bin\/python$ ]]; }

declare -A VENVS
export VENVS

llvenv() {
found-venv || return
venv-is-on && return
test -n "${VENVS[$PWD]}" && return
read -rp "Want to activate the .venv? [Y/n]" answer
answer=${answer,,}
test -z "$answer" && answer=y
VENVS["$PWD"]="$answer"
if [[ $answer =~ ^y ]]; then
. .venv/bin/activate
fi
}

PROMPT_COMMAND="llvenv; __ps1"

# ----------------------------- keyboard -----------------------------

Expand All @@ -236,16 +276,17 @@ _have setxkbmap && test -n "$DISPLAY" &&

unalias -a
alias todo='vi ~/.todo'
alias tree='tree -a -I .git'
alias ip='ip -c'
alias '?'=gpt
alias '??'=duck
alias '???'=google
alias '????'=bing
alias dot='cd $DOTFILES'
alias scripts='cd $SCRIPTS'
alias snippets='cd $SNIPPETS'
alias ls='ls -h --color=auto'
alias free='free -h'
alias tree='tree -a'
alias df='df -h'
alias chmox='chmod +x'
alias diff='diff --color'
Expand All @@ -256,13 +297,22 @@ alias clear='printf "\e[H\e[2J"'
alias c='printf "\e[H\e[2J"'
alias env='env -u LESS_TERMCAP_mb -u LESS_TERMCAP_md -u LESS_TERMCAP_me -u LESS_TERMCAP_so -u LESS_TERMCAP_se -u LESS_TERMCAP_us -u LESS_TERMCAP_ue'
alias neo="neo -D -c gold"
alias more="less"
alias more="less -R"
alias gitl="git log -n 5 --graph --decorate --oneline"
alias gp="git push"
alias gptags="git push origin --tags"
alias km="kimono"
alias s=wee
alias x=clip
alias t=topic
alias chan=twitch-channel
alias status=twitch-status
alias lurk=twitch-view
alias cur="vi ~/.currently"
alias contexts="kubectl config get-contexts"
alias reload='exec $SHELL -l'
alias python=python3
alias pip=pip3

set-editor() {
export EDITOR="$1"
Expand All @@ -271,7 +321,7 @@ set-editor() {
export GIT_EDITOR="$1"
alias vi="\$EDITOR"
}
_have "vim" && set-editor vi
_have "vim" && set-editor vim
_have "nvim" && set-editor nvim

# ----------------------------- functions ----------------------------
Expand Down Expand Up @@ -349,6 +399,7 @@ _have goreleaser && . <(goreleaser completion bash 2>/dev/null)
_have klogin && . <(klogin completion bash 2>/dev/null)
_have pandoc && . <(pandoc --bash-completion)
_have kubectl && . <(kubectl completion bash 2>/dev/null)
_have kubectl && . <(kubectl cnpg completion bash 2>/dev/null)
_have kubeadm && . <(kubeadm completion bash 2>/dev/null)
_have k && complete -o default -F __start_kubectl k
_have istioctl && . <(istioctl completion bash 2>/dev/null)
Expand All @@ -360,16 +411,18 @@ _have conftest && . <(conftest completion bash)
_have yq && . <(yq completion bash)
_have mk && complete -o default -F __start_minikube mk
_have podman && _source_if "$HOME/.local/share/podman/completion" # d

_have ansible && . <(register-python-argcomplete3 ansible)
_have ansible-config && . <(register-python-argcomplete3 ansible-config)
_have ansible-console && . <(register-python-argcomplete3 ansible-console)
_have ansible-doc && . <(register-python-argcomplete3 ansible-doc)
_have ansible-galaxy && . <(register-python-argcomplete3 ansible-galaxy)
_have ansible-inventory && . <(register-python-argcomplete3 ansible-inventory)
_have ansible-playbook && . <(register-python-argcomplete3 ansible-playbook)
_have ansible-pull && . <(register-python-argcomplete3 ansible-pull)
_have ansible-vault && . <(register-python-argcomplete3 ansible-vault)
_have mkdocs && . <(_MKDOCS_COMPLETE=bash_source mkdocs)
_have kuti && . <(kuti completion bash)

_have ansible && _have register-python-argcomplete3 && . <(register-python-argcomplete3 ansible)
_have ansible-config && _have register-python-argcomplete3 && . <(register-python-argcomplete3 ansible-config)
_have ansible-console && _have register-python-argcomplete3 && . <(register-python-argcomplete3 ansible-console)
_have ansible-doc && _have register-python-argcomplete3 && . <(register-python-argcomplete3 ansible-doc)
_have ansible-galaxy && _have register-python-argcomplete3 && . <(register-python-argcomplete3 ansible-galaxy)
_have ansible-inventory && _have register-python-argcomplete3 && . <(register-python-argcomplete3 ansible-inventory)
_have ansible-playbook && _have register-python-argcomplete3 && . <(register-python-argcomplete3 ansible-playbook)
_have ansible-pull && _have register-python-argcomplete3 && . <(register-python-argcomplete3 ansible-pull)
_have ansible-vault && _have register-python-argcomplete3 && . <(register-python-argcomplete3 ansible-vault)
#_have ssh-agent && test -z "$SSH_AGENT_PID" && . <(ssh-agent)

# -------------------- personalized configuration --------------------
Expand Down
15 changes: 9 additions & 6 deletions .wezterm.lua
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
local wezterm = require("wezterm")
local wezterm = require 'wezterm'
return {
audible_bell = "Disabled",
window_close_confirmation = 'NeverPrompt',
default_prog = {'/opt/homebrew/bin/bash','--login'},
color_scheme = 'Gruvbox Material (Gogh)',
font = wezterm.font('UbuntuMono Nerd Font'),
font_size = 34,
font_size = 35.2,
send_composed_key_when_left_alt_is_pressed = true,
send_composed_key_when_right_alt_is_pressed = true,
colors = {
cursor_bg = '#928374',
cursor_border = '#928374',
},
term = "xterm-256color",
window_decorations = "RESIZE",
-- window_decorations = "RESIZE",
hide_tab_bar_if_only_one_tab = true,
window_padding = {
left = 40,
left = 10,
right = 0,
top = 50,
bottom = 0,
top = 0,
bottom = 10,
},
}

Expand Down
10 changes: 10 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Agent Instructions

## General

- Automatically update this AGENTS.md file when new preferences, conventions, or context are established for this repo

## Commits

- Never add `Co-authored-by: Copilot` or any Copilot trailer to commits
- Never add any AI co-authorship trailers to commit messages
36 changes: 0 additions & 36 deletions DCO

This file was deleted.

46 changes: 39 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,44 @@
# Dotfiles, scripts, and stuff
# Unix/Linux dotfiles, scripts, and stuff

*You probably want [`dot-template`](https://github.com/rwxrob/dot-template) instead.*
> [!TIP]
> You are probably looking for the minimal stuff I have installed into the [Beginner Boost](https://github.com/rwxrob/boost) container instead.

Pilfer at your own peril. I'd love it if you mentioned me if you do, but yeah. [Stop by and chat sometime.](https://linktr.ee/rwxrob)
Pilfer at your own peril. If you are thinking of following, just know I commit to main about once every three days, if I had several commits I will put them in a draft PR to avoid blowing followers away with commit notifications.

## Legal
## Operating system preference

Copyright 2024 Robert S. Muhlestein (<mailto:rob@rwx.gg>)
SPDX-License-Identifier: Apache-2.0
Everything in this repo will work on any Unix or Linux system once the dependencies are satisfied. As for host workstation operating systems I personally prefer the following in order:

This license makes you safe to use anything in here pretty much anywhere—including at work. But you do it at your own peril.
1. macOS (Unix)
2. WSL2 with `wslu` (Linux)
3. Linux Mint Cinnamon

Note that much of this repo content will also work with Git-Bash, Cygwin, and MinGW but not all.

## Check core dependencies

Run the `check-workstation-deps` script to check if the current system has everything required before running any `install-*` script:

- `/bin/sh` (POSIX 2018, no `ksh`-isms)
- `/usr/bin/perl` (v5.26 which modern `git` depends on)
- `git`
- `curl`
- `uname`

Note that `perl`—required for any `git` install—is used more efficiently and powerfully than any of the usual handicapped alternatives: `sed`, `awk`, `grep`, `head`, `tail`, `cut`, `tr`, etc.

In true Unix fashion, many of the `scripts` depend on one another and most depend on everything in `install-all` to have been installed.

## Install into ~/.local

This repo is designed to work on both a cozy personal workstation as well as a multi-user system. In the later case it can never be assumed that I have access or the desire to install many of these tools or their dependencies for every user on the system. Plus there is the complication of choosing any of several different package managers. Instead, all `install-*` scripts install from the latest official release directly into `~/.local/` usually by way of `gh release download` or `go install`.

## Scripts over functions and aliases

Even a one-line script works anywhere: as a Vim filter, pipeline text transformation, and interactive command. _Functions cannot be called universally from other executables._ In fact, the _only_ time a function should ever be used is when the state of the current shell needs to change, such as changing the current working directory (see `clone` function).

Aliases are nice to same typing on the command line, but that is the only place they should ever be used. Very often an alias is better as a one-line script.

## More info

Check out my [FAQ](https://github.com/rwxrob/faq) for more answers about my work style, preferences, and dependencies.
7 changes: 7 additions & 0 deletions config/cowsay/default.cow
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
$the_cow = <<"EOC";
$thoughts ^__^
$thoughts 👁️👁️\\_______
(__)\\ )\\/\\
$tongue ||----w |
|| ||
EOC
Loading