diff options
-rw-r--r-- | README.md | 6 | ||||
-rwxr-xr-x | open_media.py | 4 | ||||
-rwxr-xr-x | read_manga_rofi.sh | 14 |
3 files changed, 5 insertions, 19 deletions
@@ -17,9 +17,9 @@ Run automedia without any options to see all options. curl, transmission-cli, notify-send (optional) ## Python lxml, requests, pure_protobuf (optional, used with mangaplus.shueisha.co.jp) -# Requirements when using read_manga.py +# Requirements when using open_media.py ## System -rofi, sxiv +dmenu, sxiv # Important Do not move files inside the download directory. If you want to move them, move the whole download directory -when automedia is not running and then set the download directory to the new location when using sync command.
\ No newline at end of file +when automedia is not running and then set the download directory to the new location when using sync command. diff --git a/open_media.py b/open_media.py index 4abbd77..2d333a1 100755 --- a/open_media.py +++ b/open_media.py @@ -7,12 +7,12 @@ import subprocess script_dir = os.path.dirname(os.path.realpath(sys.argv[0])) def run_dmenu(input): - process = subprocess.Popen(["rofi", "-dmenu", "-i", "-p", "Select media"], stdin=subprocess.PIPE, stdout=subprocess.PIPE) + process = subprocess.Popen(["dmenu", "-l", "15", "-i", "-p", "Select media"], stdin=subprocess.PIPE, stdout=subprocess.PIPE) stdout, stderr = process.communicate(input.encode()) if process.returncode == 0: return stdout else: - print("Failed to launch rofi, error: {}".format(stderr)) + print("Failed to launch dmenu, error: {}".format(stderr)) return None def add_seen(seen_filepath, media_name, seen_list): diff --git a/read_manga_rofi.sh b/read_manga_rofi.sh deleted file mode 100755 index 4eed923..0000000 --- a/read_manga_rofi.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -set -e - -script_path=$(readlink -f "$0") -script_dir=$(dirname "$script_path") -cd "$script_dir" - -download_dir="$1" -manga_list=$(ls -t "$download_dir") -selected_manga=$(echo "$manga_list" | rofi -dmenu -i -p "Select manga") -chapters=$(./read_manga.py "$download_dir/$selected_manga" --list-reverse) -selected_starting_chapter=$(echo "$chapters" | rofi -dmenu -i -p "Select starting chapter") -./read_manga.py "$download_dir/$selected_manga" "$selected_starting_chapter" |