aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-07-23 19:05:47 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-23 19:05:47 +0200
commitc98e8b40452c21aed0b9db71b1c52f3476d67557 (patch)
treefb30f7f24b5fed89399d474da22662eb54b56a45
parent90b2dc8d77351204fcdc20bf472cd4ad68cbbd35 (diff)
Use dmenu instead of rofi, remove unused script
-rw-r--r--README.md6
-rwxr-xr-xopen_media.py4
-rwxr-xr-xread_manga_rofi.sh14
3 files changed, 5 insertions, 19 deletions
diff --git a/README.md b/README.md
index a05cc40..461de39 100644
--- a/README.md
+++ b/README.md
@@ -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"