summary refs log tree commit diff
path: root/bin/hibiki
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2020-06-13 14:23:57 +0200
committerRobert Günzler <r@gnzler.io>2020-06-13 14:23:57 +0200
commit85e4f3c44aa01c6fea732965a747f26731adab73 (patch)
tree7a42f106448a6029e9f5816967c7311ce4084b22 /bin/hibiki
parent898cd6f445cc995b8383a73ecd1a27c19560f92d (diff)
move some scripts from bin/hibiki to bin
Diffstat (limited to 'bin/hibiki')
-rwxr-xr-xbin/hibiki/compose10
-rwxr-xr-xbin/hibiki/enter44
-rwxr-xr-xbin/hibiki/vncez23
-rwxr-xr-xbin/hibiki/wfez38
4 files changed, 0 insertions, 115 deletions
diff --git a/bin/hibiki/compose b/bin/hibiki/compose
deleted file mode 100755
index e4a5dbd..0000000
--- a/bin/hibiki/compose
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-cwd="$PWD"
-container_cwd="/run/cwd/$(basename "$cwd")"
-exec docker run \
-    --rm -it \
-    --net host \
-    --mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock \
-    --mount type=bind,src="$cwd",dst="$container_cwd" \
-    -w "$container_cwd" \
-    docker/compose:latest $@
diff --git a/bin/hibiki/enter b/bin/hibiki/enter
deleted file mode 100755
index 67a9806..0000000
--- a/bin/hibiki/enter
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/sh
-set -e
-[ -n "$DEBUG" ] && set -x
-
-target=
-img=""
-dockerfile="${PWD}/Dockerfile"
-become=
-
-usage() {
-	printf "usage: %s OPTIONS -- [DOCKER RUN ARGS]\n" "$(basename "$0")"
-	printf "\n"
-	printf "  -t TARGET\n"
-	printf "  -i IMAGE\n"
-	printf "  -f DOCKERFILE\n"
-	printf "  -u (become user)\n"
-	printf "\n"
-	printf "Enter the container defined in Dockerfile, with \$PWD mounted at /src\n"
-	exit 2
-}
-
-while getopts t:i:f:uh o; do
-	case $o in
-	t) 	target="$OPTARG" ;;
-	i) 	img="$OPTARG" ;;
-	f) 	dockerfile="$OPTARG" ;;
-	u) 	become=1 ;;
-	h|?) 	usage ;;
-	esac
-done
-shift $((OPTIND - 1))
-
-[ -z "$img" ] && img="$(basename "$(dirname "$(readlink -f -- "$dockerfile")")")"
-
-extra_args=
-[ -n "$become" ] && extra_args="--user=$(id -u):$(id -g)"
-
-# allow setting this to some non-file value to skip building
-# > enter -i alpine -f none
-# for a quick alpine based container with $PWD mounted in
-[ -f "$dockerfile" ] && \
-	docker build --tag="$img" --target="$target" --file="$dockerfile" "$(dirname "$dockerfile")"
-
-exec docker run --rm -it --mount=type=bind,src="$PWD",dst=/src -w /src $@ $extra_args "$img"
diff --git a/bin/hibiki/vncez b/bin/hibiki/vncez
deleted file mode 100755
index fa132f9..0000000
--- a/bin/hibiki/vncez
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-set -e
-
-if [ -n "$1" ]; then
-	printf "usage: %s\n" "$(basename "$0")"
-	printf "\n"
-	printf "launches wayvnc(1), wshowkeys(1) and remmina(1)\n"
-	exit 2
-fi
-
-trap '{ pkill wshowkeys; pkill wayvnc; pkill remmina; }' EXIT
-
-echo "=> starting wshowkeys"
-swaymsg exec "wshowkeys -a bottom -a left -F 'Iosevka Sparkle 25' -t 1" >/dev/null
-echo "=> starting wayvnc"
-swaymsg exec "wayvnc 0.0.0.0 5500" >/dev/null
-echo "=> starting remmina"
-swx -g "1820,50 720x450" -b none -s -I "org.remmina.Remmina" remmina -c "$HOME"/.local/share/remmina/group_vnc_wayvnc_localhost-5500.remmina
-
-while true; do
-	sleep $((1024*1024))
-done
diff --git a/bin/hibiki/wfez b/bin/hibiki/wfez
deleted file mode 100755
index d2f296c..0000000
--- a/bin/hibiki/wfez
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-
-# set -x
-
-output_file=${1:-"${HOME}/Videos/rec_$(now).mkv"}
-audio_output=${WF_AOUT:-alsa_output.pci-0000_00_1f.3.analog-stereo}
-audio_input=${WF_AIN:-alsa_input.pci-0000_00_1f.3.analog-stereo}
-video_output=${WF_VOUT:-DP-5}
-showkeys=${WF_KEYS}
-
-mux_sink=${WF_ASINK}
-if [ -z "${mux_sink}" ]; then
-	mux_sink=wf-mux
-	mux_sink_id=
-	output_loopback_id=
-	input_loopback_id=
-	prepare_mux_sink() {
-		mux_sink_id=$(pactl load-module module-null-sink sink_name="${mux_sink}")
-		output_loopback_id=$(pactl load-module module-loopback sink="${mux_sink}" source="${audio_output}.monitor")
-		input_loopback_id=$(pactl load-module module-loopback sink="${mux_sink}" source="${audio_input}")
-	}
-	teardown_mux_sink() {
-		pactl unload-module "${mux_sink_id}"
-		pactl unload-module "${output_loopback_id}"
-		pactl unload-module "${input_loopback_id}"
-	}
-	trap '{ teardown_mux_sink >/dev/null; }' EXIT
-	prepare_mux_sink >/dev/null
-fi
-
-if [ -n "${showkeys}" ]; then
-	echo "Starting wshowkeys on ${video_output}"
-	echo "WARNING: currently the -o flag to force display to a specific output is not implemented" >&2
-	sway exec "wshowkeys -a bottom -a left -F 'Iosevka Sparkle 25' -t 1 -o ${video_output}" >/dev/null
-	trap '{ pkill wshowkeys; }' EXIT
-fi
-
-wf-recorder -c h264_vaapi -d /dev/dri/renderD128 -o "${video_output}" -a "${mux_sink}.monitor" -f "${output_file}"