[TxMt] tmTheme: Slate

Wilson Miner wminer at gmail.com
Thu Nov 10 17:19:25 UTC 2005


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 at 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 at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20051110/76bfb29e/attachment.html>


More information about the textmate mailing list