Update scripts and services.

- create cde-kicad for themed KiCad
- create sndio_volume: requires patched sndioctl to work
- change redshift service to gamma one, use gammastep. gammastep still
  needs to be accepted into void repos
- add download code for cdetheme in sourcecode/install.sh
- update meow and purr
- clean up do-not (thanks skarnet and heliocat) / add completion for it
This commit is contained in:
Érico Rolim 2020-09-05 00:07:23 -03:00
parent 8e88f2af7d
commit 014a1979d4
9 changed files with 43 additions and 14 deletions

2
embedded/.local/bin/cde-kicad Executable file
View File

@ -0,0 +1,2 @@
#!/bin/execlineb -S0
export GTK_THEME cdetheme kicad $@

View File

@ -0,0 +1,4 @@
function __fish_complete_do_not_subcommand
__fish_complete_subcommand --commandline $args
end
complete -c do-not -x -a "(__fish_complete_do_not_subcommand)"

View File

@ -1,5 +1,8 @@
#!/bin/execlineb -S1
foreground
{ $@ }
notify-send "Done with: $@"
backtick -n OUT
{ echo $@ }
importas -u OUT OUT
notify-send "Done with:" "$OUT"
# do and notify it's done

4
media/.local/bin/sndio_volume Executable file
View File

@ -0,0 +1,4 @@
#!/bin/execlineb -P
pipeline -d
{ sndioctl -m -n output.level }
sed -r "s/output\\.level=([[:digit:]]\\.[[:digit:]]+).*/\\1/"

View File

@ -7,26 +7,29 @@ SSHFS=
CBC=
SUBPROJECTS=
MPV=
THEMES=
while [ $# -gt 0 ]; do
case $1 in
all) GOINSTALL=1
SSHFS=1
CBC=1
SUBPROJECTS=1
MPV=1
CBC=1
THEMES=1
;;
go) GOINSTALL=1 ;;
sshfs) SSHFS=1 ;;
cbc) CBC=1 ;;
sub) SUBPROJECTS=1 ;;
mpv) MPV=1;;
theme) THEMES=1;;
esac
shift
done
# create local dirs
mkdir -p "$HOME/.local/bin" "$HOME/.local/share" "$HOME/.config"
mkdir -p "$HOME/.local/bin" "$HOME/.local/share/themes" "$HOME/.config"
export PREFIX="$HOME/.local"
if [ "$GOINSTALL" ]; then
@ -55,3 +58,17 @@ if [ "$MPV" ]; then
mkdir -p "$HOME/.config/mpv/scripts/"
ln -sf /usr/lib/mpv-mpris/mpris.so "$HOME/.config/mpv/scripts"
fi
if [ "$THEMES" ]; then
TMPDIR="$(mktemp -d /tmp/ericonr.XXXXXX)"
# TODO: host in a better place
# theme from https://www.pling.com/s/Gnome/p/1231025/
xbps-fetch -o ${TMPDIR}/cdetheme.tar.gz -s "https://dllb2.pling.com/api/files/download/j/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6IjE1MjU3Mzc1MTAiLCJ1IjpudWxsLCJsdCI6ImRvd25sb2FkIiwicyI6ImUyYjAyNTFmYzNhZTRjODYzODFhNzczMjYxYzJjMzZiYWU4YTYwYzdhOTAxOTVkMWYzYTUyMmY5MzRiMDFjMWY0ZWUxNjRmYjUwZjZjZjM3Y2NlMmI0Y2QxNWZhNWI1ZmQ5OGY2NjllYTUyYjMzMGZlYWFhNWYwZmExYTdiZjY5IiwidCI6MTU5OTI3OTQ2MCwic3RmcCI6ImVhYjUyMGMyNTJjZjYwZDFlZjhkZTU5ODZjZWM3MThkIiwic3RpcCI6IjE3Ny4xOTQuNjQuMjE1In0.5p8c_SVhRQC7ANItSMK8fqjw3AItLXYFc1Y8TK8UP4c/cdetheme1.3.tar.gz"
if [ "858d9cfc2962034e577db968667d9ce1ef4e0b76a109dd15ca2c065e3009f499" = "$(xbps-digest ${TMPDIR}/cdetheme.tar.gz)" ]; then
bsdtar xvf ${TMPDIR}/cdetheme.tar.gz -C $HOME/.local/share/themes
ln -s cdetheme1.3/cdetheme $HOME/.local/share/themes/cdetheme
ln -s cdetheme1.3/cdetheme-solaris $HOME/.local/share/themes/cdetheme-solaris
else
echo "error when downloading"
fi
fi

View File

@ -1,10 +1,9 @@
#!/bin/sh
# we need to generate a 256 byte random key
# for using the aes-256-cbc cipher
key="$(openssl rand -hex 32)"
url="$(openssl enc -aes-256-cbc -K ${key} -iv 00000000000000000000000000000000 -e -base64 -A < ${1:-/dev/stdin} | purr)"
website="${url%\/*}/paste.html#${url##*\/}_${key}"
echo $website
[ "$WAYLAND_DISPLAY" ] && echo -n $website | wl-copy
iv="$(openssl rand -hex 12)"
# calculate its encryption and upload it
url="$(openssl enc -aes-256-cbc -K ${key} -iv ${iv} -e -base64 -A < ${1:-/dev/stdin} | purr)"
printf '%s\n' "${url%\/*}/paste.html#${url##*\/}_${key}_${iv}"
[ "$WAYLAND_DISPLAY" ] && printf '%s' "${url%\/*}/paste.html#${url##*\/}_${key}_${iv}" | wl-copy

View File

@ -1,6 +1,5 @@
#!/bin/sh
website="$(curl --silent --data-binary "@${1:-/dev/stdin}" bsd.ac:42069)"
website="$(curl --silent ${DEBUG:+--trace-ascii "%"} --data-binary "@${1:-/dev/stdin}" bsd.ac:42069)"
echo $website
[ "$WAYLAND_DISPLAY" ] && echo -n $website | wl-copy

View File

@ -0,0 +1,2 @@
#!/bin/execlineb -P
gammastep -l -22.9:-47.1 -m wayland -t 4500:4500

View File

@ -1 +0,0 @@
/usr/bin/redshift