120 lines
3.7 KiB
YAML
120 lines
3.7 KiB
YAML
---
|
|
- name: mpv | Create config directory
|
|
file:
|
|
path: '~/.config/mpv/{{ item }}'
|
|
state: directory
|
|
mode: '755'
|
|
loop: [fonts, shaders, scripts, script-opts]
|
|
|
|
- name: mpv | Copy config
|
|
template:
|
|
src: mpv/mpv.j2
|
|
dest: ~/.config/mpv/mpv.conf
|
|
force: true
|
|
mode: '644'
|
|
|
|
# Busybox has 'unzip' so use that
|
|
# 'zipinfo' is required for 'unarchive' module, but it is only available in 'unzip' package
|
|
- name: mpv | Install Anime4K shaders
|
|
tags: [mpv-extend, mpv-anime4k]
|
|
block:
|
|
- name: mpv | Download Anime4K zip file
|
|
get_url:
|
|
url: 'https://github.com/bloc97/Anime4K/releases/download/v{{ anime4k_shaders_version }}/Anime4K_v4.0.zip'
|
|
dest: /tmp/Anime4K.zip
|
|
mode: '644'
|
|
|
|
- name: mpv | Unzip Anime4K shaders
|
|
command: unzip /tmp/Anime4K.zip -d ~/.config/mpv/shaders
|
|
args:
|
|
creates: ~/.config/mpv/shaders/Anime4K_Clamp_Highlights.glsl
|
|
|
|
- name: mpv | Install and configure modernx OSC tweak
|
|
tags: [mpv-extend, mpv-mordenx]
|
|
block:
|
|
- name: mpv | Download modernx OSC script
|
|
get_url:
|
|
url: https://github.com/cyl0/ModernX/raw/main/modernx.lua
|
|
dest: ~/.config/mpv/scripts/modernx.lua
|
|
mode: '644'
|
|
|
|
- name: mpv | Download Material Design Iconic font zip file
|
|
get_url:
|
|
url: 'https://github.com/zavoloklom/material-design-iconic-font/releases/download/{{ material_iconic_font_version }}/material-design-iconic-font.zip'
|
|
dest: /tmp/material-design-iconic-font.zip
|
|
mode: '644'
|
|
|
|
- name: mpv | Unzip Material Design Iconic font
|
|
command: unzip -j /tmp/material-design-iconic-font.zip fonts/Material-Design-Iconic-Font.ttf -d ~/.config/mpv/fonts
|
|
args:
|
|
creates: ~/.config/mpv/fonts/Material-Design-Iconic-Font.ttf
|
|
|
|
- name: mpv | Disable default OSC and border in mpv config
|
|
lineinfile:
|
|
path: ~/.config/mpv/mpv.conf
|
|
state: present
|
|
regexp: '^{{ item | regex_replace("no$", "") }}'
|
|
line: '{{ item }}'
|
|
loop:
|
|
- osc=no
|
|
- border=no
|
|
|
|
- name: mpv | Copy OSC config for mordenx script
|
|
template:
|
|
src: mpv/osc.j2
|
|
dest: ~/.config/mpv/script-opts/osc.conf
|
|
mode: '644'
|
|
|
|
- name: mpv | Install and configure thumbfast script
|
|
tags: [mpv-extend, mpv-thumbfast]
|
|
block:
|
|
- name: mpv | Install thumbfast script
|
|
get_url:
|
|
url: https://github.com/po5/thumbfast/raw/master/thumbfast.lua
|
|
dest: ~/.config/mpv/scripts/thumbfast.lua
|
|
mode: '644'
|
|
|
|
- name: mpv | Copy thumbfast configuration
|
|
copy:
|
|
src: mpv/thumbfast.conf
|
|
dest: ~/.config/mpv/script-opts/thumbfast.conf
|
|
mode: '644'
|
|
|
|
- name: mpv | Install and configure autosubsync-mpv script
|
|
tags: [mpv-extend, mpv-subsync]
|
|
block:
|
|
- name: mpv | Clone autosubsync-mpv repository
|
|
git:
|
|
depth: 1
|
|
repo: https://github.com/joaquintorres/autosubsync-mpv.git
|
|
dest: ~/.config/mpv/scripts/autosubsync
|
|
|
|
- name: mpv | Copy autosubsync configuration
|
|
template:
|
|
src: mpv/autosubsync.j2
|
|
dest: ~/.config/mpv/script-opts/autosubsync.conf
|
|
force: true
|
|
mode: '644'
|
|
|
|
- name: mpv | Install mpv-gif script
|
|
get_url:
|
|
url: https://github.com/tyalie/mpv-gif-generator/raw/main/mpv-gif.lua
|
|
dest: ~/.config/mpv/scripts/mpv-gif.lua
|
|
mode: '644'
|
|
tags: [mpv-extend, mpv-gif]
|
|
|
|
- name: mpv | Install mpv-webm script
|
|
get_url:
|
|
url: https://github.com/ekisu/mpv-webm/releases/download/latest/webm.lua
|
|
dest: ~/.config/mpv/scripts/webm.lua
|
|
mode: '644'
|
|
tags: [mpv-extend, mpv-webm]
|
|
|
|
- name: mpv | Copy input config
|
|
copy:
|
|
src: mpv/input.conf
|
|
dest: ~/.config/mpv/input.conf
|
|
force: true
|
|
mode: '644'
|
|
tags: mpv-extend
|