File: convertTheme.Rd

package info (click to toggle)
r-cran-rstudioapi 0.17.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 916 kB
  • sloc: makefile: 2
file content (51 lines) | stat: -rw-r--r-- 1,902 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/themes.R
\name{convertTheme}
\alias{convertTheme}
\title{Convert a tmTheme to an RStudio Theme}
\usage{
convertTheme(
  themePath,
  add = TRUE,
  outputLocation = NULL,
  apply = FALSE,
  force = FALSE,
  globally = FALSE
)
}
\arguments{
\item{themePath}{A full or relative path to the \code{tmTheme} file to be
converted.}

\item{add}{Whether to add the newly converted theme to RStudio. Setting this
to true will have the same impact as running \code{{
rstudioapi::convertTheme(<themePath>, outputLocation =
<convertedThemePath>); rstudioapi::addTheme(<convertedThemePath>) }}.\cr
Default: \code{TRUE}.}

\item{outputLocation}{A full or relative path where a copy of the converted
theme will be saved. If this value is \code{NULL}, no copy will be saved.\cr
Default: \code{NULL}.}

\item{apply}{Whether to immediately apply the newly added theme. This
paramater cannot be set to \code{TRUE} if \code{add} is set to \code{FALSE}.
Setting this and \code{add} to \code{TRUE} has the same impact as running
\code{{ rstudioapi::convertTheme(<themePath>, outputLocation =
<convertedThemePath>); rstudioapi::addTheme(<convertedThemePath>);
rstudioapi::applyTheme(<themeName>) }}.\cr Default: \code{FALSE}.}

\item{force}{Whether to force the operation and overwrite an existing file
with the same name.\cr Default: \code{FALSE}.}

\item{globally}{Whether to install this theme for the current user or all
users. If set to \code{TRUE} this will attempt to install the theme for all
users, which may require administrator privileges. Only applies when
\code{add} is \code{TRUE}. \cr Default: \code{FALSE}.}
}
\description{
Converts a \code{tmTheme} to an \code{rstheme} and optionally adds and
applies it to RStudio and returns the name of the theme.
}
\note{
The \code{convertTheme} function was introduced in RStudio 1.2.879.
}