about summary refs log tree commit diff stats
path: root/bin/pw
diff options
context:
space:
mode:
authorEnsa <@>2020-05-01 17:39:45 -0700
committerEnsa <@>2020-05-01 17:39:45 -0700
commit2b52ba86897ed947976d560fc1a1eb1a8499c451 (patch)
treed1a0d2d82a7907d308b99bbd3fc827cfad20f981 /bin/pw
parentc4632455cff4a5097a3a35ad9d0531388776d028 (diff)
downloadcfg-2b52ba86897ed947976d560fc1a1eb1a8499c451.tar.gz
cwm added, general updates, etc
bother
	made the WM detection and X startup file detection more robust
comm-sel
	replaced 6cord with cordless
	made the default case do nothing so it's less annoying
lh
	removed ipc-server garbage
	changed the audio group to allow for streaming audio to mpv
		(this works with livestream audio files)
mbsync-cron
	moved config file to $XDG_CONFIG_HOME/mbsync/mbsyncrc
	made error exits actually error (helps with crontab -n)
	renamed old popmail touch file to something more nominally
	appropriate
		same with notify-send --app-name
cwmrc
	reading it, DEPENDENCIES.md, and `man cwmrc` will more than
	explain everything in here.
	except the commented binds, these are behaviours cwm does not
	have.
completions.ksh
	self-explanatory. read it.
diraliases
	added ~bin for user binaries dir
	added ~ksh for ksh config dir
	added ~pass for password database
kshrc
	added safeguards for ensuring used directories exist
	switched lfcd source to a test and source
prompt.ksh
	better sep symbols
	git branch occupies less space
lfrc
	added auto-upload to ttm.sh, bound to t
init.vim
	switched colourscheme to zellner
	removed syntastic checker specifiers,
		now uses aggregate checks.
	syntastic_c_compiler set to cc, symlink your preferred compiler
	to ~bin/cc
	switched ectags to ctags
	enabled folds
shrc
	ALTSCR: terminal you want to use for programs that already have
	scrollback. set to "$TERMINAL" if you don't have one.
	fiddled with LESS, hopefully better now
	$TODO is the file todo(1) uses.
	ENV: file ksh sources on startup.
6cord.toml
	removed because it's abandoned now.
colors-wal-dwm.h
	removed because i don't use dwm anymore.
dunstrc, zathurarc
	now uses cozette font
Diffstat (limited to 'bin/pw')
-rwxr-xr-xbin/pw25
1 files changed, 2 insertions, 23 deletions
diff --git a/bin/pw b/bin/pw
index cec9e54..fa33761 100755
--- a/bin/pw
+++ b/bin/pw
@@ -1,25 +1,4 @@
 #!/bin/sh
-# generates a password of length $1, sends it to stdout if $2 is blank.
-# if $2 is clip, sends it to the X clipboard and clears it after 10 seconds.
-# if $2 is anything else, sends it to the X primary selection and clears it after 10 seconds
-if [ "$1" = "-h" ]; then
-  printf 'usage: %s [-h]|LENGTH [clip|pri]\n' "$(basename $0)">/dev/stderr
-  return 1
-fi
+# generates a password of length $1.
 PW=$(tr -cd "[:alnum:][:punct:]"</dev/urandom|fold -w "$1"|head -1)
-if [ -n "$2" ]; then
-    # streamline selection variation by using $SEL
-    if [ "$2" = "clip" ]; then
-	    SEL="-sel clip"
-    else
-	    SEL=""
-    fi
-    # backgrounds so the user doesn't have to wait 10 seconds to get a prompt again
-      {
-      printf "%s" "$PW"|xclip $SEL -i&&notify-send "Password Generated" "$1-character password generated. It will clear in 10 seconds."
-      sleep 10
-      printf '\0'|xclip $SEL -i&&notify-send "Clipboard Cleared" "Generated password cleared from clipboard."
-      } &
-else
-  printf '%s\n' "$PW"
-fi
+printf '%s\n' "$PW"