diff options
author | ダカマ <dakama@kakeranoumi.xyz> | 2025-06-02 13:08:46 +0200 |
---|---|---|
committer | ダカマ <dakama@kakeranoumi.xyz> | 2025-06-02 13:08:46 +0200 |
commit | 14a892e627a375334a02381351f139d94ad7ecf3 (patch) | |
tree | e7c1ee5040f3076f57401b3b9e9eb567e2ecfb1a /scriptlets/transmission_dirchooser.sh |
Diffstat (limited to 'scriptlets/transmission_dirchooser.sh')
-rwxr-xr-x | scriptlets/transmission_dirchooser.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/scriptlets/transmission_dirchooser.sh b/scriptlets/transmission_dirchooser.sh new file mode 100755 index 0000000..d7614ab --- /dev/null +++ b/scriptlets/transmission_dirchooser.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +START_DIR="$HOME/Downloads" +ROFI_THEME="ErikaScythe" +# CHANGE THEME + +DIR="$START_DIR" +FULL_DIR="$DIR" +while [[ -n $DIR && $DIR != "." ]]; do + DIR="$( { echo -e ".\n.."; find "${FULL_DIR}" -mindepth 1 -maxdepth 1 -type d | sed -r "s|^.*\/||g" | sort -V ; } | rofi -dmenu -i -no-custom -p "" -theme "$ROFI_THEME" -async-pre-read 3 -no-click-to-exit )" + FULL_DIR="${FULL_DIR}/${DIR}" +done + +[[ -z "$DIR" ]] && exit -1 + + +for file in "$@"; do + transmission-remote -a "$file" -w "$FULL_DIR" +done + |