{"id":13424087,"url":"https://github.com/rileytwo/darkstudio","last_synced_at":"2025-03-15T18:34:00.298Z","repository":{"id":42158011,"uuid":"134983060","full_name":"rileytwo/darkstudio","owner":"rileytwo","description":"darkstudio. A dark grey alternative to RStudio's default dark theme.","archived":false,"fork":false,"pushed_at":"2024-02-06T09:52:45.000Z","size":13290,"stargazers_count":130,"open_issues_count":14,"forks_count":16,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-08-01T00:39:39.415Z","etag":null,"topics":["dark-theme","r","rstats","rstheme","rstudio"],"latest_commit_sha":null,"homepage":"https://rileytwo.github.io/darkstudio/","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rileytwo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-05-26T17:50:12.000Z","updated_at":"2024-07-28T13:58:31.000Z","dependencies_parsed_at":"2024-01-14T20:29:48.881Z","dependency_job_id":null,"html_url":"https://github.com/rileytwo/darkstudio","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rileytwo%2Fdarkstudio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rileytwo%2Fdarkstudio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rileytwo%2Fdarkstudio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rileytwo%2Fdarkstudio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rileytwo","download_url":"https://codeload.github.com/rileytwo/darkstudio/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221601261,"owners_count":16850313,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dark-theme","r","rstats","rstheme","rstudio"],"created_at":"2024-07-31T00:00:48.326Z","updated_at":"2024-10-26T23:30:17.240Z","avatar_url":"https://github.com/rileytwo.png","language":"CSS","funding_links":[],"categories":["CSS"],"sub_categories":[],"readme":"# darkstudio is a package!\ndarkstudio can now be installed as an R package. Instructions are below.\n\n# Overview\n\nThis is something I did for fun, and figured other people might enjoy this as much as I do.\n\nI have little experience in writing CSS and javascript, and even less experience in building IDEs. I did most of the work in RStudio's DevTools, by selecting elements and changing their properties. So, if anyone would like to help out by contributing, please do! I'd love the help :smile:.\n\n## This is not an editor theme\n\nRStudio v1.2 introduced the ability to import [your own theme](https://rstudio.github.io/rstudio-extensions/rstudio-theme-creation.html). **darkstudio is not an editor theme**, and does not change the syntax highlighting in the editor. darkstudio is an *RStudio theme*, that changes the default appearance of the Modern and Sky *RStudio themes* when using a dark *editor theme* (this is set by having `rs-theme-is-dark: TRUE` somewhere in an `*.rstheme` file).\n\nRStudio, by default, has three themes: Classic, Modern, and Sky (you can see for yourself by going to `Global Options -\u003e Appearance -\u003e RStudio theme`).\nOn RStudio's Support page, there is a fourth theme listed, called [Dark](https://support.rstudio.com/hc/en-us/articles/115011846747-Using-RStudio-Themes#dark-theme).\n\n\u003e The dark theme is a superset to the Modern and Sky themes that is activated whenever the Editor theme uses a dark palette.\n\nMeaning, when the editor theme is dark (i.e. `rs-theme-is-dark: TRUE`), RStudio's panels, borders, tabs, and menus will be the same color if you select Modern or Sky as the RStudio theme.\n\nIf you're curious, they use a different palette when using a [light theme](https://support.rstudio.com/hc/en-us/articles/115011846747-Using-RStudio-Themes#modern-theme).\n\nClassic, however, does not change its appearance, regardless of `rs-theme-is-dark: TRUE` or `rs-theme-is-dark: FALSE`.\nI think this can be overriden, but I don't plan to do so here.\n\nTL;DR: whether you have your RStudio theme set to Modern or Sky, darkstudio will work as long as you're using a dark editor theme.\n\n## Pics or it didn't happen\n\n![darkstudio](man/figures/darkstudio.png)\n\n![suggestions](man/figures/suggestions.png)\n\n![environment](man/figures/environment.png)\n\nHere, the RStudio theme is set to Modern (remember, Sky would work here as well), and the editor theme is using an `*.rstheme` with `rs-theme-is-dark: TRUE`. You can download that theme [here](https://github.com/rileytwo/kiss.git).\n\n## Installation\n\nThis used to not be an R package and required manual copying/moving/pasting files from one place to another. Now that `darkstudio` is an R package, installation and maintenance is much simpler. However, I've kept the old installation method in the README in case anyone would rather go that route.\n\n### Recommended Method\n\nYou can install `darkstudio` by using `install_github()` from the `remotes` or `devtools` packages.\n\nJust run\n\n```r\nremotes::install_github(\"rileytwo/darkstudio\")\n```\nin RStudio to install the package. To activate the custom theme, the next step depends on the OS you're using.\n\n`darkstudio` alters RStudio's DOM by adding a `\u003clink/\u003e` handle that points to a CSS file. Unless you installed RStudio to a non-default location, you may need to elevate your privileges when activating `darkstudio`.\n\n### Windows\nRun RStudio as an administrator. Next, run\n\n```r\ndarkstudio::activate()\n```\n\nin the console to activate the theme. The function will return `TRUE` if the activation was successful.\n\n### Linux\nStart RStudio from the terminal by running `sudo rstudio --no-sandbox`. \n\nOnce RStudio is running, run\n\n```r\ndarkstudio::activate()\n```\n\nin the console.\n\n### macOS\n\nSimply run\n\n```r\ndarkstudio::activate()\n```\n\nin the console. I personally own a mac, and haven't had an trouble activating `darkstudio` with non-elevated privileges. I understand I can't speak for all mac owners, so file an issue if you run into trouble.\n\n\n### Old Method\n**You may want to back up the original files.**\n\nI recommend placing them into a folder, something like `before-darkstudio`,\n`RStudio-original`, `original-rstudio-files-that-were-there-before-i-started-using-this-awesome-theme` etc., somewhere outside of RStudio's file directory (so they won't be removed when you update RStudio!).\n\n### macOS\n\n```bash\ngit clone https://github.com/rileytwo/darkstudio\n\ncp \"darkstudio/darkstudio.css\" \\\n    \"/Applications/RStudio.app/Contents/Resources/www/darkstudio.css\"\n\ncp \"darkstudio/index.htm\" \\\n    \"/Applications/RStudio.app/Contents/Resources/www/index.htm\"\n```\n\n### Windows\n\n```powershell\ngit clone https://github.com/rileytwo/darkstudio\n\nCopy-Item \"darkstudio\\darkstudio.css\" `\n    \"C:\\Program Files\\RStudio\\www\\darkstudio.css\" `\n    -Force\n\nCopy-Item \"darkstudio\\index.htm\" `\n    \"C:\\Program Files\\RStudio\\www\\index.htm\" `\n    -Force\n```\n\nYou may not have the permission to copy or overwrite items in `C:\\Program Files`.\nIf that's the case, run PowerShell in an elevated prompt (as an Adminstrator)\nand try to copy the items to `C:\\Program Files\\RStudio\\Resources\\www\\darkstudio.css`\nagain. If that doesn't work, try opening the darkstudio folder from File Explorer, and manually copying the files to the `C:\\Program Files\\RStudio\\Resources\\www\\` directory.\n\nIf you're STILL unable to copy the files (it's Windows, so who knows?) open an issue and I'll do what I can to help.\n\n### Linux\n\nIt's been a while since I've used RStudio on Linux (Kubuntu 18.04), so I'm not sure if the paths shown below are still correct.\nIf you're using Linux and find that these paths no longer work, please open an issue or pull request.\n\n```bash\ngit clone https://github.com/rileytwo/darkstudio\n\ncp \"darkstudio/darkstudio.css\" \\\n    \"/usr/lib/rstudio/resources/www/darkstudio.css\"\n\ncp \"darkstudio/index.htm\" \\\n    \"/usr/lib/rstudio/resources/www/index.htm\"\n```\n\n## Updating\n\n### Recommended Method\n\n**WIP**\n\n### Old Method\n\nIf you cloned the repositories, `cd` into the direcory that contains this repo.\n\nExecute `git pull --rebase`, and copy the files to `RStudio`'s `www` directory again.\n\nIf you run into any troubles, please file an issue.\n\n## Uninstalling\n\nI should note here that deactivating `darkstudio` **should be done _before_ uninstalling the package.** If you don't, you'll need to manually edit the `index.htm` file. If you wish to disable `darkstudio`.\n\nDeactivating the theme is relatively simple. The `deactivate()` function will return RStudio to it's normal appearance.\n\n```r\ndarkstudio::deactivate()\n```\n\nAfter that, you can uninstall `darkstudio` like any other package:\n\n```r\nremove.packages('darkstudio')\n```\n\n## I love you\n\nThanks for checking out darkstudio.\n\nIf you like it, you can show support by starring this repo.\nOr, if you know someone who may like darkstudio, tell them to check it out!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frileytwo%2Fdarkstudio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frileytwo%2Fdarkstudio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frileytwo%2Fdarkstudio/lists"}