diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-10-02 17:43:23 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-10-02 17:43:23 +0200 |
commit | 010c7903562963e5585190896f47d62218fa08fd (patch) | |
tree | b1cf45753a04acacce1502e57ce4b40a241df19e | |
parent | efbc3b1db349655a3c075ab5da22b1877c97fbb3 (diff) |
added scripts
-rwxr-xr-x | bin/extra/curszip | 17 | ||||
-rwxr-xr-x | bin/extra/gml | 65 | ||||
-rwxr-xr-x | bin/extra/pomo | 8 |
3 files changed, 90 insertions, 0 deletions
diff --git a/bin/extra/curszip b/bin/extra/curszip new file mode 100755 index 0000000..6ab99e8 --- /dev/null +++ b/bin/extra/curszip @@ -0,0 +1,17 @@ +#!/bin/sh + +list1() { find "$1" -mindepth 1 -maxdepth 1 -type "${2:-d}" -printf '%f\n'; } + +curs="$(list1 ~/docs/school/Vakken | fzf)" +[ "$curs" ] || exit 1 +zip="$(list1 ~/dl f | fzf -f "$curs" | grep '\.zip$')" +[ "$zip" ] || exit 1 + +>&2 printf "zip: %s\n" "$zip" + +cd -- ~/docs/school/Vakken/"$curs" || exit 1 +rm -rf Cursus +mv -- ~/dl/"$zip" . +unzip -- "./$zip" +mv -- "${zip%%.zip}" Cursus +rm -- "$zip" diff --git a/bin/extra/gml b/bin/extra/gml new file mode 100755 index 0000000..0d3a277 --- /dev/null +++ b/bin/extra/gml @@ -0,0 +1,65 @@ +#!/bin/sh + +minecraft() +{ + instance="$( + ( + printf "default\n" + find ~/.local/share/multimc/instances \ + -maxdepth 1 -mindepth 1 \ + -type d \ + -printf "%f\n" | + grep -v '_LAUNCHER_TEMP' + ) | + commander -d -c -x)" + + [ "$instance" ] || exit 1 + [ "$instance" = "default" ] && instance="1.20.1" + + ips="none 192.168.178.79 192.168.178.52 10.7.0.1 mc.hypixel.net" + ip="$(for ip in $ips + do printf "%s\n" "$ip" + done | commander -d -c)" + + if [ "$ip" != 'none' ] + then setsid multimc -l "$instance" -s "$ip" > /dev/null 2>&1 + else + + world="$( + ( + printf "none\n" + find "$HOME"/.local/share/multimc/instances/"$instance"/.minecraft/saves/ \ + -mindepth 1 -maxdepth 1 \ + -type d \ + -printf "%f\n" + ) | commander -d -c -s)" + + [ -z "$world" ] && exit 1 + + if [ "$world" = 'none' ] + then setsid multimc -l "$instance" > /dev/null 2>&1 + else setsid multimc -l "$instance" -w "$world" > /dev/null 2>&1 + fi + + fi +} + +steam() +{ + choice="$( + cat <<-EOF | column -t -l 2 | commander -d -x -c | awk '{printf $1}' + 274190 broforc3 + 291550 brawlhalla + 1712840 tiny tina + EOF + )" + [ "$choice" ] && setsid steam steam://rungameid/"$choice" + exit +} + +eval "$( + cat <<-EOF | commander -c + minecraft + steam + EOF +)" diff --git a/bin/extra/pomo b/bin/extra/pomo new file mode 100755 index 0000000..4227738 --- /dev/null +++ b/bin/extra/pomo @@ -0,0 +1,8 @@ +#!/bin/sh +while true +do + date +%R + sleep 20m + notify-send -u critical -t 5000 "pomodoro" "BREAK TIME" + sleep 5m +done |