Module musicctl.lua

Fine-grained media player control for awesomewm.

Controls playback and volume of MPRIS-compatable media sources.

Info:

  • Author: TheoryToE

Theme variables

beautiful.musicctl_col Primary accent color of widgets
beautiful.musicctl_col_alt Secondary accent color of widgets
beautiful.musicctl_fg Foreground color of widgets
beautiful.musicctl_bg Background color of widgets

Mode control

switch_mode () Iterate through table 'modes', taking control of player
set_modes (newmodes) Set the table of controlled modes

Playback control

playback_toggle () Toggle playback of selected player
playback_next () Next song of controlled player
playback_previous () Previous song of controlled player

Volume control

vol_increment (amount) Granular volume increment control
vol_up () Increase volume of current player
vol_down () Decrease volume of current player
vol_mute () Mute current player
vol_const (num) Set volume to a constant value


Theme variables

beautiful.musicctl_col
Primary accent color of widgets

Type:

  • color string hex color code (default: '#a7c080')
beautiful.musicctl_col_alt
Secondary accent color of widgets

Type:

  • color string hex color code (default: '#404d44')
beautiful.musicctl_fg
Foreground color of widgets

Type:

  • color string hex color code (default: '#d3c6aa')
beautiful.musicctl_bg
Background color of widgets

Type:

  • color string hex color code (default: '#2f383e')

Mode control

switch_mode ()
Iterate through table 'modes', taking control of player
set_modes (newmodes)
Set the table of controlled modes

Parameters:

  • newmodes table string array of modes to control

Usage:

    M.set_modes({ 'vlc', 'spotify'})

Playback control

playback_toggle ()
Toggle playback of selected player
playback_next ()
Next song of controlled player
playback_previous ()
Previous song of controlled player

Volume control

vol_increment (amount)
Granular volume increment control

Parameters:

Usage:

    -- incremental control (increment polarity (+/-) must follow the number with no space)
    -- don't use this unless you *really* need too
    vol_increment('0.1-') -- vol down
    vol_increment('0.1+') -- vol up
vol_up ()
Increase volume of current player
vol_down ()
Decrease volume of current player
vol_mute ()
Mute current player
vol_const (num)
Set volume to a constant value

Parameters:

  • num int volume to set (0.01 - 1), if ooutside these bounds, defaults to 0.02
generated by LDoc 1.4.6 Last updated 2022-04-14 21:25:28