aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--awesompd.lua25
-rw-r--r--icons/check_icon.pngbin0 -> 241 bytes
-rw-r--r--icons/next_icon.pngbin0 -> 224 bytes
-rw-r--r--icons/pause_icon.pngbin0 -> 210 bytes
-rw-r--r--icons/play_icon.pngbin0 -> 234 bytes
-rw-r--r--icons/play_pause_icon.pngbin0 -> 232 bytes
-rw-r--r--icons/prev_icon.pngbin0 -> 221 bytes
-rw-r--r--icons/radio_icon.pngbin0 -> 342 bytes
-rw-r--r--icons/stop_icon.pngbin0 -> 210 bytes
9 files changed, 14 insertions, 11 deletions
diff --git a/awesompd.lua b/awesompd.lua
index ac864a9..ae3c081 100644
--- a/awesompd.lua
+++ b/awesompd.lua
@@ -38,16 +38,17 @@ function awesompd.try_load(file)
end
end
-awesompd.ICONS = {}
-awesompd.ICONS.PLAY = awesompd.try_load("/home/unlogic/.config/awesome/play_icon.png")
-awesompd.ICONS.PAUSE = awesompd.try_load("/home/unlogic/.config/awesome/pause_icon.png")
-awesompd.ICONS.PLAY_PAUSE = awesompd.try_load("/home/unlogic/.config/awesome/play_pause_icon.png")
-awesompd.ICONS.STOP = awesompd.try_load("/home/unlogic/.config/awesome/stop_icon.png")
-awesompd.ICONS.NEXT = awesompd.try_load("/home/unlogic/.config/awesome/next_icon.png")
-awesompd.ICONS.PREV = awesompd.try_load("/home/unlogic/.config/awesome/prev_icon.png")
-awesompd.ICONS.CHECK = awesompd.try_load("/home/unlogic/.config/awesome/check_icon.png")
-awesompd.ICONS.RADIO = awesompd.try_load("/home/unlogic/.config/awesome/radio_icon.png")
-awesompd.ICONS_LOADED = true
+function awesompd.load_icons(path)
+ awesompd.ICONS = {}
+ awesompd.ICONS.PLAY = awesompd.try_load(path .. "/play_icon.png")
+ awesompd.ICONS.PAUSE = awesompd.try_load(path .. "/pause_icon.png")
+ awesompd.ICONS.PLAY_PAUSE = awesompd.try_load(path .. "/play_pause_icon.png")
+ awesompd.ICONS.STOP = awesompd.try_load(path .. "/stop_icon.png")
+ awesompd.ICONS.NEXT = awesompd.try_load(path .. "/next_icon.png")
+ awesompd.ICONS.PREV = awesompd.try_load(path .. "/prev_icon.png")
+ awesompd.ICONS.CHECK = awesompd.try_load(path .. "/check_icon.png")
+ awesompd.ICONS.RADIO = awesompd.try_load(path .. "/radio_icon.png")
+end
-- Function that returns a new awesompd object
function awesompd:create()
@@ -74,7 +75,7 @@ function awesompd:create()
instance.recreate_servers = true
instance.recreate_options = true
instance.current_number = 0
- instance.menu_shown = false
+ instance.menu_shown = false
-- Default user options
instance.servers = { { server = "localhost", port = 6600 } }
@@ -82,6 +83,7 @@ function awesompd:create()
instance.scrolling = true
instance.output_size = 30
instance.update_interval = 10
+ instance.path_to_icons = ""
-- Widget configuration
instance.widget:add_signal("mouse::enter", function(c)
@@ -99,6 +101,7 @@ function awesompd:run()
self:update_track()
-- self:update_state()
self:check_playlists()
+ self.load_icons(self.path_to_icons)
awful.hooks.timer.register(1, function () self:update_widget() end)
awful.hooks.timer.register(self.update_interval, function () self:update_track() end)
end
diff --git a/icons/check_icon.png b/icons/check_icon.png
new file mode 100644
index 0000000..dc5cba1
--- /dev/null
+++ b/icons/check_icon.png
Binary files differ
diff --git a/icons/next_icon.png b/icons/next_icon.png
new file mode 100644
index 0000000..7fe1eb6
--- /dev/null
+++ b/icons/next_icon.png
Binary files differ
diff --git a/icons/pause_icon.png b/icons/pause_icon.png
new file mode 100644
index 0000000..83a92ee
--- /dev/null
+++ b/icons/pause_icon.png
Binary files differ
diff --git a/icons/play_icon.png b/icons/play_icon.png
new file mode 100644
index 0000000..83230d1
--- /dev/null
+++ b/icons/play_icon.png
Binary files differ
diff --git a/icons/play_pause_icon.png b/icons/play_pause_icon.png
new file mode 100644
index 0000000..e17846e
--- /dev/null
+++ b/icons/play_pause_icon.png
Binary files differ
diff --git a/icons/prev_icon.png b/icons/prev_icon.png
new file mode 100644
index 0000000..11e34a1
--- /dev/null
+++ b/icons/prev_icon.png
Binary files differ
diff --git a/icons/radio_icon.png b/icons/radio_icon.png
new file mode 100644
index 0000000..ffdf065
--- /dev/null
+++ b/icons/radio_icon.png
Binary files differ
diff --git a/icons/stop_icon.png b/icons/stop_icon.png
new file mode 100644
index 0000000..6bef770
--- /dev/null
+++ b/icons/stop_icon.png
Binary files differ