-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathREADME.Rmd
More file actions
180 lines (132 loc) · 9.27 KB
/
Copy pathREADME.Rmd
File metadata and controls
180 lines (132 loc) · 9.27 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
---
title: "RStudio Theme Collection"
output:
md_document:
variant: gfm
---
```{r utility, echo=FALSE}
# load all themes
rstudio_themes <- read.csv("data-raw/rstudio_themes.csv")
# sort alphabetically by theme name
rstudio_themes <- rstudio_themes[order(rstudio_themes$theme_name),]
# save outputs: CSV incl. header, CSV excl. header, RData file
write.csv(rstudio_themes,
file = "data-raw/rstudio_themes.csv",
row.names = FALSE)
save(rstudio_themes, file = "data/rstudio_themes.rda")
```
# RStudio Theme Collection
This is a collection of custom RStudio themes that offer alternatives to the default built-in themes. Below, you will find a list with **`r nrow(rstudio_themes)` RStudio themes** that have been created by users (`r sum(rstudio_themes$is_dark)` dark themes, `r nrow(rstudio_themes) - sum(rstudio_themes$is_dark)` light themes).
You can find [here](https://github.com/max-alletsee/rstudio-themes/blob/master/data-raw/rstudio_themes.csv) a CSV file, also including links to screenshots if available.
If you would like to learn more about how to create custom themes for RStudio, please see the [RStudio theme creation website](https://rstudio.github.io/rstudio-extensions/rstudio-theme-creation.html). There is also a [great tutorial by Xiaoyang Song](https://github.com/Xiaoyang-Song/RStudio-Theme-Customization) that explains the structure of theme files, usage of variables and other topics.
To add your own theme to the list, please open a pull request, add your theme to the file [data-raw/rstudio_themes.csv](https://github.com/max-alletsee/rstudio-themes/blob/master/data-raw/rstudio_themes.csv) and re-knit the file README.rmd.
```{r check_for_duplicates, echo=FALSE}
# check for duplicated theme names
if (any(duplicated(rstudio_themes$theme_name))) {
warning("Duplicated Theme Names!\n")
cat(rstudio_themes$theme_name[duplicated(rstudio_themes$theme_name)])
}
# check for duplicated Github Direct Links
if (any(duplicated(rstudio_themes$github_direct_link))) {
warning("Duplicated Github Direct Links!\n")
cat(rstudio_themes$github_direct_link[duplicated(rstudio_themes$github_direct_link)])
}
# check for duplicated screenshot URLs
if (any(duplicated(rstudio_themes$screenshot) & rstudio_themes$screenshot > 1)) {
warning("Duplicated screenshots!\n")
cat(rstudio_themes$screenshot[duplicated(rstudio_themes$screenshot)])
}
```
## How to install/use custom themes
RStudio supports custom themes in version 1.20 or higher. Themes can be installed via "Tools" - "Global Options" - "Appearance" - "Add Theme". Once a theme is installed, the theme name will appear in the theme list and it can be activated by simply clicking on it.

The "rstudioapi" package includes an ["addTheme" function](https://rdrr.io/cran/rstudioapi/man/addTheme.html) that allows to install custom themes.
Moreover, this Github repository comes with a little pseudo-package that allows to install specific themes from the list below, also coming with the possibility for a bulk install. Below is a quick overview how to use this function.
```{r example_code, eval = FALSE}
# install the pseudo-package from this Github repository
devtools::install_github("max-alletsee/rstudio-themes")
library(rstudiothemes) # ... then load the library
# example 1: bulk-install all light themes
install_rstudio_themes(theme = "all_light")
# example 2: install two specific light themes
install_rstudio_themes(theme = c("Ayu Light", "Github {rsthemes}"))
```
## Dark Themes from R Users
```{r show_dark_themes, results='asis', echo=FALSE}
# filter on dark themes
themes_dark <- rstudio_themes[rstudio_themes$is_dark, ]
for (row in 1:nrow(themes_dark)) {
# base text
text <- paste0("* ", themes_dark$theme_name[row], " ([repo](", themes_dark$github_repository[row], "), [direct link](", themes_dark$github_direct_link[row], "))")
# additional text if screenshot is available
if(themes_dark$screenshot[row] != "") {
text <- gsub(pattern = "))",
replacement = paste0("), [screenshot](", themes_dark$screenshot[row], "))"),
x = text)
}
# additional text if description is available
if(nchar(themes_dark$description[row]) > 1) {
text <- paste0(text, ": ", themes_dark$description[row])
}
cat(paste(text, "\n"))
}
```
## Light Themes from R Users
```{r show_light_themes, results='asis', echo=FALSE}
# filter on dark themes
themes_light <- rstudio_themes[!rstudio_themes$is_dark, ]
for (row in 1:nrow(themes_light)) {
# base text
text <- paste0("* ", themes_light$theme_name[row], " ([repo](", themes_light$github_repository[row], "), [direct link](", themes_light$github_direct_link[row], "))")
# additional text if screenshot is available
if(themes_light$screenshot[row] != "") {
text <- gsub(pattern = "))",
replacement = paste0("), [screenshot](", themes_light$screenshot[row], "))"),
x = text)
}
# additional text if description is available
if(nchar(themes_light$description[row]) > 1) {
text <- paste0(text, ": ", themes_light$description[row])
}
cat(paste(text, "\n"))
}
```
## Built-in RStudio Themes
The list below shows the full list of the currently built-in RStudio themes that are installed by default.
### Dark
* [Ambiance](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/ambiance.rstheme)
* [Chaos](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/chaos.rstheme)
* [Clouds Midnight](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/clouds_midnight.rstheme)
* [Cobalt](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/cobalt.rstheme)
* [Dracula](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/dracula.rstheme)
* [Gob](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/gob.rstheme)
* [Idle Fingers](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/idle_fingers.rstheme)
* [Katzenmilch](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/katzenmilch.rstheme)
* [Kr Theme](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/kr_theme.rstheme)
* [Material](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/material.rstheme)
* [Merbivore](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/merbivore.rstheme)
* [Merbivore Soft](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/merbivore_soft.rstheme)
* [Mono Industrial](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/mono_industrial.rstheme)
* [Monokai](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/monokai.rstheme)
* [Pastel on Dark](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/pastel_on_dark.rstheme)
* [Solarized Dark](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/solarized_dark.rstheme)
* [Tomorrow Night](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/tomorrow_night.rstheme)
* [Tomorrow Night Blue](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/tomorrow_night_blue.rstheme)
* [Tomorrow Night Bright](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/tomorrow_night_bright.rstheme)
* [Tomorrow Night 80s](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/tomorrow_night_eighties.rstheme)
* [Twilight](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/twilight.rstheme)
* [Vibrant Ink](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/vibrant_ink.rstheme)
### Light
* [Chaos](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/chrome.rstheme)
* [Chrome](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/chrome.rstheme)
* [Clouds](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/clouds.rstheme)
* [Crimson Editor](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/crimson_editor.rstheme)
* [Dawn](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/dawn.rstheme)
* [Dreamweaver](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/dreamweaver.rstheme)
* [Eclipse](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/eclipse.rstheme)
* [iPlastic](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/iplastic.rstheme)
* [Solarized Light](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/solarized_light.rstheme)
* [SQL Server](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/sqlserver.rstheme)
* [Textmate](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/textmate.rstheme) (default theme)
* [Tomorrow](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/tomorrow.rstheme)
* [Xcode](https://github.com/rstudio/rstudio/blob/master/src/cpp/session/resources/themes/xcode.rstheme)