Comments (7)
Do you have two RStudios installed, by chance? I'm curious as to why activate()
is returning TRUE
but isn't actually doing anything.
Can you type this into RStudio's console and check for a darkstudio
folder? You'll need fs
installed, if you don't already.
system2("/usr/bin/open", args = fs::path_join(c(rstudioapi::dictionariesPath(), "../../www")))
from darkstudio.
Yes, I have two version installed. But it haven't been a problem before. About the darstudio
folder, there is none in there. Interestingly, the path point to the correct application folder. Unfortunately, I cannot reconstruct what might change to the situation before the issue appeared.
from darkstudio.
So there isn't a darkstudio
folder in either application? Can you run darkstudio::deactivate()
and then remove.packages('darkstudio')
for good measure?
Another area that may be causing trouble is the index.htm
file. darkstudio
works by injecting a <link/>
handle to darkstudio/darkstudio.css
, which loads the styles. I'm wondering if index.htm
was modified incorrectly and wasn't restored properly.
from darkstudio.
I just checked the other RStudio
version in /Applications
, and it work there, however, if I uninstall it, there and install it with the version in ~/Applications
it still modified and activate it for the version in /Applications
.
Location ~/Applications
:
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<meta name="gwt:property" content="compiler.stackMode=#compiler_stack_mode#"/>
#!viewport_tag#
<meta name="csrf-token" content="#csrf_token#" />
<link rel="shortcut icon" href="images/favicon.ico" />
<title>RStudio</title>
#!head_tags#
<link type="text/css" rel="stylesheet" href="css/icons.css" />
<link type="text/css" rel="stylesheet" href="css/focus-visible.css" />
<script type="text/javascript" language="javascript" src="js/text.min.js"></script>
<script type="text/javascript" language="javascript" src="js/inert-polyfill.min.js"></script>
<script type="text/javascript" language="javascript" src="js/focus-visible.min.js"></script>
<script type="text/javascript" language="javascript" src="#!gwt_prefix#rstudio/rstudio.nocache.js"></script>
</head>
<body>
</body>
</html>
Location /Applications
:
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<meta name="gwt:property" content="compiler.stackMode=#compiler_stack_mode#"/>
#!viewport_tag#
<meta name="csrf-token" content="#csrf_token#" />
<link rel="shortcut icon" href="images/favicon.ico" />
<title>RStudio</title>
#!head_tags#
<link type="text/css" rel="stylesheet" href="css/icons.css" />
<link type="text/css" rel="stylesheet" href="css/focus-visible.css" />
<script type="text/javascript" language="javascript" src="js/text.min.js"></script>
<script type="text/javascript" language="javascript" src="js/inert-polyfill.min.js"></script>
<script type="text/javascript" language="javascript" src="js/focus-visible.min.js"></script>
<script type="text/javascript" language="javascript" src="#!gwt_prefix#rstudio/rstudio.nocache.js"></script>
</head>
<body>
</body>
<link rel="stylesheet" href="darkstudio/darkstudio.css" type="text/css"/>
</html>
So it seems the installation process don't differ between the app locations, and assumed /Applications
folder only? Of course I could install the necessary files manually, but it would be nice if the package would do it for me.
from darkstudio.
So, it does look for both paths, but will only modify the RStudio.app
in /Applications
if both are present. I plan on changing the behavior, but haven't found a solution that's reliable.
In a perfect world, I'd be able to detect (using R, only) which RStudio
is running when darkstudio::activate()
is executed. I haven't found a way to do this yet, unfortunately. The only solutions I've found are workarounds at best, most of which are similar to the rstudioapi::dictionariesPath()
function I asked you to run above.
All that being said, you can still "override" the RStudio
being changed by providing a path
argument in activate()
. If you want to activate ~/Applications/RStudio.app
, do the following:
darkstudio::activate(path = "~/Applications/RStudio.app/Contents/Resources/www/index.htm")
path
lets you control where darkstudio
is activated. Can you try running the above, and let me know if that works for you? Sorry for the trouble so far.
from darkstudio.
Thanks, that works! It is actually a very nice workaround I haven't considered. Perhaps you may add an option (local = TRUE
) looking for a local version of RStudio
assuming it at ~/Applications
in most cases (at least for macOS), I guess. Alternative you may reduce the path option to just the app location, path = "~/Applications"
, so it would internally complete the path with "/RStudio.app/Contents/Resources/www/index.htm". Again, many thanks for this awesome extension!
from darkstudio.
I 100% agree. I wanted an option that worked the same way for both macOS and Windows. macOS is much simpler, as you noted above, since most of the time, user-only installations take place in ~/Applications
. I don't know of the user-only equivalent in Windows that's consistent (ie ~/AppData/Local
, ~/AppData/LocalLow
or ~/AppData/Roaming
).
Thanks for being patient!
from darkstudio.
Related Issues (20)
- Document elements in`darkstudio.css`
- Add Install Option to Customize UI Fonts
- Installation instructions completely broken for Linux HOT 7
- Style help pane HOT 6
- Style remaining elements HOT 6
- Can't activate on macOS Catalina HOT 2
- Rstudio via Anaconda: activation issue HOT 2
- not working on linux. Could anyone fix it? HOT 3
- Cannot be activated on the latest R version HOT 11
- Title and menu bar color on windows HOT 3
- Styling of operators HOT 1
- New RStudio Version (2022.07.0) Breaks --ds-tab-gradient-dark on MacOS HOT 2
- New RStudio version (2022.07.1 ) breaks --ds-tab-gradient-light
- Data View requires new work around HOT 1
- Error on new Rstudio version (2022.12.0+353) HOT 1
- Error with new RStudio version 2022.12.0 - IDE still blue when daRkstudio is activated HOT 4
- Where to manually add files on macOS HOT 12
- Invert plot color for a more consistent dark mode experience
- Error when activating darkstudio on Mac HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from darkstudio.