项目作者: mdlincoln

项目描述 :
Match the RStudio editor theme to the operating system appearance
高级语言: R
项目地址: git://github.com/mdlincoln/darkly.git
创建时间: 2019-08-17T23:31:37Z
项目社区:https://github.com/mdlincoln/darkly

开源协议:Other

下载


darkly 🌚🌞

Lifecycle: experimental
Travis build status
AppVeyor build status

darkly creates dark and light presets for your RStudio editor theme, and will synchronize them on startup with your OS appearance (currently for OS X only).

Installation

You can install the development version of darkly from GitHub with:

  1. # install.packages("devtools")
  2. devtools::install_github("mdlincoln/darkly")

Run use_darkly() to guide the one-time setup process. You will first save your preferred theme names to your .Renviron, and then have the option setup a hook in your .Rprofile that will call darkly_sync() when starting up RStudio. (Currently available on OS X only.)

  1. darkly::use_darkly()
  2. #> ● Paste the following lines into your .Renviron
  3. #> DARKLY_LIGHT_THEME=Textmate (default)
  4. #> DARKLY_DARK_THEME=Solarized Dark
  5. #> [Copied to clipboard]
  6. #> ● Modify '/Users/admin/.Renviron'
  7. #> ● Restart R for changes to take effect
  8. #> ● Paste the following line into your Rprofile
  9. #> # On load, synchronize the RStudio editor theme to the OS appearance using the darkly package
  10. #> setHook("rstudio.sessionInit", function(newSession) if (interactive() & require("darkly", quietly = TRUE)) darkly::darkly_sync(), #> action = "append")
  11. #> [Copied to clipboard]
  12. #> ● Modify '/Users/admin/.Rprofile'
  13. #> ● Restart R for changes to take effect

darkly also includes RStudio addins to quickly toggle themes:

darkly RStudio addin