Skip to content

Commit

Permalink
mpv-osc-modernx-git: add package, ref #3539
Browse files Browse the repository at this point in the history
  • Loading branch information
zjuyk committed Jul 22, 2024
1 parent dd79fd1 commit ee889c4
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 0 deletions.
35 changes: 35 additions & 0 deletions archlinuxcn/mpv-osc-modernx-git/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Maintainer: zjuyk <ownbyzjuyk@gmail.com>

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/"
}
13 changes: 13 additions & 0 deletions archlinuxcn/mpv-osc-modernx-git/lilac.yaml
Original file line number Diff line number Diff line change
@@ -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
47 changes: 47 additions & 0 deletions archlinuxcn/mpv-osc-modernx-git/modernx.conf
Original file line number Diff line number Diff line change
@@ -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
14 changes: 14 additions & 0 deletions archlinuxcn/mpv-osc-modernx-git/modernx.install
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit ee889c4

Please sign in to comment.