Dotfiles, utilities, and other apparatus.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

179 lines
6.9 KiB

5 years ago
5 years ago
5 years ago
5 years ago
  1. bpb-kit
  2. =======
  3. This repo is for dotfiles, utility scripts, and other things in my personal
  4. setup. Ideally, it includes most of the bits and pieces that make a personal
  5. machine usable for me. It may occasionally serve as a testbed for things that
  6. will eventually become standalone projects.
  7. I generally use Debian and Debian-like GNU/Linux systems (including Ubuntu),
  8. with the [xmonad][xmonad] tiling window manager rather than a full desktop
  9. environment like Gnome or KDE. I usually edit text in Vim, with
  10. [Vimwiki][vimwiki] for notes. I maintain a blog called [p1k3][p1k3] using
  11. [wrt][wrt].
  12. I have a [partially-finished book about the command line][userland] which may
  13. be relevant.
  14. status
  15. ------
  16. As of June 2018, this collection is actively maintained, although it doesn't
  17. meet the standards of quality, consistency, or documentation you might want
  18. from a real software project.
  19. (Then again, neither do most software projects.)
  20. sources
  21. -------
  22. I routinely thief ideas and bits of configuration from the following projects
  23. and people:
  24. - [Advanced Bash Scripting Guide][bash-guide], Mendel Cooper
  25. - [Alan][alan]
  26. - [ArchWiki][archwiki]
  27. - [Ben][ben]
  28. - [Casey][casey]
  29. - [Chris][chris]
  30. - [Dave][dave]
  31. - [Leah][leah]
  32. - [Learn Vimscript the Hard Way][vimscript], Steve Losh
  33. - [Rob][rob]
  34. - [Todd][todd]
  35. - [Tyler][tyler]
  36. contents
  37. --------
  38. ### shell stuff
  39. These days I use ZSH on personal systems and Bash when writing tutorials or
  40. doing tech support. I like to keep lots and lots of history. I think shell
  41. scripting is a nightmare for most real tasks, but I do it sometimes anyway.
  42. - [`.bashrc`](home/.bashrc)
  43. - [`.zshrc`](home/.zshrc) - nothing fancy
  44. - [`.sh_common`](home/.sh_common) - aliases and variables for both Bash and ZSH;
  45. no Bash compatibility guarantees here, since I mostly don't use custom
  46. aliases in Bash
  47. ### scripts in [home/bin/](home/bin)
  48. Scripts here fall into a handful of categories:
  49. - Short wrappers for getting (or remembering) specific behavior from other
  50. tools
  51. - Screenshot and screencast tools used in my work as a writer for
  52. DigitalOcean and Adafruit
  53. - Things for working with the [p1k3][p1k3] repo and site
  54. - Text filters and template fragments, mostly for use with Vim aliases
  55. - Miscellaneous utilities
  56. Most of these are unlikely to be portable, useful, or documented.
  57. - `chrome-incognito`: run Google Chrome in incognito mode
  58. - `cheat`: a place to hang a personal cheatsheet of sorts
  59. - `dmenu_unique`: run dmenu with big fonts and vertical, only showing each entry once
  60. - `dog`: concatenate argument strings and stdin
  61. - `filter-decorate`: splat some text dingbats into HTML I write sometimes
  62. - `filter-exec-raw`: like above, but different
  63. - `filter-exec`: replace text in-between markers with result of shell-script execution
  64. - `filter-markdownify`: convert a few things in old DigitalOcean tutorials to Markdown
  65. - `filter-vertical`: verticalize a string
  66. - `firefox-fromselection`: open a selected url in firefox
  67. - `fragment-bullet`: print out a "random" dingbat character
  68. - `get-external-ip`: print public IP address
  69. - `gif-sel`, `gif-sel-4`, `gif-sel-15`: take an animated gif of selected screen region
  70. - `git-diff-wrapper`: use vim with `git-diff-tool`
  71. - `git-local-to-remote-status`
  72. - `grab`, `grab-sel`: take a screenshot, take a screenshot of a selected region
  73. - `json_decode.php`: decode JSON into PHP data structures
  74. - `jsonprint.pl`: pretty-print JSON with Perl
  75. - `jump-to-window`: use `wmctrl` and `dmenu` to pick a window to jump to
  76. - `listusers`: print an HTML list of users
  77. - `notesession`: start a tmux named session for notes
  78. - `photocp`: copy photos from various media to a home directory location
  79. - `pmwhich`: find the on-filesystem location of a Perl module
  80. - `rightnow`: print the current time in a variety of formats
  81. - `saytime`: speak the time with Festival
  82. - `snowday`: is it a snow day for the Boulder Valley School District?
  83. - `timelog`: parse a timelogging format (I use this to bill for contracting)
  84. - `today`: print a date
  85. - `todaydir`: find a p1k3 dir for the current date
  86. - `uni`: search unicode codepoint names (via @chneukirchen)
  87. - `unsorted-unique`: print all lines of input once (just an `awk` one-liner)
  88. - `wip`: move a p1k3 file into a work-in-progress directory
  89. - `words`: split input into individual words
  90. - `xm`: call xmodmap
  91. - `xmonad.start`: personal version of xmonad startup script
  92. - `xtfix`: do a subtle color shift within the current xterm
  93. - `yank`, `unyank`: stash a file path, move it to the current directory
  94. ### fragments
  95. The [fragments](fragments) directory is for code snippets that I write in the
  96. course of testing some idea, checking a technique, or trying to solve a problem
  97. posed by friends on IRC.
  98. They're typically the kind of thing I'd throw in a random file called something
  99. like `test.sh` and overwrite later. It seemed useful to start collecting these
  100. instead.
  101. ### tmux
  102. I use `tmux` for terminal multiplexing (i.e., most of what GNU Screen does).
  103. In practice, this means that I rely on it for
  104. - persistent shell sessions, sometimes attached to multiple machines
  105. - putting a bunch of shell / editor buffers inside one `ssh` or `mosh`
  106. session
  107. - capturing and scrolling back through a bunch of output
  108. My [`.tmux.conf`](home/.tmux.conf) is brief, but does contain one useful
  109. snippet for correcting weird Esc-key behavior in Vim.
  110. ### vim config
  111. - [`.vimrc`](home/.vimrc) - see file for installation details
  112. - uses [Vundle][vundle] to manage plugins and such
  113. - pulls in a ton of plugins, some more useful than others
  114. ### window management
  115. - `.xmodmap`
  116. - capslock -> ctrl
  117. - `.xinitrc`
  118. - sources `.hacksrc` if it exists
  119. - `.Xresources` tweaks xterm behavior and a number of fonts
  120. - behavior changes depending on whether `.hacksrc` is linked to
  121. `.hacksrc_hi_dpi`
  122. - XMonad config -
  123. - `.xmobarrc`, `.xmonad/`
  124. - see [`bin/xmonad.start`](bin/xmonad.start) for a drop-in replacement for
  125. default XMonad startup on some Debian-like systems, including Gnome/Unity
  126. stuff and the like. Perpetually not-quite-right.
  127. building a debian package for dependencies
  128. ------------------------------------------
  129. See instructions in [ns-control](ns-control).
  130. [alan]: https://github.com/acg
  131. [archwiki]: https://wiki.archlinux.org/
  132. [bash-guide]: http://www.tldp.org/LDP/abs/html/
  133. [ben]: https://github.com/benlemasurier
  134. [casey]: https://github.com/caseydentinger/
  135. [chris]: https://github.com/frencil
  136. [dave]: https://stilldavid.com/
  137. [leah]: https://github.com/chneukirchen/
  138. [p1k3]: https://p1k3.com/
  139. [rob]: https://github.com/robacarp/
  140. [todd]: https://uniontownlabs.org/
  141. [tyler]: https://tylercipriani.com/
  142. [userland]: https://p1k3.com/userland-book/
  143. [vimscript]: http://learnvimscriptthehardway.stevelosh.com/
  144. [vimwiki]: https://github.com/vimwiki/vimwiki
  145. [vundle]: https://github.com/VundleVim/Vundle.vim
  146. [wrt]: https://code.p1k3.com/gitea/brennen/wrt
  147. [xmonad]: http://xmonad.org/