@@ -0,0 +1,19 @@ | |||
#!/bin/bash | |||
source ~/.mrecrc | |||
if [ "$1" = "" ] && [ ! -f ~/.mrecname ]; then | |||
echo "mrec <name>" | |||
exit 1 | |||
elif [ "$1" = "" ]; then #stop recording | |||
name=$(cat ~/.mrecname) | |||
rm ~/.mrecname &>/dev/null | |||
sleep 0.2 | |||
mupload ~/.mrecfile.ogv "img/${name}.ogv" | |||
rm ~/.mrecfile.ogv &>/dev/null | |||
else #start recording | |||
rm ~/.mrecname &>/dev/null | |||
sleep 0.2 | |||
echo "$1" > ~/.mrecname | |||
byzanz-record -x "$X" -y "$Y" -w "$W" -h "$H" --delay 0 --exec=mrecsleep ~/.mrecfile.ogv & | |||
fi |
@@ -0,0 +1,5 @@ | |||
#!/bin/bash | |||
while [ -f ~/.mrecname ]; do | |||
sleep 0.1 | |||
done |
@@ -7,7 +7,5 @@ fi | |||
sleep 0.2 | |||
DIR=`mktemp -d` | |||
gnome-screenshot -f "$DIR/pic.png" | |||
scp "$DIR/pic.png" "martin@serve.mort.coffee:/var/www/mort.coffee/d/public/img/${1}.png" | |||
URL="http://d.mort.coffee/img/${1}.png" | |||
echo $URL | xclip | |||
echo $URL | |||
mupload "$DIR/pic.png" "img/${1}.png" |
@@ -0,0 +1,11 @@ | |||
#!/bin/bash | |||
if [ ! -f "$1" ] || [ "$2" == "" ]; then | |||
echo "mupload <file> <name>" | |||
exit 1 | |||
fi | |||
scp "$1" "martin@serve.mort.coffee:/var/www/mort.coffee/d/public/$2" | |||
URL="http://d.mort.coffee/$2" | |||
echo $URL | xclip | |||
echo $URL |
@@ -1,14 +0,0 @@ | |||
#!/bin/sh | |||
path="/var/www/mort.coffee/d/public/" | |||
if [ -d "$1" ]; then | |||
scp -r "$1" serve.mort.coffee:"$path$2" | |||
elif [ -f "$1" ]; then | |||
scp "$1" serve.mort.coffee:"$path$2" | |||
else | |||
echo "Invalid arguments D:" | |||
exit 1 | |||
fi | |||
echo "$1 is now at http://d.mort.coffee/$2" |
@@ -1,30 +1,42 @@ | |||
#!/bin/sh | |||
#!/bin/bash | |||
commands_missing=0 | |||
check_exists() | |||
issues=0 | |||
check_command() | |||
{ | |||
which "$1" 1> /dev/null | |||
if [ "$?" -ne 0 ]; then | |||
commands_missing=1 | |||
issues=1 | |||
echo "Missing command: $1" | |||
fi | |||
} | |||
check_exists "zsh" | |||
check_exists "tmux" | |||
check_exists "vim" | |||
check_exists "python" | |||
check_exists "xdotool" | |||
check_exists "i3" | |||
check_exists "compton" | |||
check_exists "amixer" | |||
check_exists "xbacklight" | |||
check_exists "feh" | |||
check_exists "xclip" | |||
check_exists "xsel" | |||
if [ $commands_missing -ne 0 ]; then | |||
echo "Some commands are missing. Continue? (y/n)" | |||
issues=0 | |||
check_file() | |||
{ | |||
if [ ! -f "$1" ]; then | |||
issues=1 | |||
echo "Missing file: $1" | |||
fi | |||
} | |||
check_command "zsh" | |||
check_command "tmux" | |||
check_command "vim" | |||
check_command "python" | |||
check_command "xdotool" | |||
check_command "i3" | |||
check_command "compton" | |||
check_command "amixer" | |||
check_command "xbacklight" | |||
check_command "feh" | |||
check_command "xclip" | |||
check_command "xsel" | |||
check_command "byzanz-record" | |||
check_file ~/.mrecrc | |||
if [ $issues -ne 0 ]; then | |||
echo "Some commands or files are missing. Continue? (y/n)" | |||
read response | |||
if [ "$response" != "y" ]; then | |||
echo "Aborting." |