update scripts

This commit is contained in:
shibao 2023-10-16 09:24:46 -04:00
parent 2015ad637c
commit 490f2f3eb8
4 changed files with 56 additions and 0 deletions

View File

@ -0,0 +1,32 @@
#!/usr/bin/env sh
# rename .MKV -> .MKV
count=`ls -1 *.JPG 2>/dev/null | wc -l`
if [ $count != 0 ]; then
rename MKV mkv *.MKV
fi
# convert to opus
count=`ls -1 *.mkv 2>/dev/null | wc -l`
if [ $count != 0 ]; then
for i in *.mkv; do
ffmpeg -i "$i" "${i%.mkv}.opus";
rm "$i";
done
fi
# rename .WEBM -> .webm
count=`ls -1 *.WEBM 2>/dev/null | wc -l`
if [ $count != 0 ]; then
rename WEBM webm *.WEBM
fi
# convert to opus
count=`ls -1 *.webm 2>/dev/null | wc -l`
if [ $count != 0 ]; then
for i in *.webm; do
ffmpeg -i "$i" "${i%.webm}.opus";
rm "$i";
done
fi

View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -eou pipefail
echo $(pacman -Qqe) | \
tr " " "\n" | \
sort \
> /packages.txt

View File

@ -0,0 +1,5 @@
#!/bin/bash
set -eou pipefail
swaymsg "output * dpms off" && \
swaymsg "output * dpms on"

View File

@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -euo pipefail
echo stopping pipewire-media-session...
systemctl --user stop pipewire-media-session
echo stopping pipewire...
systemctl --user stop pipewire
echo starting pipewire...
systemctl --user start pipewire
echo starting pipewire-media-session...
systemctl --user start pipewire-media-session