diff options
| author | Timmy Keller <tjk@tjkeller.xyz> | 2021-12-23 22:20:14 -0600 | 
|---|---|---|
| committer | Timmy Keller <tjk@tjkeller.xyz> | 2021-12-23 22:20:14 -0600 | 
| commit | f4b77c42ca78c5265c4754caeef5289e3841f5e9 (patch) | |
| tree | bad69cda55721e2230d909b16d438f4472105db1 | |
| parent | 63505f644d8f2bf8c9d4ca493048081f83532cf8 (diff) | |
| download | scripts-f4b77c42ca78c5265c4754caeef5289e3841f5e9.tar.xz scripts-f4b77c42ca78c5265c4754caeef5289e3841f5e9.zip  | |
some youtube dl script and dmenu runapplication and test timmywm and modified other scripts idjlol
| -rwxr-xr-x | launch/dmenu_runapp | 4 | ||||
| -rwxr-xr-x | launch/virt | 6 | ||||
| -rwxr-xr-x | misc/mime | 9 | ||||
| -rwxr-xr-x | video/ffconcat | 17 | ||||
| -rwxr-xr-x | video/ytdl-dlplst | 5 | ||||
| -rwxr-xr-x | x11/testtimmywm | 6 | 
6 files changed, 31 insertions, 16 deletions
diff --git a/launch/dmenu_runapp b/launch/dmenu_runapp new file mode 100755 index 0000000..bf0e148 --- /dev/null +++ b/launch/dmenu_runapp @@ -0,0 +1,4 @@ +#!/bin/sh +apps=/usr/share/applications +name="$(grep -rh -m1 '^Name=' $apps | cut -d'=' -f2- | sort | uniq | dmenu "$@")" +$(grep '^Exec=[^%]*' -o -m1 $(grep -rl -m1 "$name" $apps) | cut -d'=' -f2-) & diff --git a/launch/virt b/launch/virt index f1035a0..9706106 100755 --- a/launch/virt +++ b/launch/virt @@ -10,15 +10,15 @@ startvm() {  		-m $(halfram) \  		-smp $(halfthreads) \  		-net nic \ -		-nographic \ -		-vga none \ +		-display sdl,gl=on \  		-audiodev pa,id=pa1,server=/run/user/1000/pulse/native \  		-soundhw all \  		-boot menu=on \  		-drive file="$virtdir/$1.img" \  ; } +		#-vga none \ +		#-nographic \ -		#-display sdl,gl=on \  vms="$(ls $virtdir)"  [ -n "$1" ] && vm="$1" || vm=$(echo "$vms" | sed 's/\.img//' | dmenu -p "Choose Virtual Machine Image or Enter Name for New Virtual Machine") @@ -65,6 +65,7 @@ echo  # Choose subtype  mtypefile="$cachedir/$mtype.csv"  [ -e "$mtypefile" ] && interactiveopt "all\n$(cut -d',' -f1 "$mtypefile" | tail -n +2)" "Choose $mtype subtype: " "" col +mfiletypes=" $opt "  echo  # Choose program @@ -73,8 +74,12 @@ program="$opt"  echo "$program"  echo +#echo "$mfiletypes" | grep ' all ' && mfiletypes="$(cut -d',' -f1 "$cachedir/$mtype.csv" | tail -n +2)" +  # Xdg-mime commands -#echo "All $mtype Types\n$(cut -d',' -f1 "$cachedir/image.csv" | tail -n +2)"  #cut -d',' -f2 "$cachedir/image.csv" -#[ -n "$mimetype" ] && xdg-mime default $application.desktop $mimetype +for mfiletype in $(cut -d',' -f1 "$cachedir/$mtype.csv" | tail -n +2); do +	echo "Changing default program for $mfiletype to $program" +	xdg-mime default "$program.desktop" $mfiletype +done diff --git a/video/ffconcat b/video/ffconcat index 7e903f6..06eb066 100755 --- a/video/ffconcat +++ b/video/ffconcat @@ -1,17 +1,12 @@  #!/bin/sh -#for out; do true; done # get last argument -filelist=$(mktemp ${TMPDIR:-/tmp}/ffconcat.XXXXXX) || exit -pwd="$(pwd)" -for out; do -	[ -e "$pwd/$out" ] \ -	&& files="$pwd/$out\n$files" \ -	|| ([ -e "$out" ] && files="$out\n$files") -done -echo $files | tail +2 | sed -n "s/\(.\+\)/file '\1'/p"# > $filelist +ffconcat="$(ls | sed "s/^/file '/; s/$/'/")" +echo "$ffconcat" > ffconcat  ffmpeg \  	-f concat \  	-safe 0 \ -	-i $filelist \ +	-i ffconcat \  	-c copy \ -	$out +	out.mkv + +rm ffconcat diff --git a/video/ytdl-dlplst b/video/ytdl-dlplst new file mode 100755 index 0000000..f7b4a47 --- /dev/null +++ b/video/ytdl-dlplst @@ -0,0 +1,5 @@ +#!/bin/sh +echo "Getting Video ID's..." +for id in $(youtube-dl --get-id "$1"); do +	youtube-dl --newline "https://youtu.be/$id" & +done diff --git a/x11/testtimmywm b/x11/testtimmywm new file mode 100755 index 0000000..330a328 --- /dev/null +++ b/x11/testtimmywm @@ -0,0 +1,6 @@ +#!/bin/sh + +Xephyr -br -ac -reset -screen 2160x1440 :1 & +sleep 1 +export DISPLAY=:1 +timmywm &  | 
