Brennen Bearnes 05495d693a | 4 years ago | |
---|---|---|
etc | 5 years ago | |
home | 4 years ago | |
.gitignore | 4 years ago | |
README.md | 4 years ago | |
install.sh | 4 years ago | |
ns-control | 5 years ago |
If you're reading this on GitHub, it may be out of date. The canonical copy of this repository lives on code.p1k3.com.
This repo is for dotfiles, utility scripts, and other things in my personal setup. Ideally, it includes most of the bits and pieces that make a personal machine usable for me. It may occasionally serve as a testbed for things that will eventually become standalone projects.
I generally use Debian and Debian-like GNU/Linux systems (including Ubuntu), with the xmonad tiling window manager rather than a full desktop environment like Gnome or KDE. I usually edit text in Vim, with Vimwiki for notes. I maintain a blog called p1k3 using wrt.
I have a partially-finished book about the command line which may be relevant.
As of February 2020, this collection is actively maintained, although it doesn't meet the standards of quality, consistency, or documentation you might want from a real software project.
(Then again, neither do most software projects.)
Except as noted below or in the body of specific files, and to the extent possible under law, I, Brennen Bearnes, waive all copyright and related or neighboring rights to the contents of bpb-kit. Go to town.
Exceptions:
home/bin/grab
, written Tyler Cipriani, is probably GPLv3 or later,
I'll clarify that.In the general case, I am a firm believer in Free Software, and correspondingly in the pragmatic value of strong copyleft licenses like the GNU General Public License. Where I have the option, I'll generally license more substantial projects under the GPL, with a view towards impeding the corporate capture of every available computational resource and generally throwing a little grit in the gears of capital in these latter days before it finishes murdering the entire biosphere. (As no one uses my software, this is a purely symbolic gesture, but what the hell.)
People have invested a lot of time and effort in telling us the GPL is uncool, just as they've invested a lot of time and effort in promoting the practical business-friendly benefits of "Open Source" as a development methodology while tucking the political implications of Free Software away out of sight so as not upset the billionaires. These are not unrelated phenomena.
All that said, this is a trivial repository of configuration fragments and small utility scripts for a very limited audience. It seems likely to do the most good if nobody has to worry about the bureaucracy of grabbing bits and pieces of it.
From time to time, I may incorporate code from other sources in this collection, as long as it's in the public domain or under a license that meets the Debian Free Software Guidelines. In those cases, I'll do my best to ensure that said code is clearly marked.
I have thiefed ideas and bits of configuration from the following projects and people:
These days I use ZSH on personal systems and Bash when writing tutorials, doing tech support, or working on production server systems. I like to keep lots and lots of history. I think shell scripting is a nightmare for most real tasks, but I do it sometimes anyway.
.bashrc
.zshrc
- nothing fancy.sh_common
- aliases and variables for both Bash and ZSH;
no Bash compatibility guarantees here, since I mostly don't use custom
aliases in BashScripts here fall into a handful of categories:
Many of these are unlikely to be portable, useful, or documented.
cheat
: a place to hang a personal cheatsheet of sortschrome-incognito
: run Google Chrome in incognito modedmenu_unique
: run dmenu with big fonts and vertical, only showing each entry oncedog
: concatenate argument strings with stdinedit-clipboard
: edit the current text selection in $EDITOR
(requires xclip
)enterprise
: play a sound like the USS Enterprise engines in TNGfilter-decorate
: splat some text dingbats into HTML I write sometimesfilter-exec
: replace text in-between markers with result of shell-script executionfilter-exec-raw
: like above, but differentfilter-exec-stdin
: feed text in-between markers to standard input of a command, replace it with outputfilter-markdownify
: convert a few things in old DigitalOcean tutorials to Markdownfilter-vertical
: verticalize a stringfirefox-fromselection
: open a selected url in firefoxfragment-bullet
: print out a "random" dingbat characterfragment-entry
: stub blog entryfragment-entry-gallery
: stub blog entry with galleryfragment-entry-poem
: stub blog entry with poemget-external-ip
: print public IP addressgif-sel
, gif-sel-4
, gif-sel-15
: take an animated gif of selected screen regiongit-diff-wrapper
: use vim with git-diff-tool
git-local-to-remote-status
grab
, grab-sel
: take a screenshot, take a screenshot of a selected regionjson_decode.php
: decode JSON into PHP data structuresjsonprint.pl
: pretty-print JSON with Perljump-to-window
: use wmctrl
and dmenu
to pick a window to jump tolistusers
: print an HTML list of userslynx-wrapper-edit
: edit a p1k3 entry in vim and re-render everythingmachine-status
: use dsh
to check status on a list of machines (stub)mostrecent
: print the name of newest file in the current directorynotesession
: start a tmux named session for notesphotocp
: copy photos from various media to a home directory locationpmwhich
: find the on-filesystem location of a Perl modulerightnow
: print the current time in a variety of formatssaytime
: speak the time with Festivalsnowday
: is it a snow day for the Boulder Valley School District?ssh-nofucks
: SSH to an address, I don't really care if the key has changedst
: get status using myrepostimelog
: parse a timelogging format (I use this to bill for contracting)timeslice
: aggregate some data for a given date range or file's implied datetoday
: print a datetodaydir
: find a p1k3 dir for the current dateuni
: search unicode codepoint names (via @chneukirchen)unsorted-unique
: print all lines of input once (just an awk
one-liner)wip
: move a p1k3 file into a work-in-progress directorywords
: split input into individual wordswthr
: use unicode snowflakes to display CPU loadxm
: call xmodmapxmonad.start
: personal version of xmonad startup scriptxtfix
: do a subtle color shift within the current xtermyank
, put
, put-mv
: stash a file path, copy or move it to the current directoryThe fragments directory is for code snippets that I write in the course of testing some idea, checking a technique, or trying to solve a problem posed by friends on IRC.
They're typically the kind of thing I'd throw in a random file called something
like test.sh
and overwrite later. It seemed useful to start collecting these
instead.
The cheatsheets directory is mostly empty, but may become a repository of useful shorthand documentation for the increasingly-many things I use that are not discoverable or memorable enough for my deteriorating long-term memory.
I use tmux
for terminal multiplexing (i.e., most of what GNU Screen does).
In practice, this means that I rely on it for
ssh
or mosh
sessionMy .tmux.conf
is brief, but does contain one useful
snippet for correcting weird Esc-key behavior in Vim.
.vimrc
- see file for installation details.xmodmap
.xinitrc
.hacksrc
if it exists.Xresources
tweaks xterm behavior and a number of fonts
.hacksrc
is linked to
.hacksrc_hi_dpi
.xmobarrc
, .xmonad/
bin/xmonad.start
for a drop-in replacement for
default XMonad startup on some Debian-like systems, including Gnome/Unity
stuff and the like. Perpetually not-quite-right.See instructions in ns-control.