diff --git a/.config/mpv/script-opts/SimpleHistory.conf b/.config/mpv/script-opts/SimpleHistory.conf new file mode 100644 index 0000000..7e7f09f --- /dev/null +++ b/.config/mpv/script-opts/SimpleHistory.conf @@ -0,0 +1,299 @@ +######----Settings For SimpleHistory 1.1.5----###### +####------Script Settings-----#### + +#--Auto run the list when opening mpv and there is no video / file loaded. 'none' for disabled. Or choose between: all, recents, distinct, protocols, fileonly, titleonly, timeonly, keywords. +auto_run_list_idle=recents + +#--The behavior when mpv launches and nothing is loaded. 'none' for disabled. 'resume' to automatically resume your last played item. 'resume-notime' to resume your last played item but starts from the beginning. +startup_idle_behavior=resume + +#--hides OSC idle screen message when opening and closing menu (could cause unexpected behavior if multiple scripts are triggering osc-idlescreen off) +toggle_idlescreen=no + +#--change to 0 so item resumes from the exact position, or decrease the value so that it gives you a little preview before loading the resume point +resume_offset=-0.65 + +#--yes is for displaying osd messages when actions occur. Change to no will disable all osd messages generated from this script +osd_messages=yes + +#--none: for disabled. notification: a message to resume the previous reached time will be triggered. force: to forcefully resume last playback based on threshold +resume_option=notification + +#--0 to always trigger the resume option when the same video has been played previously, a value such as 5 will only trigger the resume option if the last played time starts after 5% of the video and ends before completion by 5% +resume_option_threshold=0 + +#--yes is for marking the time as a chapter. no disables mark as chapter behavior. +mark_history_as_chapter=no + +#--yes so that blacklist becomes a whitelist, resulting in stuff such as paths / websites that are added to history_blacklist to be saved into history +invert_history_blacklist=no + +#--Paths / URLs / Websites / Files / Protocols / Extensions, that wont be added to history automatically, e.g.: ["c:\\users\\eisa01\\desktop", "c:\\users\\eisa01\\desktop\\*", "c:\\temp\\naruto-01.mp4", "youtube.com", "https://dailymotion.com/", "avi", "https://www.youtube.com/watch?v=e8YBesRKq_U", ".jpeg", "magnet:", "https://", "ftp"] +history_blacklist=[""] + +#--Keybind that will be used to immediately load and resume last item when no video is playing. If video is playing it will resume to the last found position +history_resume_keybind=["ctrl+r", "ctrl+R"] + +#--Keybind that will be used to immediately load the last item without resuming when no video is playing. If video is playing then it will add into playlist +history_load_last_keybind=["alt+r", "alt+R"] + +#--Keybind that will be used to open the list along with the specified filter. Available filters: "all", "recents", "distinct", "protocols", "fileonly", "titleonly", "timeonly", "keywords". +open_list_keybind=[ ["h", "all"], ["H", "all"], ["r", "recents"], ["R", "recents"] ] + +#--Keybind that is used while the list is open to jump to the specific filter (it also enables pressing a filter keybind twice to close list). Available filters: "all", "recents", "distinct", "protocols", "fileonly", "titleonly", "timeonly", "keywords". +list_filter_jump_keybind=[ ["h", "all"], ["H", "all"], ["r", "recents"], ["R", "recents"], ["d", "distinct"], ["D", "distinct"], ["f", "fileonly"], ["F", "fileonly"] ] + +####------Incognito Settings-----#### + +#--yes to automatically start incognito mode when mpv launches, no disables this behavior +auto_run_incognito_mode=no + +#--yes so that the file that had incognito mode triggered on gets removed from history automatically, no keeps the file in history that incognito mode triggered on +delete_incognito_entry=yes + +#--"none" for disabled, "deleted-restore" so that the the file that was removed when entering incognito automtically gets restored, "always" so that exiting incognito_mode always immediately updates entry into history +restore_incognito_entry=always + +#--Triggers incognito mode. When enabled files played wont be added to history until this mode is disabled. +history_incognito_mode_keybind=["ctrl+H"] + +####------Logging Settings------#### + +#--Change to "/:dir%script%" for placing it in the same directory of script, OR change to "/:dir%mpvconf%" for mpv portable_config directory. OR write any variable using "/:var" then the variable "/:var%APPDATA%" you can use path also, such as: "/:var%APPDATA%\mpv" OR "/:var%HOME%/mpv" OR specify the absolute path , e.g.: 'C:\Users\Eisa01\Desktop\' +log_path=/:dir%mpvconf% + +#--name+extension of the file that will be used to store the log data +log_file=mpvHistory.log + +#--Date format in the log (see lua date formatting), e.g.:"%d/%m/%y %X" or "%d/%b/%y %X" +date_format=%A/%B %d/%m/%Y %X + +#--Change between all, protocols, none. This option will store the media title in log file, it is useful for websites / protocols because title cannot be parsed from links alone +file_title_logging=protocols + +#--add below (after a comma) any protocol you want its title to be stored in the log file. This is valid only for (file_title_logging = "protocols" or file_title_logging = "all") +logging_protocols=["https?://", "magnet:", "rtmp:"] + +#--Prefers to use filename over filetitle. Select between local, protocols, all, and none. "local" prefer filenames for videos that are not protocols. "protocols" will prefer filenames for protocols only. "all" will prefer filename over filetitle for both protocols and not protocols videos. "none" will always use filetitle instead of filename +prefer_filename_over_title=local + +#--Limit saving entries with same path: -1 for unlimited, 0 will always update entries of same path, e.g. value of 3 will have the limit of 3 then it will start updating old values on the 4th entry. +same_entry_limit=2 + +####------List Settings-------#### + +#--yes is for going up on the first item loops towards the last item and vise-versa. no disables this behavior. +loop_through_list=no + +#--no is for more items to show, then u must reach the end. yes is for new items to show after reaching the middle of list. +list_middle_loader=yes + +#--Show file paths instead of media-title +show_paths=no + +#--Show the number of each item before displaying its name and values. +show_item_number=yes + +#--Change to yes or no. Slices long filenames per the amount specified below +slice_longfilenames=no + +#--Amount for slicing long filenames +slice_longfilenames_amount=55 + +#--Change maximum number to show items at once +list_show_amount=15 + +#--Keybind entries from 0 to 9 for quick selection when list is open (list_show_amount = 10 is maximum for this feature to work) +quickselect_0to9_keybind=yes + +#--Will exit the list when double tapping the main list, even if the list was accessed through a different filter. +main_list_keybind_twice_exits=yes + +#--To smartly set the search as not typing (when search box is open) without needing to press ctrl+enter. +search_not_typing_smartly=yes + +#--"specific" to find a match of either a date, title, path / url, time. "any" to find any typed search based on combination of date, title, path / url, and time. "any-notime" to find any typed search based on combination of date, title, and path / url, but without looking for time (this is to reduce unwanted results). +search_behavior=any + +####------Filter Settings-------#### +##--available filters: "all" to display all the items. Or "recents" to display recently added items to log without duplicate. Or "distinct" to show recent saved entries for files in different paths. Or "fileonly" to display files saved without time. Or "timeonly" to display files that have time only. Or "keywords" to display files with matching keywords specified in the configuration. Or "playing" to show list of current playing file. + +#--Jump to the following filters and in the shown sequence when navigating via left and right keys. You can change the sequence and delete filters that are not needed. +filters_and_sequence=["all", "recents", "distinct", "protocols", "playing", "fileonly", "titleonly", "keywords"] + +#--Keybind that will be used to go to the next available filter based on the filters_and_sequence +next_filter_sequence_keybind=["RIGHT", "MBTN_FORWARD"] + +#--Keybind that will be used to go to the previous available filter based on the filters_and_sequence +previous_filter_sequence_keybind=["LEFT", "MBTN_BACK"] + +#--yes is for bypassing the last filter to go to first filter when navigating through filters using arrow keys, and vice-versa. no disables this behavior. +loop_through_filters=yes + +#--Create a filter out of your desired "keywords", e.g.: youtube.com will filter out the videos from youtube. You can also insert a portion of filename or title, or extension or a full path / portion of a path. e.g.: ["youtube.com", "mp4", "naruto", "c:\\users\\eisa01\\desktop"] +keywords_filter_list=[""] + +####------Sort Settings-------#### +##--available sort: added-asc is for the newest added item to show first. Or added-desc for the newest added to show last. Or alphanum-asc is for A to Z approach with filename and episode number lower first. Or alphanum-desc is for its Z to A approach. Or time-asc, time-desc to sort the list based on time. + +#--the default sorting method for all the different filters in the list. select between: added-asc, added-desc, time-asc, time-desc, alphanum-asc, alphanum-desc +list_default_sort=added-asc + +#--Default sort for specific filters, e.g.: [ ["all", "alphanum-asc"], ["playing", "added-desc"] ] +list_filters_sort=[ ] + +#--Keybind to cycle through the different available sorts when list is open +list_cycle_sort_keybind=["alt+s", "alt+S"] + +####------List Design Settings------#### + +#--The alignment for the list, uses numpad positions choose from 1-9 or 0 to disable. e,g.:7 top left alignment, 8 top middle alignment, 9 top right alignment. +list_alignment=7 + +#--The time type for items on the list. Select between: duration, length, remaining. +text_time_type=duration + +#--Time seperator that will be used before the saved time +time_seperator= 🕒 + +#--The text that indicates there are more items above. \N is for new line. \h is for hard space. +list_sliced_prefix=...\h\N\N + +#--The text that indicates there are more items below +list_sliced_suffix=... + +#--yes enables pre text for showing quickselect keybinds before the list. no to disable +quickselect_0to9_pre_text=no + +#--Text color for list in BGR hexadecimal +text_color=ffffff + +#--Font size for the text of list +text_scale=50 + +#--Black border size for the text of list +text_border=0.7 + +#--Text color of current cursor position in BGR +text_cursor_color=ffbf7f + +#--Font size for text of current cursor position in list +text_cursor_scale=50 + +#--Black border size for text of current cursor position in list +text_cursor_border=0.7 + +#--Pre text for highlighted multi-select item +text_highlight_pre_text=✅ + +#--Search color when in typing mode +search_color_typing=ffffaa + +#--Search color when not in typing mode and it is active +search_color_not_typing=00bfff + +#--Header color in BGR hexadecimal +header_color=00bfff + +#--Header text size for the list +header_scale=55 + +#--Black border size for the Header of list +header_border=0.8 + +#--Text to be shown as header for the list +#--Available header variables: %cursor%, %total%, %highlight%, %filter%, %search%, %listduration%, %listlength%, %listremaining% +#--User defined text that only displays if a variable is triggered: %prefilter%, %afterfilter%, %prehighlight%, %afterhighlight% %presearch%, %aftersearch%, %prelistduration%, %afterlistduration%, %prelistlength%, %afterlistlength%, %prelistremaining%, %afterlistremaining% +#--Variables explanation: %cursor: displays the number of cursor position in list. %total: total amount of items in current list. %highlight%: total number of highlighted items. %filter: shows the filter name, %search: shows the typed search. Example of user defined text that only displays if a variable is triggered of user: %prefilter: user defined text before showing filter, %afterfilter: user defined text after showing filter. + +header_text=⌛ History [%cursor%/%total%]%prehighlight%%highlight%%afterhighlight%%prelistduration%%listduration%%afterlistduration%%prefilter%%filter%%afterfilter%%presort%%sort%%aftersort%%presearch%%search%%aftersearch% + +#--Sort method that is hidden from header when using %sort% variable +header_sort_hide_text=added-asc + +#--Text to be shown before or after triggered variable in the header +header_sort_pre_text= \{ +header_sort_after_text=} +header_filter_pre_text= [Filter: +header_filter_after_text=] +header_search_pre_text=\h\N\N[Search= +header_search_after_text=..] +header_highlight_pre_text=✅ +header_highlight_after_text= +header_list_duration_pre_text= 🕒 +header_list_duration_after_text= +header_list_length_pre_text= 🕒 +header_list_length_after_text= +header_list_remaining_pre_text= 🕒 +header_list_remaining_after_text= + +####-----Time Format Settings-----#### +##--in the first parameter, you can define from the available styles: default, hms, hms-full, timestamp, timestamp-concise "default" to show in HH:MM:SS.sss format. "hms" to show in 1h 2m 3.4s format. "hms-full" is the same as hms but keeps the hours and minutes persistent when they are 0. "timestamp" to show the total time as timestamp 123456.700 format. "timestamp-concise" shows the total time in 123456.7 format (shows and hides decimals depending on availability). +##--in the second parameter, you can define whether to show milliseconds, round them or truncate them. Available options: 'truncate' to remove the milliseconds and keep the seconds. 0 to remove the milliseconds and round the seconds. 1 or above is the amount of milliseconds to display. The default value is 3 milliseconds. +##--in the third parameter you can define the seperator between hour:minute:second. "default" style is automatically set to ":", "hms", "hms-full" are automatically set to " ". You can define your own. Some examples: ["default", 3, "-"],["hms-full", 5, "."],["hms", "truncate", ":"],["timestamp-concise"],["timestamp", 0],["timestamp", "truncate"],["timestamp", 5] + +osd_time_format=["default", "truncate"] +list_time_format=["default", "truncate"] +header_duration_time_format=["hms", "truncate", ":"] +header_length_time_format=["hms", "truncate", ":"] +header_remaining_time_format=["hms", "truncate", ":"] + +####------List Keybind Settings------#### +#--Add below (after a comma) any additional keybind you want to bind. Or change the letter inside the quotes to change the keybind +#--Example of changing and adding keybinds: --From ["b", "B"] To ["b"]. --From [""] to ["alt+b"]. --From [""] to ["a" "ctrl+a", "alt+a"] + +#--Keybind that will be used to navigate up on the list +list_move_up_keybind=["UP", "WHEEL_UP"] + +#--Keybind that will be used to navigate down on the list +list_move_down_keybind=["DOWN", "WHEEL_DOWN"] + +#--Keybind that will be used to go to the first item for the page shown on the list +list_page_up_keybind=["PGUP"] + +#--Keybind that will be used to go to the last item for the page shown on the list +list_page_down_keybind=["PGDWN"] + +#--Keybind that will be used to navigate to the first item on the list +list_move_first_keybind=["HOME"] + +#--Keybind that will be used to navigate to the last item on the list +list_move_last_keybind=["END"] + +#--Keybind that will be used to highlight while pressing a navigational keybind, keep holding shift and then press any navigation keybind, such as: up, down, home, pgdwn, etc.. +list_highlight_move_keybind=["SHIFT"] + +#--Keybind that will be used to highlight all displayed items on the list +list_highlight_all_keybind=["ctrl+a", "ctrl+A"] + +#--Keybind that will be used to remove all currently highlighted items from the list +list_unhighlight_all_keybind=["ctrl+d", "ctrl+D"] + +#--Keybind that will be used to load entry based on cursor position +list_select_keybind=["ENTER", "MBTN_MID"] + +#--Keybind that will be used to add entry to playlist based on cursor position +list_add_playlist_keybind=["CTRL+ENTER"] + +#--Keybind that will be used to add all highlighted entries to playlist +list_add_playlist_highlighted_keybind=["SHIFT+ENTER"] + +#--Keybind that will be used to close the list (closes search first if it is open) +list_close_keybind=["ESC", "MBTN_RIGHT"] + +#--Keybind that will be used to delete the entry based on cursor position +list_delete_keybind=["DEL"] + +#--Keybind that will be used to delete all highlighted entries from the list +list_delete_highlighted_keybind=["SHIFT+DEL"] + +#--Keybind that will be used to trigger search +list_search_activate_keybind=["ctrl+f", "ctrl+F"] + +#--Keybind that will be used to exit typing mode of search while keeping search open +list_search_not_typing_mode_keybind=["ALT+ENTER"] + +#--Keybind thats are ignored when list is open +list_ignored_keybind=["B", "b", "k", "K", "c", "C"] + +######----End of Settings----###### diff --git a/.config/mpv/script-opts/subs2srs.conf b/.config/mpv/script-opts/subs2srs.conf new file mode 100644 index 0000000..117bd7b --- /dev/null +++ b/.config/mpv/script-opts/subs2srs.conf @@ -0,0 +1,271 @@ +### +### Main mpvacious configuration file. +### Save this file to ~/.config/mpv/script-opts/subs2srs.conf +### + +## +## General settings +## + +# Anki deck for new cards. Subdecks are supported. +deck_name=Mining + +# Model names are listed in `Tools -> Manage note types` menu in Anki. +# If you don't have a model for Japanese, get it from +# https://tatsumoto.neocities.org/blog/setting-up-anki.html#import-an-example-mining-deck +model_name=Japanese sentences + +# Field names as they appear in the selected note type. +# If you set `audio_field` or `image_field` empty, +# the corresponding media file will not be created. +sentence_field=SentKanji +secondary_field=SentEng +audio_field=SentAudio +image_field=Image + +# The tag(s) added to new notes. Spaces separate multiple tags. +# Leave nothing after `=` to disable tagging completely. +# The following substitutions are supported: +# %n - the name of the video +# %t - timestamp +# %d - episode number (if none, returns nothing) +# %e - SUBS2SRS_TAGS environment variable (if you have it set) +note_tag=subs2srs +#note_tag=%n %t %e +#note_tag= + +# Size and name of the font used in the menu +menu_font_size=24 +menu_font_name=Noto Serif CJK JP + +## +## Toggleables. +## Possible values: `yes` or `no`. +## + +# Use FFmpeg encoder instead of mpv encoder +# If mpvacious encounters problems creating audio and images for Anki cards, +# setting this to `yes` should fix them. +# +# You need to install ffmpeg and add it to the PATH first. +# https://wiki.archlinux.org/title/FFmpeg +# https://www.ffmpeg.org/download.html +# +# FFmpeg encoder is unable to create audio and images from remote content (like YouTube videos). +use_ffmpeg=no + +# Automatically create the deck for new cards (see deck_name option) +create_deck=yes + +# Allow making notes with the same sentence field. +allow_duplicates=no + +# When mpv starts, automatically copy subs to the clipboard as they appear on screen. +# This option can be also toggled in the addon's OSD menu. +autoclip=yes + +# Command to run when autoclip is triggered. +# If empty, just copies text to the clipboard. +# If set, calls the external program. +# E.g., even though GoldenDict can watch the system clipboard, +# if you send subtitles directly to GoldenDict, you don't pollute the clipboard as much. +autoclip_command=goldendict +#autoclip_command=goldendict + +# Remove all spaces from the primary subtitle text. +# Set this to "yes" for languages without spaces like Japanese. +# However, if mpvacious detects any latin characters in the string, spaces will not be removed. +nuke_spaces=yes + +# if set to `yes`, the volume of the outputted audio file +# depends on the volume of the player at the time of export +tie_volumes=no + +# Remove text in parentheses and leading/trailing spaces or +# newlines that may interfere with Yomichan before copying +# subtitles to the clipboard +clipboard_trim_enabled=yes + +# Add media to fields before or after existing data +append_media=yes + +# Remove text in brackets before substituting %n into tag +tag_nuke_brackets=yes + +# Remove text in brackets before substituting %n into tag +tag_nuke_parentheses=no + +# Remove the episode number before substituting %n into tag +tag_del_episode_num=yes + +# Remove everything after the episode number before substituting %n into tag +# Does nothing if the previous option tag_del_episode_num is disabled. +tag_del_after_episode_num=yes + +# Convert filename to lowercase for tagging. +tag_filename_lowercase=no + +# Lets you disable anki browser manipulation by mpvacious. +disable_gui_browse=no + +# Play audio clip automatically in background +# after note creation (or note update) to ensure that the audio is correctly cut. +preview_audio=no + +# When selecting subtitle lines, print them on the screen. +show_selected_text=yes + +# For convenience, read config file from disk before a card is made. +# Useful if you change your config often since you won't have to restart mpv every time, +# but reading from disk takes some time. +reload_config_before_card_creation=yes + +## +## Image settings +## + +# Snapshot format. +# Do not switch to `jpg` unless your computer doesn't support `webp`. +snapshot_format=webp +#snapshot_format=jpg + +# Quality of produced image files. 0 = lowest, 100=highest. +snapshot_quality=15 + +# Image dimensions +# If either (but not both) of the width or height parameters is -2, +# the value will be calculated preserving the aspect-ratio. +snapshot_width=-2 +snapshot_height=200 + +# Screenshot (yes, no) +# Usually not required. +# When making Anki cards, create a screenshot (by calling 'screenshot-to-file') instead of a snapshot. +# If set to yes, image dimensions and quality cannot be controlled due to mpv limitations. +# 'snapshot_format' is still respected. +# When using this, a custom sync server is recommended, e.g. https://github.com/ankicommunity/anki-sync-server +screenshot=no + +# The exact image template used when exporting to Anki's image field. +# Adding data-editor-shrink="true" makes the image smaller by default within the Anki viewer +# on versions 2.1.53+ (equivalent of double-clicking on the image). +# You likely would not want to change this unless you know what you are doing. +image_template=snapshot +#image_template=snapshot + +# Similar to image_template but with audio. +# Normally, the user doesn't need to change this setting, +# but it may be needed for audio files to be playable on AnkiWeb. +audio_template=[sound:%s] +#audio_template= + +## +## Animated snapshots +## Animated snapshots will capture the video from the start to the end times selected when using mpvacious. +## + +# If enabled, generates animated snapshots (something like GIFs) instead of static snapshots. +animated_snapshot_enabled=no + +# Number of frame per seconds, a value between 0 and 30 (30 included) +# Higher values will increase both quality and file size, lower values will do the opposite +animated_snapshot_fps=10 + +# Animated snapshot dimensions +# If either (but not both) of the width or height parameters is -2, +# the value will be calculated preserving the aspect-ratio. +animated_snapshot_width=-2 +animated_snapshot_height=200 + +# Quality of the produced animation, 0 = lowest, 100 = highest +animated_snapshot_quality=5 + +## +## Audio settings +## + +# Audio format. +# Do not switch to `mp3` unless your computer doesn't support `opus`. +audio_format=opus +#audio_format=mp3 + +# Sane values are 16k-32k for opus, 64k-128k for mp3. +audio_bitrate=20k + +# Set a pad to the dialog timings. 0.5 = half a second. +# Pads are never applied to manually set timings. +audio_padding=0.0 +#audio_padding=0.5 + +## +## Forvo support (Yomichan users only) +## + +# yes - fetch audio from Forvo if Yomichan couldn't find the audio (default) +# always - always fetch audio from Forvo and replace the audio added by Yomichan +# no - never use Forvo +use_forvo=yes + +# Vocab field should be equal to {expression} field in Yomichan +vocab_field=VocabKanji + +# Vocab Audio field should be equal to {audio} field in Yomichan +vocab_audio_field=VocabAudio + +## +## Misc info +## Various context information that can be written on your cards in a specified field. +## + +# yes to enable or no to disable. +miscinfo_enable=yes + +# Field name +miscinfo_field=Notes + +# Format string used to fill the misc info field. +# It supports the same substitutions as `note_tag`. HTML is supported. +miscinfo_format=%n EP%d (%t) +#miscinfo_format=From mpvacious %n at %t. + +## +## Secondary subtitles +## Mpvacious can try automatically loading secondary subtitles that will appear at the top. +## For example, you may want to load English subs alongside Japanese subs. +## +## Secondary subtitles should be present in the container. +## But if you manually set secondary sid from the command line, mpvacious won't change it. +## + +# Language of secondary subs. +# If you leave this parameter empty, no secondary subs will be automatically loaded. +#secondary_sub_lang=eng,en,rus,ru,bel,be +secondary_sub_lang= + +# Hover area. +# Proportion of the top part of the mpv window where the secondary subtitles are visible when hovered over. +# Possible values: from 0.0 to 1.0 +secondary_sub_area=0.15 + +# Visibility state +# Can be set to: 'auto', 'never', 'always'. +# If set to 'never' or 'always', secondary_sub_area has no effect. +# If set to 'auto', visibility behaves according to the value of secondary_sub_area. +# Default binding to cycle this value: Ctrl+v. +secondary_sub_visibility=auto + +## +## Custom audio encoding arguments +## These arguments are added to the command line. +## `mpv` and `ffmpeg` accept slightly different parameters. +## Feel free to experiment for yourself, but be careful or media creation might stop working. +## + +# Ffmpeg +ffmpeg_audio_args=-af loudnorm=I=-16:TP=-1.5:LRA=11 +#ffmpeg_audio_args=-af silenceremove=1:0:-50dB + +# mpv +# mpv accepts each filter as a separate argument, e.g. --af-append=1 --af-append=2 +mpv_audio_args=--af-append=loudnorm=I=-16:TP=-1.5:LRA=11 +#mpv_audio_args=--af-append=silenceremove=1:0:-50dB