diff --git a/README.md b/README.md index c5b83c37..21d08609 100644 --- a/README.md +++ b/README.md @@ -7,33 +7,56 @@ example of config/local.lua: https://gist.github.com/actionless/229eef7795915068 ![Screenshot](http://fc08.deviantart.net/fs70/f/2014/213/7/0/monovedek_set_____by_actionless-d7sr317.png "Screenshot") -### Keyboard widget appearance (with different themes) +### Widget popups -#### Monovedek theme with transparency and blur: +##### CPU (with transparency and blur) +![cpu_tb](http://i.imgur.com/JlRkAIm.png "cpu_tb") + +##### CPU +![cpu](http://i.imgur.com/4G94o8i.png "cpu") + +##### Memory +![mem](http://i.imgur.com/cg4dq17.png "mem") + +##### Systray toggle +![st](http://i.imgur.com/Q4KjyfP.png "st") + +##### Calendar (taken from Lain widgetkit) +![cal](http://i.imgur.com/pB5n12b.png "cal") + +##### Music (supports mpd, cmus, clementine, spotify) +![music](http://i.imgur.com/W7ur5SQ.png "music") + + + +### Hotkey- and other widgets appearance (with different themes) + +##### Monovedek theme with transparency and blur: ![hotkeys_monovedek](http://i.imgur.com/auQdZC5.png "hotkeys_monovedek") -#### Monovedek theme without transparency and blur: +##### Monovedek theme without transparency and blur: ![hotkeys_monovedek](http://i.imgur.com/ygsVm7E.png "hotkeys_monovedek") -#### "LCARS modern" theme without transparency and blur: +##### "LCARS modern" theme without transparency and blur: ![hotkeys_lm](http://i.imgur.com/t6XRD7m.png "hotkeys_lm") -#### "LCARS xresources" with "jwr_dark" xresources theme without transparency and blur: +##### "LCARS xresources" with "jwr_dark" xresources theme without transparency and blur: -![hotkeys_xjwr](http://i.imgur.com/y4o3vY0.png "hotkeys_xjwr") +![hotkeys_xjwr](http://i.imgur.com/y4o3vY0.png "hotkeys_xjw +r") -#### "Pokemon Light" theme without transparency and blur: +##### "Pokemon Light" theme without transparency and blur: ![hotkeys_pokemon_light](http://i.imgur.com/hgijuIo.png "hotkeys_pokemon_light") -#### "Pokemon Dark" theme without transparency and blur: +##### "Pokemon Dark" theme without transparency and blur: ![pokemon_dark](http://i.imgur.com/BWnzpfh.png?1 "pokemon_dark") -#### "Gnome Noble Dark" theme without transparency and blur: +##### "Gnome Noble Dark" theme without transparency and blur: ![hotkeys_noble_dark](http://i.imgur.com/XfpBqrV.png "hotkeys_noble_dark") diff --git a/actionless/helpers.lua b/actionless/helpers.lua index a1cc877f..3ac83844 100644 --- a/actionless/helpers.lua +++ b/actionless/helpers.lua @@ -23,8 +23,12 @@ helpers.font = string.match(beautiful.get().font or "monospace 8", "([%a, ]+) %d helpers.dir = debug.getinfo(1, 'S').source:match[[^@(.*/).*$]] helpers.scripts_dir = helpers.dir .. 'scripts/' -helpers.mono_preset = { font=beautiful.get().notification_monofont, - opacity=beautiful.get().notification_opacity } +helpers.mono_preset = function() + return { + font=beautiful.get().notification_monofont, + opacity=beautiful.get().notification_opacity + } +end -- {{{ Modules loader diff --git a/actionless/string.lua b/actionless/string.lua index 2efc4000..a3afae26 100644 --- a/actionless/string.lua +++ b/actionless/string.lua @@ -41,7 +41,7 @@ function string_helpers.max_length(unicode_string, max_length) return unicode_string end local result = '' - local counter = 0 + local counter = 1 for uchar in string.gmatch(unicode_string, '([%z\1-\127\194-\244][\128-\191]*)') do result = result .. uchar counter = counter + 1 diff --git a/actionless/widgets/calendar.lua b/actionless/widgets/calendar.lua index 56fb5a87..ffc0a999 100644 --- a/actionless/widgets/calendar.lua +++ b/actionless/widgets/calendar.lua @@ -8,7 +8,7 @@ local beautiful = require("beautiful") local naughty = require("naughty") local helpers = require('actionless.helpers') -local mono_preset = helpers.mono_preset +local mono_preset = helpers.mono_preset() -- Calendar notification diff --git a/actionless/widgets/cpu.lua b/actionless/widgets/cpu.lua index f2763c99..04bc7156 100644 --- a/actionless/widgets/cpu.lua +++ b/actionless/widgets/cpu.lua @@ -12,7 +12,7 @@ local helpers = require("actionless.helpers") local parse = require("actionless.parse") local newtimer = helpers.newtimer local font = helpers.font -local mono_preset = helpers.mono_preset +local mono_preset = helpers.mono_preset() local common_widget = require("actionless.widgets.common").widget diff --git a/actionless/widgets/manage_client.lua b/actionless/widgets/manage_client.lua index f64084da..fa15dd08 100644 --- a/actionless/widgets/manage_client.lua +++ b/actionless/widgets/manage_client.lua @@ -15,7 +15,7 @@ local common = require("actionless.widgets.common") local helpers = require("actionless.helpers") local newtimer = helpers.newtimer local font = helpers.font -local mono_preset = helpers.mono_preset +local mono_preset = helpers.mono_preset() local manage_client = {} diff --git a/actionless/widgets/mem.lua b/actionless/widgets/mem.lua index 106c4380..698e367a 100644 --- a/actionless/widgets/mem.lua +++ b/actionless/widgets/mem.lua @@ -17,7 +17,7 @@ local parse = require("actionless.parse") local common_widget= require("actionless.widgets.common").widget local newtimer = helpers.newtimer local font = helpers.font -local mono_preset = helpers.mono_preset +local mono_preset = helpers.mono_preset() -- Memory usage (ignoring caches) local mem = { diff --git a/actionless/widgets/music/backends/spotify.lua b/actionless/widgets/music/backends/spotify.lua index 1dc50a88..3937ba06 100644 --- a/actionless/widgets/music/backends/spotify.lua +++ b/actionless/widgets/music/backends/spotify.lua @@ -7,6 +7,7 @@ local awful = require("awful") local async = require("actionless.async") local h_table = require("actionless.table") +local h_string = require("actionless.string") local parse = require("actionless.parse") -- @TODO: change to native dbus implementation instead of calling qdbus @@ -66,6 +67,7 @@ function spotify.parse_metadata(result_string, parse_status_callback) cover_url='artUrl' } ) + player_status.date = h_string.max_length(player_status.date, 4) player_status.file = 'spotify stream' h_table.merge(spotify.player_status, player_status) parse_status_callback(spotify.player_status) diff --git a/actionless/widgets/netctl.lua b/actionless/widgets/netctl.lua index 5201d6cc..f07d0282 100644 --- a/actionless/widgets/netctl.lua +++ b/actionless/widgets/netctl.lua @@ -9,7 +9,7 @@ local helpers = require("actionless.helpers") local newtimer = helpers.newtimer local font = helpers.font local beautiful = require("beautiful") -local mono_preset = helpers.mono_preset +local mono_preset = helpers.mono_preset() local common_widget = require("actionless.widgets.common").widget local markup = require("actionless.markup") local parse = require("actionless.parse") diff --git a/themes/pokemon_light/pattern1.jpg b/themes/pokemon_light/pattern1.jpg deleted file mode 100644 index 478ea464..00000000 Binary files a/themes/pokemon_light/pattern1.jpg and /dev/null differ