-
Notifications
You must be signed in to change notification settings - Fork 24
/
mpvpaper.man
170 lines (135 loc) · 4.48 KB
/
mpvpaper.man
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
.TH MPVPAPER 1 "September 2022" "mpvpaper 1.3" "User Manual"
.SH NAME
mpvpaper \- video wallpaper player using mpv for wlroots
.SH SYNOPSIS
mpvpaper [options] <output> <url|path filename>
.SH DESCRIPTION
.P
\fBmpvpaper\fR is a wallpaper program for wlroots based Wayland compositors, such as Sway.
That allows you to play videos with \fBmpv\fR as your wallpaper.
.SH OPTIONS
.TP
\fB\-h\fR, \fB\-\-help\fR
Displays usage options
.TP
\fB\-d\fR, \fB\-\-help-output\fR
Displays all available outputs and quits
.TP
\fB\-v\fR, \fB\-\-verbose\fR
Be more verbose (-vv for higher verbosity)
.TP
\fB\-f\fR, \fB\-\-fork\fR
Forks mpvpaper so you can close the terminal
.TP
\fB\-p\fR, \fB\-\-auto-pause\fR
Automagically pause mpv when the wallpaper is hidden*
This saves CPU usage, more or less, seamlessly
.TP
\fB\-s\fR, \fB\-\-auto-stop\fR
Automagically stop mpv when the wallpaper is hidden*
This saves CPU/RAM usage, although more abruptly
.TP
\fB\-n\fR, \fB\-\-slideshow\fR <seconds>
Slideshow mode plays the next video in a playlist every \fI\<seconds>\fR
And passes mpv options "loop loop-playlist" for convenience
.TP
\fB\-l\fR, \fB\-\-layer\fR <layer>
Specifies shell surface \fI\<layer>\fR to run on (background by default)
.TP
\fB\-o\fR, \fB\-\-mpv-options\fR <"options">
Forwards mpv \fI\<"options">\fR
Must be within quotes if multiple options are passed
.SH EXAMPLES
Simple example:
.RS
mpvpaper DP-2 /path/to/video
.RE
You can select the output with either a connection or identifier names:
.RS
mpvpaper 'DP-2 DP-1 HDMI-A-1' /path/to/video
.RE
.RS
mpvpaper 'Acer Technologies Acer H236HL LX1AA12341234' /path/to/video
.RE
To play the same video on all outputs:
.RS
mpvpaper '*' /path/to/video
.RE
Forward mpv options by passing "--mpv-options" or "-o" like so:
.RS
mpvpaper -o "no-audio --loop-playlist shuffle" HDMI-A-1 www.url/to/playlist
.RE
You can also control mpvpaper just like \fBmpv\fR in the terminal with keyboard bindings.
But if you would like to control mpvpaper while it\'s forked, you could use a mpv input-ipc-server like this:
.RS
mpvpaper -o "input-ipc-server=/tmp/mpv-socket-DP-1" DP-1 /path/to/video
.RE
Then input commands with \fBsocat\fR. For example, toggle pause:
.RS
echo 'cycle pause' | socat - /tmp/mpv-socket-DP-1
.RE
For more mpv commands read:
.UR https://mpv.io/manual/master/#command-interface
.UE
.SH FILES
These files(watch lists) contain lists of program names that, if found running with \fBpidof\fR,
will cause mpvpaper to pause/stop and must be created manually**
.RS
.I ~/.config/mpvpaper/pauselist
.RS
List of program names that will cause mpvpaper to pause
.RE
.I ~/.config/mpvpaper/stoplist
.RS
List of program names that will cause mpvpaper to stop
.RE .RE
Add programs that can be found with the \fBpidof\fR command into the list and separate by spaces or newlines.
.br .br
For example: "firefox steam obs" or:
.RS
"firefox
steam
obs"
.RE
.SH NOTES
*Limitations of automagic:
.RS
.P
mpvpaper manipulates a feature of Wayland called a "surface frame callback"
.P
This feature of Wayland allows mpvpaper to draw/render only when it makes sense to do so.
And one reason mpvpaper might not draw/render is if it\'s "hidden".
This is the magic behind the automagic pause/stop options.
.P
Whatever "hidden" means is up to compositor. As for Sway, "hidden" is if there is a fullscreen window
in the way of the wallpaper. mpvpaper will still draw/render even if there is a normal window
blocking the wallpaper view entirely.
.P
This feature is at best a hack that works on some compositors.
Usability of these auto options will vary and may not work as intended or at all.
In such a case, other features like the "watch lists" mentioned above should be used instead.
.RE
**More on lists:
.RS
\(bu mpvpaper will automatically resume only after all the programs
in the watch lists are no longer running
\(bu If there are programs running from both lists, stopping will always win out
\(bu Programs added into a list at runtime will be ignored, unless restarted or "stopped"
.RE
Extra notes:
.RS
\(bu When mpvpaper is resuming after "stopping", mpvpaper should begin where it left off.
Both in terms of time position and playlist position(if not shuffled)
\(bu There is a small time delay(1-2 secs.) with the automagic options
as it uses time to calculate when to act
\(bu mpv user configs are loaded by default
.RE
.SH AUTHOR
Created by GhostNaN
.SM Based on \fBswaybg\fR
.SM Inspired by scoopta\'s \fBglpaper\fR
Code Repository:
.UR https://github.com/GhostNaN/mpvpaper/
.UE
.SH SEE ALSO
mpv (1)