---
output: rmarkdown::github_document
editor_options: 
  chunk_output_type: console
---
```{r pkg-knitr-opts, include=FALSE}
hrbrpkghelpr::global_opts()
```

```{r badges, results='asis', echo=FALSE, cache=FALSE}
hrbrpkghelpr::stinking_badges()
```

```{r description, results='asis', echo=FALSE, cache=FALSE}
hrbrpkghelpr::yank_title_and_description()
```

## Installing BitBar

If you have [homebrew](https://brew.sh/) installed, you can do:

```shell
brew cask install bitbar
```

Otherwise [grab the latest release](https://github.com/matryer/bitbar/releases/latest) and install it the hard way.

Open the application and choose the directory you want to be your plugins directory. This is where your menubar scripts will go.
(I use `~/Library/BitBar/Plugins` but you can pick any directory; just make sure it isn't one with
a gazillion files as that impacts BitBar's performance).

## What's Inside The Tin

The following functions are implemented:

```{r ingredients, results='asis', echo=FALSE, cache=FALSE}
hrbrpkghelpr::describe_ingredients()
```

There are also two RStudio Addins, one with a GUI for entering in the script metadata & starting a new BitBar {bitbar} script and one for opening up the BitBar plugins directory in the Finder.

## Installation

```{r install-ex, results='asis', echo=FALSE, cache=FALSE}
hrbrpkghelpr::install_block()
```

## Usage

```{r lib-ex}
library(bitbar)

# current version
packageVersion("bitbar")

```

This will open up a `my-awesome-bitbar-script.R` in RStudio (if available) or whatever editor `file.edit()` is configured to use.

```{r ex-01, eval=FALSE}
new_bitbar_script(
  save_as = file.path(bitbar_plugins_dir(), "my-awesome-bitbar-script.R"),
  title = ":blue_heart:",
  description = "Example BitBar Script"
)
```

## bitbar Metrics

```{r cloc, echo=FALSE}
cloc::cloc_pkg_md()
```

## Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. 
By participating in this project you agree to abide by its terms.
