new_bitbar_script: Helper to get started with a new BitBar bitbar script

Description Usage Arguments Examples

View source: R/use-bitbar.R

Description

Helper to get started with a new BitBar bitbar script

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
new_bitbar_script(
  save_as,
  title = "Script Title",
  version = "1.0",
  author = Sys.info()[["user"]],
  github_user = author,
  description = "BitBar Plugin Using R",
  dependencies = "R",
  image_url = "",
  about_url = "",
  refresh = ""
)

Arguments

save_as

full path (including scriptname.R) to where you want the file saved

title, version, author, github_user, description, dependencies, image_url, about_url

BitBar metadata passed on to the generator.

refesh

if non-blank this will cause the filename to include a refresh hint in the save_as filename before the ending .R so BitBar will run the script every refresh period. See Configuring the refresh time for more information.

Examples

1
2
3
4
5
6
7
if (interactive()) {
  new_bitbar_script(
    save_as = file.path(bitbar_plugins_dir(), "my-awesome-bitbar-script.R"),
    title = ":blue_heart:",
    description = "Example BitBar Script")
  )
}

hrbrmstr/bitbar documentation built on June 23, 2020, 11:02 a.m.