From fb88c5693a202e551e8857c4275423c673e879c5 Mon Sep 17 00:00:00 2001 From: morganmayday Date: Tue, 24 Feb 2026 09:48:00 -0800 Subject: [PATCH] Quick commit via qp.sh --- hypr/binds/nav.conf | 4 +-- hypr/scripts/nav/mt.sh | 7 +++-- scripts/stable/metag | 59 ++++++++++++++++++++++++++++++++++++++++ scripts/working/metag.sh | 59 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 125 insertions(+), 4 deletions(-) create mode 100755 scripts/stable/metag create mode 100755 scripts/working/metag.sh diff --git a/hypr/binds/nav.conf b/hypr/binds/nav.conf index 16552cf..1d2b744 100644 --- a/hypr/binds/nav.conf +++ b/hypr/binds/nav.conf @@ -13,8 +13,8 @@ bind = $mainMod, D, exec, $DOTFILES_DIR/hypr/scripts/nav/h-scroll.sh m+1 # bind = $mainMod, S, exec, $SCRIPTS_DIR/hypr/nav/v-scroll.sh desktop # bind = $mainMod $terMod, S, movetoworkspacesilent, special:desktop -bind = $mainMod, TAB, exec, $DOTFILES_DIR/hypr/scripts/nav/open.sh empty -bind = $mainMod $auxMod, TAB, exec, $DOTFILES_DIR/hypr/scripts/nav/mt.sh empty +bind = $mainMod, TAB, exec, $DOTFILES_DIR/hypr/scripts/nav/open.sh emptynm +bind = $mainMod $auxMod, TAB, exec, $DOTFILES_DIR/hypr/scripts/nav/mt.sh emptynm # Switch workspaces with mainMod + [0-9] bind = $mainMod, 1, exec, $DOTFILES_DIR/hypr/scripts/nav/open.sh 1 diff --git a/hypr/scripts/nav/mt.sh b/hypr/scripts/nav/mt.sh index 2c88234..4ba9006 100755 --- a/hypr/scripts/nav/mt.sh +++ b/hypr/scripts/nav/mt.sh @@ -1,3 +1,6 @@ #!/bin/sh -hyprctl dispatch movetoworkspacesilent $1 -hyprctl dispatch workspace $1 +# if [[ $1 =~ emptynm ]]; then +# hyprctl dispatch movetoworkspacesilent emptynm +# else +hyprctl dispatch movetoworkspace $1 +# hyprctl dispatch workspace $1 diff --git a/scripts/stable/metag b/scripts/stable/metag new file mode 100755 index 0000000..8cac44c --- /dev/null +++ b/scripts/stable/metag @@ -0,0 +1,59 @@ +#!/usr/bin/env bash +# Pass artist as argument I think. Didn't comment my code well enough last time + +echo "" + +function updateTitles { + for eachfile in *; do + if [[ $eachfile =~ [^a-zA-Z0-9\.\(\)\_\-] ]]; then + mv "$eachfile" "${eachfile//[^a-zA-Z0-9\.\(\)\-\_]/_}" + echo "Moved $eachfile to ${eachfile//[^a-zA-Z0-9\.\(\)\-\_]/_}" + fi + done +} + +if [[ $1 == "h" ]]; then + echo "=== Valid options ===" && echo "" && echo "h: Show this help." && echo "m: Manually assign track numbers. Defaults to 0 without this option." +else + +cd $HOME/Media/Music +updateTitles +indexLibrary=$(ls) +echo "=== Artists found: ===" && echo "${indexLibrary//_/ }" && echo "" + +for indexed in *; do + if [[ $indexed != "Fresh" ]]; then + cd $indexed + updateTitles + indexArtist=$(ls) + echo "Albums for artist ${indexed//_/ } found:" && echo "[ ${indexArtist//_/ } ]" && echo "" + + for indexedAlbum in *; do + data=$(pwd) && data=${data/#"$HOME/Media/Music/"} && artist=$(echo "$data" | awk '{split($0,artist,"/"); print artist[1]}') && artist=${artist//_/ } && album=${indexedAlbum//_/ } + cd $indexedAlbum + updateTitles + + for i in *; do + tagutil add:artist="$artist" $i + tagutil add:album="$album" $i + title="${i%.mp3}" + tagutil add:title="${title//_/ }" $i + if [[ $2 == "m" ]]; then + echo -n "${title//_/ } Track Number: " + read track + tagutil add:track="$track" $i + echo "${title//_/ } by $artist as song $track on album $album tagged" + else + echo "${title//_/ } by $artist on album $album tagged" + fi + done + echo "" + cd .. + done + fi + + cd && cd $HOME/Media/Music +done +fi + +echo "" diff --git a/scripts/working/metag.sh b/scripts/working/metag.sh new file mode 100755 index 0000000..8cac44c --- /dev/null +++ b/scripts/working/metag.sh @@ -0,0 +1,59 @@ +#!/usr/bin/env bash +# Pass artist as argument I think. Didn't comment my code well enough last time + +echo "" + +function updateTitles { + for eachfile in *; do + if [[ $eachfile =~ [^a-zA-Z0-9\.\(\)\_\-] ]]; then + mv "$eachfile" "${eachfile//[^a-zA-Z0-9\.\(\)\-\_]/_}" + echo "Moved $eachfile to ${eachfile//[^a-zA-Z0-9\.\(\)\-\_]/_}" + fi + done +} + +if [[ $1 == "h" ]]; then + echo "=== Valid options ===" && echo "" && echo "h: Show this help." && echo "m: Manually assign track numbers. Defaults to 0 without this option." +else + +cd $HOME/Media/Music +updateTitles +indexLibrary=$(ls) +echo "=== Artists found: ===" && echo "${indexLibrary//_/ }" && echo "" + +for indexed in *; do + if [[ $indexed != "Fresh" ]]; then + cd $indexed + updateTitles + indexArtist=$(ls) + echo "Albums for artist ${indexed//_/ } found:" && echo "[ ${indexArtist//_/ } ]" && echo "" + + for indexedAlbum in *; do + data=$(pwd) && data=${data/#"$HOME/Media/Music/"} && artist=$(echo "$data" | awk '{split($0,artist,"/"); print artist[1]}') && artist=${artist//_/ } && album=${indexedAlbum//_/ } + cd $indexedAlbum + updateTitles + + for i in *; do + tagutil add:artist="$artist" $i + tagutil add:album="$album" $i + title="${i%.mp3}" + tagutil add:title="${title//_/ }" $i + if [[ $2 == "m" ]]; then + echo -n "${title//_/ } Track Number: " + read track + tagutil add:track="$track" $i + echo "${title//_/ } by $artist as song $track on album $album tagged" + else + echo "${title//_/ } by $artist on album $album tagged" + fi + done + echo "" + cd .. + done + fi + + cd && cd $HOME/Media/Music +done +fi + +echo ""