Compare commits
No commits in common. "nortega-work" and "master" have entirely different histories.
nortega-wo
...
master
118
d6
118
d6
@ -1,118 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# This is free and unencumbered software released into the public domain.
|
|
||||||
#
|
|
||||||
# Anyone is free to copy, modify, publish, use, compile, sell, or
|
|
||||||
# distribute this software, either in source code form or as a compiled
|
|
||||||
# binary, for any purpose, commercial or non-commercial, and by any
|
|
||||||
# means.
|
|
||||||
#
|
|
||||||
# In jurisdictions that recognize copyright laws, the author or authors
|
|
||||||
# of this software dedicate any and all copyright interest in the
|
|
||||||
# software to the public domain. We make this dedication for the benefit
|
|
||||||
# of the public at large and to the detriment of our heirs and
|
|
||||||
# successors. We intend this dedication to be an overt act of
|
|
||||||
# relinquishment in perpetuity of all present and future rights to this
|
|
||||||
# software under copyright law.
|
|
||||||
#
|
|
||||||
# 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 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.
|
|
||||||
#
|
|
||||||
# For more information, please refer to <http://unlicense.org/>
|
|
||||||
|
|
||||||
VERSION="1.0"
|
|
||||||
|
|
||||||
function print_usage() {
|
|
||||||
echo "USAGE: d6 [OPTIONS]"
|
|
||||||
}
|
|
||||||
|
|
||||||
function print_help() {
|
|
||||||
print_usage
|
|
||||||
echo "OPTIONS:
|
|
||||||
-v print program version
|
|
||||||
-h print this help information
|
|
||||||
-n <num> number of words in generated password (default 3)
|
|
||||||
-f <file> custom dictionary file (default
|
|
||||||
~/.local/share/wordlist.txt)
|
|
||||||
-d <delim> delimiter used between words (default \"\", i.e. NONE)
|
|
||||||
-c <case> the case used for the generated words, can be: upper,
|
|
||||||
lower, capital (default \"capital\")"
|
|
||||||
}
|
|
||||||
|
|
||||||
function test_case() {
|
|
||||||
if [ $1 != "lower" ] && [ $1 != "upper" ] && [ $1 != "capital" ]
|
|
||||||
then
|
|
||||||
return 1
|
|
||||||
else
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
NUM_WORDS=3
|
|
||||||
WORDLIST="$HOME/.local/share/wordlist.txt"
|
|
||||||
DELIMITER=""
|
|
||||||
CASE="capital"
|
|
||||||
|
|
||||||
while getopts "vhn:f:d:c:" arg
|
|
||||||
do
|
|
||||||
case $arg in
|
|
||||||
v)
|
|
||||||
echo "d6 v$VERSION"
|
|
||||||
exit 0;;
|
|
||||||
h)
|
|
||||||
print_help
|
|
||||||
exit 0;;
|
|
||||||
n)
|
|
||||||
NUM_WORDS=$OPTARG;;
|
|
||||||
f)
|
|
||||||
WORDLIST="$OPTARG";;
|
|
||||||
d)
|
|
||||||
DELIMITER="$OPTARG";;
|
|
||||||
c)
|
|
||||||
if test_case $OPTARG
|
|
||||||
then
|
|
||||||
CASE="$OPTARG"
|
|
||||||
else
|
|
||||||
echo "'$OPTARG' is an invalid case. Use 'capital', 'lower', or 'upper'."
|
|
||||||
exit 1
|
|
||||||
fi;;
|
|
||||||
?)
|
|
||||||
print_usage
|
|
||||||
exit 2
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
WORDS=""
|
|
||||||
|
|
||||||
for i in $(seq 1 $NUM_WORDS)
|
|
||||||
do
|
|
||||||
ROLLS=""
|
|
||||||
for j in {1..5}
|
|
||||||
do
|
|
||||||
ROLLS="$((1 + $RANDOM % 6))$ROLLS"
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ $CASE == "upper" ]
|
|
||||||
then
|
|
||||||
WORD="$(awk "/$ROLLS/{ print toupper(\$2) }" $WORDLIST)"
|
|
||||||
elif [ $CASE == "lower" ]
|
|
||||||
then
|
|
||||||
WORD="$(awk "/$ROLLS/{ print tolower(\$2) }" $WORDLIST)"
|
|
||||||
else
|
|
||||||
WORD="$(awk "/$ROLLS/{ print \$2 }" $WORDLIST)"
|
|
||||||
WORD="${WORD^}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $i -eq $NUM_WORDS ]
|
|
||||||
then
|
|
||||||
WORDS="${WORDS}${WORD}"
|
|
||||||
else
|
|
||||||
WORDS="${WORDS}${WORD}${DELIMITER}"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "$WORDS"
|
|
10
setbg
10
setbg
@ -1,12 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [ $# -gt 1 ]
|
[ $# -ne 1 ] &&
|
||||||
then
|
echo "Requires an image argument." &&
|
||||||
echo "Too many arguments"
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
|
||||||
|
|
||||||
[ $# -eq 1 ] &&
|
|
||||||
cp $1 $HOME/.local/share/wallpaper.jpg
|
|
||||||
|
|
||||||
|
cp $1 $HOME/.local/share/wallpaper.jpg
|
||||||
xwallpaper --zoom $HOME/.local/share/wallpaper.jpg
|
xwallpaper --zoom $HOME/.local/share/wallpaper.jpg
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
df -h | awk '{ if ($6 == "/") printf "/: " $4; }' > $HOME/.cache/free-space
|
df -h | awk '{ if ($6 == "/") printf "/: " $4; if ($6 == "/home") printf " home: " $4; if ($6 == "/home/music") printf " music: " $4; }' > $HOME/.cache/free-space
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
DATE="$(date +"%F %H:%M" )"
|
DATE="$(date +"%F %H:%M" )"
|
||||||
NETWORK="wlan: $(cat /sys/class/net/wlp2s0/operstate)"
|
NETWORK="eth: $(cat /sys/class/net/enp34s0/operstate)"
|
||||||
SPACE="$(cat $HOME/.cache/free-space)"
|
SPACE="$(cat $HOME/.cache/free-space)"
|
||||||
vol_status="$(cat $HOME/.cache/audio-control/vol_status)"
|
vol_status="$(cat $HOME/.cache/audio-control/vol_status)"
|
||||||
vol_level="$(cat $HOME/.cache/audio-control/vol_level)%"
|
vol_level="$(cat $HOME/.cache/audio-control/vol_level)%"
|
||||||
VOLUME="$vol_status $vol_level"
|
VOLUME="$vol_status $vol_level"
|
||||||
UPDATES="Upd: $(cat $HOME/.cache/update_count)"
|
UPDATES="Upd: $(checkupdates -n | wc -l)"
|
||||||
xsetroot -name "$VOLUME | $NETWORK | $SPACE | $UPDATES | $DATE"
|
xsetroot -name "$VOLUME | $NETWORK | $SPACE | $UPDATES | $DATE"
|
||||||
|
Loading…
Reference in New Issue
Block a user