X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/dd30f585b4ec95426cb4f7348b4893c238250e1c..d4b51f09d83f75a663c5711af77e0e6da40764a9:/awesome/widgets/awesompd.lua diff --git a/awesome/widgets/awesompd.lua b/awesome/widgets/awesompd.lua index ea8ea2a..d697be1 100644 --- a/awesome/widgets/awesompd.lua +++ b/awesome/widgets/awesompd.lua @@ -2,12 +2,12 @@ local awesompd = require("widgets/awesompd/awesompd") local musicwidget musicwidget = awesompd:create() -- Create awesompd widget -musicwidget.font = "Liberation Mono" -- Set widget font +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 = 1 -- Set the update interval in seconds -- Set the folder where icons are located -musicwidget.path_to_icons = "/home/ramsi/.config/awesome/widgets/awesompd/icons" +musicwidget.path_to_icons = "/home/ramsi/.config/awesome/widgets/awesompd/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 @@ -32,7 +32,9 @@ musicwidget.rdecorator = " " -- Set all the servers to work with (here can be any servers you use) musicwidget.servers = { { server = "localhost", - port = 6600 } } + port = 6600 }, + { server = "localhost", + port = 6601 } } -- Set the buttons of the widget musicwidget:register_buttons({ { "", awesompd.MOUSE_LEFT, musicwidget:command_playpause() }, @@ -41,7 +43,21 @@ musicwidget:register_buttons({ { "", awesompd.MOUSE_SCROLL_UP, musicwidget:command_volume_up() }, { "", awesompd.MOUSE_SCROLL_DOWN, musicwidget:command_volume_down() }, { "", awesompd.MOUSE_RIGHT, musicwidget:command_show_menu() }, + { modkey, "p", musicwidget:command_playpause() }, + { modkey, ",", musicwidget:command_prev_track() }, + { modkey, ".", musicwidget:command_next_track() }, + { { modkey, "Shift" }, ",", musicwidget:command_previous_server() }, + { { modkey, "Shift" }, ".", musicwidget:command_next_server() }, + { "", "XF86AudioPlay", musicwidget:command_playpause() }, + { "", "XF86AudioPrev", musicwidget:command_prev_track() }, + { "", "XF86AudioNext", musicwidget:command_next_track() }, + { "Shift", "XF86AudioPrev", musicwidget:command_previous_server() }, + { "Shift", "XF86AudioNext", musicwidget:command_next_server() } }) -musicwidget:run() -- After all configuration is done, run the widget + +-- register global_keys +musicwidget:append_global_keys() +-- After all configuration is done, run the widget +musicwidget:run() return musicwidget.widget