Skip to content

Latest commit

 

History

History

spotify_bar

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Awesome Window Manager

🌥️ Spotify Bar

Widget Preview

A widget to control the Spotify using only your wibar.


📑 Table of Contents


🔧 Dependencies

Name Description
awesome-git Highly configurable framework window manager.
sp Spotify CLI controller

🚀 Installation

Implementing this widget is as simple as peeling a banana 🍌.

  1. you need to have Spotify CLI installed, it uses dbus to communicate with spotify-client
git clone https://gist.github.com/fa6258f3ff7b17747ee3.git
cd ./fa6258f3ff7b17747ee3 
chmod +x sp
# This widget will work by default if the binary is in the system PATH
sudo cp ./sp /usr/local/bin/
# Alternatively, you may save the binary anywhere and supply the path via this widget's sp_bin argument:
# cp ./sp ~/.config/awesome/scripts/
  1. Clone this repository and copy the files to the Awesome WM configuration directory. eg:
git clone https://github.com/paodelonga/awesome-widgets.git
cp --recursive --parents awesome-widgets/widgets/ ~/.config/awesome/
  1. Then add the following lines to your rc.lua
-- Importing the widget
local widgets = require("widgets")

-- Configure the Widget
local spotify_bar = widgets.spotify_bar({
    timeout = 1,
    font = {
        name = "Font Name",
        color = "HEX Color Code"
    },
    separator = ' - ',
    sp_bin = 'sp_bin'
})
-- Add the Widget to your Wibar
s.wibar:setup({
    spotify_bar
})

--[>D]
  1. Then go to the init.lua file and uncomment the following line
 -- To activate a Widget, move the line outside the comment block.
return {
	--[[
-   spotify_bar = require("widgets.spotify_bar")
	--]]
+   spotify_bar = require("widgets.spotify_bar")
}

 --[>D]

Check the configuration category to learn more about the widgets parameters and settings.

Now the widget has been installed, to initialize just restart your environment.


⚙️ Configuration

📑 Parameters

Parameter Description Type Default
timeout Check execution interval number 2
font Table containing information about the source table
font.name Name of the font to be used string Noto Mono 9
font.color Color of the font string #FAFAFA
separator Separator between song artist and title string -
sp_bin path or name for the spotify dbus controller for linux string sp

🚀 Use

🚀 Actions

Has some actions binded in this widget

Button Action
Mouse - Left Click Play/Pause current song
Mouse - Right Click Close/Open the Spotify
Mouse - Scroll Up Previous song
Mouse - Scroll Down Next song

🚀 Status

Name Preview
SPOTIFY IS NOT RUNNING Image
PLAYING Image
PAUSED Image
DISCONNECTED Image

💡 Contributors


👤 Credits

Back to top