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@macromates.com 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[@]} 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@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate