Questions tagged [lua]
41
questions
0
votes
0
answers
247
views
Setting indent blankline plugin in lua with custom options
I do not know how to write configs in lua.
I am using neovim and my configartion is written in lua.
I have few plugins and I use lazy nvim as my plugin manager.
I have a seperate plugins directory ...
1
vote
0
answers
65
views
Conky: attempt to compare number with nil
I'm trying to make my own conky script, and I'm having some trouble with a script I'm using. The script is this one. This is the problematic part:
{
name="diskio_read",
arg="/...
1
vote
1
answer
187
views
How to detect the linux distribution name in Neovim init.lua
How can I detect in my neovim ~/.config/nvim/init.lua configuration which operating system distribution nvim is running? I want different Neovim configurations on debian servers as on my fedora linux ...
0
votes
1
answer
101
views
How do I configure a key binding to send a client to bling's scratch pad in awesome wm?
I want to make a shortcut that can send a client to bling's scratchpad.
The part that initializes bling scratch pad:
local bling = require("bling")
local term_scratch = bling.module....
4
votes
1
answer
485
views
How to use neovim configuration systemwide
I am trying to make sure that my neovim configuration gets used for all users. Basically I want my neovim configuration at ~/.config/nvim to be used on using the nvim command with sudo. Hence I copied ...
0
votes
1
answer
53
views
Ubuntu package names which ends with "lua"
Searching through the Ubuntu package repositories (packages.ubuntu.com) i recently found packages which names ends with "lua" for example "Package: dnsmasq-base-lua" or "...
1
vote
2
answers
367
views
How can I remove multi-line (Lua) comments in a bash script?
I'm writing a bash script where I need to strip comments from Lua files, which are formatted:
--like this
foo="bar" --or like this
--[[ or like this ]]
--[[
or
like
this
]]
I ...
0
votes
0
answers
455
views
Luci fails to start, openwrt_s905x3_k5.4.158_2021.11.12.1717
Fresh install of OpenWRT 21.02.1 on an X96 Air Android TV box. OpenWRT running on USB stick. Accessing the web interface gives a Bad Gateway error.
Running /www/cgi-bin-luci over ssh results in the ...
2
votes
1
answer
350
views
Making Bash send this error to std error
While writing some Lua as a backend for my LuaTeX code I noticed the following. For background, here is the Lua code. This version is standard Lua. But you don't really need to understand Lua to ...
0
votes
1
answer
936
views
How to use Conky variable with external command?
I'm trying to create a workaround for Conky's truncation of usernames with the top user function. Using id -nu $uid, I tried this:
${exec id -nu ${top uid \1}}
which leads to "bad substitution&...
1
vote
0
answers
98
views
What is the command in Awesome Window manager to let go of a key that has not been let go of?
My v key is locked up after I use the below snippet in my rc.lua file.
Background
Hotkey combinations are usually all pressed together at the same time.
I am using the function key Fn which works as a ...
0
votes
1
answer
281
views
Override makefile precious variable
configure.ac has precious variables[1], which are supposed to be subbed-in when calling configure, e.g. configuring the location of the system Lua interpreter as a precious variable[2]:
configure.ac:
...
0
votes
0
answers
289
views
Conky script not running after being converted
I am attempting to convert an older conky widget to the new syntax of 1.10+, but I can't for the life of me figure out why it won't run. I've ran through everything to make sure it was converted ...
0
votes
1
answer
260
views
How to set a toggle keybinding in Awesome's rc.lua
I'm running AwesomeWM on top of Ubuntu 20.04. I'd like to set a shortcut to disable the trackpad. My computer comes with built-in functionality to do that, but I'd like to change it from what it ...
0
votes
2
answers
2k
views
Awesome WM - Launch a terminal based app with a shortcut
What I want is to have a shortcut to initiate things like vifm, cmus, htop etc. These apps require being initiate from a terminal.
I know for create a shortcut in Awesome WM I should:
awful.key({ ...
0
votes
1
answer
606
views
Awesome WM - Toggle Hide / Show Wibox
How can I implement a function so that pressing a key toggles between hiding & showing the wibox?
I've found this answer but either the code doesn't work anymore or I'm not implementing it right.
...
0
votes
0
answers
4k
views
passing a referrer link using a m3u playlist file
I can pass a referrer link in VLC using a Lua file by typing in vlc ipchannel.lua (see example of Lua file below). But how can I pass a referrer link using an m3u playlist file?
Example of working ...
0
votes
1
answer
1k
views
translating text in lua file
The thing is, I'm translating a game from English to Polish language. The text I'm trying to translate is in lua-files. I have most of the game translated, but I'm looking for a way to automatize ...
3
votes
1
answer
2k
views
How to get subject of gmail letter with curl?
I use curl in my Lua program to get new mail list.
I am trying to send request like this
local head_command = "curl --connect-timeout 30 -fsm 30"
local server = "imap.gmail.com"
local mail ...
0
votes
1
answer
227
views
cairo graphics inside my_conky.lua is eating memory when I use surface_create_from_png
I tried adding images to my conky.lua with the following function
function drawimage(cr,img)
image = cairo_image_surface_create_from_png (img)
cairo_set_source_surface (cr, image, screen.x, ...
1
vote
0
answers
291
views
Separating the code related to various components in awesome wm config
This is the code in default awesome wm config for creating top bar:
awful.screen.connect_for_each_screen(function(s)
-- Wallpaper
set_wallpaper(s)
-- Each screen has its own tag table.
...
1
vote
2
answers
8k
views
Is there a way to find version of lua interpreter?
Unlike python, lua doesn't seem to have a way of giving version details.
With python -
$ python --version
Python 2.7.15+
$ python3 --version
Python 3.6.6
There are multiple versions of lua on my ...
0
votes
1
answer
418
views
Lua standalone with external binary program
I am writing a small program to us in LuaLaTex. The purpose of it is to produce an qr-code with a given uuid, the qr-code is printed on the page and the uuid is stored in the pdf's meta-data.
...
0
votes
0
answers
118
views
how to trigger a PHP webpage after lsync copies a file
I have the following logic in my /etc/lsyncd/lsyncd.lua file
require "lsync-widgets"
sync {
widget_sync,
source="/tmp/folder1",
target="/tmp/folder2/"
}
And then in my lsync-widgets....
0
votes
1
answer
4k
views
conky attempt to call nil value
I've been tweaking my conky config and getting the error
conky: llua_do_call: function conky_cpu execution failed: attempt to call a nil value
The function conky_cpu resides in ~/.conky_cpu.lua. ...
1
vote
0
answers
379
views
Awesome wm wibox visible just in one tag
I want to leave visible wibox1 only one of my tags.
I try use this code:
your_tag:add_signal("property:selected", function(tag)
your_wibox.visible = tag.selected
end)
But no have success.
...
1
vote
1
answer
111
views
Why Lapis does not work?
I have installed Lapis framework using command:
luarocks install lapis --local
It gave me success installation:
Updating manifest for /home/Oman/.luarocks/lib/luarocks/rocks
lapis 1.5.0-2 is now ...
1
vote
1
answer
742
views
Ubuntu, lua, nmap and sqlite3 - module 'luasql.sqlite3' not found
I need to work with nmap and sqlite3 and I installed lua 5.1 and lua-sql-sqlite3 on an ubuntu machine:
sudo apt-get install lua5.1; sudo apt-get install lua-sql-sqlite3
Now, when I'm doing this:
$ ...
-1
votes
1
answer
1k
views
What is the Lua language used in Conky script? [closed]
I've been experimenting with Linux on a spare PC using Crunchbang so that I can try changing things and tinker. The Conky system monitor is fun to work with and changes are immediately seen, so it's a ...
3
votes
1
answer
4k
views
Can a wibox in Awesome-WM be setup vertically?
I use the venerable Awesome WM to manage tiled window layouts across a couple of screens. My configuration has a few goodies, but in general it follows a familiar pattern with a bar across the top ...
2
votes
1
answer
466
views
Disable text on tags in awesomeWM?
The current awesomewm theme that I am using has small icons to manage the tags, as opposed to the traditional numbers. How can I disable the numbers from displaying over top of my icons?
3
votes
1
answer
1k
views
Run Lua commands in Awesome window manager
I need to have network widget in my Awesome manager. When I placed in very bottom of rc.lua line
awful.util.spawn("nm-applet")
my Awesome was not starting until I have removed it. What is wrong ...
0
votes
1
answer
2k
views
Bandwidth speed test with nginx
I have server with nginx-1.4.1.
I want to test bandwidth between my desktop and server.
Incoming speed I can test by simple download file with size 10M from server and count time what I need to ...
1
vote
4
answers
993
views
Distro with pip and npm as package managers?
Is there an attempt of distro around that for Python and Node code ( and Ruby , Lua ) would use Pip, NPM and rubygems and luarocks respectively ? It could simply work as a passthrough from native ...
7
votes
3
answers
13k
views
Increasing conky height
Is there any way to change the height of a conky window?
.conkyrc
background no
update_interval 1
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
double_buffer yes
no_buffers yes
...
9
votes
1
answer
2k
views
How to force applications to not start maximised in Awesome WM?
How to reproduce:
ssh -X user@host firefox (or some other X application).
Maximise the window.
Close the application.
Open the application in Awesome WM (tried only locally, but should also work ...
2
votes
1
answer
1k
views
Editing Conky configuration variables from Lua
I've been messing around with Conky for a while now and I recently started dabbling in Lua scripting. One of the things that used to bug me about a "flat" conkyrc approach (as opposed to a combined ...
10
votes
2
answers
4k
views
Conky - string formatting
I have conky the record:
${color lightblue} Down: ${downspeed wlan0} Up: ${upspeed wlan0}
Conky prints link speed, but the text moves:
Down: OB Up: OB
Down: 60B Up: 60B
Down: 148B Up: 148B
Down:...
3
votes
1
answer
3k
views
Control-q-? key binding in Awesome WM
I wish to configure my Awesome Window Manager so that the keyboard shortcuts begin with ctrlq.
ctrlq-x, ctrlq-y, ctrlq-z, and so on...
I've attempted to modify the /etc/xdg/awesome/rc.lua config ...
2
votes
2
answers
5k
views
Using a lua rock installed with luarocks
I wanted to install luasql.mysql with luarocks, and I've ran into a problem. Even though the packages were installed providing mysql.h, luarocks couldn't find it. I solved it eventually:
luarocks ...
14
votes
2
answers
5k
views
How to separate Awesome's `rc.lua` configuration into multiple files?
I've just moved to Awesome WM from OpenBox. I like that it's very extensible, customizable and I have huge control about window layout. I like structured and organized things and I'd like to separate ...