Sponsored Content
Top Forums Shell Programming and Scripting [LUA-Awesome] Can i use $XDG_XY_DIR inside a lua script? Post 302865921 by sea on Sunday 20th of October 2013 03:15:58 PM
Old 10-20-2013
[LUA-Awesome] Can i use $XDG_XY_DIR inside a lua script?

Heyas

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):
Code:
{ "BG: NASA iotd", "sh " .. awful.util.getdir("config") .. "/scripts/nasaBackground.sh",  },

I'm currently trying to open the project-container-folder like this:
Code:
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 08:02 PM..
 

5 More Discussions You Might Find Interesting

1. 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

2. 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

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. 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

5. 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
Locale::Codes::Script(3)				User Contributed Perl Documentation				  Locale::Codes::Script(3)

NAME
Locale::Codes::Script - standard codes for script identification SYNOPSIS
use Locale::Codes::Script; $script = code2script('phnx'); # 'Phoenician' $code = script2code('Phoenician'); # 'Phnx' $code = script2code('Phoenician', LOCALE_CODE_NUMERIC); # 115 @codes = all_script_codes(); @scripts = all_script_names(); DESCRIPTION
The "Locale::Codes::Script" module provides access to standards codes used for identifying scripts, such as those defined in ISO 15924. Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default ISO 15924 four-letter codes will be used. SUPPORTED CODE SETS
There are several different code sets you can use for identifying scripts. A code set may be specified using either a name, or a constant that is automatically exported by this module. For example, the two are equivalent: $script = code2script('phnx','alpha'); $script = code2script('phnx',LOCALE_SCRIPT_ALPHA); The codesets currently supported are: alpha, LOCALE_SCRIPT_ALPHA This is a set of four-letter (capitalized) codes from ISO 15924 such as 'Phnx' for Phoenician. It also includes additions to this set included in the IANA language registry. The Zxxx, Zyyy, and Zzzz codes are not used. This is the default code set. num, LOCALE_SCRIPT_NUMERIC This is a set of three-digit numeric codes from ISO 15924 such as 115 for Phoenician. ROUTINES
code2script ( CODE [,CODESET] ) script2code ( NAME [,CODESET] ) script_code2code ( CODE ,CODESET ,CODESET2 ) all_script_codes ( [CODESET] ) all_script_names ( [CODESET] ) Locale::Codes::Script::rename_script ( CODE ,NEW_NAME [,CODESET] ) Locale::Codes::Script::add_script ( CODE ,NAME [,CODESET] ) Locale::Codes::Script::delete_script ( CODE [,CODESET] ) Locale::Codes::Script::add_script_alias ( NAME ,NEW_NAME ) Locale::Codes::Script::delete_script_alias ( NAME ) Locale::Codes::Script::rename_script_code ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::Script::add_script_code_alias ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::Script::delete_script_code_alias ( CODE [,CODESET] ) These routines are all documented in the Locale::Codes::API man page. SEE ALSO
Locale::Codes The Locale-Codes distribution. Locale::Codes::API The list of functions supported by this module. http://www.unicode.org/iso15924/ Home page for ISO 15924. http://www.iana.org/assignments/language-subtag-registry The IANA language subtag registry. AUTHOR
See Locale::Codes for full author history. Currently maintained by Sullivan Beck (sbeck@cpan.org). COPYRIGHT
Copyright (c) 1997-2001 Canon Research Centre Europe (CRE). Copyright (c) 2001-2010 Neil Bowers Copyright (c) 2010-2013 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.16.3 2013-02-27 Locale::Codes::Script(3)
All times are GMT -4. The time now is 03:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy