install_rstudio_themes: Add a Custom RStudio Editor Theme

View source: R/install_rstudio_themes.R

install_rstudio_themesR Documentation

Add a Custom RStudio Editor Theme

Description

Adds a custom editor theme to RStudio, leveraging the package's internal dataset with custom RStudio themes. The function also allows to bulk-install themes.

Usage

install_rstudio_themes(theme, globally = FALSE)

Arguments

theme

name of the theme to install, can be a character vector with multiple themes. the shortcode "all" will install all themes in the dataset; similarly, "all_light" and "all_dark" will install all light or dark themes, respectively.

globally

boolean, default FALSE. should the themes be installed only for the current user (FALSE, default) or for all users (TRUE)

Details

The function wraps rstudioapi::addTheme. It does not force the installation, meaning that existing themes are not overwritten. Also, it does not immediately apply the newly installed theme (see rstudioapi::applyTheme) for this). To see the newly installed themes, navigate to "Tools"- "Global Options" - "Appearance".

Value

none

See Also

rstudioapi:addTheme() which this function wraps.

Examples

## Not run: 
# install all dark themes
install_rstudio_themes(theme = "all_dark")

# install two specific themes from the list
install_rstudio_themes(theme = c("Ayu Light", "GitHub {rsthemes}"))

## End(Not run)

max-alletsee/rstudio-themes documentation built on July 4, 2024, 9:07 p.m.