commit 10df53fd0b6c9bd7335bbf134a643ad1c65f81e9
parent 37dc20656000581d8ce013cf6fcdb51eb1374f9d
Author: Josuah Demangeon <mail@josuah.net>
Date: Thu, 9 Nov 2017 21:23:41 +0100
cleanup
Diffstat:
9 files changed, 53 insertions(+), 72 deletions(-)
diff --git a/bin/cl b/bin/cl
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-printf '\033[H\033[2J'
diff --git a/bin/git-repos b/bin/git-repos
@@ -1,17 +1,15 @@
-git clone http://github.com/josuah/etc "$HOME/etc"
-git clone http://github.com/josuah/pkg "$HOME/pkg"
-git clone http://github.com/josuah/bin "$HOME/bin"
+#!/bin/sh
-mkdir -p "$HOME/var/git"
-cd "$HOME/var/git"
-
-git clone --mirror http://github.com/josuah/alphabet
-git clone --mirror http://github.com/josuah/bin
-git clone --mirror http://github.com/josuah/cgr
-git clone --mirror http://github.com/josuah/etc
-git clone --mirror http://github.com/josuah/fungus-pathogen
-git clone --mirror http://github.com/josuah/http
-git clone --mirror http://github.com/josuah/iode
-git clone --mirror http://github.com/josuah/iomenu
-git clone --mirror http://github.com/josuah/notes
-git clone --mirror http://github.com/josuah/pkg
+while read repo
+do
+ git clone --mirror "$repo" &&
+ printf '\n' >> "${repo##*/}.git"
+done << 'EOF'
+http://github.com/josuah/alphabet
+http://github.com/josuah/cgr
+http://github.com/josuah/etc
+http://github.com/josuah/fungus-pathogen
+http://github.com/josuah/http
+http://github.com/josuah/iomenu
+http://github.com/josuah/notes
+EOF
diff --git a/bin/pree b/bin/pree
@@ -1,44 +1,53 @@
#!/bin/sh
-# convert find(1)-style listing to tree(1)-style listing
+# convert find(1)-style input to a tree(1)-style
LC_COLLATE=C
awk '{ do { print } while (sub("/[^/]*$", "")) }' | sort -u |
-awk -v LINE='| ' -v NODE='|-- ' -v TAIL='`-- ' -v VOID=' ' '
+
+awk -v LINE='| ' -v NODE='|-- ' -v TAIL='`-- ' -v VOID=' ' -v HTML="$1" '
+BEGIN {
+ if (HTML)
+ print("<pre>");
+}
+
{
- count = split($0, line, "/")
- lines[NR"]["0] = $0
+ count = split($0, line, "/");
+ if (HTML) {
+ gsub("&", "\\&");
+ gsub("<", "\\>");
+ }
+ lines[NR":"0] = $0
for (i = 1; i <= count; i++)
- lines[NR"]["i] = LINE
-
- lines[NR"]["i - 1] = NODE
+ lines[NR":"i] = LINE;
+ lines[NR":"i - 1] = NODE;
}
END {
for (i = 1; !stop; i++) {
- stop = tail = 1
-
+ stop = tail = 1;
for (l = NR; l > 0; l--) {
- if (lines[l"]["i] == LINE && tail) {
- lines[l"]["i] = VOID
- stop = 0
-
- } else if (lines[l"]["i] == NODE && tail) {
- lines[l"]["i] = TAIL
- tail = stop = 0
-
- } else if (!lines[l"]["i]) {
- tail = 1
+ if (lines[l":"i] == LINE && tail) {
+ lines[l":"i] = VOID;
+ stop = 0;
+ } else if (lines[l":"i] == NODE && tail) {
+ lines[l":"i] = TAIL
+ tail = stop = 0;
+ } else if (!lines[l":"i]) {
+ tail = 1;
}
}
}
-
for (l = 1; l <= NR; l++) {
- for (i = 1; lines[l"]["i]; i++)
- printf "%s", lines[l"]["i]
-
- name = lines[l"]["0]
- sub(".*/", "", lines[l"]["0])
- print lines[l"]["0]
+ name = lines[l":"0];
+ sub(".*/", "", name);
+ for (i = 1; lines[l":"i]; i++)
+ printf("%s", name);
+ if (HTML)
+ printf("<a href=\"%s\"></a>\n", lines[l":"0], name);
+ else
+ print(name);
}
+ if (HTML)
+ print("</pre>");
}'
diff --git a/bin/screen-brightness b/bin/screen-brightness
@@ -1,2 +0,0 @@
-#!/bin/sh
-printf '%s\n' "$1" | sudo tee -a /sys/class/backlight/*/brightness
diff --git a/bin/screen-cast b/bin/screen-cast
@@ -1,8 +0,0 @@
-#!/bin/sh
-# record screen content to a video using ffmpeg
-
-ffmpeg -framerate 25 -f x11grab -i :0.0 -video_size "$(
- sed 's/,.*//' /sys/class/graphics/fb0/virtual_size
-)x$(
- sed 's/.*,//' /sys/class/graphics/fb0/virtual_size
-)" "$HOME/${1:-screencast}.mp4"
diff --git a/bin/screen-rotate b/bin/screen-rotate
@@ -1,16 +0,0 @@
-#!/bin/sh
-# rotate the screen in TTY or GUI
-
-if [ "$DISPLAY" ]
-then
- xrandr --output "$(
- xrandr -q | grep -w connected | cut -d ' ' -f 1
- )" --rotate "$1"
-else
- case "$1" in
- ( u | up ) printf 0 ;;
- ( r | right ) printf 1 ;;
- ( d | down ) printf 2 ;;
- ( l | left ) printf 3 ;;
- esac | sudo tee /sys/class/graphics/fbcon/rotate_all > /dev/null
-fi
diff --git a/dot/profile b/dot/profile
@@ -24,3 +24,5 @@ export BLIH="josuah.demangeon@epitech.eu"
export SSH_AUTH_SOCK="$HOME/var/run/ssh-agent"
[ "$SSH_TTY" ] || ssh-agent -a "$HOME/var/run/ssh-agent"
+
+[ -z "${-##*i*}" ] && . "$HOME/.bashrc"
diff --git a/io/http b/io/http
@@ -23,3 +23,4 @@ http://www.3x6x.com/discography.html
http://systemspace.network
http://tttthis.com/rememberwebsites.php
https://wiby.me
+http://wurstcaptures.untergrund.net/music/
diff --git a/service/quark b/service/quark
@@ -1,3 +1,3 @@
#!/bin/sh
-exec quark -h 0.0.0.0 -d "$HOME/var/http" -V &
+exec quark -h 0.0.0.0 -d "$1" -V &