A widget to control the Spotify using only your wibar.
Name | Description |
---|---|
awesome-git |
Highly configurable framework window manager. |
sp |
Spotify CLI controller |
Implementing this widget is as simple as peeling a banana 🍌.
- 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/
- 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/
- 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]
- 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.
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 |
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 |
Name | Preview |
---|---|
SPOTIFY IS NOT RUNNING | |
PLAYING | |
PAUSED | |
DISCONNECTED |