Hot answers tagged

11

You can simply place code in a separate file and include it with dofile("somefile.lua") Note: The working directory is $HOME. To specify a file relative to rc.lua you can use dofile(awful.util.getdir("config") .. "/" .. "somefile.lua") If it's more than just some code and it might be used by others as well, it might make sense to create a lua module ...


5

To move code into a different file, you create a module and require the module in the rc.lua. To create a module, you simply call module (name [, ···]) in the script that has the code you pulled out of the original script. Lua reference - module. To use the module you created, you just call require (modname). Lua reference - require. There is an excellent ...


4

A vertical wibox is possible, I used one with 3.4 since years and had to recreate setup with 3.5. Based on this mailing list discussion, here a short example with widgets re-ordered for my own needs, including margins to introduce spacing between widgets: -- Create the wibox mywibox[s] = awful.wibox({ position="left",orientation="north", screen = s }) -- ...


3

Have you tried using goto as referenced here : http://conky.sourceforge.net/variables.html You could do something like: ${color lightblue} Down: ${lua_parse format %7s ${downspeed wlan0}}${goto 100} Up: ${lua_parse format %7s ${upspeed wlan0}} and just change the ${goto 100} to a number that better matches your formatting.


3

No. Unless you convince packagekit to support not only the major package managers (APT, RPM, pacman) but also the language-specific ones (RVM, CPAN, npm etc...), this is not in the agenda of any distro. Package managers like that are easy to install and configure, I don't believe that you would need to go thru such extent. Note: Fedora yum has a ...


3

Lua is a really tiny programming language. It's written in C and it's GOOD. Take a look at the "Programming in Lua" - online book on http://www.lua.org/pil/contents.html. Lua is a perfect tool for embedding scripts in otherwise C/C++ applications. So with Lua built into an executable like conky (which I didn't know of) you can make it very adaptable.


2

OK, I solved it, and it was quite a stupid mistake: luasql.mysql is only available for Lua 5.1, not Lua 5.2, which I use by default. Running lua5.1 solves the issue: % lua5.1 Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio > require "luasql.mysql" > ...and all is good. Sorry to have created a confusion...


2

Just add ${voffset 200} at the end of the .conckyrc file and play with the value.


2

Converted Comment from @ewhac into an answer: Firefox is not the only application to preserve its own window settings on exit (for example, the Pan newsreader does this). It looks an awful lot like there's a race condition between Awesome setting up the window, and the application restoring its saved settings. As such, you may be stuck doing it with a ...


2

To answer your main question (Is there an attempt […]?): Surprisingly, yes. Though not relating to the languages or tools you mention. For years (at least 15) — long before Python had a stable, accepted packaging system, and long before Node was a twinkle in anyone’s eye — the FreeBSD operating system has included a system known as “BSDPAN” which wraps ...


2

Found the answer to my own question! Basically, each of those tags has a label in your rc.lua file (either in /etc/xdg/awesome or $HOME/.config/awesome), so you can rewrite those as you please. The default look of this line (around 86 in the default file) is something like tags = {} for s = 1, screen.count() do -- Each screen has its own tag table. ...


1

You may think it is too much work, but there are existing methodologies for handling internationalization in programs, such as gettext, see wikipedia and GNU website. Basically, tools are used to extract the strings from the program's source code, collecting them in a file. Someone translates these to provide a new language, then the program is modified ...


1

From the lua docs: -v show version information.


1

I had similar problems trying to load multiple Lua files, finally stumbling onto the following, which worked: lua_load = '~/.conky_cpu.lua ~/.conky_part.lua',


1

Nmap uses Lua 5.2, not 5.1. The versions are not compatible. EDIT: Just saw that you are indeed using lua-sql-sqlite3 for Lua 5.2. But Nmap is looking for it in the locations printed in your question, in the /usr/local prefix. Ubuntu packages install in the /usr prefix. You could probably make it work by doing sudo ln -s /usr/lib/lua/5.2/luasql /usr/local/...


1

That command should work fine. Did you see any errors? Try the follwing in a terminal and check for a response: echo "return awful.util.spawn('nm-applet')" | awesome-client You could also try using the full path: /usr/bin/nm-applet


1

No, and there really isn't any need for it. We're drowning in package managers now and don't need any additional ones at the distro levels (rpm, dpkg, yum, apt, aptitude, pacman,portage, etc.). NOTE: Here's a full list of package managers for most Unixes, titled:"List of software package management systems". Most programming languages have their own ...


1

Awesome is pretty awesome, so is wmfs2/ratpoison. However you should be able to, modkey = "Control" -- Under the require keys modkey is used in the default configurations so if you didn't stray too far from the defaults this should work like a charm. For three Key Mapping you could also have the following, awful.key({ modkey, "q" }, "j", function () ...


1

Have you tried to set lua.package_cpath or lua.package_path in your LUA script? Or set LUA_CPATH and LUA_PATH environment variable? i.e export LUA_PATH='/usr/local/lib/luarocks/?.so'; lua ./XX.lua


Only top voted, non community-wiki answers of a minimum length are eligible