restructured again

This commit is contained in:
2021-05-16 08:00:04 +05:30
parent a3e2fa3b5a
commit 7578463af7
30 changed files with 164 additions and 58 deletions

View File

@@ -1,4 +1,4 @@
{lib, stdenv, fetchFromGitHub, rage, curl, sox, ffmpeg}:
{lib, stdenv, fetchFromGitHub}:
stdenv.mkDerivation rec{
name = "customscripts";
src = ./src;
@@ -8,7 +8,6 @@ stdenv.mkDerivation rec{
rev = "a996a52831316cc2c282904352654bd20c82f7bd";
sha256 = "sha256-nw21YmcmQMF8NADnuHOc7eF2Yaj/r/1mYBn77fYK7s8=";
};*/
buildInputs = [ rage curl sox ffmpeg ];
unpackPhase = ":";
installPhase = ''
mkdir -p $out/bin

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p rage
if [ $# -eq 0 ]; then echo "bruh"; exit 1; fi
FILE=$1
if [ $# -eq 2 ]; then

View File

@@ -1,2 +1,3 @@
#!/usr/bin/env bash
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p ffmpeg sox
mkdir spectrals; cd spectrals; for x in ../*$1;do sox "$x" -n spectrogram -o "$(echo $(ffprobe -loglevel error -show_entries format_tags=track -of default=noprint_wrappers=1:nokey=1 "$x") - $(ffprobe -loglevel error -show_entries format_tags=TITLE -of default=noprint_wrappers=1:nokey=1 "$x")).png"; done

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p sox ffmpeg curl jq
mkdir spectrals
cd spectrals
for x in ../*$1

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p ffmpeg sox
IFS=$'\n'
for i in $(ls *$3)
do

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p flac
if [ $1 == "flac" ]; then
for x in *.flac; do
flac "$x" --compression-level-8 -o "bruh.$x"

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p ffmpeg
target_video_size_KB="$2"
origin_duration_s=$(ffprobe -v error -show_streams -select_streams a "$1" | grep -Po "(?<=^duration\=)\d*\.\d*")

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p mono
#Script to control fans via nbfc in /opt/nbfc
if [[ $1 = "a" ]]; then
mono /opt/nbfc/nbfc.exe set -f 0 -a

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
killall mpdas
killall mpd_discord_richpresence
systemctl stop mpd.socket --user

View File

@@ -1,3 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p ffmpeg
for x in *$1;do echo $(ffprobe -loglevel error -show_entries format_tags=track -of default=noprint_wrappers=1:nokey=1 "$x") - $(ffprobe -loglevel error -show_entries format_tags=TITLE -of default=noprint_wrappers=1:nokey=1 "$x"); done

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env sh
#!/usr/bin/env nix-shell
#! nix-shell -i sh -p ncmpcpp python39Packages.ueberzug
#credits: https://github.com/alnj/ncmpcpp-ueberzug
export FIFO_UEBERZUG="/tmp/mpd-ueberzug-${PPID}"

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p curl
for x in $@; do
curl -F "file=@\"$x\"" https://x0.at/
echo " "

View File

@@ -1,7 +1,9 @@
#!/usr/bin/env bash
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p ffmpeg youtube-dl
youtube-dl -f bestaudio -o "ytmp3.%(title)s.%(ext)s" "$1"
file=$(echo ytmp3.*.*)
newfile=$(echo $file | cut -c 7-)
mv "$file" "$newfile"
ffmpeg -i "$newfile" -c:a mp3 "${newfile%.*}.mp3"
rm "$newfile"
#trust me ive a reason for lossy->lossy transcoding