aboutsummaryrefslogtreecommitdiff
path: root/rcsample.lua
diff options
context:
space:
mode:
authorAlexander Yakushev <yakushev.alex@gmail.com>2011-07-26 22:27:33 +0300
committerAlexander Yakushev <yakushev.alex@gmail.com>2011-07-26 22:27:33 +0300
commit8d0ed9774285084d0a55e5c30ae18680186db76a (patch)
tree2dcd68e0d9273b52fd0df9c396de74fa40a96075 /rcsample.lua
parentf0828b11cc315e6760688a27be1660a70fc38c66 (diff)
downloadawesompd-8d0ed9774285084d0a55e5c30ae18680186db76a.tar.gz
awesompd-8d0ed9774285084d0a55e5c30ae18680186db76a.tar.bz2
Final bugfixes and updated rcsample.lua
Diffstat (limited to 'rcsample.lua')
-rw-r--r--rcsample.lua37
1 files changed, 32 insertions, 5 deletions
diff --git a/rcsample.lua b/rcsample.lua
index 768a679..71d9349 100644
--- a/rcsample.lua
+++ b/rcsample.lua
@@ -6,7 +6,6 @@ require("awful.rules")
require("beautiful")
-- Notification library
require("naughty")
-require("awesompd")
-- Load Debian menu entries
require("debian.menu")
@@ -80,14 +79,38 @@ mytextclock = awful.widget.textclock({ align = "right" })
-- Create a systray
mysystray = widget({ type = "systray" })
--- Create a wibox for each screen and add it
+-- BEGIN OF AWESOMPD WIDGET DECLARATION
+
+ require('awesompd')
musicwidget = awesompd:create() -- Create awesompd widget
musicwidget.font = "Liberation Mono" -- Set widget font
musicwidget.scrolling = true -- If true, the text in the widget will be scrolled
musicwidget.output_size = 30 -- Set the size of widget in symbols
musicwidget.update_interval = 10 -- Set the update interval in seconds
- musicwidget.path_to_icons = "/home/unlogic/.config/awesome/icons" -- Set the folder where icons are located (change username to your login name)
+
+ -- Set the folder where icons are located (change username to your login name)
+ musicwidget.path_to_icons = "/home/username/.config/awesome/icons"
+
+ -- Set the default music format for Jamendo streams. You can change
+ -- this option on the fly in awesompd itself.
+ -- possible formats: awesompd.FORMAT_MP3, awesompd.FORMAT_OGG
+ musicwidget.jamendo_format = awesompd.FORMAT_MP3
+
+ -- If true, song notifications for Jamendo tracks will also contain
+ -- album cover image.
+ instance.show_jamendo_album_covers = true
+
+ -- Specify how big in pixels should an album cover be. Maximum value
+ -- is 100.
+ instance.album_cover_size = 50
+
+ -- Specify decorators on the left and the right side of the
+ -- widget. Or just leave empty strings if you decorate the widget
+ -- from outside.
+ musicwidget.ldecorator = " "
+ musicwidget.rdecorator = " "
+
-- Set all the servers to work with (here can be any servers you use)
musicwidget.servers = {
{ server = "localhost",
@@ -95,6 +118,7 @@ mysystray = widget({ type = "systray" })
{ server = "192.168.0.72",
port = 6600 }
}
+
-- Set the buttons of the widget
musicwidget:register_buttons({ { "", awesompd.MOUSE_LEFT, musicwidget:command_toggle() },
{ "Control", awesompd.MOUSE_SCROLL_UP, musicwidget:command_prev_track() },
@@ -102,7 +126,10 @@ mysystray = widget({ type = "systray" })
{ "", awesompd.MOUSE_SCROLL_UP, musicwidget:command_volume_up() },
{ "", awesompd.MOUSE_SCROLL_DOWN, musicwidget:command_volume_down() },
{ "", awesompd.MOUSE_RIGHT, musicwidget:command_show_menu() } })
- musicwidget:run()
+ musicwidget:run() -- After all configuration is done, run the widget
+
+-- END OF AWESOMPD WIDGET DECLARATION
+-- Don't forget to add the widget to the wibox. It is done on the line 202.
mywibox = {}
mypromptbox = {}
@@ -173,7 +200,7 @@ for s = 1, screen.count() do
},
mylayoutbox[s],
mytextclock,
- musicwidget.widget,
+ musicwidget.widget, -- Awesompd widget is added like this
s == 1 and mysystray or nil,
mytasklist[s],
layout = awful.widget.layout.horizontal.rightleft