Skip to content

Commit 059f8dc

Browse files
committed
usage
1 parent dd9c162 commit 059f8dc

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

xklb/usage.py

+21-19
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,27 @@ def play(action) -> str:
537537
library {action} -m 4 --screen-name eDP # play four media at once on specific screen
538538
library {action} -m 4 --loop --crop # play four cropped videos on a loop
539539
library {action} -m 4 --hstack # use hstack style
540+
541+
When using `--multiple-playback` it may help you to set simple focus-under-window rules while using this to prevent keys from accidentally being entered in the wrong mpv window (as new windows are created and capture the cursor focus).
542+
You can set and restore your previous mouse focus setting by wrapping the command like this:
543+
544+
focus-under-mouse
545+
library watch ... --multiple-playback 4
546+
focus-follows-mouse
547+
548+
For example in KDE:
549+
550+
function focus-under-mouse
551+
kwriteconfig5 --file kwinrc --group Windows --key FocusPolicy FocusUnderMouse
552+
qdbus-qt5 org.kde.KWin /KWin reconfigure
553+
end
554+
555+
function focus-follows-mouse
556+
kwriteconfig5 --file kwinrc --group Windows --key FocusPolicy FocusFollowsMouse
557+
kwriteconfig5 --file kwinrc --group Windows --key NextFocusPrefersMouse true
558+
qdbus-qt5 org.kde.KWin /KWin reconfigure
559+
end
560+
540561
"""
541562

542563

@@ -1733,25 +1754,6 @@ def play(action) -> str:
17331754
k quit 5
17341755
r quit 6
17351756
1736-
NB. It may help you to set simple focus-under-window rules while using this to prevent keys from accidenly being entered in the wrong mpv windows as new ones are created and capture focus. You can restore your previous mouse focus setting by wrapping the command like this:
1737-
1738-
focus-under-mouse
1739-
library watch ...
1740-
focus-follows-mouse
1741-
1742-
For example:
1743-
1744-
function focus-under-mouse
1745-
kwriteconfig5 --file kwinrc --group Windows --key FocusPolicy FocusUnderMouse
1746-
qdbus-qt5 org.kde.KWin /KWin reconfigure
1747-
end
1748-
1749-
function focus-follows-mouse
1750-
kwriteconfig5 --file kwinrc --group Windows --key FocusPolicy FocusFollowsMouse
1751-
kwriteconfig5 --file kwinrc --group Windows --key NextFocusPrefersMouse true
1752-
qdbus-qt5 org.kde.KWin /KWin reconfigure
1753-
end
1754-
17551757
Download checked videos
17561758
17571759
library download --fs open_dir.db --prefix ~/d/dump/video/ -w 'id in (select media_id from history)'

0 commit comments

Comments
 (0)