Wilson Miner | 10 Nov 18:19
Picon

Re: tmTheme: Slate

Glad you like it. I stole some of the scope definitions from Twilight, so credit due etc.

On 11/10/05, Allan Odgaard < throw-away-1-jlSwmc+ugeV0ubjbjo6WXg@public.gmane.org> wrote:
On 10/11/2005, at 16.22, Andreas Wahlin wrote:

> [...] what was described was a way of having a toggle between two
> files, but i want a toggel between n files.

The stuff I showed used a bash array, so just do:

themes=(theme1 theme2 theme3)

You'll have to use modulo "number of themes", which was the "total"
variable in my last script.

So just making it:

>> themes=(theme1 theme2 theme3)
>> rand=$(dd </dev/random bs=1 count=1 2>/dev/null|hexdump -e '/1 "%u"')
>> total=${#themes[ <at> ]}
>> open "${themes[$((rand % total))]}"

Should work. Though remeber to quote theme paths properly, though ~
won't expand in double quotes, so use $HOME instead.


______________________________________________________________________
For new threads USE THIS: textmate-qhrM8SXbD5LrQoZeqNtYVVaTQe2KTcn/@public.gmane.org
(threading gets destroyed and the universe will collapse if you don't)
http://lists.macromates.com/mailman/listinfo/textmate



Gmane