Pārlūkot izejas kodu

Add walk_sassy_themes()

base16
Garrick Aden-Buie pirms 7 gadiem
vecāks
revīzija
1ea44fe199
1 mainītis faili ar 14 papildinājumiem un 0 dzēšanām
  1. +14
    -0
      R/make_functions.R

+ 14
- 0
R/make_functions.R Parādīt failu

rgx_name <- "/\\*\\s*([[:alpha:][:digit:][:punct:] ]+) by" rgx_name <- "/\\*\\s*([[:alpha:][:digit:][:punct:] ]+) by"
info$name <- stringr::str_match(info$attribution, rgx_name)[1, 2] info$name <- stringr::str_match(info$attribution, rgx_name)[1, 2]
info info
}

walk_sassy_themes <- function(style = c("all", "light", "dark"), auto = FALSE) {
themes <- list_sassy_themes(style)
for (theme in themes) {
cliapp::cli_alert(theme)
rstudioapi::applyTheme(theme)
if (auto) {
Sys.sleep(1)
} else {
res <- readline("Press enter for next theme or q to stop...")
if (tolower(res) == "q") return()
}
}
} }

Notiek ielāde…
Atcelt
Saglabāt