Browse Source

update README, rm grab for licensing reasons

main
Brennen Bearnes 1 year ago
parent
commit
42dbd4e3ab
3 changed files with 20 additions and 137 deletions
  1. +20
    -27
      README.md
  2. +0
    -108
      home/bin/grab
  3. +0
    -2
      home/bin/grab-sel

+ 20
- 27
README.md View File

@ -12,7 +12,7 @@ will eventually become standalone projects.
I generally use Debian and Debian-like GNU/Linux systems (including Ubuntu),
with the [xmonad][xmonad] tiling window manager rather than a full desktop
environment like Gnome or KDE. I usually edit text in Vim, with
[Vimwiki][vimwiki] for notes. I maintain a blog called [p1k3][p1k3] using
[VimWiki][vimwiki] for notes. I maintain a blog called [p1k3][p1k3] using
[wrt][wrt].
I have a [partially-finished book about the command line][userland] which may
@ -21,7 +21,7 @@ be relevant.
status
------
As of February 2020, this collection is actively maintained, although it
As of October 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.
@ -34,28 +34,17 @@ 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.
a philosophical note about copying
----------------------------------
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.
In the _general case_, I'm a proponent of Free Software, and correspondingly of
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.)
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
@ -64,8 +53,8 @@ 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.
the Debian Free Software Guidelines. In the latter case, I'll do my best to
ensure that said code is clearly marked.
sources
-------
@ -92,10 +81,10 @@ contents
### shell stuff
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.
At this writing 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 pretty often anyway.
- [`.bashrc`](home/.bashrc)
- [`.zshrc`](home/.zshrc) - nothing fancy
@ -200,9 +189,13 @@ snippet for correcting weird Esc-key behavior in Vim.
### vim config
My Vim setup was once written to be easily copied by new users. It's gotten a
little out of hand since then.
- [`.vimrc`](home/.vimrc) - see file for installation details
- uses [Vundle][vundle] to manage plugins and such
- pulls in a ton of plugins, some more useful than others
- has a bunch of customization for [VimWiki][vimwiki]
### window management


+ 0
- 108
home/bin/grab View File

@ -1,108 +0,0 @@
#!/usr/bin/env bash
# forked from Tyler at:
# https://github.com/thcipriani/dotfiles
# https://github.com/thcipriani/dotfiles/commit/1c39af38fafaf24a22474930d18d77edb8931611
#
# TODO:
# [ ] uploads
show_help() {
cat<<USE
USAGE:
grab [screenshotname]
OPTIONS:
--select|-s: use selection rectangle
--public|-p: upload it to https://squiggle.city/~brennen/images/
EXAMPLE:
grab --select --public whatchamajig
USE
}
simple_shot() {
scrot "${_SCREEN_PATH:=$HOME/workspace/screenshots}/Screenshot-%Y-%m-%d-%T.png"
printf "[\033[38;5;2mGOT IT\033[00m] ${_SCREEN_PATH:=$HOME/workspace/screenshots}/Screenshot-$(date +%Y-%m-%d-%T).png\n"
}
take_shot() {
default_path="Screenshot-%Y-%m-%d-%T"
if (( $(printf "$path" | wc -c) < 1 )); then
path="$default_path"
grabname=1
else
filename="/${path}.png"
fi
options=''
if (( select == 1 )); then
options="-s"
printf "[\033[38;5;2mSELECT\033[00m] Waiting for your selection\n"
fi
\scrot ${options} "${_SCREEN_PATH:=$HOME/workspace/screenshots}/${path}.png"
if (( grabname == 1 )); then
filename="/Screenshot-$(date +%Y-%m-%d-%T).png"
fi
if (( $public == 1 )); then
make_public "${_SCREEN_PATH:=$HOME/workspace/screenshots}" "$filename"
else
printf "[\033[38;5;2mGOT IT\033[00m] ${_SCREEN_PATH:=$HOME/workspace/screenshots}${filename}\n"
fi
}
make_public() {
if ! command -v scp > /dev/null 2>&1; then
printf "[\033[5;38;5;1mERR\033[00m] scp command not found in $PATH\n"
fi
if (( $# < 2 )); then
printf "[\033[5;38;5;1mERR\033[00m] need a path and a folder\n"
fi
scp "${1}${2}" squiggle.city:~/public_html/images/
printf "[\033[38;5;2mURL\033[00m] https://squiggle.city/~brennen/images${2}\n"
}
main () {
if ! command -v scrot > /dev/null 2>&1; then
printf "[\033[5;38;5;1mERR\033[00m] scrot command not found in $PATH\n"
fi
mkdir -p "${_SCREEN_PATH:=$HOME/workspace/screenshots}"
if (( $# == 0 )); then
simple_shot
exit 0
fi
select=0
public=0
while [ -n "$1" ]; do
case "$1" in
--select|-s)
select=1
;;
--public|-p)
public=1
;;
--help|-h)
show_help
exit 0
;;
*)
path="$1"
esac
shift
done
take_shot
}
main "$@"

+ 0
- 2
home/bin/grab-sel View File

@ -1,2 +0,0 @@
#!/bin/sh
grab -s

Loading…
Cancel
Save