Put this in a file
! Swap alt and win on left hand side of keyboard
keysym Alt_L = Super_L
keysym Super_L = Alt_L
and run xmodmap on it.
Much easier
>>>>> "Toby" == Toby Cubitt <[EMAIL PROTECTED]> writes:
Toby> On Fri, Aug 25, 2006 at 10:58:15PM +0200, Toby Cubitt wrote:
>> On Fri, Aug 25, 2006 at 12:22:47PM +0100, Asfand Yar Qazi wrote:
>> > I don't know if it's already been done, but here's a little script
>> > that reads in all key bindings from enlightenment_remote, and
>> > substitutes all uses of ALT with WIN.
>> >
>> > Just thought it might be useful to someone. If there's a better
>> > solution out there, please tell me!
>>
>> Looks to me like a job for a sed + xargs one-liner(*) to me...
>>
>> (*) left as an exercise for the reader ;-)
Toby> OK, I got curious as to how easy this would be, so here's my attempt:
Toby> (split over multiple lines for clarity(!), but it could all be on
Toby> one...)
Toby> enlightenment_remote -binding-key-list | grep -v '<-' | \
Toby> tr = " " | cut -d" " -f4,6,8,10,12,14 | \
Toby> while read context key mod anymod action params; do \
Toby> if [[ -n "`echo $mod | grep ALT`" ]]; then \
Toby> enlightenment_remote -binding-key-del \
Toby> $context $key $mod $anymod $action $params; \
Toby> enlightenment_remote -binding-key-add \
Toby> $context $key `echo $mod | sed 's/ALT/WIN/g'` \
Toby> $anymod $action $params; \
Toby> fi; \
Toby> done
Toby> Admittedly, this doesn't use xargs after all. The (trimmed)
Toby> enlightenment_remote output contains VAR=VALUE pairs, which is already
Toby> in the right format for setting bash variables. So I wanted to pipe it
Toby> to xargs and get it to set temporary shell variables, then execute the
Toby> enlightenment remote commands using those variables. But I couldn't
Toby> figure out how to get xargs to set shell variables based on the text
Toby> it receives from the pipe. Instead, I munged the output with the tr
Toby> and cut commands, then piped it to the while loop and the read
Toby> command, etc.
Toby> Anyone know if there's a way to do what I want using xargs? Or indeed
Toby> any way to shorten it?
Toby> Of course, this isn't the diehard-bash-scripting-junkies mailing list,
Toby> so perhaps this is getting off-topic ;-)
Toby> But I do like the fact that an entire object-oriented,
Toby> relational-database-driven, automatic, systematic, hydromatic,
Toby> all-singing, all-dancing, fully web 3.0 hype-infused ruby program can
Toby> be replaced by one line of (incomprehensible) bash ;-)
Toby> Toby
Toby> PS: I've never even tried programming in ruby, so please don't take my
Toby> inane comments seriously ;-)
Toby> --
Toby> PhD Student
Toby> Quantum Information Theory group
Toby> Max Planck Institute for Quantum Optics
Toby> Garching, Germany
Toby> email: [EMAIL PROTECTED]
Toby> web: www.dr-qubit.org
Toby>
-------------------------------------------------------------------------
Toby> Using Tomcat but need to do more? Need to support web services,
security?
Toby> Get stuff done quickly with pre-integrated technology to make your
job easier
Toby> Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
Toby>
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Toby> _______________________________________________
Toby> enlightenment-users mailing list
Toby> [email protected]
Toby> https://lists.sourceforge.net/lists/listinfo/enlightenment-users
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-users