From ee889c465c3d26b33de22907ab2467645bd01e62 Mon Sep 17 00:00:00 2001 From: zjuyk Date: Mon, 22 Jul 2024 16:11:33 +0800 Subject: [PATCH] mpv-osc-modernx-git: add package, ref #3539 --- archlinuxcn/mpv-osc-modernx-git/PKGBUILD | 35 ++++++++++++++ archlinuxcn/mpv-osc-modernx-git/lilac.yaml | 13 +++++ archlinuxcn/mpv-osc-modernx-git/modernx.conf | 47 +++++++++++++++++++ .../mpv-osc-modernx-git/modernx.install | 14 ++++++ 4 files changed, 109 insertions(+) create mode 100644 archlinuxcn/mpv-osc-modernx-git/PKGBUILD create mode 100644 archlinuxcn/mpv-osc-modernx-git/lilac.yaml create mode 100644 archlinuxcn/mpv-osc-modernx-git/modernx.conf create mode 100644 archlinuxcn/mpv-osc-modernx-git/modernx.install diff --git a/archlinuxcn/mpv-osc-modernx-git/PKGBUILD b/archlinuxcn/mpv-osc-modernx-git/PKGBUILD new file mode 100644 index 000000000000..c469d63a87c9 --- /dev/null +++ b/archlinuxcn/mpv-osc-modernx-git/PKGBUILD @@ -0,0 +1,35 @@ +# Maintainer: zjuyk + +pkgname=mpv-osc-modernx-git +_gitname=ModernX +pkgver=1856_9.rc1.178.g05ef18d_2023.04.01 +pkgrel=1 +pkgdesc="A modern OSC UI replacement for MPV that retains the functionality of the default OSC." +arch=('x86_64') +url="https://github.com/cyl0/${_gitname}" +license=('LGPL-2.1-or-later') +depends=('mpv' 'ttf-material-design-iconic-font') +makedepends=('git') +provides=(mpv-osc-modernx) +conflicts=(mpv-osc-modernx) +backup=("etc/mpv/script-opts/modernx.conf") +install=modernx.install +source=( + "git+https://github.com/cyl0/${_gitname}.git#branch=with.thumbfast" + "modernx.conf" +) +md5sums=('SKIP' + '59746419670e6d4b3a0d31327ede8c8f') + +pkgver() { + cd "$srcdir/$_gitname" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +package() { + cd "${srcdir}/${_gitname}" + mkdir -p "${pkgdir}/etc/mpv/scripts" + install -D -m644 "modernx.lua" -t "${pkgdir}/etc/mpv/scripts/" + mkdir -p "${pkgdir}/etc/mpv/script-opts" + install -D -m644 "${srcdir}/modernx.conf" -t "${pkgdir}/etc/mpv/script-opts/" +} diff --git a/archlinuxcn/mpv-osc-modernx-git/lilac.yaml b/archlinuxcn/mpv-osc-modernx-git/lilac.yaml new file mode 100644 index 000000000000..b079548ef783 --- /dev/null +++ b/archlinuxcn/mpv-osc-modernx-git/lilac.yaml @@ -0,0 +1,13 @@ +maintainers: + - github: zjuyk + email: zjuyk@archlinuxcn.org + +build_prefix: archlinuxcn-x86_64 + +pre_build: vcs_update + +update_on: + - source: github + github: cyl0/ModernX + - source: manual + manual: 1 diff --git a/archlinuxcn/mpv-osc-modernx-git/modernx.conf b/archlinuxcn/mpv-osc-modernx-git/modernx.conf new file mode 100644 index 000000000000..dd829e866f70 --- /dev/null +++ b/archlinuxcn/mpv-osc-modernx-git/modernx.conf @@ -0,0 +1,47 @@ +# show osc when windowed +showwindowed=yes +# show osc when fullscreen +showfullscreen=yes +# scaling controller when windowed +scalewindowed=1 +# scaling controller when fullscreen +scalefullscreen=1 +# scaling when rendered on a forced window +scaleforcedwindow=2 +# scale the controller with the video +vidscale=no +# hide the OSC in ms if no mouse movement. +# internally negative is 'always-on'. +hidetimeout=1000 +# duration of fade out in ms, 0 means no fade +fadeduration=500 +# minimum amount of pixels the mouse has to +# move between ticks to make the OSC show up +minmousemove=3 +# use native mpv values and disable OSC +# internal track list management (and some +# functions that depend on it) +iamaprogrammer=no +# default osc title font (will fallback to regular fonts) +font=mpv-osd-symbols +# show seekrange overlay +seekrange=yes +# transparency of seekranges +seekrangealpha=128 +# use keyframes when dragging the seekbar +seekbarkeyframes=yes +# string compatible with property-expansion to be shown as OSC title +title=${media-title} +# show title and no hide timeout on pause +showtitle=yes +# display total time instead of remaining time? +timetotal=yes +# only used at init to set visibility_mode(...) +visibility=auto +# whether to show window controls (auto, yes, no) +windowcontrols=no +# volume control +volumecontrol=yes +processvolume=yes +# eng=English, chs=Chinese +language=eng diff --git a/archlinuxcn/mpv-osc-modernx-git/modernx.install b/archlinuxcn/mpv-osc-modernx-git/modernx.install new file mode 100644 index 000000000000..94edbd70848d --- /dev/null +++ b/archlinuxcn/mpv-osc-modernx-git/modernx.install @@ -0,0 +1,14 @@ +#!/bin/bash + +function whisperer(){ + echo "-----------------------------------------------------------------------" + echo "Please add config to mpv.conf" + echo "osc=no + border = no # Optional, but recommended" + echo "-----------------------------------------------------------------------" +} + +post_install() +{ + whisperer +}