aboutsummaryrefslogtreecommitdiff
path: root/.scripts
diff options
context:
space:
mode:
Diffstat (limited to '.scripts')
-rwxr-xr-x.scripts/android_bridge5
-rwxr-xr-x.scripts/boil27
-rwxr-xr-x.scripts/compile28
-rwxr-xr-x.scripts/dwm_time9
-rwxr-xr-x.scripts/environment21
-rwxr-xr-x.scripts/excerpt_copy14
-rwxr-xr-x.scripts/ext30
-rwxr-xr-x.scripts/know3
-rwxr-xr-x.scripts/light16
-rwxr-xr-x.scripts/preview22
-rwxr-xr-x.scripts/radar6
-rwxr-xr-x.scripts/rotate42
-rwxr-xr-x.scripts/sailfish6
-rwxr-xr-x.scripts/uefi3
-rwxr-xr-x.scripts/webcam3
-rwxr-xr-x.scripts/wlan18
16 files changed, 0 insertions, 253 deletions
diff --git a/.scripts/android_bridge b/.scripts/android_bridge
deleted file mode 100755
index 523b0ff..0000000
--- a/.scripts/android_bridge
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/env sh
-
-sudo adb kill-server
-sudo adb start-server
-scrcpy
diff --git a/.scripts/boil b/.scripts/boil
deleted file mode 100755
index 0805147..0000000
--- a/.scripts/boil
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env sh
-
-mode="$1"
-name="$2"
-boilerplates="$HOME/.boilerplates"
-
-if [ "${mode}" = "" ] || [ "${name}" = "" ]; then
- echo "Not enough parameters"
- exit 1
-fi
-
-if [ "${mode}" = "clj" ]; then
- lein new app "$name"
- cp "$boilerplates/$mode/run" "$name"
- rm -rf "$name/CHANGELOG.md" "$name/LICENSE" "$name/README.md" "$name/doc/"
-elif [ "${mode}" = "md" ] || [ "${mode}" = "ms" ]; then
- cp "$boilerplates/txt/$mode.$mode" "$name.$mode"
-elif [ "${mode}" = "run" ]; then
- cp "$boilerplates/txt/run" run
-elif [ "${mode}" = "cs" ]; then
- mkdir -p "$name"
- cd "$name" || exit 1
- dotnet new console
- cp "$boilerplates/cs/run" run
-else
- cp -r "$boilerplates/$mode" "$name" || echo "Something went wrong"
-fi
diff --git a/.scripts/compile b/.scripts/compile
deleted file mode 100755
index 95f70c8..0000000
--- a/.scripts/compile
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env sh
-
-file=$(readlink -f "$1")
-dir=${file%/*}
-base="${file%.*}"
-ext="${file##*.}"
-
-if [ -f "$dir/run" ]; then
- echo "Using run file"
- exec "$dir/run"
-fi
-
-case "$ext" in
-ms) preconv "$file" | refer -PS -e | groff -me -ms -kept -T pdf >"$base".pdf ;;
-[0-9]) preconv "$file" | refer -PS -e | groff -mandoc -T pdf >"$base".pdf ;;
-#md) lowdown -d nointem -e super "$file" -Tms | groff -t -mspdf -k -Kutf8 -T pdf >"$base".pdf ;;
-#md) pandoc "$file" --pdf-engine=xelatex -V geometry:a4paper -V geometry:margin=2cm -V toc-title='Table of contents' -o "$base.pdf" ;; # Xelatex is slow af
-md) pandoc "$file" -V geometry:a4paper -V geometry:margin=2cm -V toc-title='Table of contents' -o "$base.pdf" ;;
-[rR]md) Rscript -e "rmarkdown::render('$file', quiet=TRUE)" ;;
-tex) pdflatex --output-directory "$dir" "$base" ;;
-sent) setsid -f sent "$file" 2>/dev/null ;;
-h) sudo make install ;;
-c) cc "$file" -o "$base" && "$base" ;;
-py) python "$file" ;;
-rs) cargo build ;;
-go) go run "$file" ;;
-*) sed 1q "$file" | grep "^#!/" | sed "s/^#!//" | xargs -r -I % "$file" ;;
-esac
diff --git a/.scripts/dwm_time b/.scripts/dwm_time
deleted file mode 100755
index a68b913..0000000
--- a/.scripts/dwm_time
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env sh
-
-while true; do
- time=$(date +'%H:%M')
- # bat=$(acpi | awk '{print $4}' | head -c3)
- # xsetroot -name " $bat | $time "
- xsetroot -name " $time "
- sleep 1
-done
diff --git a/.scripts/environment b/.scripts/environment
deleted file mode 100755
index 8591c7d..0000000
--- a/.scripts/environment
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env sh
-
-notify-send -t 10000 -i "dialog-xml-editor" "Waiting for internet connection..."
-while ! ping -qc1 8.8.8.8; do sleep 0.1; done
-notify-send -t 2000 -i "dialog-yes" "Found network"
-#notify-send -t 5000 -i "dialog-layers" "Starting programs"
-
-exec qutebrowser &
-exec st &
-
-exec telegram-desktop &
-exec signal-desktop &
-exec discord &
-exec whatsapp-nativefier-dark &
-exec thunderbird &
-
-notify-send -t 10000 -i "im-user" "Welcome back, Melvin!"
-
-# Musica! :)
-exec /usr/local/bin/spotify & # Force spotifywm
-while ! dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Play; do sleep 0.5; done
diff --git a/.scripts/excerpt_copy b/.scripts/excerpt_copy
deleted file mode 100755
index c183ea7..0000000
--- a/.scripts/excerpt_copy
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/bash
-
-BEGIN=$1
-DURATION=$2
-SRC="$3"
-DST="$4"
-
-
-ffmpeg -y -nostdin -ss $BEGIN -i "$SRC" -t $DURATION -codec:v copy -codec:a copy -codec:d copy \
- "$DST"
-
-
-#ffmpeg -ss $BEGIN -i $SRC -to $END -strict -2 ${DST}.mp4
-
diff --git a/.scripts/ext b/.scripts/ext
deleted file mode 100755
index a1b9d0e..0000000
--- a/.scripts/ext
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/env sh
-
-archive="$(readlink -f "$*")" &&
- directory="$(echo "$archive" | sed 's/\.[^\/.]*$//')" &&
- mkdir -p "$directory" &&
- cd "$directory" || exit
-
-[ "$archive" = "" ] && printf "Give archive to extract as argument\\n" && exit
-
-if [ -f "$archive" ]; then
- case "$archive" in
- *.tar.bz2 | *.tbz2) tar xvjf "$archive" ;;
- *.tar.xz) tar -xf "$archive" ;;
- *.tar.gz | *.tgz) tar xvzf "$archive" ;;
- *.tar.lz) tar --lzip -xvf "$archive" ;;
- *.lzma) unlzma "$archive" ;;
- *.bz2) bunzip2 "$archive" ;;
- *.rar) unrar x -ad "$archive" ;;
- *.gz) gunzip "$archive" ;;
- *.tar) tar xvf "$archive" ;;
- *.zip) unzip "$archive" ;;
- *.Z) uncompress "$archive" ;;
- *.7z) 7z x "$archive" ;;
- *.xz) unxz "$archive" ;;
- *.exe) cabextract "$archive" ;;
- *) printf "extract: '%s' - unknown archive method\\n" "$archive" ;;
- esac
-else
- printf "File \"%s\" not found\\n" "$archive"
-fi
diff --git a/.scripts/know b/.scripts/know
deleted file mode 100755
index 8fbe45a..0000000
--- a/.scripts/know
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-man -l "$(find /usr/share/man/man1/ -type f | shuf -n 1)"
diff --git a/.scripts/light b/.scripts/light
deleted file mode 100755
index 143ba1f..0000000
--- a/.scripts/light
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env bash
-
-if [ "$1" = "alert" ]; then
- hueadm group 1 select &>/dev/null
- exit 0
-elif [ -n "$1" ]; then
- hueadm group 1 =0 &>/dev/null
- hueadm group 1 on &>/dev/null
- exit 0
-fi
-
-if [ "$(hueadm group -j 1 | jq .state.any_on)" = "true" ]; then
- hueadm group 1 off &>/dev/null
-else
- hueadm group 1 reset &>/dev/null
-fi
diff --git a/.scripts/preview b/.scripts/preview
deleted file mode 100755
index 099eb1b..0000000
--- a/.scripts/preview
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/env sh
-
-if [ -z "$1" ]; then exit 1; fi
-
-basename="$(echo "$1" | sed 's/\.[^\/.]*$//')"
-
-wait_pdf() {
- sleep 5 # Some start delay
- while true; do
- if ! pgrep -x "zathura" >/dev/null; then
- rm -f "$basename".pdf
- exit 0
- fi
- done
-}
-
-case "$1" in
-*.tex | *.m[dse] | *.[rR]md | *.mom | *.[0-9]) compile "$1" && preview "$basename".pdf >/dev/null 2>&1 && wait_pdf & ;;
-*.html) setsid -f "$BROWSER" "$basename".html >/dev/null 2>&1 ;;
-*.sent) setsid -f sent "$1" >/dev/null 2>&1 ;;
-*) setsid -f xdg-open "$1" >/dev/null 2>&1 ;;
-esac
diff --git a/.scripts/radar b/.scripts/radar
deleted file mode 100755
index 9431649..0000000
--- a/.scripts/radar
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/env sh
-
-notify-send -i raindrop -t 10000 "Loading radar..."
-
-mpv --no-resume-playback --loop-file=inf "https://www.dwd.de/DWD/wetter/radar/radfilm_brd_akt.gif" &
-mpv --no-resume-playback --loop-file=inf "https://www.dwd.de/DWD/wetter/radar/radfilm_baw_akt.gif"
diff --git a/.scripts/rotate b/.scripts/rotate
deleted file mode 100755
index 97b045a..0000000
--- a/.scripts/rotate
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/bin/env bash
-
-nibble="TPPS/2 IBM TrackPoint"
-stylus="Wacom ISDv4 90 Pen stylus"
-eraser="Wacom ISDv4 90 Pen eraser"
-
-matrix="$(xinput list-props "$stylus" | awk '/Coordinate Transformation Matrix/{print $5$6$7$8$9$10$11$12$NF}')"
-
-# Matrix declarations
-
-normal="1 0 0 0 1 0 0 0 1"
-normal_float="1.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,1.000000"
-
-inverted="-1 0 1 0 -1 1 0 0 1"
-inverted_float="-1.000000,0.000000,1.000000,0.000000,-1.000000,1.000000,0.000000,0.000000,1.000000"
-
-left="0 -1 1 1 0 0 0 0 1"
-left_float="0.000000,-1.000000,1.000000,1.000000,0.000000,0.000000,0.000000,0.000000,1.000000"
-
-right="0 1 0 -1 0 1 0 0 1"
-
-if [ "$matrix" == $normal_float ] && [ "$1" != "-n" ]; then
- xrandr -o inverted
- xinput set-prop "$stylus" 166 $inverted
- xinput set-prop ""$eraser"" 166 $inverted
- xinput set-prop ""$nibble"" 166 $inverted
-elif [ "$matrix" == $inverted_float ] && [ "$1" != "-j" ] && [ "$1" != "-n" ]; then
- xrandr -o left
- xinput set-prop "$stylus" 166 $left
- xinput set-prop "$eraser" 166 $left
- xinput set-prop "$nibble" 166 $left
-elif [ "$matrix" == $left_float ] && [ "$1" != "-j" ] && [ "$1" != "-n" ]; then
- xrandr -o right
- xinput set-prop "$stylus" 166 $right
- xinput set-prop "$eraser" 166 $right
- xinput set-prop "$nibble" 166 $right
-else
- xrandr -o normal
- xinput set-prop "$stylus" 166 $normal
- xinput set-prop "$eraser" 166 $normal
- xinput set-prop "$nibble" 166 $normal
-fi
diff --git a/.scripts/sailfish b/.scripts/sailfish
deleted file mode 100755
index cb3849f..0000000
--- a/.scripts/sailfish
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/env sh
-
-export TERM=xterm
-sudo ifconfig enp1s0f0u2 inet 192.168.2.14
-ssh nemo@192.168.2.15
-export TERM=st
diff --git a/.scripts/uefi b/.scripts/uefi
deleted file mode 100755
index 015a38d..0000000
--- a/.scripts/uefi
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env sh
-
-sudo systemctl reboot --firmware-setup
diff --git a/.scripts/webcam b/.scripts/webcam
deleted file mode 100755
index f0a64c6..0000000
--- a/.scripts/webcam
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env sh
-
-mpv "av://v4l2:/dev/video$1"
diff --git a/.scripts/wlan b/.scripts/wlan
deleted file mode 100755
index 0df4aea..0000000
--- a/.scripts/wlan
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/env bash
-# Melvin's awesome wifi connection script!
-
-netctl list | grep -q "$1" || {
- echo "This network doesn't exist. Please use 'sudo wifi-menu' to add a new network or use one of the following:"
- netctl list
- exit 1
-}
-
-sudo netctl stop-all
-sudo killall -9 dhcpcd
-sudo systemctl start dhcpcd || exit 1
-sudo ip link set wlp3s0 down
-sudo netctl start "$1" || exit 1
-
-echo "Connecting..."
-while ! ping -c1 1.1.1.1 &>/dev/null; do sleep 1; done
-echo "Connected!"