From 203c7a283e1e5e50044e823ddf6c42713c90a1a2 Mon Sep 17 00:00:00 2001 From: surdeus Date: Fri, 26 Jul 2024 03:31:29 +0500 Subject: [PATCH] feat: river: added mpv hotkey. --- dot/file/profile | 2 ++ mpv/mpv.conf | 8 ++++---- river/init | 5 +++++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/dot/file/profile b/dot/file/profile index d44e706..527c7c7 100755 --- a/dot/file/profile +++ b/dot/file/profile @@ -110,6 +110,8 @@ fi export XDISPLAY_REGION="slurp" export XDISPLAY_SCREENSHOT="grim" export XDISPLAY_REGION_SCREENSHOT='slurp | grim -g - - | wl-copy' + export XVIDEO_PLAYER='mpv' + export XLINK_VIDEO_PLAYER='mpv' # Android. export ANDROID_HOME="$HOME/app/android/Sdk" diff --git a/mpv/mpv.conf b/mpv/mpv.conf index d181673..fe6d927 100644 --- a/mpv/mpv.conf +++ b/mpv/mpv.conf @@ -1,5 +1,5 @@ keep-open=yes -ao=jack -osd-fractions -osd-level=1 -volume=30 +ao=pipewire +volume=60 +ytdl-raw-options=extractor-args="youtube:player-client=android" + diff --git a/river/init b/river/init index 5286464..a1be783 100755 --- a/river/init +++ b/river/init @@ -8,6 +8,7 @@ # See the river(1), riverctl(1), and rivertile(1) man pages for complete # documentation. # +# # Setting the default border width in pixels # and the border colors @@ -172,6 +173,10 @@ riverctl map normal Super Backspace spawn "riverctl keyboard-layout 'ru'" riverctl map normal Super+Alt R spawn "RIVER_RELOAD=1 $XDG_CONFIG_HOME/river/init && $XNOTIFY 'Reloaded the River configuration'" +# Link player. +riverctl map normal Super+Shift P spawn \ + 'p=`wl-paste` ; $XNOTIFY "$XLINK_VIDEO_PLAYER $p" ; ($XLINK_VIDEO_PLAYER $p || $XNOTIFY "$XLINK_VIDEO_PLAYER failed")' + # Run appications. riverctl map normal Super+Shift R spawn "$XRUNNER"