commit 746cccfe9c682792c0db1a50f52a18fd64125517
parent bbefeefd651b762ecd90e919ce45cabc7e843c18
Author: Hayden Hamilton <hayden@haydenvh.com>
Date: Wed, 22 Jan 2020 20:30:59 +0000
Relicensing to MIT
Diffstat:
2 files changed, 22 insertions(+), 12 deletions(-)
diff --git a/.scripts/bin/misc/urlhand b/.scripts/bin/misc/urlhand
@@ -6,27 +6,29 @@ clear
count=0
IFS=$'\n'
printf "" > ~/.cache/urlhand1
+printf "" > ~/.cache/urlhand3
for link in $array
do
count=$(($count+1))
- echo "$count: $link"
+ echo "$count: $link" >> ~/.cache/urlhand3
echo "$count:$link" | sed 's|/|\t|g' >> ~/.cache/urlhand1
done
-printf "\nSelect a number: "; read var < /dev/tty
+var=$(dmenu -i -p "Select an item" < ~/.cache/urlhand3 | grep -o '[0-9]*')
arg=$(grep "$var:" < ~/.cache/urlhand1 | sed 's|\t|/|g' | sed 's/^[0-9]*://')
handlers=("mpv" "youtube-dl --add-metadata -ic" "youtube-dl --add-metadata -xic" "vimb --no-maximize" "surf" "w3m")
count=0
echo
printf "" > ~/.cache/urlhand2
+printf "" > ~/.cache/urlhand4
for item in ${!handlers[*]}
do
count=$(($count+1))
- echo "$count: ${handlers[$item]}"
+ echo "$count: ${handlers[$item]}" >> ~/.cache/urlhand4
echo "$count:${handlers[$item]}" | sed 's|/|\t|g' >> ~/.cache/urlhand2
done
-printf "\nSelect a handler: "; read var < /dev/tty
+var=$(dmenu -i -p "Select a handler" < ~/.cache/urlhand4 | grep -o '[0-9]*')
hand=$(grep "$var:" < ~/.cache/urlhand2 | sed 's|\t|/|g' | sed 's/^[0-9]*://')
killall mpvlisten
hmpv pause /tmp/mpv-socket
diff --git a/LICENSE b/LICENSE
@@ -1,11 +1,19 @@
Copyright (C) 2019 Hayden Hamilton <hayden@haydenvh.com>
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.