lcpz / lain Goto Github PK
View Code? Open in Web Editor NEWAwesome WM complements
License: GNU General Public License v2.0
Awesome WM complements
License: GNU General Public License v2.0
When I scroll down from alsabar or use Alt and down key alsabar show shows it decreased 5% but actually it decreases the sound much more.
alsabar alsamixer
100 88
95 78
90 69
..
..
Like what happened with this battery widget-related issue, I was given an error: attempt to perform arithmetic operation on local 'rem' (a nil value)
. After some digging, I found that some of the monitors in /sys/class/power_supply/
either did not exist, or did not return expected values.
My laptop is a ThinkPad T420, and it is known that TP batteries don't always play nice with Awesome battery/power status widgets. So I expected to have to do some tweaking to get things working smoothly.
This commit contains my modifications to the bat.lua widget such that it will be compatible with TP laptops that have tp_smapi installed, while also retaining non-TP compatibility (it should work fine on systems that currently use this widget without issue, but I would need someone to test this). bat.lua will also now perform some start-up checks to automatically determine which configuration to use, and it will warn you with naughty notifications if something doesn't look right. There's also some performance tweaks and cleanups included.
You have some great themes! I've only switched to using Awesome WM within the last week, so I'm very new to this. I can make a pull request if this is something you'd be interested in incorporating for other users.
(Some other stylistic thoughts: Would this be better kept in its own tp-bat.lua widget? Should auto-detect be removed in favor of manual configuration by, say, adding a key to the args input table so args['module'] = 'smapi' would enable the alternate behavior?)
I tried to create a volume widget using this code:
volumewidget = lain.widgets.alsa({
timeout = 0.5,
settings = function ()
widget:set_markup("<span color='#db2bff'>[ sound ] " .. volume_now.level .. " " .. volume_now.status .. "</span>")
end
})
But I get an error:
attempt to call field 'alsa' (a table value)
It's strange because I used this code some months ago and it worked.
Not sure how to debug this. I'll follow instructions if you think is relevant. I'm actually just filling the bug for reference, as I don't think is anything critical, but might be messing with someone else's brains
Having lain MPD widget makes awesome lag each X seconds (wich i assume is the plugin refresh rate). I tested it with and without mpd daemon running.
Disabling mpd widget solved all my issues, and I'm not even using it, just reporting it here in case someone else thinks that copycat-killer themes are slow. Nope, they're not, it's just this widget malfunctioning, remove it and stop whinning.
Hello, it seems that lain is missing the browse layout from vain. I would really appreciate if you could recreate that layout. Thank you!
Well, easier showing with a screenshot: http://i.imgur.com/g4yK4sP.png
When we have 2 net widgets at same time (one for download speed and one for upload):
net_widgetdl = lain.widgets.net({
settings = function()
widget:set_markup(markup.font("Tamsyn 1", " ") .. net_now.received .. space2)
end
})
widget_netdl = wibox.widget.imagebox()
widget_netdl:set_image(beautiful.widget_netdl)
netwidgetdl = wibox.widget.background()
netwidgetdl:set_widget(net_widgetdl)
netwidgetdl:set_bgimage(beautiful.widget_display)
net_widgetul = lain.widgets.net({
settings = function()
widget:set_markup(markup.font("Tamsyn 1", " ") .. net_now.sent .. space2)
end
})
widget_netul = wibox.widget.imagebox()
widget_netul:set_image(beautiful.widget_netul)
netwidgetul = wibox.widget.background()
netwidgetul:set_widget(net_widgetul)
netwidgetul:set_bgimage(beautiful.widget_display)
there is strange issue, download speed freeze from start at 294754.4 or 6574.0 and such, also upload speed not displayin real speed.
When 1 net widget (with: .. net_now.received .. " - " .. net_now.sent .. ) - everything ok.
How to make it work when 2 net widgets at same time?
┌─(t0m5k1@b0x)-(3054/pts/1)-(09:07pm:20/01/14)-
└─>(%:~)
└─>> cat /sys/class/thermal/thermal_zone0/temp
cat: /sys/class/thermal/thermal_zone0/temp: No such file or directory
how do I "obtain" the temp file?
am I missing a dependency?
VM's don't have temp sensors and calls using the lain.widgets.temp brings up error
/usr/share/awesome/lib/lain/widgets/temp.lua:31 : attempt to index local 'f' (a nil value)
some of the awesome-copycats themes have this included. easy enough to remove if not required but it would be nicer if lain handled this gracefully.
thanks
if bat_now.status == "Discharging" and notify == "on" and bat_now.perc ~= nil
then
if tonumber(bat_now.perc) <= 5 -- ISSUE IS HERE LINE 128 !!! :-1:
then
bat.id = naughty.notify({
preset = bat_notification_critical_preset,
replaces_id = bat.id
}).id
elseif tonumber(bat_now.perc) <= 15
then
bat.id = naughty.notify({
preset = bat_notification_low_preset,
replaces_id = bat.id
}).id
end
end
end
Hey,
first of all. Love your themes. However, I am experiencing an issue with the battery widget on my laptop.
./lain/widgets/bat.lua:76: attempt to perform arithmetic operation on local 'rem' (a nil value)
Do you have any idea what might cause this?
I am having some trouble with the mpd.lua after setting up a copycat theme (https://github.com/copycat-killer/awesome-copycats), here is the error message:
Oops, an error happened!
/home/dax/.config/awesome/lain/widgets/mpd.lua:67 attempt to index local 'f' (a nil value)
I get the following error
"Oops, an error happened!
/home/mouss/.config/awesome/lain/layout/centerfair.lua:98: attempt to index field '?' (a nil value'"
└-(>:) awesome --version
awesome v3.5.4 (Brown Paper Bag)
• Build: Apr 2 2014 09:32:34 for x86_64 by gcc version 4.8.2 (nobody@)
• Compiled against Lua 5.2.3 (running with Lua 5.2)
• D-Bus support: ✔
Two errors :
-----First one
/usr/share/awesome/lib/gears/color.lua:210: Table index is nil
-----Second one:
error while running function
stack traceback :
/usr/share/awesome/lib/gears/color.lua:210: in functione /usr/share/awesome/lib/gears/color.lua:185
(Tails calls)
/usr/share/awesome/lib/gears/wallpaper:89: in function 'centered'
/home/plonky/.config/awesome/rc.lua:102: in main chunk
error: /usr/share/awesome/lib/gears/color.lua:210: table index is nil
Recently after updating to Awesome 3.5.4, I've noticed that the MPD popup is showing incorrect album art.
For example, if a song comes up and I skip it the album art of the next song will be the same as the previous song.
This appears to be partially fixed by simply not skipping ahead.
Using the latest lain version from git.
Hello! I'm using the calendar.lua in ubuntu 14.04 and i have a issue when the script try to do the sed in the output of /usr/bin/cal for hightlight the current day, take a look to this images:
But when the day is not selected:
This is the sed that tries to do:
/usr/bin/cal | sed -r -e "s/(^| )(27)($| )/\1<b><span foreground=\"#000000\" background=\"#aaaaaa\">\2<\/span><\/b>\3/"
Thank you!
The error in the topic started happening recently.
I looked at the code and it looks like you are actually doing the math to figure out the percentage left on the battery. But this seems to be stored inside "/capacity", so i don't get why don't check for the file before deciding on doing the math.
I fixed the issue temporarly by doing bat_now.perc = first_line(bstr .. "/capacity")
, this probably wont work on all systems, but it solves the problem nicely until a better approache is pushed.
When adding more that one widget using lain.widgets.base, getting the error "attempt to call field 'base' (a table value)". This behaviour can be reproduced when the following code is added to rc.lua:
mywidget1 = lain.widgets.base({
timeout = 10,
cmd = "echo 20",
})
mywidget2 = lain.widgets.base({
timeout = 5,
cmd = "echo 10",
})
Hey,
Trying to make mailwidget working with gmail account, here my settings:
timeout = 380,
is_plain = true,
server = "imap.gmail.com",
mail = "[email protected]",
password = "mypa$$w0rdh3r3",
Sent myself an email, i can see it in inbox and it 100% unread but i never get the mail notification widget showing up.
For example: I get 1(one) email - mail widget say: "you've got 4(four) emails!!!"
I get 2(two) email - mail widget say: "you've got a 8(eight) emails!!!"
etc (always digits of mails is multiply by four).
This is issue, and i've got a question:
Can I change place where the textbox is showing? From upper left to upper right?
when I use mod+w it displays the message "service not available at this moment"
http://i.imgur.com/3mpryRs.jpg
here are the lines for this widget i use in rc.lua
-- Weather
weathericon = wibox.widget.imagebox(beautiful.widget_weather)
yawn = lain.widgets.yawn(12752509, {
settings = function()
widget:set_markup(markup("#eca4c4", forecast:lower() .. " @ " .. units .. "°C "))
end
})
right_layout:add(weathericon)
right_layout:add(yawn.widget)
Hi, I've been having an issue with widget sizing, particularly with the Filesystem and Calendar. There's an image here.
I'm running the latest version of Awesome (3.5.5 at time of writing) on Arch Linux.
/usr/share/awesome/lib/gears/surface.lua:39: Failed to open file '/tmp/mpdcover.png': No such file or directory
awesome -v
awesome v3.5.5 (Kansas City Shuffle)
• Build: Apr 11 2014 09:37:47 for i686 by gcc version 4.8.2 (nobody@)
• Compiled against Lua 5.2.3 (running with Lua 5.2)
• D-Bus support: ✔
Title is pretty much all there is to it.
I have 2 screen setup, laptop screen on eDP1 and external monitor on HDMI1, even though in xrandr it is set that HDMI1 is primary:
xrandr --output HDMI1 --primary --left-of eDP1 --auto --output eDP1 --auto
And tray is on HDMI1 none of lain widgets won't refresh on HDMI1. I tested vicious widgets and it refreshes on both screens at the same time.
I call lain with:
local lain = require("lain")
and widgets with:
batwidget = lain.widgets.bat({
settings = function()
bat_perc = bat_now.perc
if bat_perc == "N/A" then bat_perc = "Plug" end
widget:set_markup(markup(gray, " Bat ") .. bat_perc .. "")
end
})
If you need any more info let me know.
Just fyi i changed lain code in widgets/calendar.lua to match my locale (cal -m) and made few changes to icons - changed size. I guess that should not be the issue here.
Also, i just pulled latest code from git and issue is still here.
dfs script fails with message:
awk: line 16: syntax error at or near ,
running it with debug option everything seems fine until the final awk call ("Let's go!"):
$ sh dfs -d
.
.
.
MOUNT_POINT_MAX_LENGTH: 15
MOUNT_POINT_MAX_SIZE: 2147483647
awk: line 16: syntax error at or near ,
Hi,
With my current setup, often the mem widget displaying mem_now.used value freezes and instead mem_now.swapused flashes during the update step, showing the current mem_now.used value, for some reason in the color (markup) of the mem widget.
Video:
http://youtu.be/YRNpK-6pgJg
Note: the flashing yellow value does change, although it's not identical to htop. In the video it's 1317 at first, changes to values like 1310, 1311 later, while the left constant yellow value stays the same, as it seems, the memused value when awesome starts/rc.lua runs.
rc.lua:
http://codepad.org/qICre4sQ
theme:
http://codepad.org/ysmWeejM
I think it has to do with using the mem widget twice. Perhaps because of non-local variables (entirely guessing) in https://github.com/copycat-killer/lain/blob/master/widgets/mem.lua
Is one supposed not to use a widget twice?
This is a minor issue, but I still wanted to let you know. If the network is down, there is no space between the yawn.icon and the yawn.widget if you have them side by side on your panel. Maybe add a space to the "N/A" in your yawn/init.lua ?
After the recent update too MPD, the widget have started to act up. Displaying N/A and turning on and off. Sometimes displaying the correct information.
Recently i noticed that whenever a song changed in mpd awesome will hang for 5-10 seconds, i tracked the issue to mpdcover script and eventually to the convert command (imagemagick)
in https://github.com/copycat-killer/lain/blob/a250f4d3fcf483cdd7eb10254690a9a8feb4501a/scripts/mpdcover#L61
Mainly the -thumbnail and -extent arguments are what causes the slowdown.
For -thumbnail it can be changed to -scale or -sample for a faster resize but with lower quality output, as for extent i haven't found any alternatives (but i can't say i noticed it being missing).
Right now im running it with convert "$cover" -scale $COVER_RESIZE -gravity "center" -background "$COVER_BACKGROUND" "$TEMP_PATH"
without any issues.
If anyone else has this problem post here, at first i thought imagemagick was bugged but trying the fixes from http://www.daniloaz.com/en/high-cpu-load-when-converting-images-with-imagemagick/ didn't help so i don't think thats it.
Previously by setting these keys it was possible to adjust the height of clients:
awful.key({ modkey, "Shift" }, "l", function () awful.client.incwfact(-0.05) end),
awful.key({ modkey, "Shift" }, "h", function () awful.client.incwfact( 0.05) end),
Commit 1925436 has broken this functionality as it no longer uses tag.getdata(t).windowfact
.
create a localization : zh_CN, reload the awesome,then
Oops, an error happened!
/usr/share/awesome/lib/lain/widgets/yawn/init.lua:138:attempt to index a nil value
The cpu_now array is instantiated as 'cpu_noj', lain starts complaining if the cpu widget is used at all because of it.
cpu.lua, line 61
I noticed a missing icon when yahoo weather gives the condition "mist". Maybe this could be linked to "foggy" but curently it gives me no icon.
I have a pretty basic mpd widget setup (except that I'm using mopidy instead of mpd) and I realized some files are constantly created every 2 seconds in /tmp/asyncshell
with a content:
OK MPD 0.17.0
ACK [2@0] {password} wrong number of arguments for "password"
volume: 100
repeat: 0
random: 0
single: 0
consume: 0
playlist: 0
playlistlength: 0
xfade: 0
state: stop
OK
OK
OK
When I delete the folder /tmp/asyncshell
I start to get the following error every 2 seconds:
Oops, an error happened!
/usr/share/awesome/lib/lain/widgets/mpd.lua:67: attempt to index local 'f' (a nil value)
Is this bug related to lain?
How to properly configure the mpd widget to display my music on the statusbar as oppose to have it say "N/A" for everything?
Hello, thank you for lain and awesome-copycats!
On Arch Linux with AMD Phenom X4 9550 on A7GM-S 2.0, https://github.com/copycat-killer/lain/wiki/temp uses /sys/devices/virtual/thermal/thermal_zone0/temp which always contains the value 40000.
using find /sys/devices/ -name "*temp*"
I discovered another file, which seems to contain a correct value (analog to sensors
), which gets updated:
/sys/devices/pci0000:00/0000:00:18.3/temp1_input
I'm not sure what causes the first file not being updated or how to tell which file should be used to get the updated temperature.
As a dirty fix, I edit /usr/share/awesome/lib/lain/widgets/temp.lua and replace the imported files, hoping it will stay the same after rebooting.
in the default tiling layouts, (awesome 3.4), modkey+rmb will resize whatever client is under the cursur and slide the layout divisions around accordingly. uselesstile doesn't do this. :(
Hi
Under debian testing I had to update
LANG to LANGUAGE in order for os.getenv to work correctly
Regards
when using layouts with useless gaps, the distance between windows is matching what i set. however, the gaps at the top and left of the layout are larger than they should be, and the gaps at the bottom and right smaller. when i set theme.useless_gap_width to 10, for example, the gaps at the top and left are 12 while the bottom and right are 8. this off-by-two seems consistent (e.g. setting the gap to 20 yields a top and left of 22 and a bottom and right of 18).
Hello,
At https://github.com/copycat-killer/lain/wiki/Utilities there are a reference to create_tag, when should be add_tag (In anohter side I'm not sure why remove_tag is not working here).
At https://github.com/copycat-killer/lain/wiki/task, lain.widgets.task.show should be lain.widgets.custom.task.show
Maybe the code introduction to task widget could be changed to something like:
clockicon = wibox.widget.imagebox(beautiful.widget_clock)
lain.widgets.contrib.task:attach(clockicon)
Thank you
http://i.imgur.com/3mpryRs.jpg
this shows the imap widget not being displayed here are the lines i use in rc.lua:
-- Mail IMAP check
-- commented because it needs to be set before use
mailicon = wibox.widget.imagebox()
mailicon:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn(mail) end)))
mailwidget = lain.widgets.imap({
timeout = 180,
is_plain = true,
server = "imap.gmail.com",
mail = "[email protected]",
password = "mypassword",
settings = function()
if mailcount > 0 then
mailicon:set_image(beautiful.widget_mail)
widget:set_markup(markup("#cccccc", mailcount .. " "))
else
widget:set_text("")
mailicon:set_image(nil)
end
end
})
snip
right_layout:add(mailicon)
right_layout:add(mailwidget)
Is this possible to delete that issue?
It works fine with BAT1
In rc.lua.copland of awesome-copycats project , 'used' may be a nil value and attempt to compare with number
fshomeupd = lain.widgets.fs({
partition = "/home",
settings = function()
if used < 90 then
diskbar:set_color(beautiful.fg_normal)
else
diskbar:set_color("#EB8F8F")
end
diskbar:set_value(used / 100)
end
})
I've done a little widget for spotify
https://gist.github.com/TeddyDesTodes/af18b8f0b614d0a5013f
i've actually took the mpd widget and modified it, since this is my first time writing lua.
feel free to modify the license header
Hi, thanks for your gorgeous work, but there is a problem with me, when on battery it will continually complain that 'rate' is a 'nil value' which is on line 72 in lain/widgets/bat.lua, I tried modify the block like this
elseif bat_now.status == 'Discharing'
then
rate = 1
time_rate = rem / rate
end
it doesn't complai any more, but I have no idea what value it shoud be, because obviously it is not 1.
Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.