others changes.
This commit is contained in:
parent
4c5fbffec8
commit
46c2b68f03
36
fftext.sh
36
fftext.sh
|
@ -1,36 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
. $HOME/.wmvar
|
||||
|
||||
OPT=$1 # input flag
|
||||
INPUT=$2 # input video file
|
||||
OUTPUT=$3 # output video file
|
||||
TEXT=$( echo $4) # text to draw
|
||||
VW=$(ffprobe -v error -select_streams v -show_entries stream=width -of csv=p=0:s=x $INPUT) # video width
|
||||
VH=$(ffprobe -v error -select_streams v -show_entries stream=height -of csv=p=0:s=x $INPUT) # video height
|
||||
|
||||
usage() {
|
||||
echo "usage:
|
||||
fftext.sh [ -c, -s ] <input_file> <output_file> / <text> /
|
||||
-c) centered text
|
||||
-s) signature
|
||||
-t) titles"
|
||||
}
|
||||
|
||||
case $OPT in
|
||||
-c) # centered
|
||||
ffmpeg -i $INPUT -vf "drawtext=fontfile=/usr/share/fonts/truetype/dejavu/DejaVuSans-bold.ttf:text=$TEXT:fontcolor=white:fontsize=64:box=1:boxcolor=black@0.5:boxborderw=5:x=(w-text_w)/2:y=(h-text_h)/2" -codec:a copy $OUTPUT
|
||||
;;
|
||||
-s) # signature
|
||||
x=$((VW - 360))
|
||||
y=$((VH - 60))
|
||||
ffmpeg -i $INPUT -vf "drawtext=fontfile=/usr/share/fonts/truetype/dejavu/DejaVuSans-BoldOblique.ttf:text="$SIGNATURE":fontcolor=white@0.5:fontsize=44:box=1:boxcolor=black@0.5:boxborderw=5:x=$x:y=$y" -codec:a copy $OUTPUT
|
||||
;;
|
||||
-t)
|
||||
y=$((VH - 60))
|
||||
ffmpeg -i $INPUT -vf "drawtext=fontfile=/usr/share/fonts/truetype/dejavu/DejaVuSans-bold.ttf:text=$TEXT:fontcolor=white:fontsize=64:box=1:boxcolor=black@0.0:boxborderw=5:x=(w-text_w)/2:y=$y" -codec:a copy $OUTPUT
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
;;
|
||||
esac
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
|
||||
## upload files and share with transfer.sh ##
|
||||
|
||||
TARGET=$1
|
||||
|
||||
# do the thing
|
||||
if [ -n "$TARGET" ]; then
|
||||
# filename=$($TARGET##*/) # file name
|
||||
|
||||
# upload file and save stdout to paste
|
||||
# curl --upload-file "$TARGET" https://transfer.sh/"$filename" | xclip
|
||||
curl -F "file=@$TARGET" -F "secret=" https://0x0.st | xclip
|
||||
|
||||
# to paste somewhere else other than terminal
|
||||
xclip -o | xclip -sel c
|
||||
fi
|
||||
|
|
@ -26,12 +26,13 @@ esac
|
|||
|
||||
# do the thing
|
||||
if [ -n "$filter" ]; then
|
||||
filepath=$(find $HOME -type f | grep -E "$filter" | noxfzfm.sh) # path to file
|
||||
filename=${filepath##*/} # file name
|
||||
filepath=$(find $HOME -type f | grep -E "$filter" | fzfmenu.sh) # path to file
|
||||
# filename=${filepath##*/} # file name
|
||||
|
||||
if [ -n "$filepath" ]; then # if filepath
|
||||
# upload file and save stdout to paste
|
||||
curl --upload-file "$filepath" https://transfer.sh/"$filename" > /tmp/noxtsh
|
||||
# curl --upload-file "$filepath" https://transfer.sh/"$filename" > /tmp/noxtsh
|
||||
curl -F "file=@$TARGET" -F "secret=" https://0x0.st > /tmp/noxtsh
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
## podcast player ##
|
||||
|
||||
PD="$HOME/Descargas/ytdl" # podcast dir
|
||||
TD="/tmp/trash" # trash dir
|
||||
|
||||
# make the trash dir
|
||||
if [ ! -d $TD ]; then
|
||||
mkdir $TD
|
||||
fi
|
||||
|
||||
# remove ugly spaces between
|
||||
spacekiller.sh $PD
|
||||
|
||||
TARGET=$(find $PD -type f | grep -v .part | fzfmenu.sh)
|
||||
if [ -n "$TARGET" ]; then # if target
|
||||
mplayer "$TARGET" # play it
|
||||
cp "$TARGET" $TD # copy it to trash dir
|
||||
rm "$TARGET" # remove it
|
||||
fi
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh
|
||||
|
||||
# crap with dmenu to browse/open files #
|
||||
# depends on vi-nucke.sh #
|
||||
|
||||
# a loop ending with ":quit"
|
||||
while true; do
|
||||
TARGET=$(ls | dmenu.sh) # file/directory target
|
||||
if [ -d "$TARGET" ]; then # if target is a directory
|
||||
cd "$TARGET" # move to it (Obviously if target is ".." it goes back a directory)
|
||||
|
||||
elif [ "$TARGET" = :quit ]; then # if target is ":quit"
|
||||
break # exit loop
|
||||
|
||||
else # if target is a file
|
||||
vi-nuke.sh "$TARGET" # vi-nuke.sh will try to open it
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ COLORS="-menu-background-color 0x000000 \
|
|||
-scroll-bar-frame-color 0x$IC"
|
||||
|
||||
BROWSER="links2 -g $COLORS"
|
||||
XSEL=$(atomx CUT_BUFFER0 $(lsw -r))
|
||||
XSEL=$(xclip -o)
|
||||
|
||||
echo $XSEL | grep -Eq "^https://|^http://" && $BROWSER $XSEL \
|
||||
|| $BROWSER "https://duckduckgo.com/?q=$XSEL"
|
||||
|
@ -18,3 +18,4 @@ echo $XSEL | grep -Eq "^https://|^http://" && $BROWSER $XSEL \
|
|||
## xselection ##
|
||||
# under xprop: XSEL=$(xprop -root | awk -F "=" '/CUT_BUFFER0/ {gsub("\"","",$2); print $2}')
|
||||
# under wmutils: XSEL=$(atomx CUT_BUFFER0 $(lsw -r))
|
||||
# with xclip: XSEL=$(xclip -o)
|
||||
|
|
16
zathura.sh
16
zathura.sh
|
@ -1,16 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
. $HOME/.config/wms/wms_var
|
||||
|
||||
INPUT=$1
|
||||
DOCDIR="$HOME/Documentos"
|
||||
|
||||
if [ -n "$INPUT" ] && [ -f "$INPUT" ]; then
|
||||
zathura $INPUT
|
||||
|
||||
else
|
||||
doc=$(find $DOCDIR -type f | grep ".pdf" | $XMENU_XL)
|
||||
if [ -n "$doc" ]; then
|
||||
zathura "$doc"
|
||||
fi
|
||||
fi
|
Loading…
Reference in New Issue