Re: require from /home not /usr

2011-08-07 Thread Uli Schlachter
On 07.08.2011 03:02, stardiviner wrote:
 I want to put vicious and obvious under /usr/share/awesome/ into
 /home/user/.config/awesome/
 because it is easy to backup configurations.
 I tested that put them into /home/... but it does not work. require can not 
 use
 them. 
 
 so how to solve this ?

The error message will say where it looked for it. In other words, it would be
extremely helpful if you find the error message and check which paths you can 
use.

-- 
- Buck, when, exactly, did you lose your mind?
- Three months ago. I woke up one morning married to a pineapple.
  An ugly pineapple... But I loved her.

-- 
To unsubscribe, send mail to awesome-unsubscr...@naquadah.org.


Re: Keyboard widget with layout _and_ variant

2011-08-07 Thread manos
Thanks Uli, this works,
So the solution is to check:
if t ==  de 

Patrick, in my system the command works like this:
setxkbmap layout variant

Going further I try to show en instead of us when english is the
language but my code doesn't work
I change
kbdcfg.widget.text = t
with
   kbdcfg.widget.text = function ()
  if t ==  us  then return  en 
  else return t
  end
   end
When  i do that the widget doesn't work, it always show us and the
layout is not changing

manos~



On 08/06/2011 10:08 AM, Patrick Bethke wrote:
 The setxkbmap command to set a variant is
 setxkbmap layout -variant variant
 for example
 setxkbmap de -variant deadgraveacute
 not setxkbmap de deadgraveacute


 2011/8/6 Uli Schlachter psyc...@znc.in:
 On 06.08.2011 04:13, manos wrote:
 Hello,

 I am using the keyboard widget from the wiki and try to change it to
 pass also the variant (i want German qwerty, not qwertz that is the
 default).

 Code:
 kbdcfg = {}
 kbdcfg.cmd = setxkbmap
 kbdcfg.layout = { us, de, el }
 kbdcfg.current = 1
 kbdcfg.widget = widget({ type = textbox, align = right })
 kbdcfg.widget.text =   .. kbdcfg.layout[kbdcfg.current] ..  
 kbdcfg.switch = function ()
kbdcfg.current = kbdcfg.current % #(kbdcfg.layout) + 1
local t =   .. kbdcfg.layout[kbdcfg.current] ..  
 This sets t to e.g.  de 

local v = qwerty
kbdcfg.widget.text = t  -- the change to the original code is
 after this line
if t == de then   -- have tried also en, the
 previous layout
 and  de  is not equal to de.

   os.execute( kbdcfg.cmd .. t .. v )
else
   os.execute( kbdcfg.cmd .. t )
end
end

 Any ideas?


 --
 The Angels have the phone box!

 --
 To unsubscribe, send mail to awesome-unsubscr...@naquadah.org.


-- 
To unsubscribe, send mail to awesome-unsubscr...@naquadah.org.


Re: Keyboard widget with layout _and_ variant

2011-08-07 Thread manos
Hello,
The layouts are working as needed now so i share it. It might be a
better solution of course.

It is the keyboard widget from awesome wiki but it passes the variant
qwerty when the layout is de and it shows the desired text (en, de, ελ)
instead of the layout name (us, de, el). It can be changed to pass
different variants and show whichever text on the widget!

-- Keyboard widget
kbdcfg = {}
kbdcfg.cmd = setxkbmap
kbdcfg.layout = { us, de, el }
kbdcfg.current = 1  -- us is our default layout
kbdcfg.widget = widget({ type = textbox, align = right })
--kbdcfg.widget.text =   .. kbdcfg.layout[kbdcfg.current] ..  
kbdcfg.widget.text =  en 
kbdcfg.switch = function ()
kbdcfg.current = kbdcfg.current % #(kbdcfg.layout) + 1
local t =   .. kbdcfg.layout[kbdcfg.current] ..  
local v = qwerty
kbdcfg.widget.text = t
if t ==  us  then
kbdcfg.widget.text =  en 
os.execute( kbdcfg.cmd .. t )
elseif t ==  de  then
kbdcfg.widget.text = t
os.execute( kbdcfg.cmd .. t .. v )   
elseif t ==  el  then
kbdcfg.widget.text =  ελ 
os.execute( kbdcfg.cmd .. t )
end
end





manos~



On 08/07/2011 01:26 PM, manos wrote:
 Thanks Uli, this works,
 So the solution is to check:
 if t ==  de 

 Patrick, in my system the command works like this:
 setxkbmap layout variant

 Going further I try to show en instead of us when english is the
 language but my code doesn't work
 I change
 kbdcfg.widget.text = t
 with
kbdcfg.widget.text = function ()
   if t ==  us  then return  en 
   else return t
   end
end
 When  i do that the widget doesn't work, it always show us and the
 layout is not changing

 manos~



 On 08/06/2011 10:08 AM, Patrick Bethke wrote:
 The setxkbmap command to set a variant is
 setxkbmap layout -variant variant
 for example
 setxkbmap de -variant deadgraveacute
 not setxkbmap de deadgraveacute


 2011/8/6 Uli Schlachter psyc...@znc.in:
 On 06.08.2011 04:13, manos wrote:
 Hello,

 I am using the keyboard widget from the wiki and try to change it to
 pass also the variant (i want German qwerty, not qwertz that is the
 default).

 Code:
 kbdcfg = {}
 kbdcfg.cmd = setxkbmap
 kbdcfg.layout = { us, de, el }
 kbdcfg.current = 1
 kbdcfg.widget = widget({ type = textbox, align = right })
 kbdcfg.widget.text =   .. kbdcfg.layout[kbdcfg.current] ..  
 kbdcfg.switch = function ()
kbdcfg.current = kbdcfg.current % #(kbdcfg.layout) + 1
local t =   .. kbdcfg.layout[kbdcfg.current] ..  
 This sets t to e.g.  de 

local v = qwerty
kbdcfg.widget.text = t  -- the change to the original code is
 after this line
if t == de then   -- have tried also en, the
 previous layout
 and  de  is not equal to de.

   os.execute( kbdcfg.cmd .. t .. v )
else
   os.execute( kbdcfg.cmd .. t )
end
end

 Any ideas?

 --
 The Angels have the phone box!

 --
 To unsubscribe, send mail to awesome-unsubscr...@naquadah.org.


-- 
To unsubscribe, send mail to awesome-unsubscr...@naquadah.org.


Custom Layouts

2011-08-07 Thread Ethan Levine
I'm trying to find information regarding writing my own custom layout for
awesome.  Instead of the ones that come with it, I want one where my screen
is split into columns, and if you assign multiple windows to the same
column, they'll just stack.

I've tried reading through the source code for the built-in layouts, but
it's hard to tell what's going on (a combination of few comments and Lua
being dynamically typed).  The API documentation is also quite scant in this
regard.

Are there any resources available to help me write my own custom layout for
awesome?  Do you have any hints as to where to start?  I'd also be grateful
for any nice examples of others' custom layouts, so I can see how they work
(as far as I can tell from reading the source code, I need to call
client:geometry(new_geometry), but I'm not sure if I need to do anything
else, or exactly what the parameters to arrange are).

Thanks in advance.


Re: Custom Layouts

2011-08-07 Thread lilydjwg
On Sun, Aug 07, 2011 at 05:18:41PM -0400, Ethan Levine wrote:
 I'm trying to find information regarding writing my own custom layout for
 awesome.  Instead of the ones that come with it, I want one where my screen
 is split into columns, and if you assign multiple windows to the same
 column, they'll just stack.
 
 I've tried reading through the source code for the built-in layouts, but
 it's hard to tell what's going on (a combination of few comments and Lua
 being dynamically typed).  The API documentation is also quite scant in this
 regard.
 
 Are there any resources available to help me write my own custom layout for
 awesome?  Do you have any hints as to where to start?  I'd also be grateful
 for any nice examples of others' custom layouts, so I can see how they work
 (as far as I can tell from reading the source code, I need to call
 client:geometry(new_geometry), but I'm not sure if I need to do anything
 else, or exactly what the parameters to arrange are).
 
 Thanks in advance.


I have managed to write a layout for Empathy. Seems like calling
client:geometry for each client is sufficient.

https://github.com/lilydjwg/myawesomerc/blob/master/empathy.lua

-- 
Best regards,
lilydjwg

Linux Vim Python 我的博客
http://lilydjwg.is-programmer.com/

-- 
To unsubscribe, send mail to awesome-unsubscr...@naquadah.org.