Code Monkey home page Code Monkey logo

awesomewm-media-player-widget's Introduction

AwesomeWM Media Player Widget

Pure Lua implementation of a Media Player Widget, supports any media player complaint with MPRIS D-Bus MediaPlayer2.Player interface

Some examples are: mpd, vlc, audacious, bmp, xmms2, spotify and mpv with a plugin

Media Player Screenshot

Installation

Lua D-Bus Proxy handles connections with D-Bus interface to read data regarding current playing music and artist to fill the widget. Lua D-Bus proxy is available at Luarocks. Further installation info available here

Drop the plugin code into your AwesomeWM configuration folder. e.g.:

[[ -d ~/.config/awesome/plugins ]] || mkdir ~/.config/awesome/plugins
cd ~/.config/awesome/plugins

git clone https://github.com/macunha1/awesomewm-media-player-widget \
    ~/.config/awesome/plugins/media-player

In case your AwesomeWM configuration is a git repository, you can add as a submodule with

cd ~/.config/awesome

git submodule add -b master \
    -f --name media-player-widget \
    https://github.com/macunha1/awesomewm-media-player-widget \
    plugins/media-player

git submodule sync --recursive .

Usage

Lastly, import the plugin into your rc.lua, configure according to your style and keep on Rollin':

-- load the widget code
local media_player = require("plugins.media-player")

-- be free to configure your media player widget:
local spotify_widget = media_player({
    icons  = {
        play   = theme.play,
        pause  = theme.pause
    },
    font         = theme.font,
    name         = "spotify", -- target media player
    refresh_rate = 0.3 -- interval between widget update calls
}).widget

fake.wibar:set {
    layout = wibox.layout.align.horizontal,
    -- ...
    {
        -- ...
        separator,
        media_player_widget,
        -- ...
    }
    -- ...
}

By default the widget hides itself when no data regarding a media player is found through MPRIS D-Bus interface. In case you're planning to inspect many at the same time, it's possible to create many instances of the widget (media_player) and attach to your wibar.

awesomewm-media-player-widget's People

Contributors

macunha1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.