]> gitweb.fluxo.info Git - awesompd.git/commitdiff
Reworked icon handling
authorAlexander Yakushev <yakushev.alex@gmail.com>
Fri, 5 Nov 2010 06:43:52 +0000 (08:43 +0200)
committerAlexander Yakushev <yakushev.alex@gmail.com>
Fri, 5 Nov 2010 07:05:15 +0000 (09:05 +0200)
1  2 
awesompd.lua
icons/check_icon.png
icons/next_icon.png
icons/pause_icon.png
icons/play_icon.png
icons/play_pause_icon.png
icons/prev_icon.png
icons/radio_icon.png
icons/stop_icon.png

diff --cc awesompd.lua
index 8b854ba2316c0a828282dc9fbcf8c869d98b169b,ac864a9ddd330c34567699e0e95a5242a24df556..ae3c0815018a0896079abc93fdc14c8abccc21a6
@@@ -38,16 -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 -74,7 +75,7 @@@
     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 -82,6 +83,7 @@@
     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)
@@@ -97,7 -97,8 +99,9 @@@ en
  -- Registers timers for the widget
  function awesompd:run()
     self:update_track()
-    self:update_state()
+ --   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
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..dc5cba1287277f859cece13ee824cff04505493c
new file mode 100644 (file)
Binary files differ
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..7fe1eb6c56e970c4e6f7fe613c1379b46c65c48a
new file mode 100644 (file)
Binary files differ
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..83a92ee602c8c2c21b8d03e8a218d14ae2d9f02b
new file mode 100644 (file)
Binary files differ
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..83230d13214f288943c4de91d96d8b74a64251ee
new file mode 100644 (file)
Binary files differ
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e17846e8670cd1d62e42508a226c6f21ca9e1271
new file mode 100644 (file)
Binary files differ
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..11e34a16bc25b01e60d6ce10b75c8c7b094c7d85
new file mode 100644 (file)
Binary files differ
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ffdf065b18858f0544eba1abcf47f9f9723cd9cb
new file mode 100644 (file)
Binary files differ
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..6bef770ae510991bee43a7c9095ba3259017d5cd
new file mode 100644 (file)
Binary files differ