From 2eeb540c059a3f6ef0c469e72d91cc973314e752 Mon Sep 17 00:00:00 2001 From: Alex Karle Date: Thu, 30 Dec 2021 20:36:11 -0500 Subject: [PATCH] Start fresh 2022, the year of the FOSS-licensed dotfiles! --- .Xdefaults | 6 ------ .bashrc | 73 ------------------------------------------------------------------------- .config/git/config | 29 ----------------------------- .config/git/ignore | 16 ---------------- .config/gtk-3.0/settings.ini | 2 -- .config/mutt/.gitignore | 9 --------- .config/mutt/README.md | 27 --------------------------- .config/mutt/accounts/karleco.muttrc | 16 ---------------- .config/mutt/common.muttrc | 97 ------------------------------------------------------------------------------------------------- .config/mutt/mailcap | 11 ----------- .config/mutt/muttrc | 4 ---- .config/nvim/init.vim | 20 -------------------- .cwmrc | 76 ---------------------------------------------------------------------------- .exrc | 9 --------- .gdbinit | 4 ---- .gitignore | 2 -- .gitmodules | 27 --------------------------- .inputrc | 18 ------------------ .shrc | 22 ---------------------- .tmux.conf | 61 ------------------------------------------------------------- .vim/.gitignore | 17 ----------------- .vim/README.md | 28 ---------------------------- .vim/autoload/vimrc.vim | 14 -------------- .vim/ftplugin/c.vim | 5 ----- .vim/ftplugin/go.vim | 2 -- .vim/ftplugin/help.vim | 32 -------------------------------- .vim/ftplugin/html.vim | 3 --- .vim/ftplugin/javascript.vim | 3 --- .vim/ftplugin/man.vim | 3 --- .vim/ftplugin/markdown.vim | 11 ----------- .vim/ftplugin/python.vim | 7 ------- .vim/ftplugin/tex.vim | 10 ---------- .vim/ftplugin/text.vim | 15 --------------- .vim/ftplugin/vim.vim | 21 --------------------- .vim/improved.vim | 95 ----------------------------------------------------------------------------------------------- .vim/pack/mine/start/gruvbox | 1 - .vim/pack/plugins/start/gv.vim | 1 - .vim/pack/plugins/start/vim-commentary | 1 - .vim/pack/plugins/start/vim-dirvish | 1 - .vim/pack/plugins/start/vim-fugitive | 1 - .vim/pack/plugins/start/vim-gitgutter | 1 - .vim/pack/plugins/start/vim-repeat | 1 - .vim/pack/plugins/start/vim-rhubarb | 1 - .vim/pack/plugins/start/vim-surround | 1 - .vim/swp/.gitkeep | 0 .vim/syntax/python.vim | 3 --- .vim/undo/.gitkeep | 0 .vim/vimrc | 29 ----------------------------- .xinitrc | 34 ---------------------------------- LICENSE | 21 +++++++++++++++++++++ README | 13 +++++++++++++ README.md | 12 ------------ bin/csum | 11 ----------- bin/e | 44 -------------------------------------------- bin/ic | 11 ----------- bin/irccolor | 44 -------------------------------------------- bin/irclogs | 18 ------------------ bin/lnkdot | 37 ------------------------------------- bin/p | 3 --- bin/rmake | 7 ------- bin/siccolor | 51 --------------------------------------------------- bin/t | 38 -------------------------------------- bin/tmic | 7 ------- bin/vip | 18 ------------------ etc/edinputrc | 7 ------- etc/install.sh | 23 ----------------------- etc/mbsyncrc | 31 ------------------------------- etc/perl/README.md | 11 ----------- etc/perl/cpanfile | 4 ---- etc/skel.sh | 38 -------------------------------------- 70 files changed, 34 insertions(+), 1285 deletions(-) delete mode 100644 .Xdefaults delete mode 100644 .bashrc delete mode 100644 .config/git/config delete mode 100644 .config/git/ignore delete mode 100644 .config/gtk-3.0/settings.ini delete mode 100644 .config/mutt/.gitignore delete mode 100644 .config/mutt/README.md delete mode 100644 .config/mutt/accounts/karleco.muttrc delete mode 100644 .config/mutt/common.muttrc delete mode 100644 .config/mutt/mailcap delete mode 100644 .config/mutt/muttrc delete mode 100644 .config/nvim/init.vim delete mode 100644 .cwmrc delete mode 100644 .exrc delete mode 100644 .gdbinit delete mode 100644 .gitignore delete mode 100644 .gitmodules delete mode 100644 .inputrc delete mode 100644 .shrc delete mode 100644 .tmux.conf delete mode 100644 .vim/.gitignore delete mode 100644 .vim/README.md delete mode 100644 .vim/autoload/vimrc.vim delete mode 100644 .vim/ftplugin/c.vim delete mode 100644 .vim/ftplugin/go.vim delete mode 100644 .vim/ftplugin/help.vim delete mode 100644 .vim/ftplugin/html.vim delete mode 100644 .vim/ftplugin/javascript.vim delete mode 100644 .vim/ftplugin/man.vim delete mode 100644 .vim/ftplugin/markdown.vim delete mode 100644 .vim/ftplugin/python.vim delete mode 100644 .vim/ftplugin/tex.vim delete mode 100644 .vim/ftplugin/text.vim delete mode 100644 .vim/ftplugin/vim.vim delete mode 100644 .vim/improved.vim delete mode 160000 .vim/pack/mine/start/gruvbox delete mode 160000 .vim/pack/plugins/start/gv.vim delete mode 160000 .vim/pack/plugins/start/vim-commentary delete mode 160000 .vim/pack/plugins/start/vim-dirvish delete mode 160000 .vim/pack/plugins/start/vim-fugitive delete mode 160000 .vim/pack/plugins/start/vim-gitgutter delete mode 160000 .vim/pack/plugins/start/vim-repeat delete mode 160000 .vim/pack/plugins/start/vim-rhubarb delete mode 160000 .vim/pack/plugins/start/vim-surround delete mode 100644 .vim/swp/.gitkeep delete mode 100644 .vim/syntax/python.vim delete mode 100644 .vim/undo/.gitkeep delete mode 100644 .vim/vimrc delete mode 100755 .xinitrc create mode 100644 LICENSE create mode 100644 README delete mode 100644 README.md delete mode 100755 bin/csum delete mode 100755 bin/e delete mode 100755 bin/ic delete mode 100755 bin/irccolor delete mode 100755 bin/irclogs delete mode 100755 bin/lnkdot delete mode 100755 bin/p delete mode 100755 bin/rmake delete mode 100755 bin/siccolor delete mode 100755 bin/t delete mode 100755 bin/tmic delete mode 100755 bin/vip delete mode 100644 etc/edinputrc delete mode 100755 etc/install.sh delete mode 100644 etc/mbsyncrc delete mode 100644 etc/perl/README.md delete mode 100644 etc/perl/cpanfile delete mode 100755 etc/skel.sh diff --git a/.Xdefaults b/.Xdefaults deleted file mode 100644 index 9c8f561..0000000 --- a/.Xdefaults +++ /dev/null @@ -1,6 +0,0 @@ -! Xdefaults -- currently just settings for xterm(1) -XTerm*loginShell:true -XTerm*foreground: lightgray -XTerm*background: black -XTerm*faceName: Consolas:size=9:antialias=true -XTerm*metaSendsEscape: true diff --git a/.bashrc b/.bashrc deleted file mode 100644 index 131361d..0000000 --- a/.bashrc +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/env bash -# .bashrc -# The way I like to roll in the shell - -# If not running interactively, don't do anything -[[ $- != *i* ]] && return - -# Functions -include() { [ -r "$1" ] && source "$1"; } -aw() { w3m "https://wiki.archlinux.org/index.php?search=$1"; } -ddg() { w3m "https://duckduckgo.com/lite?q=$1"; } -last_err() { - err="$?" - if [ $err -ne "0" ]; then - echo "($err) " - fi -} - -# Load ~/.shrc from $ENV (similar to sh(1)'s init) -include "$ENV" - -# Settings / Shell Variables -stty -ixon # Disable XON/XOFF to allow forward search w CTRL-S -shopt -s checkwinsize # check win size after each cmd, update if needed -shopt -s histappend # append to the history file, don't overwrite it -shopt -s direxpand # expand variables in directory names -HISTSIZE=10000 # Max lines in history (in memory) -HISTFILESIZE=200000 # Max size of the history file -HISTIGNORE=fg:pwd:ls # Don't store common commands in history -HISTCONTROL=ignoreboth # Don't store duped / whitespace-led commands in history -PROMPT_COMMAND="history -a" # Record history after each command - -if [ -n "$PRETTY_COLORS" ]; then - # ls colors - if ls --color &>/dev/null; then - alias ls='ls --color' - elif ls -G &>/dev/null; then - alias ls='ls -G' - elif colorls -G &>/dev/null; then - alias ls='colorls -G' - fi - - parse_git_dirty() { - if [ -z "$BASH_PROMPT_NO_GSTATUS" ]; then - [ -n "$(git status --porcelain=v1 2>/dev/null)" ] && echo "*" - fi - } - - git_info() { - echo " $(git branch --show-current 2>/dev/null)$(parse_git_dirty)" - } - - # Preferred Prompt: fancy with colors from tput - if tput setaf 1 &> /dev/null; then - tput sgr0 # reset effects of test command - RED="\[$(tput setaf 1)\]" - MAGENTA="\[$(tput setaf 5)\]" - YELLOW="\[$(tput setaf 3)\]" - GRAY="\[$(tput setaf 8)\]" - BLUE="\[$(tput setaf 4)\]" - BOLD="\[$(tput bold)\]" - RESET="\[$(tput sgr0)\]" - - PS1_TOP="$BOLD$RED\$(last_err)$BLUE\w $RESET$GRAY[\u@\h]\$(git_info)" - PS1="$PS1_TOP\n$BOLD$MAGENTA\$ $RESET" - PS2="$YELLOW> $RESET" - else - PS1="\$(last_err)\w [\u@\h]\$(git_info)\n\$ " - fi -fi - -# Include .local version last as override mechanism -include "$HOME/.bashrc.local" diff --git a/.config/git/config b/.config/git/config deleted file mode 100644 index 52684e6..0000000 --- a/.config/git/config +++ /dev/null @@ -1,29 +0,0 @@ -[user] - email = alex@alexkarle.com - name = Alex Karle - -[sendemail] - # smtpserver = smtp.fastmail.com - # smtpuser = alex@alexkarle.com - # smtpencryption = tls - # smtpserverport = 587 - annotate = yes - confirm = always -[pull] - ff = only -[alias] - s = status -s - ss = status - l = log --stat - d = diff - c = commit - a = add - f = fetch - rb = rebase - co = checkout - g = grep - rs = reset - p = push - b = branch -[init] - defaultBranch = main diff --git a/.config/git/ignore b/.config/git/ignore deleted file mode 100644 index 71cfce6..0000000 --- a/.config/git/ignore +++ /dev/null @@ -1,16 +0,0 @@ -# My Global .gitignore -# Set with: -# git config --global core.excludesfile 'path/to/.gitignore' -# -# For the junk that I create that nobody else needs or wants - -# ctags files -tags -TAGS - -# Backup files -*.swp -*~ - -# OS Junk -.DS_Store diff --git a/.config/gtk-3.0/settings.ini b/.config/gtk-3.0/settings.ini deleted file mode 100644 index 6bcbff5..0000000 --- a/.config/gtk-3.0/settings.ini +++ /dev/null @@ -1,2 +0,0 @@ -[Settings] -gtk-key-theme-name=Default diff --git a/.config/mutt/.gitignore b/.config/mutt/.gitignore deleted file mode 100644 index 318d1e0..0000000 --- a/.config/mutt/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -# Not worth checking in encrypted passwords, as FastMail requires a different -# password for each client anyways... -*.gpg - -# Don't check in those emails ;) -cache - -# Local muttrc to determine which account to use, etc -muttrc.local diff --git a/.config/mutt/README.md b/.config/mutt/README.md deleted file mode 100644 index 79b3433..0000000 --- a/.config/mutt/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# mutt - -Trying `mutt` in pursuit of an email client that sucks less. - -## Installation - -This folder should be symlinked to the `$XDG_CONFIG_HOME`. But other than that -it is necessary to generate an encrypted password file. - -Given that I am using FastMail, they insist on having a one-client one-time -password for each mail client that isn't theirs. So, in this order: - -1. Go to FastMail's web client -2. Under Settings create a password -3. Create a GPG key if you don't already have one: - -``` -gpg --gen-key -``` - -4. Use that key's public key to encrypt the password (and putt it in a file): - -``` -echo -n "PASSWORD" | gpg --encrypt -r EMAIL > accounts/karleco.gpg -``` - -Now, everything should work! diff --git a/.config/mutt/accounts/karleco.muttrc b/.config/mutt/accounts/karleco.muttrc deleted file mode 100644 index b30b82c..0000000 --- a/.config/mutt/accounts/karleco.muttrc +++ /dev/null @@ -1,16 +0,0 @@ -# Account setup for my personal email -# Checked into git as a template for other accounts - -set from="alex@alexkarle.com" -set realname="Alex Karle" - -# Use a local copy of my mail (for speed and offline-access) -set mbox_type="Maildir" -set folder="~/mail/karleco/" -set spoolfile="=INBOX" -set record="=Sent" -set postponed="=Drafts" - -# Uncomment if sendmail not configured on machine -# set smtp_pass=`pass show mail/karleco` -# set smtp_url="smtps://$from:$smtp_pass@smtp.fastmail.com:465" diff --git a/.config/mutt/common.muttrc b/.config/mutt/common.muttrc deleted file mode 100644 index 1bb4e8a..0000000 --- a/.config/mutt/common.muttrc +++ /dev/null @@ -1,97 +0,0 @@ -# Common muttrc -- source in muttrc.local -# In pursuit of an email client that sucks less - -################################################################################ -# General / Behavior -set ssl_force_tls = yes # Require encrypted connection - -# Attachments -set mailcap_path=~/.config/mutt/mailcap -auto_view text/html # tell mutt to load HTML via mailcap -alternative_order text/plain text/enriched text/html # prefer plaintext - -# Fetching Mail -set mail_check=90 # From the manual, over IMAP, 90 reasonable value -set timeout=15 # mutt blocks mail check if no user input - -# Caching (speeds up IMAP considerably to not redownload every time) -set header_cache="~/.config/mutt/cache" -set message_cachedir="~/.config/mutt/cache" - -# BCC self to show up in INBOX -my_hdr BCC: $from - -# Use the `abook` program for contact management/completions -set query_command="abook --mutt-query '%s'" - -# Enables shelling out in macros without a pause -set wait_key=no - -################################################################################ -# Appearance / Layout -set sort=threads -set sort_aux=reverse-last-date-received - -# Show some index in the pager -set pager_index_lines=6 - -# Restrict quotes to |, :, and > (default has } and # which match code) -set quote_regexp="^([ \t]*[|>:])+" -color index yellow black ~U -color quoted green black -color quoted1 blue black -color quoted2 magenta black -color quoted3 yellow black -color quoted4 red black - -# Patch highting -color body green black "^\\+.*" -color body red black "^-.*" -color body magenta black "^\\+\\+\\+ b/.*" -color body magenta black "^--- a/.*" -color body magenta black "^@@.*@@" -color body magenta black "^@@.*@@" -color body magenta black "^diff --git.*" -color body magenta black "^index [0-9a-z]{7}\\.\\.[0-9a-z]{7}.*" - -################################################################################ -# Bindings -# I've chosen to customize-as-I-go on these. Some general guiding rules: -# 1. Vi-like -# - Obvious reasons -# 2. Non-destructive -# - Especially as a newby, its **the worst** to have CTRL-D -# which I spam in Vim for half-down to delete 5-10 messages -# in the pager before I've realized what I've done. - -# Navigation -bind pager j next-line -bind pager k previous-line -bind index G last-entry -bind pager G bottom -bind index,pager g noop # good practice, as gg prevents g from binding -bind index gg first-entry -bind pager gg top -bind index,pager \CD half-down -bind index,pager \CU half-up -bind index,pager d half-down -bind index,pager u half-up -bind index,pager previous-unread -bind index,pager next-unread -bind index,pager next-unread - -# Functional -bind index,pager h help -bind index,pager ? search-reverse -bind index N search-opposite -bind index,pager R group-reply -bind index \CN toggle-new -bind attach view-mailcap -bind editor complete-query # Used for contact-completion - -# Macros -macro index,pager ga "abook --add-email-quiet" "Add sender to abook contacts" -macro index g$ "mbsync -a" "Sync with mbsync" - -# set send_multipart_alternative=ask-no -# set send_multipart_alternative_filter=markdown2html diff --git a/.config/mutt/mailcap b/.config/mutt/mailcap deleted file mode 100644 index cab96f6..0000000 --- a/.config/mutt/mailcap +++ /dev/null @@ -1,11 +0,0 @@ -# Defaults (for GUI/X) -text/plain; $EDITOR '%s'; -application/octet-stream; $EDITOR '%s'; -text/html; firefox '%s' & sleep 1; test=test -n "$DISPLAY"; needsterminal; -text/html; w3m -I %{charset} -T text/html; copiousoutput; -image/*; feh '%s' ; test=test -n "$DISPLAY"; needsterminal; -application/pdf; xdg-open '%s' &; test=test -n "$DISPLAY"; needsterminal; - -# Backups for Virtual Console (needs fbida package) -image/*; fbi -a '%s'; -application/pdf; fbgs '%s'; diff --git a/.config/mutt/muttrc b/.config/mutt/muttrc deleted file mode 100644 index 58c768e..0000000 --- a/.config/mutt/muttrc +++ /dev/null @@ -1,4 +0,0 @@ -# Source common config and local config -# common should *not* source local to enable multiple muttrc's to coexist -source ~/.config/mutt/muttrc.local -source ~/.config/mutt/common.muttrc diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim deleted file mode 100644 index 523ddc9..0000000 --- a/.config/nvim/init.vim +++ /dev/null @@ -1,20 +0,0 @@ -" init.vim -- the config for neovim -" -" Used for specific neovim customization! - -" First, just source the regular Vim stuff -set runtimepath+=~/.vim,~/.vim/after -set packpath+=~/.vim - -if filereadable(expand("~/.vimrc")) - " On some machines, I prefer to use a ~/.vimrc - source ~/.vimrc -else - source ~/.vim/vimrc -endif - -" no numbers in terminal -autocmd TermOpen * setlocal nonumber - -" incrementally show substitutions! -set inccommand=nosplit diff --git a/.cwmrc b/.cwmrc deleted file mode 100644 index ea1e841..0000000 --- a/.cwmrc +++ /dev/null @@ -1,76 +0,0 @@ -# Commands (for menu-cmd) -command firefox firefox -command term /usr/local/bin/st -command lock xlock -command top "/usr/local/bin/st -e top" -command htop "/usr/local/bin/st -e htop" -command mutt "/usr/local/bin/st -e mutt" - -# Global keys -bind-key 4S-e quit -bind-key 4S-r restart - -# App spawns -bind-key 4-Return terminal -bind-key 4-w firefox -bind-key 4-p menu-cmd -bind-key 4S-p menu-exec -bind-key 4S-w menu-window -bind-key 4S-g menu-group -bind-key 4-c lock - -# Window manipulation -bind-key 4S-Return window-maximize -bind-key 4-j window-cycle -bind-key 4-k window-rcycle -bind-key 4S-j group-cycle -bind-key 4S-k group-rcycle -bind-key 4-q window-close - -# Mouse it -bind-mouse 4-1 window-move -bind-mouse 4-3 window-resize - -# Group settings -sticky yes -bind-key 4-1 group-only-1 -bind-key 4-2 group-only-2 -bind-key 4-3 group-only-3 -bind-key 4-4 group-only-4 -bind-key 4-5 group-only-5 -bind-key 4-6 group-only-6 -bind-key 4-7 group-only-7 -bind-key 4-8 group-only-8 -bind-key 4-9 group-only-9 - -bind-key 4C-0 group-toggle-all -bind-key 4C-1 group-toggle-1 -bind-key 4C-2 group-toggle-2 -bind-key 4C-3 group-toggle-3 -bind-key 4C-4 group-toggle-4 -bind-key 4C-5 group-toggle-5 -bind-key 4C-6 group-toggle-6 -bind-key 4C-7 group-toggle-7 -bind-key 4C-8 group-toggle-8 -bind-key 4C-9 group-toggle-9 - -bind-key 4S-1 window-movetogroup-1 -bind-key 4S-2 window-movetogroup-2 -bind-key 4S-3 window-movetogroup-3 -bind-key 4S-4 window-movetogroup-4 -bind-key 4S-5 window-movetogroup-5 -bind-key 4S-6 window-movetogroup-6 -bind-key 4S-7 window-movetogroup-7 -bind-key 4S-8 window-movetogroup-8 -bind-key 4S-9 window-movetogroup-9 - -bind-key 4-g window-group - -# ------------- -# Linux-only Brightness and Volume keys (works out-of-box on OpenBSD) -# bind-key XF86AudioMute "pulsemixer --toggle-mute" -# bind-key XF86AudioLowerVolume "pulsemixer --change-volume -10" -# bind-key XF86AudioRaiseVolume "pulsemixer --change-volume +10" -# bind-key XF86MonBrightnessDown "light -U 10" -# bind-key XF86MonBrightnessUp "light -A 10" -# ------------- diff --git a/.exrc b/.exrc deleted file mode 100644 index 9145e73..0000000 --- a/.exrc +++ /dev/null @@ -1,9 +0,0 @@ -" .exrc -- For OpenBSD's nvi -" Mostly used for quick edits or prose (emails, commit messages, etc) -" So default to 72 hard wrapping and spaces over tabs -set ruler -set autoindent -set searchincr -set showmode - -map gg 1G diff --git a/.gdbinit b/.gdbinit deleted file mode 100644 index 139c791..0000000 --- a/.gdbinit +++ /dev/null @@ -1,4 +0,0 @@ -# Save history, but do it globally -set history save on -set history size 10000 -set history filename ~/.gdb_history diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 0023d98..0000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# netrw (vim) cruft -.netrwhist diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 65d4f1c..0000000 --- a/.gitmodules +++ /dev/null @@ -1,27 +0,0 @@ -[submodule ".vim/pack/mine/start/gruvbox"] - path = .vim/pack/mine/start/gruvbox - url = https://github.com/akarle/gruvbox -[submodule ".vim/pack/plugins/start/vim-fugitive"] - path = .vim/pack/plugins/start/vim-fugitive - url = https://github.com/tpope/vim-fugitive -[submodule ".vim/pack/plugins/start/gv.vim"] - path = .vim/pack/plugins/start/gv.vim - url = https://github.com/junegunn/gv.vim -[submodule ".vim/pack/plugins/start/vim-dirvish"] - path = .vim/pack/plugins/start/vim-dirvish - url = https://github.com/justinmk/vim-dirvish -[submodule ".vim/pack/plugins/start/vim-surround"] - path = .vim/pack/plugins/start/vim-surround - url = https://github.com/tpope/vim-surround -[submodule ".vim/pack/plugins/start/vim-commentary"] - path = .vim/pack/plugins/start/vim-commentary - url = https://github.com/tpope/vim-commentary -[submodule ".vim/pack/plugins/start/vim-gitgutter"] - path = .vim/pack/plugins/start/vim-gitgutter - url = https://github.com/airblade/vim-gitgutter -[submodule ".vim/pack/plugins/start/vim-rhubarb"] - path = .vim/pack/plugins/start/vim-rhubarb - url = https://github.com/tpope/vim-rhubarb -[submodule ".vim/pack/plugins/start/vim-repeat"] - path = .vim/pack/plugins/start/vim-repeat - url = https://github.com/tpope/vim-repeat diff --git a/.inputrc b/.inputrc deleted file mode 100644 index ac4a6f0..0000000 --- a/.inputrc +++ /dev/null @@ -1,18 +0,0 @@ -# vi keys! Needs to be up top -set editing-mode vi -set show-mode-in-prompt on -set vi-cmd-mode-string ":" -set vi-ins-mode-string "" - -set keymap vi-command -Control-l: clear-screen - -set keymap vi-insert -Control-l: clear-screen -Control-x: yank-last-arg - -# Quicker changing of prompt after ESC -set keyseq-timeout 30 - -# Don't make noise, please! -set bell-style none diff --git a/.shrc b/.shrc deleted file mode 100644 index e848eec..0000000 --- a/.shrc +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -# ~/.shrc -- a base config for all POSIX shells -# "the /etc/skel to my .bashrc" - -# Shell vars (non-exported) -PS1='\u@\h:\w \$ ' -HISTFILE=${HISTFILE:="$HOME/.sh_histo"} # Don't override bash_history -HISTSIZE=10000 - -# Exports -export PATH="$HOME/bin:$PATH" # Put ~/bin on the for personal scripts -export EDITOR=vi # vi(1) starts faster than vim(1) -export VISUAL=vi # Some programs give priority to this -export PAGER=less # less is more -export PERL5LIB="$HOME/perl5/lib/perl5" # default cpanminus location -export MANPATH=":$HOME/share/man" -export PERLDB_OPTS="HistFile=$HOME/.perldb_histo HistSize=10000" - -# Aliases -alias l='ls -1AhF' -alias ll='ls -lAhF' -alias g='git' diff --git a/.tmux.conf b/.tmux.conf deleted file mode 100644 index 72678a1..0000000 --- a/.tmux.conf +++ /dev/null @@ -1,61 +0,0 @@ -#----------# -# Settings # -#----------# -set -g prefix C-a # Who can reach C-b? -set -g mouse on # I guess mice are useful sometimes.. -set -g mode-keys vi # vi or di -set -g base-index 1 # Start windows at 1 -set -g history-limit 10000 # Larget history -set -g pane-base-index 1 # Start panes at 1 -set -g renumber-windows on # Closed windows renumber -set -s escape-time 0 # ESC instantly passed through to process -set -g set-clipboard off # Use xclip over escape-code-clipboard #1119 - -# Set default term based on $TERM -set default-terminal screen # More support for "screen" than "tmux" -if "test $TERM = 'st-256color' -o $TERM = 'xterm-256color'" \ - 'set default-terminal screen-256color' - - -#----------# -# Bindings # -#----------# -# remap prefix from 'C-b' to 'C-a' -unbind C-b -bind C-a send-prefix - -# split panes using | and - -unbind '"' -unbind % -bind | split-window -h -c "#{pane_current_path}" -bind - split-window -v -c "#{pane_current_path}" - -# new window same directory -bind c new-window -c "#{pane_current_path}" - -# reload config file -bind r source-file ~/.tmux.conf \; display 'reloaded' - -# switch panes using vim keys -bind C-h select-pane -L -bind C-j select-pane -D -bind C-k select-pane -U -bind C-l select-pane -R - -# set vi-bindings for scrolling -bind -T copy-mode-vi v send -X begin-selection -bind -T copy-mode-vi y send -X copy-pipe-and-cancel 'xclip -in -selection clipboard' - -# GoToHttp -- find the last url in the buffer -bind H copy-mode\; send -X search-backward "http" \; send -X begin-selection \; send -X next-space-end -bind -T copy-mode-vi H send -X start-of-line \; send -X search-again \; send -X begin-selection \; send -X next-space-end - -bind P copy-mode \; send -X search-backward "/" \; send -X begin-selection \; send -X next-space-end \; send -X other-end \; send -X previous-space -bind -T copy-mode-vi P send -X clear-selection \; send -X start-of-line \; send -X search-again \; send -X begin-selection \; send -X next-space-end \; send -X other-end \; send -X previous-space - - -#-------# -# Other # -#-------# -# Finally, let the .local copy override anything here -if 'test -e $HOME/.tmux.conf.local' 'source-file $HOME/.tmux.conf.local' diff --git a/.vim/.gitignore b/.vim/.gitignore deleted file mode 100644 index e27a546..0000000 --- a/.vim/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -# Ignore files generated by editing -# Stuff like swp/ and undo/ really shouldn't be tracked -swp/ -spell/ -undo/ - -# Ignore plugin artifacts -.netrwhist - -# Ignore plugins -pack/ - -# Ignore tags -tags - -# Optional per-computer configuration -.vimrc.local diff --git a/.vim/README.md b/.vim/README.md deleted file mode 100644 index 421fb49..0000000 --- a/.vim/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# dotvim - -My personal Vim configuration. - -## Install - -Mac/Linux: - -```sh -git clone --recurse-submodules https://github.com/akarle/dotfiles ~/dotfiles -ln -s ~/dotfiles/vim ~/.vim -``` - -Windows: - -If you can't figure out how to get symlinks to work (or they don't work, I never -understood them on Windows), set up a minimal vimrc that uses ~/dotfiles/vim as -the ~/vimfiles: - -```sh -git clone --recurse-submodules https://github.com/akarle/dotfiles ~/dotfiles -cat < ~/_vimrc -set rtp ^= ~/dotfiles/vim -set rtp += ~/dotfiles/vim/after -set pp = &rtp -source ~/dotfiles/vim/vimrc -EOM -``` diff --git a/.vim/autoload/vimrc.vim b/.vim/autoload/vimrc.vim deleted file mode 100644 index e0079b6..0000000 --- a/.vim/autoload/vimrc.vim +++ /dev/null @@ -1,14 +0,0 @@ -" autoload/vimrc.vim -- functions to be called in vimrc -" -" See `:h autoload-functions` for explanation of autoloading and performance -function! vimrc#ToggleColorColumn() abort - if &colorcolumn == "" - if &textwidth > 0 - exe "set colorcolumn=" . &textwidth - else - set colorcolumn=80 - endif - else - set colorcolumn="" - endif -endfunction diff --git a/.vim/ftplugin/c.vim b/.vim/ftplugin/c.vim deleted file mode 100644 index 54acb43..0000000 --- a/.vim/ftplugin/c.vim +++ /dev/null @@ -1,5 +0,0 @@ -" TAB is TAB -setlocal softtabstop=8 -setlocal shiftwidth=8 -setlocal noexpandtab -setlocal nosmarttab diff --git a/.vim/ftplugin/go.vim b/.vim/ftplugin/go.vim deleted file mode 100644 index c23c27b..0000000 --- a/.vim/ftplugin/go.vim +++ /dev/null @@ -1,2 +0,0 @@ -setlocal noexpandtab -setlocal sw=8 sts=8 diff --git a/.vim/ftplugin/help.vim b/.vim/ftplugin/help.vim deleted file mode 100644 index 1b11000..0000000 --- a/.vim/ftplugin/help.vim +++ /dev/null @@ -1,32 +0,0 @@ -" Some folding settings I like to use for writing Vim plugin documentation -" Won't work universally, but doesn't hurt to enable - -" Simple fold function to fold until the next ===== or ------ -function! DocTxtFoldExpr(lnum) abort - if getline(a:lnum + 1) =~ '^\(=\+\|-\+\)$' - return '<1' - else - return 1 - endif -endfunction - -" Fold Text that prints number lines folded, a preview of what header it is, -" and the section name. Attempted to align nicely, but it breaks with tabs -" - 6 lines: ===== INTRO ..... -" - 12 lines: ----- Example ..... -function! DocTxtFoldText() abort - let l = getline(v:foldstart) - let lp1 = getline(v:foldstart + 1) - let num_lines = v:foldend - v:foldstart + 1 - let lines_text = printf("%4s", num_lines) . ' lines:' - let header_preview = l[0:5] - let section_name = lp1[0:stridx(lp1, ' ')] - if section_name !~ ' $' - let section_name = section_name . ' ' - endif - return join([v:folddashes, lines_text, header_preview, section_name], ' ') -endfunction - -setlocal foldexpr=DocTxtFoldExpr(v:lnum) -setlocal foldtext=DocTxtFoldText() -setlocal foldmethod=expr diff --git a/.vim/ftplugin/html.vim b/.vim/ftplugin/html.vim deleted file mode 100644 index 12be0ea..0000000 --- a/.vim/ftplugin/html.vim +++ /dev/null @@ -1,3 +0,0 @@ -" 2 spaces -setlocal softtabstop=2 -setlocal shiftwidth=2 diff --git a/.vim/ftplugin/javascript.vim b/.vim/ftplugin/javascript.vim deleted file mode 100644 index bff51f2..0000000 --- a/.vim/ftplugin/javascript.vim +++ /dev/null @@ -1,3 +0,0 @@ -" 2 space -setlocal softtabstop=2 -setlocal shiftwidth=2 diff --git a/.vim/ftplugin/man.vim b/.vim/ftplugin/man.vim deleted file mode 100644 index 216d024..0000000 --- a/.vim/ftplugin/man.vim +++ /dev/null @@ -1,3 +0,0 @@ -" break lines at word boundaries -setlocal wrap -setlocal linebreak diff --git a/.vim/ftplugin/markdown.vim b/.vim/ftplugin/markdown.vim deleted file mode 100644 index a210b8b..0000000 --- a/.vim/ftplugin/markdown.vim +++ /dev/null @@ -1,11 +0,0 @@ -" wrap at word breaks -setlocal linebreak - -" have broken lines indent! -setlocal breakindent - -" spell check -setlocal spell spelllang=en_us - -" Break at 80 -setlocal textwidth=80 diff --git a/.vim/ftplugin/python.vim b/.vim/ftplugin/python.vim deleted file mode 100644 index 363f1da..0000000 --- a/.vim/ftplugin/python.vim +++ /dev/null @@ -1,7 +0,0 @@ -" set fold method to be indent based -" USAGE: -" KEY: no longer use zf#j or zf/ to create folds -" instead: -" zc -- close a fold by indent (at cursor until end indent) -" zo -- open a closed fold -setlocal foldmethod=indent diff --git a/.vim/ftplugin/tex.vim b/.vim/ftplugin/tex.vim deleted file mode 100644 index e68fac3..0000000 --- a/.vim/ftplugin/tex.vim +++ /dev/null @@ -1,10 +0,0 @@ -" spell check! -setlocal spell spelllang=en_us - -" soft word wrap should not break words -" NOTE: don't use listchars with this feature -setlocal linebreak -setlocal breakindent - -" Break at 80 -setlocal textwidth=80 diff --git a/.vim/ftplugin/text.vim b/.vim/ftplugin/text.vim deleted file mode 100644 index 3664c2a..0000000 --- a/.vim/ftplugin/text.vim +++ /dev/null @@ -1,15 +0,0 @@ -" soft wrap at word breaks -setlocal linebreak -setlocal breakindent - -" Spellcheck -setlocal spell spelllang=en_us - -" Break at 65 -setlocal textwidth=65 - -" TAB is TAB -setlocal softtabstop=8 -setlocal shiftwidth=8 -setlocal noexpandtab -setlocal nosmarttab diff --git a/.vim/ftplugin/vim.vim b/.vim/ftplugin/vim.vim deleted file mode 100644 index c19ab13..0000000 --- a/.vim/ftplugin/vim.vim +++ /dev/null @@ -1,21 +0,0 @@ -" Custom folding by expression to fold markers and functions - -let b:viml_fold_markers = split(&foldmarker, ',') - -function! VimLFoldByFunctionAndMarker(lnum) abort - let l = getline(a:lnum) - if l =~ '^\s*function!\? ' - return 'a1' - elseif l =~ '^\s*endfunction' - return 's1' - elseif l =~ b:viml_fold_markers[0] - return 'a1' - elseif l =~ b:viml_fold_markers[1] - return 's1' - else - return '=' - endif -endfunction - -setlocal foldmethod=expr -setlocal foldexpr=VimLFoldByFunctionAndMarker(v:lnum) diff --git a/.vim/improved.vim b/.vim/improved.vim deleted file mode 100644 index da0e32c..0000000 --- a/.vim/improved.vim +++ /dev/null @@ -1,95 +0,0 @@ -" .vim/improved.vim -- putting the IM in VIM - -" GENERAL EDITOR SETTINGS {{{ -set number " Line numbers -set undodir=~/.vim/undo/ " Persistent undo -set undofile " Do indeed create said files -set undolevels=1000 " Max # changes that can be undone -set undoreload=10000 " Saves undofile on reload (:e) if < 10k LOC -set backupdir=~/.vim/swp,. " Backup files in ~/.vim/swp -set directory=~/.vim/swp,. " Swap files in ~/.vim/swp -" }}} - -" PLUGIN RELATED SETTINGS {{{ -" If using Dirvish, don't use netrw -if isdirectory(expand('~/.vim/pack/plugins/start/vim-dirvish/plugin')) - " Dirvish #137 - let loaded_netrwPlugin = 1 -else - let g:netrw_banner=0 " disable banner - let g:netrw_liststyle=1 " details view -endif - -let g:ale_set_loclist = 1 -let g:ale_python_flake8_options = '--ignore "E501,E302"' -let g:ale_linters = { 'javascript': ['eslint'], 'python': ['flake8'] } -let g:ale_fixers = {'javascript': ['prettier'], 'python': ['black'] } -let g:ale_fix_on_save = 1 -" }}} - -" COLORSCHEME {{{ -" Only gruv if you can handle it -" NOTE: for initial check, check $TERM, not &term, as nvim has &term=nvim -set background=dark -if (($TERM =~# '256color' && has("termguicolors")) || has('gui_running')) && - \ filereadable(expand("~/.vim/pack/mine/start/gruvbox/colors/gruvbox.vim")) - - set termguicolors - colorscheme gruvbox - - " See :h xterm-true-color for tmux+termguicolors - if &term =~# '^\(tmux\|st\|screen\)' - let &t_8f = "\[38;2;%lu;%lu;%lum" - let &t_8b = "\[48;2;%lu;%lu;%lum" - endif - - augroup CurLineToggle - autocmd! - autocmd InsertEnter,InsertLeave * set cul! - augroup END -endif -" }}} - -" KEY MAPPINGS {{{ -" set leader to be spacebar -let mapleader = " " - -"Map ctrl-i/j/k/h to switch between splits -nnoremap j -nnoremap k -nnoremap h -nnoremap l - -" Paste from clipboard without any formatting issues -nnoremap :set paste \| put + \| set nopaste - -" Clear trailing whitespace (through regexp) -nnoremap :%s/\s\+$//e - -" edit in current buffer dir -nnoremap e :e %:h/ -nnoremap v :vsp %:h/ -nnoremap s :sp %:h/ - -" toggle color column (to ensure short lines) -nnoremap C vimrc#ToggleColorColumn() - -" Clear that highlight! -nnoremap :nohlsearch - -" Get greppin quick! --> search word under cursor (escape # for VimL autoload) -nnoremap G :Ggrep! :copen - -" Toggle whitespace -nnoremap w :set list! - -" From defaults.vim: breaks the undo chain so we can undo -inoremap u -" }}} - -" COMMANDS {{{ -command! CD exe 'cd ' . expand('%:h') -" }}} - -" Load optional config (in ~/.vim) -runtime! .vimrc.local diff --git a/.vim/pack/mine/start/gruvbox b/.vim/pack/mine/start/gruvbox deleted file mode 160000 index 6c59bb5..0000000 --- a/.vim/pack/mine/start/gruvbox +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6c59bb5d72abcab0f22fc819793cf1f3b53d1336 diff --git a/.vim/pack/plugins/start/gv.vim b/.vim/pack/plugins/start/gv.vim deleted file mode 160000 index 023b315..0000000 --- a/.vim/pack/plugins/start/gv.vim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 023b315ea1fb92aba20c71ef54f806d2903cfc9e diff --git a/.vim/pack/plugins/start/vim-commentary b/.vim/pack/plugins/start/vim-commentary deleted file mode 160000 index 141d9d3..0000000 --- a/.vim/pack/plugins/start/vim-commentary +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 141d9d32a9fb58fe474fcc89cd7221eb2dd57b3a diff --git a/.vim/pack/plugins/start/vim-dirvish b/.vim/pack/plugins/start/vim-dirvish deleted file mode 160000 index eba64ed..0000000 --- a/.vim/pack/plugins/start/vim-dirvish +++ /dev/null @@ -1 +0,0 @@ -Subproject commit eba64ed111a3aab8121a0e5b6df62c6f19e05322 diff --git a/.vim/pack/plugins/start/vim-fugitive b/.vim/pack/plugins/start/vim-fugitive deleted file mode 160000 index 875a58c..0000000 --- a/.vim/pack/plugins/start/vim-fugitive +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 875a58c2e1b2022fb806a40f75c5c7b0f34667eb diff --git a/.vim/pack/plugins/start/vim-gitgutter b/.vim/pack/plugins/start/vim-gitgutter deleted file mode 160000 index c75c83d..0000000 --- a/.vim/pack/plugins/start/vim-gitgutter +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c75c83df531881008f8cf903eab7cd68bc19ff7a diff --git a/.vim/pack/plugins/start/vim-repeat b/.vim/pack/plugins/start/vim-repeat deleted file mode 160000 index 24afe92..0000000 --- a/.vim/pack/plugins/start/vim-repeat +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 24afe922e6a05891756ecf331f39a1f6743d3d5a diff --git a/.vim/pack/plugins/start/vim-rhubarb b/.vim/pack/plugins/start/vim-rhubarb deleted file mode 160000 index b4081f0..0000000 --- a/.vim/pack/plugins/start/vim-rhubarb +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b4081f0a882ff36d92d9d3ae5c3b70a378bfd5af diff --git a/.vim/pack/plugins/start/vim-surround b/.vim/pack/plugins/start/vim-surround deleted file mode 160000 index fab8621..0000000 --- a/.vim/pack/plugins/start/vim-surround +++ /dev/null @@ -1 +0,0 @@ -Subproject commit fab8621670f71637e9960003af28365129b1dfd0 diff --git a/.vim/swp/.gitkeep b/.vim/swp/.gitkeep deleted file mode 100644 index e69de29..0000000 --- a/.vim/swp/.gitkeep +++ /dev/null diff --git a/.vim/syntax/python.vim b/.vim/syntax/python.vim deleted file mode 100644 index 18539d9..0000000 --- a/.vim/syntax/python.vim +++ /dev/null @@ -1,3 +0,0 @@ -" Highlight the self keyword -syn keyword pythonSelf self -highlight link pythonSelf GruvboxBlue diff --git a/.vim/undo/.gitkeep b/.vim/undo/.gitkeep deleted file mode 100644 index e69de29..0000000 --- a/.vim/undo/.gitkeep +++ /dev/null diff --git a/.vim/vimrc b/.vim/vimrc deleted file mode 100644 index 9591780..0000000 --- a/.vim/vimrc +++ /dev/null @@ -1,29 +0,0 @@ -" .vimrc -- the bare necessities -filetype plugin indent on " Enable filetype plugins/indentation -syntax on " Syntax highlighting on -set softtabstop=4 " is 4 spaces (when expandtab set) -set shiftwidth=4 " >> will indent 4 spaces -set expandtab " Needed to replace with spaces -set autoindent " Indent carries over on new line -set smarttab " Use shiftwidth for and -set hlsearch " Highlight searches -set incsearch " Incrementally search -set backspace=indent,eol,start " Backspace should function as expected -set ttimeout " Timeout on esc keycodes -set ttimeoutlen=30 " Low timeout to avoid delay -set modelines=0 " Disable modelines for security -set history=10000 " Remember last 1000 :commands -set scrolloff=3 " Scroll at 3 rows from edge of screen -set wildmenu " Visual completion for command mode -set showcmd " Show the command being typed -set laststatus=2 " Always show the statusbar -set noequalalways " Don't resize split on open/close event -set listchars=tab:>-,trail:~,space:.,eol:$ " Nicer whitespace -set hidden " Allow unsaved buffers - -if v:progname =~# 'vim$' - runtime! improved.vim " put the IM in VIM -elseif has('packages') - set pp-=~/.vim - set pp-=~/.vim/after -endif diff --git a/.xinitrc b/.xinitrc deleted file mode 100755 index 6db11e5..0000000 --- a/.xinitrc +++ /dev/null @@ -1,34 +0,0 @@ -# This is the config I use for dwm + startx -setxkbmap -option caps:ctrl_modifier -slstatus & - -if [ -e ~/background.png ]; then - feh --bg-fill ~/background.png -else - xsetroot -solid black -fi - -if [ $(uname) = "OpenBSD" ]; then - # On my thinkpad, I seem to need these xinput calls to get - # middle click scroll to work on OpenBSD. Linux is fine - xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation" 1 - xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Button" 2 - xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Axes" 6 7 4 5 - - # since xenodm is run as root, we need to export ENV - # ~/.shrc otherwise the interactive shells spawned in st - # won't have the right profile. Sourcing .profile should do it - # and get local aliases, etc - . $HOME/.profile - - # Prefer UTF-8 in X for unicode character support - export LC_CTYPE="en_US.UTF-8" - - # Lock on 5m idle - xidle -program "/usr/X11R6/bin/xlock" -timeout 300 & - - # xenodm handles ssh-agent for us - exec cwm -else - ssh-agent dwm -fi diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..2732b68 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021, Alex Karle + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README b/README new file mode 100644 index 0000000..b5d7d10 --- /dev/null +++ b/README @@ -0,0 +1,13 @@ +~akarle's dotfiles +------------------ +2022, the year of the dotfile rewrite. + +This repo's got a _lot_ of history, and +I use these configs daily. In 2022 though, +I wanted to start from scratch to both: + + 1. License them from the get-go + 2. Re-evaluate what I really use + +Dotfiles have a funny way of going stale. +Here's to a fresh start! diff --git a/README.md b/README.md deleted file mode 100644 index ae67f8b..0000000 --- a/README.md +++ /dev/null @@ -1,12 +0,0 @@ -dotfiles -======== -My personal config files for Linux and OpenBSD. - -Installation ------------- -The [etc/skel.sh][1] script will bootstrap a minimal config (tmux/sh/git) -that I use on new servers. [etc/install.sh][2] is a more complete -installation for desktop use. - -[1]: ./etc/skel.sh -[2]: ./etc/install.sh diff --git a/bin/csum b/bin/csum deleted file mode 100755 index 9834172..0000000 --- a/bin/csum +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -# csum -- sum a column -if [ -z "$1" ]; then - echo "usage: csum N [files]" >&2 - exit 1 -fi - -awk ' -{ s += $'$1' } -END { print s } -' diff --git a/bin/e b/bin/e deleted file mode 100755 index 805e492..0000000 --- a/bin/e +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh -# e -- slightly improved ed(1) wrapper -set -e - -# If we're already in e, export a count to show the depth! -if [ -z "$E_LVL" ]; then - PROMPT="> " - export E_LVL=0 -else - export E_LVL=$((${E_LVL} + 1)) - PROMPT="${E_LVL}> " -fi - -# short circuit fallback to ed(1) if no rlwrap present -if ! command -v rlwrap >/dev/null; then - echo "warning: rlwrap not found, falling back to regular ed" 1>&2 - exec ed -p"$PROMPT" "$@" -fi - -for f in .tags tags; do - if [ -e "$f" ]; then - echo "using tags from ./$f" - COMP="$COMP --file=$f" - fi -done - -DOTDIR="$(dirname $(dirname $(readlink -f "$0")))" -export INPUTRC="$DOTDIR/etc/edinputrc" - -# Don't want to pop open vi(1)! -export EDITOR=e -export VISUAL=e - -# Only include -v if using GNU ed -if ed --version >/dev/null 2>&1 ; then - VERBOSE="-v" -fi - -exec rlwrap \ - --no-warnings \ - --complete-filenames \ - --histsize 10000 $COMP \ - --extra-char-after-completion '' \ - ed $VERBOSE -p"$PROMPT" "$@" diff --git a/bin/ic b/bin/ic deleted file mode 100755 index 474c53b..0000000 --- a/bin/ic +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -# ic -- taking the simple out of sic(1) -set -e -mkdir -p "$HOME/.irc" -LOG="$HOME/.irc/$(date +%Y-%m-%d).log" - -if [ -z "$NOCOLOR" ]; then - rlwrap sic "$@" | tee -a "$LOG" | siccolor -else - rlwrap sic "$@" | tee -a "$LOG" -fi diff --git a/bin/irccolor b/bin/irccolor deleted file mode 100755 index 79a1cab..0000000 --- a/bin/irccolor +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env perl -# irccolor -- filter to colorize the output of irclogs -# usage: irclogs sr.ht | irccolor | less -R -use strict; -use warnings; -use Term::ANSIColor; - -# No black (bg), white (text/msg), bright white, or bright black (time) -my @colors = qw( - red - green - yellow - blue - magenta - cyan - bright_red - bright_green - bright_yellow - bright_blue - bright_magenta - bright_cyan -); - -my $i = 0; -my %user_colors; -while (my $line = <>) { - if ($line =~ m{(\d\d\d\d-\d\d-\d\d).log:\[(\d\d:\d\d:\d\d)]\s*(<[^>]+>)(.*)}) { - my ($date, $time, $user, $msg) = ($1, $2, $3, $4); - print color("bright_black"); - print "[$date $time] "; - print color("reset"); - if (!exists $user_colors{$user}) { - $user_colors{$user} = $colors[$i % @colors]; - $i++; - } - print color("$user_colors{$user}"); - print $user; - print color("reset"); - print "$msg\n"; - } else { - # Don't know how to colorize! - print "$line"; - } -} diff --git a/bin/irclogs b/bin/irclogs deleted file mode 100755 index 02a48a9..0000000 --- a/bin/irclogs +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh -# irclogs -- small script to get only the messages from logs -set -e -die() { - echo "$*" 1>&2 - exit 1 -} - -LOGS=/home/_soju/logs - -[ -z "$1" ] && die "usage: $0 CHANNEL" -[ ! -d "$LOGS/$USER" ] && die "User $USER doesn't appear to have a soju account" -[ ! -d "$LOGS/$USER/irc.libera.chat/#$1" ] && die "channel #$1 doesn't have any logs" - -# cd into the log dir as a cheap way to truncate output -cd "$LOGS/$USER/irc.libera.chat/#$1" - -grep '^\[[0-9][0-9]:[0-9][0-9]:[0-9][0-9]\] *<' *.log diff --git a/bin/lnkdot b/bin/lnkdot deleted file mode 100755 index 501d3b3..0000000 --- a/bin/lnkdot +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh -# lnkdot -- link a dotfile -set -e - -die() { - echo "$1" 1>&2 - exit 1 -} - -if [ "$#" = "0" ]; then - die "usage: linkdot DOTFILE [DOTFILE ...]" -fi - -DIR="$(dirname "$(dirname "$(readlink -f "$0")")")" -RELDIR="$(echo $DIR | sed "s#^$HOME/##")" - -lnk() { - printf "$1 ... " - if [ -e "$HOME/$1" -a ! -L "$HOME/$1" ]; then - echo "failed" - else - root=$RELDIR - case $1 in - */*) root=$DIR ;; - esac - ln -snf $root/$1 $HOME/$1 - echo "linked" - fi -} - -for f in "$@"; do - if [ -e "$DIR/$f" ]; then - lnk "$f" - else - die "dotfile doesn't exist: $f" - fi -done diff --git a/bin/p b/bin/p deleted file mode 100755 index da0d87d..0000000 --- a/bin/p +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -# p - pager, script over alias for availability in ed(1) -exec ${PAGER:-less} "$@" diff --git a/bin/rmake b/bin/rmake deleted file mode 100755 index 767c35f..0000000 --- a/bin/rmake +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# rmake -- make at the repo root -if ! git rev-parse --show-toplevel >/dev/null 2>&1; then - echo "Not in a git repo!" >&2 - exit 1 -fi -make -C $(git rev-parse --show-toplevel) diff --git a/bin/siccolor b/bin/siccolor deleted file mode 100755 index 13d9605..0000000 --- a/bin/siccolor +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env perl -# siccolor -- colorize sic(1) output -use strict; -use warnings; -use Term::ANSIColor; - -# No black (bg), white (text/msg), bright white, or bright black (time) -my @colors = qw( - green - yellow - blue - magenta - cyan - bright_green - bright_yellow - bright_blue - bright_magenta - bright_cyan -); - -our $i = 0; -our %user_colors; -main(); - -sub main { - while (my $line = <>) { - if ($line =~ m{^([^:]+):\s+(\d\d\d\d-\d\d-\d\d \d\d:\d\d) (<[^>]+>)(.*)}) { - my ($channel, $time, $user, $msg) = ($1, $2, $3, $4); - print get_color($channel) . "$channel"; - print color("bright_black"); - print ": $time "; - print get_color($user) . "$user"; - print color("reset"); - print "$msg\n"; - } else { - # Don't know how to colorize! - print color("bright_black"); - print "$line"; - print color("reset"); - } - } -} - -sub get_color { - my ($val) = @_; - if (!exists $user_colors{$val}) { - $user_colors{$val} = $colors[$i % @colors]; - $i++; - } - return color($user_colors{$val}); -} diff --git a/bin/t b/bin/t deleted file mode 100755 index 2322781..0000000 --- a/bin/t +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -# t -- tag jumping in ed(1) -# -# core concept: -# we simulate a "tag stack" by recursing within ed(1). When you're done -# at this tag, just `q` out of there! -# -# NOTE: unfortunately, we can't get ed(1) to jump to the location within -# the file (without maybe some crazy hacks like using a fifo for stdin.. -# but even that's likely to fail). The best we can do is output the cmd -# to search! -die() { - echo "$*" 1>&2 - exit 1 -} - -[ -z "$1" ] && die "usage: t TAG" -[ ! -e "tags" ] && die "no ./tags file" - -TLINE=$(grep "^$1 " tags | head -n 1) -[ -z "$TLINE" ] && die "tag not found" - -file=$(echo "$TLINE" | cut -f2) -regex=$(echo "$TLINE" | cut -f3) - -# trim the universal ctags regex bits -# also convert it to a real regex by escaping any special chars! -regex=$(echo "$regex" | sed \ - -e 's/;"$//' \ - -e 's/\\/\\\\/g' \ - -e 's/\*/\\*/g' \ - -e 's/\[/\\[/g' \ - -e 's/\]/\\]/g' \ - -e 's/\./\\./g') - -echo "jumping to $file, search the following:" -echo "$regex" -exec e "$file" diff --git a/bin/tmic b/bin/tmic deleted file mode 100755 index 1cec4ef..0000000 --- a/bin/tmic +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# tmic -- ic(1) in tmux(1) -# argv is passed to ic! -tmux new-session \ - 'log="$HOME/.irc/$(date +%F).log"; touch $log && tail -f $log | siccolor' \; \ - split-pane "env NOCOLOR=1 ic $* >/dev/null" \; \ - resize-pane -y 1 diff --git a/bin/vip b/bin/vip deleted file mode 100755 index 588c230..0000000 --- a/bin/vip +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh -# vip -- vi on the $PATH - -die() { - echo "$1" 1>&2; - exit 1 -} - -if [ -z "$1" ]; then - die "usage: vip progname" -fi - -bin=`which $1` -if [ -z $bin ]; then - die "$1 not on PATH" -fi - -exec $EDITOR $bin diff --git a/etc/edinputrc b/etc/edinputrc deleted file mode 100644 index 025d8ac..0000000 --- a/etc/edinputrc +++ /dev/null @@ -1,7 +0,0 @@ -$include ~/.inputrc - -# Since this is ed(1) we want to use C-n/C-p for -# completion (tabs should be tabs) -Control-n: complete -Control-p: complete-backward -TAB: tab-insert diff --git a/etc/install.sh b/etc/install.sh deleted file mode 100755 index fa11a72..0000000 --- a/etc/install.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -# install.sh -- full install via skel.sh/lnkdot -set -e -DIR="$(dirname "$(dirname "$(readlink -f "$0")")")" - -. "$DIR/etc/skel.sh" -add .bash_profile "export ENV=\"$DIR/.shrc\"" -add .bash_profile "[ -e \"$DIR/.bashrc\" ] && source \"$DIR/.bashrc\"" - -# Generic .dotfiles -for f in `find $DIR -maxdepth 1 -name '.*' -type f | grep -v git | sed "s#^$DIR/##"`; do - "$DIR/bin/lnkdot" $f -done - -# Generic .config dirs -for d in `find $DIR/.config -maxdepth 1 -mindepth 1 -type d | sed "s#^$DIR/##"`; do - "$DIR/bin/lnkdot" $d -done - -# Other exceptions -"$DIR/bin/lnkdot" .vim -mkdir -p $HOME/.newsboat -"$DIR/bin/lnkdot" .newsboat/urls diff --git a/etc/mbsyncrc b/etc/mbsyncrc deleted file mode 100644 index 023a3a4..0000000 --- a/etc/mbsyncrc +++ /dev/null @@ -1,31 +0,0 @@ -# mbsyncrc -- see `man mbsync` - -# IMAP side -# SSLType -- connect with SSL -IMAPStore karleco-far -User alex@alexkarle.com -Host imap.fastmail.com -SSLType IMAPS -PassCmd "+pass show mail/karleco-ro" - -# Filesystem side -# Flatten -- foo/bar -> foo.bar (better for mutt) -MaildirStore karleco-near -Path ~/mail/karleco/ -Inbox ~/mail/karleco/INBOX -Flatten . - -# Channel to connect IMAP to Maildir Stores -# Patterns * -- pull all directories -# SyncState * -- save state of channel in dir/.mbsyncstate -# Sync All -- Pull/Push/New/reNew/Delete/Flags .. all the things! -# Create Both -- directories created both near and far -# CopyArrivalDate -- Sync down the IMAP arrival time (for sorting) -Channel karleco -Far :karleco-far: -Near :karleco-near: -Patterns * -SyncState * -Sync All -Create Both -CopyArrivalDate yes diff --git a/etc/perl/README.md b/etc/perl/README.md deleted file mode 100644 index 9b0c0f1..0000000 --- a/etc/perl/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# dotfiles/etc/perl - -The `cpanfile` contains all the CPAN modules I like to install -for Perl development. See also the [.perldb](.perldb) file for -history in the Perl debugger. - -To install them, first install `cpanm`, and then run: - -```sh -cpanm --installdeps /path/to/dotfiles/etc/perl -``` diff --git a/etc/perl/cpanfile b/etc/perl/cpanfile deleted file mode 100644 index ed2ee50..0000000 --- a/etc/perl/cpanfile +++ /dev/null @@ -1,4 +0,0 @@ -# The below is necessary to use the readline libary that comes with -# bash, which has necessary features like arrow key navigation, -# history, vi keybindings... just install it already! -requires 'Term::ReadLine::Gnu'; diff --git a/etc/skel.sh b/etc/skel.sh deleted file mode 100755 index 25cfb54..0000000 --- a/etc/skel.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -# skel.sh -- links the "/etc/skel" subset of my dotfiles -# intended usage: -# $ git clone git://git.alexkarle.com/dotfiles.git -# $ ./dotfiles/etc/skel.sh -# $ # manually link any other files -# -# NOTE: .{bash_,}profile is *generated* so that per-site -# customizations can be put in. This script checks that the -# bits worth version controlling are installed properly -set -e -DIR="$(dirname "$(dirname "$(readlink -f "$0")")")" - -add() { - dot="$1" - cmd="$2" - printf "%s ... " "$dot" - if test ! -e "$HOME/$dot" - then - echo "$cmd" >> "$HOME/$dot" - echo "new" - elif grep -q "$cmd" "$HOME/$dot" - then - echo "exists" - else - echo "$cmd" >> "$HOME/$dot" - echo "added" - fi -} - -mkdir -p $HOME/.config - -# TODO: create full install.sh -"$DIR/bin/lnkdot" .tmux.conf -"$DIR/bin/lnkdot" .config/git -"$DIR/bin/lnkdot" .exrc -add .profile "export PATH=\"$DIR/bin:\$PATH\"" -add .profile "export ENV=\"$DIR/.shrc\"" -- libgit2 1.1.1