<commit_before># Hydra

*Hack your OS X desktop environment*

[![Build Status](https://travis-ci.org/sdegutis/hydra.svg?branch=master)](https://travis-ci.org/sdegutis/hydra)

### Install

Don't install Hydra via [cask](http://caskroom.io/). Instead, download
the zipped binary directly from the
[the latest-release page](https://github.com/sdegutis/hydra/releases/latest);
unzip the downloaded file, put the app somewhere permanent, and run
it. You may need to right-click it and click "Open" the first time.

Hydra is currently in beta, but is very stable, seeing minor releases
every day. While in beta, the API is subject to change. Within a week,
it will come out of beta. You can check for updates via the `updates`
module, to be notified when an update (beta or not) is available.

### Usage

Hydra will look for `~/.hydra/init.lua` and run it if it exists. But
if you haven't written one yet, it will run a fallback config that
gives you a menu bar icon that contains an option to open
[this sample init](https://github.com/sdegutis/hydra/blob/master/Hydra/Bootstrapping/sample_init.lua).
You can paste its contents into your `~/.hydra/init.lua` to get
started with a really basic starter config.

Bookmark the [official online docs](http://sdegutis.github.io/hydra/)!
The index page has very handy and valuable information that's not
found in this readme or the in-app documentation system.

### Example

[sample_init.lua](https://github.com/sdegutis/hydra/blob/master/Hydra/Bootstrapping/sample_init.lua) ([raw source](https://raw.githubusercontent.com/sdegutis/hydra/master/Hydra/Bootstrapping/sample_init.lua))

Here's a convenient way to set it up with `wget`:

~~~bash
$ mkdir -p ~/.hydra && cd $_ && wget -O https://raw.githubusercontent.com/sdegutis/hydra/master/Hydra/Bootstrapping/sample_init.lua init.lua
~~~

Here's a snippet:
~~~lua
-- show a helpful menu
menu.show(function()
    local updatetitles = {[true] = "Install Update", [false] = "Check for Update..."}
    local updatefns = {[true] = updates.install, [false] = checkforupdates}
    local hasupdate = (updates.newversion ~= nil)

    return {
      {title = "Reload Config", fn = hydra.reload},
      {title = "Open REPL", fn = repl.open},
      {title = "-"},
      {title = "About", fn = hydra.showabout},
      {title = updatetitles[hasupdate], fn = updatefns[hasupdate]},
      {title = "Quit Hydra", fn = os.exit},<commit_msg>Fix wget order of arguments<commit_after># Hydra

*Hack your OS X desktop environment*

[![Build Status](https://travis-ci.org/sdegutis/hydra.svg?branch=master)](https://travis-ci.org/sdegutis/hydra)

### Install

Don't install Hydra via [cask](http://caskroom.io/). Instead, download
the zipped binary directly from the
[the latest-release page](https://github.com/sdegutis/hydra/releases/latest);
unzip the downloaded file, put the app somewhere permanent, and run
it. You may need to right-click it and click "Open" the first time.

Hydra is currently in beta, but is very stable, seeing minor releases
every day. While in beta, the API is subject to change. Within a week,
it will come out of beta. You can check for updates via the `updates`
module, to be notified when an update (beta or not) is available.

### Usage

Hydra will look for `~/.hydra/init.lua` and run it if it exists. But
if you haven't written one yet, it will run a fallback config that
gives you a menu bar icon that contains an option to open
[this sample init](https://github.com/sdegutis/hydra/blob/master/Hydra/Bootstrapping/sample_init.lua).
You can paste its contents into your `~/.hydra/init.lua` to get
started with a really basic starter config.

Bookmark the [official online docs](http://sdegutis.github.io/hydra/)!
The index page has very handy and valuable information that's not
found in this readme or the in-app documentation system.

### Example

[sample_init.lua](https://github.com/sdegutis/hydra/blob/master/Hydra/Bootstrapping/sample_init.lua) ([raw source](https://raw.githubusercontent.com/sdegutis/hydra/master/Hydra/Bootstrapping/sample_init.lua))

Here's a convenient way to set it up with `wget`:

~~~bash
$ mkdir -p ~/.hydra && cd $_ && wget https://raw.githubusercontent.com/sdegutis/hydra/master/Hydra/Bootstrapping/sample_init.lua -O init.lua
~~~

Here's a snippet:
~~~lua
-- show a helpful menu
menu.show(function()
    local updatetitles = {[true] = "Install Update", [false] = "Check for Update..."}
    local updatefns = {[true] = updates.install, [false] = checkforupdates}
    local hasupdate = (updates.newversion ~= nil)

    return {
      {title = "Reload Config", fn = hydra.reload},
      {title = "Open REPL", fn = repl.open},
      {title = "-"},
      {title = "About", fn = hydra.showabout},
      {title = updatetitles[hasupdate], fn = updatefns[hasupdate]},
      {title = "Quit Hydra", fn = os.exit},
{'fraction_non_alphanumeric': 0.1261373035566584, 'fraction_numerical': 0.0, 'mean_word_length': 4.096944151738672, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2385226', 'n_tokens_mistral': 1620, 'n_tokens_neox': 1547, 'n_words': 527}