restructuring

This commit is contained in:
David Todd
2020-03-25 14:26:51 -05:00
parent f9660904b3
commit a324612c70
36 changed files with 42 additions and 170 deletions

12
bin/screencast2gif.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
date=$(date +%Y-%m-%d-%s)
ffmpeg() {
command ffmpeg -hide_banner -loglevel error -nostdin "$@"
}
ffcast -q $(while slop -q -n -f '-g %g ';do :;done) rec ~/Videos/screencast-${date}.mp4
ffmpeg -i ~/Videos/screencast-${date}.mp4 -vf palettegen -f image2 -c:v png - |
ffmpeg -i ~/Videos/screencast-${date}.mp4 -i - -filter_complex paletteuse ~/Pictures/screencast-${date}.gif && notify-send "Gif recorded to ~/Pictures/screencast-${date}"

18
bin/screenshotter.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
# Simple screenshot uploader
# The web server is nginx and configured with h5ai to be a file manager
# Copyright (c) 2019 David Todd (c0de) c0de@c0defox.es
DATE=$(date +%Y-%m-%d-%s).png
FILENAME=~/Pictures/$DATE
maim -s $FILENAME&
wait $!
notify-send "Uploading Screenshot"
scp $FILENAME web.foxnet.space:/var/www/c0de.link/pics&
wait $!
echo https://i.c0de.link/$DATE | xclip -selection clipboard
notify-send "Link copied to Clipboard"

27
bin/wallpaper.sh Executable file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
shopt -s nullglob
#===change these config start===
#wallpapers directory path
path=~/Pictures/Wallpapers
#time interval
interval=5m
#===change these config end===
cd $path
while true; do
files=()
for i in *.jpg *.png; do
[[ -f $i ]] && files+=("$i")
done
range=${#files[@]}
((range)) && feh --bg-scale "${files[RANDOM % range]}"
sleep $interval
done