File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ An extensible lyrics fetcher, with daemon support for cmus and mocp.
55
66### Features:
77 - support for plugins
8- - cmus and mocp daemon mode
8+ - cmus, mocp and playerctl daemon mode
99
1010### Dependencies:
1111
@@ -18,7 +18,8 @@ usage: clyrics [options] [song name]
1818options:
1919 -m : start as a daemon for moc player
2020 -c : start as a daemon for cmus player
21- -s <int> : sleep duration between lyrics updates (default: 3)
21+ -p : start as a daemon for playerctl media controller
22+ -s <int> : sleep duration between lyrics updates (default: 1)
2223 -P <dir> : plugin directory (default: ~/.config/clyrics)
2324
2425 -d : activate the debug mode
Original file line number Diff line number Diff line change @@ -37,13 +37,13 @@ use Time::HiRes qw(sleep);
3737
3838# Name and version
3939my $name = ' clyrics' ;
40- my $version = ' 0.10 ' ;
40+ my $version = ' 0.11 ' ;
4141
4242# Debug mode
4343my $DEBUG = 0;
4444
4545# Sleep duration
46- my $SLEEP_SECONDS = 3 ;
46+ my $SLEEP_SECONDS = 1 ;
4747
4848# .config directory
4949my $xdg_config_home = $ENV {XDG_CONFIG_HOME }
@@ -180,7 +180,7 @@ options:
180180
181181example:
182182 $0 -m -s 1 # stars the mocp daemon
183- $0 dust of the chase # prints the lyrics of "RWH - Dust of the chase "
183+ $0 eminem not afraid # prints the lyrics of "Eminem - Not Afraid "
184184USAGE
185185}
186186
@@ -240,7 +240,6 @@ sub mocp_daemon {
240240
241241 daemon_loop(
242242 sub {
243-
244243 my $info = ` mocp --info &>/dev/stdout` ;
245244 $? and die " [!] moc player is not installed!\n " ;
246245
@@ -297,6 +296,7 @@ sub cmus_daemon {
297296
298297# playerctl daemon
299298sub playerctl_daemon {
299+
300300 daemon_loop(
301301 sub {
302302 my $info = ` playerctl metadata --format '{{artist}}\n {{title}}\n {{status}}' &>/dev/stdout` ;
You can’t perform that action at this time.
0 commit comments