scripts

Random scripts
git clone git://git.margiolis.net/scripts.git
Log | Files | Refs | README | LICENSE

commit ee3ce1af8553c1099fca3415cb47183dea0d5ad1
parent ba93d8a63ade74990ee3d0ca523eefc260f9ce99
Author: Christos Margiolis <christos@margiolis.net>
Date:   Mon,  4 Apr 2022 03:27:15 +0300

added android mount/unmount scripts

Diffstat:
MMakefile | 2++
Amntdroid | 9+++++++++
Mscreencast | 4+++-
Aumntdroid | 7+++++++
4 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile @@ -9,6 +9,7 @@ SCRIPTS = ausplit \ extr \ fontupd \ irssi_torconf \ + mntdroid \ namefmt \ newsboat_bookmark \ passget \ @@ -19,6 +20,7 @@ SCRIPTS = ausplit \ setscreens \ sysact \ tag \ + umntdroid \ unix \ upd \ vdq \ diff --git a/mntdroid b/mntdroid @@ -0,0 +1,9 @@ +#!/bin/sh + +MTPT="/mnt/droid" + +n=$(simple-mtpfs -l 2>/dev/null | dmenu -i -p "Available devices" | cut -f1 -d':') +mkdir -p "${MTPT}/${n}" +simple-mtpfs --device "${n}" -o allow_other "${MTPT}/${n}" | dmenu -p "Check" >/dev/null +simple-mtpfs --device "${n}" -o allow_other "${MTPT}/${n}" && +echo "Android device mounted to: ${MTPT}/${n}" | nfy diff --git a/screencast b/screencast @@ -4,4 +4,6 @@ ffmpeg -y \ -f x11grab \ -s $(xrandr | grep "connected primary" | awk '{print $4}' | sed 's/+0+0//') \ -i :0.0 \ - -c:v libx264 -r 30 -c:a mp3 ${1} + -f oss -i /dev/dsp -filter:a "asetpts=N/SR/TB" \ + -c:v libx264 -r 30 -c:a mp3 \ + ${1} diff --git a/umntdroid b/umntdroid @@ -0,0 +1,7 @@ +#!/bin/sh + +MTPT="/mnt/droid" + +n=$(simple-mtpfs -l 2>/dev/null | dmenu -i -p "Available devices" | cut -f1 -d':') +umount "${MTPT}/${n}" +rm -rf "${MTPT}/${n}"