summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-11-01 19:46:01 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-11-01 19:46:01 +0100
commit95cc831989799a31d97b3168582bccc66a7a60dc (patch)
tree7a119d3112ee78f5d096711f3c4a28eba296637e
parentworking on unixize (diff)
downloaddotfiles-bsd-95cc831989799a31d97b3168582bccc66a7a60dc.tar.gz
dotfiles-bsd-95cc831989799a31d97b3168582bccc66a7a60dc.tar.bz2
dotfiles-bsd-95cc831989799a31d97b3168582bccc66a7a60dc.tar.xz
dotfiles-bsd-95cc831989799a31d97b3168582bccc66a7a60dc.tar.zst
dotfiles-bsd-95cc831989799a31d97b3168582bccc66a7a60dc.zip
Renamed scripts
-rwxr-xr-x.local/bin/mpv-view.pl76
-rwxr-xr-x.local/bin/unixize6
-rwxr-xr-x.local/bin/webview.sh20
-rw-r--r--.urlview2
4 files changed, 4 insertions, 100 deletions
diff --git a/.local/bin/mpv-view.pl b/.local/bin/mpv-view.pl
deleted file mode 100755
index a66a75b..0000000
--- a/.local/bin/mpv-view.pl
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/usr/bin/env perl
-
-use strict;
-use warnings;
-use Scalar::Util qw(looks_like_number);
-use Term::ANSIColor;
-
-sub get_size
-{
- my $size;
- my $answer;
-
- $size = 0;
- $answer = 0;
- print
- "1) 0\n" .
- "2) 240\n" .
- "3) 360\n" .
- "4) 480\n" .
- "5) 720\n" .
- "6) 1080\n" .
- "\n" .
- "> ";
- $answer = <STDIN>;
- if (!looks_like_number($answer) || $answer == 0 || $answer == 1 || $answer > 6) {
- $size = 0;
- }
- elsif ($answer == 2) {
- $size = 240;
- }
- elsif ($answer == 3) {
- $size = 360;
- }
- elsif ($answer == 4) {
- $size = 480;
- }
- elsif ($answer == 5) {
- $size = 720;
- }
- elsif ($answer == 6) {
- $size = 1080;
- }
- return $size;
-}
-
-sub main
-{
- my $size;
-
- if ($#ARGV + 1 == 0) {
- print STDERR "URL needed\n";
- exit 1;
- }
- $size = get_size();
- if ($size != 0) {
- print 'mpv --ytdl-format=[height<=' . $size . '] ' . $ARGV[0] . "\n";
- exec(
- 'mpv',
- '--ytdl-format=[height<=' . $size . ']',
- $ARGV[0]
- );
- }
- else {
- print 'mpv ' . $ARGV[0] . "\n";
- exec(
- 'mpv',
- $ARGV[0]
- );
- }
- print "$size\n";
- exit 0;
-}
-
-main();
-
-__END__
diff --git a/.local/bin/unixize b/.local/bin/unixize
index 0e05c74..3d214d1 100755
--- a/.local/bin/unixize
+++ b/.local/bin/unixize
@@ -34,14 +34,14 @@ sub unixize_file_names
$_ =~ s/c\+\+/cxx/g;
$_ =~ s/C\+\+/CXX/g;
$_ =~ s/[\x83\x84\x85\x86]/a/g; # âäàå
- # $_ =~ s/[ÁÀÅÂÄ]/A/g;
+ $_ =~ s/[]/A/g; # ÄÅ
$_ =~ s/\x91/ae/g; # æ
$_ =~ s/\x92/AE/g; # Æ
$_ =~ s/\x87/c/g; # ç
$_ =~ s/\x80/C/g; # Ç
- # $_ =~ s/[éèêë]/e/g;
+ $_ =~ s/[\x82\x88\x89\x8a]/e/g; # éêëè
# $_ =~ s/[ÉÈÊË]/E/g;
- # $_ =~ s/[ïîì]/i/g;
+ $_ =~ s/[\x8b\x8c\x8d]/i/g; # ïîì
# $_ =~ s/[ÏÎÌ]/I/g;
# $_ =~ s/[ôöò]/o/g;
$_ =~ s/[\x93\x94\x95]/o/g; # ôöò
diff --git a/.local/bin/webview.sh b/.local/bin/webview.sh
deleted file mode 100755
index bbf114a..0000000
--- a/.local/bin/webview.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/local/bin/dash
-
-ext="${1##*.}"
-mpvFiles="mkv mp4 gif"
-sxivFiles="png jpg jpeg jpe xpm"
-wgetFiles="flac mp3 mp3?source=feed opus pdf doc docx"
-
-cd ~/dl || exit
-
-if echo "$sxivFiles" | grep -w "$ext" > /dev/null; then
- nohup sxiv "$1" > /dev/null &
-elif echo "$mpvFiles" | grep -w "$ext" > /dev/null; then
- nohup mpv --loop --quiet "$1" > /dev/null &
-elif echo "$wgetFiles" | grep -w "$ext" > /dev/null; then
- clear
- fetch "$1"
-else
- clear
- mpv-view.pl "$1"
-fi
diff --git a/.urlview b/.urlview
index b6c681c..36e6eb4 100644
--- a/.urlview
+++ b/.urlview
@@ -1,4 +1,4 @@
REGEXP (((http|https|ftp|gopher)|mailto)[.:][^ >"\t]*|www\.[-a-z0-9.]+)[^ .,;\t>">\):]
-COMMAND ~/.local/bin/webview.sh
+COMMAND ~/.local/bin/linkview.pl
QUITONLAUNCH