[LUA-Awesome] Can i use $XDG_XY_DIR inside a lua script?

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting [LUA-Awesome] Can i use $XDG_XY_DIR inside a lua script?
# 1  
Old 10-20-2013
[LUA-Awesome] Can i use $XDG_XY_DIR inside a lua script?


I'm a fan of AwesomeWM, but i had failed to learn lua, though, i'm quite satisfied with the cofniguration i have by now.

Either way, i'd like to know if i could 'call' those XDG_XY_DIR variables which are located on my linux ~/.config/user-dirs.dirs.

While to call scripts i use (copy-changed):
{ "BG: NASA iotd", "sh " .. awful.util.getdir("config") .. "/scripts/nasaBackground.sh",  },

I'm currently trying to open the project-container-folder like this:
menuscripttools = {
	    { "------",},
	    { "projects", files .. "$XDG_PROJECTS_DIR" },

The menu is displayed properly, however, clicking on the according menu entry "projects", results in no activity...

Do i need to call a script in order to use $XDG_PROJECTS_DIR?
And if so, how could i get the use of the 'set' filenamager 'files' within the script to be called?
Or could i grep (or alike) the required value somehow?
Or is there a way to 'source' ~/.config/user-dirs.dirs within LUA?

I know there are 'bashets' but since i dont need a datastream just an execution (opening a folder), that seems a little too much..

Any ideas or thoughts?
Thank you.

Last edited by sea; 10-20-2013 at 09:02 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. Programming

A make-like build utility based on Lua

xmake is a make-like build utility based on lua. (Link to project site: xmake) The project focuses on making development and building easier and provides many features (.e.g package, install, plugin, macro, action, option, task ...), so that any developer can quickly pick it up and enjoy the... (1 Reply)
Discussion started by: waruqi
1 Replies

2. Programming

[LUA] WindowManager: Awesome - Checking OS and assign different icon

Heyas I'm having a bad time to fix this. Code is just related samples, paths are edited, take: ~/.config/awesome as 'base/config' (dot) dir. Situation: Recently i actualy started to have 2 different kinds of gnu/linux installed, with this, the abition raised, to get a distro specific icon... (1 Reply)
Discussion started by: sea
1 Replies

3. Programming

[LUA] Set variables according to if file exists

Heya I'm using Awesome WM with the Vicious widget library. As i'm using multi boot, Win8, Fedora and Arch, i have my WM-Config shared accross my GNU/Linux installations. The regarding snippet: -- Functions -- Its just a workaround for an 'unstable' 'hwmon/hwmon' definition of Fedora21 -... (0 Replies)
Discussion started by: sea
0 Replies

4. UNIX Desktop Questions & Answers

[LUA / DE] AwesomeWM & Vicious Widgets

Hello Allthough i dont know LUA, despite its name, i do love the window manager that was created using that language. By now, I'm enough familiar with LUA so i could adapt (most of) the recent changes so i have vicous widgets working again - by the means of no error messages on start up. I... (1 Reply)
Discussion started by: sea
1 Replies

5. UNIX for Dummies Questions & Answers

Installing PECL LUA on Centos for PHP

I'm kinda new to Linux, I'm mostly run websites, and it's rather easy to do everything... except install this PECL LUA plugin. :wall: I start by running this command: pecl install lua-0.9.4 downloading lua-0.9.4.tgz ... Starting to download lua-0.9.4.tgz (12,617 bytes) .....done: 12,617... (0 Replies)
Discussion started by: blackstar
0 Replies
Login or Register to Ask a Question