summaryrefslogtreecommitdiff
path: root/scriptlets/transmission_dirchooser.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scriptlets/transmission_dirchooser.sh')
-rwxr-xr-xscriptlets/transmission_dirchooser.sh20
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
+