aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-09-25 14:00:39 +0200
committerlonkaars <loek@pipeframe.xyz>2022-09-25 14:00:39 +0200
commit78a1a2e9017594227dd7695ad80a1f8d89c434fe (patch)
tree72085c77067306f9ab9dac5ffa03c89e91c781e5
parentd692d4baf742f8756ee2048a1a5ba3c6c77d1952 (diff)
script shuffle
-rwxr-xr-x.local/share/bin/cc1080p302
-rwxr-xr-x.local/share/bin/ccpreview17
-rwxr-xr-x.local/share/bin/covid13
-rwxr-xr-x.local/share/bin/ipod-sync29
-rwxr-xr-x.local/share/bin/loadwall5
-rwxr-xr-x.local/share/bin/patchmc17
-rwxr-xr-x.local/share/bin/shows12
-rwxr-xr-x.local/share/bin/ttv8
8 files changed, 19 insertions, 84 deletions
diff --git a/.local/share/bin/cc1080p30 b/.local/share/bin/cc1080p30
new file mode 100755
index 0000000..2682911
--- /dev/null
+++ b/.local/share/bin/cc1080p30
@@ -0,0 +1,2 @@
+#!/bin/sh
+ccpreview 1920x1080 30
diff --git a/.local/share/bin/ccpreview b/.local/share/bin/ccpreview
new file mode 100755
index 0000000..158541b
--- /dev/null
+++ b/.local/share/bin/ccpreview
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+caffeine
+
+FRAMERATE="$2"
+RESOLUTION="$1"
+DEVICE="/dev/$(readlink /dev/v4l/by-id/usb-MACROSILICON_USB_Video-* | head -n1 | cut -c7-)"
+
+mpv --demuxer-lavf-format=video4linux2 \
+ --demuxer-lavf-o-set=input_format=mjpeg,framerate="$FRAMERATE",resolution="$RESOLUTION" \
+ --cache=no \
+ --pause=no \
+ --force-seekable=no \
+ --no-osc \
+ --no-input-default-bindings \
+ "av://v4l2:$DEVICE"
+ # &> /dev/null & disown
diff --git a/.local/share/bin/covid b/.local/share/bin/covid
deleted file mode 100755
index 91b1139..0000000
--- a/.local/share/bin/covid
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-
-RESPONSE=$(curl -s "https://disease.sh/v3/covid-19/countries/netherlands")
-prop () { echo $RESPONSE | jq $1 | xargs printf; }
-
-printf "󰀏 "
-prop .cases
-
-printf " 󰯈 "
-prop .deaths
-
-printf "\n"
-
diff --git a/.local/share/bin/ipod-sync b/.local/share/bin/ipod-sync
deleted file mode 100755
index 62c8c80..0000000
--- a/.local/share/bin/ipod-sync
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-UUID="81CC-A462"
-
-if test ! -h "/dev/disk/by-uuid/$UUID"; then
- notify-send "ipod-sync" "can't find disk with uuid $UUID"
- exit 1
-fi
-
-read -r -d '' commands << EOF
-echo "mounting..."
-sudo mount "/dev/disk/by-uuid/$UUID" /mnt/ipod -o uid=loek,gid=users
-echo "mounted"
-
-echo "copying music..."
-musicopy
-
-echo "pushing scrobbler.log to last.fm..."
-pyapplier -y -f /mnt/ipod/.scrobbler.log
-
-echo "unmounting..."
-sudo umount /mnt/ipod
-echo "done! exiting..."
-sleep 1
-EOF
-
-st -T "[floating]" -g "100x15--154-140" -e sh -c "$commands"
-
-
diff --git a/.local/share/bin/loadwall b/.local/share/bin/loadwall
deleted file mode 100755
index e419667..0000000
--- a/.local/share/bin/loadwall
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/node
-var args = process.argv;
-var image = args.find(a => a.match(/\.(png|jpeg|jpg)/g));
-var wal = require(__dirname + "/pywal/jswal.js");
-wal(["--bg-fill", image]);
diff --git a/.local/share/bin/patchmc b/.local/share/bin/patchmc
deleted file mode 100755
index 4b23cc9..0000000
--- a/.local/share/bin/patchmc
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/node
-
-var fs = require('fs');
-var path = require('path');
-
-var profilesPath = path.join(process.env.HOME, '/.minecraft/launcher_profiles.json');
-var profiles = require(profilesPath);
-
-var def = "-Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M";
-var patch = " -Dorg.lwjgl.librarypath=\"/home/loek/.minecraft\""
-
-for (var profile in profiles.profiles) {
- var javaArgs = profiles.profiles[profile].javaArgs
- profiles.profiles[profile].javaArgs = javaArgs ? (javaArgs.includes(patch) ? javaArgs : javaArgs + patch) : (def + patch);
-}
-
-fs.writeFileSync(profilesPath, JSON.stringify(profiles, null, 4))
diff --git a/.local/share/bin/shows b/.local/share/bin/shows
deleted file mode 100755
index 6bcff01..0000000
--- a/.local/share/bin/shows
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-media_path="/mnt/media/shows/"
-search_term=$1
-episode=$2
-[ -z $episode ] && episode="1"
-season=$3
-[ -z $season ] && season="1"
-
-cd $media_path
-filename=$(find . -type f | fzf -f$search_term | grep -iE "s0?${season}e0?${episode}" | head -n1)
-mpv "$media_path/$filename" & disown
-
diff --git a/.local/share/bin/ttv b/.local/share/bin/ttv
deleted file mode 100755
index 4db2cd5..0000000
--- a/.local/share/bin/ttv
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-streamlink twitch.tv/$1 best -p "mpv --fs=no --geometry=75%" & disown
-brave --user-data-dir=/tmp --app="https://twitch.tv/$1/chat?popout=" & disown
-
-sleep 5
-PPPID=$(awk '{print $4}' "/proc/$PPID/stat")
-kill $PPPID
-