]> git.rmz.io Git - dotfiles.git/blob - awesome/widgets/awesompd.lua
vim: use XDG specification
[dotfiles.git] / awesome / widgets / awesompd.lua
1 local awesompd = require("widgets/awesompd/awesompd")
2 local musicwidget
3
4 musicwidget = awesompd:create() -- Create awesompd widget
5 musicwidget.font = "Liberation Mono" -- Set widget font
6 musicwidget.scrolling = true -- If true, the text in the widget will be scrolled
7 musicwidget.output_size = 30 -- Set the size of widget in symbols
8 musicwidget.update_interval = 1 -- Set the update interval in seconds
9 -- Set the folder where icons are located
10 musicwidget.path_to_icons = "/home/ramsi/.config/awesome/widgets/awesompd/icons"
11 -- Set the default music format for Jamendo streams. You can change
12 -- this option on the fly in awesompd itself.
13 -- possible formats: awesompd.FORMAT_MP3, awesompd.FORMAT_OGG
14 musicwidget.jamendo_format = awesompd.FORMAT_OGG
15 -- If true, song notifications for Jamendo tracks and local tracks will also contain
16 -- album cover image.
17 musicwidget.show_album_cover = true
18 -- Specify how big in pixels should an album cover be. Maximum value
19 -- is 100.
20 musicwidget.album_cover_size = 50
21 -- This option is necessary if you want the album covers to be shown
22 -- for your local tracks.
23 musicwidget.mpd_config = "/home/ramsi/.config/mpd/mpd.conf"
24 -- Specify the browser you use so awesompd can open links from
25 -- Jamendo in it.
26 musicwidget.browser = "mimeo"
27 -- Specify decorators on the left and the right side of the
28 -- widget. Or just leave empty strings if you decorate the widget
29 -- from outside.
30 musicwidget.ldecorator = ""
31 musicwidget.rdecorator = " "
32 -- Set all the servers to work with (here can be any servers you use)
33 musicwidget.servers = {
34 { server = "localhost",
35 port = 6600 } }
36 -- Set the buttons of the widget
37 musicwidget:register_buttons({
38 { "", awesompd.MOUSE_LEFT, musicwidget:command_playpause() },
39 { "Control", awesompd.MOUSE_SCROLL_UP, musicwidget:command_prev_track() },
40 { "Control", awesompd.MOUSE_SCROLL_DOWN, musicwidget:command_next_track() },
41 { "", awesompd.MOUSE_SCROLL_UP, musicwidget:command_volume_up() },
42 { "", awesompd.MOUSE_SCROLL_DOWN, musicwidget:command_volume_down() },
43 { "", awesompd.MOUSE_RIGHT, musicwidget:command_show_menu() },
44 })
45 musicwidget:run() -- After all configuration is done, run the widget
46
47 return musicwidget.widget