home-manager how to set gnome dark mode? - gtk

I'm trying out home-manager for the first time, and was trying to use it set Gnome to use dark mode. So I set both qt and gtk theme to dark:
qt.enable = true;
qt.style.name = "adwaita-dark";
gtk.enable = true;
gtk.theme.name = "Adwaita-dark";
Which works for most applications, but doesn't for Gnome Files (Nautilus) even though, as far as I know, it's a GTK application. Also does not work after rebooting.
Does anybody know why this is happening? And how to fix it?

I found the dconf.settings, which is what worked! I had to set the following:
dconf.settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
};
...

Related

How can I disable use of default 'LaunchScreen.storyboard' (Qt 5.15 for iOS)?

I use my custom launch screen (storyboard-file) and need to disable default one, generated by qmake, to be bundled either. How can I do that?
Looking under the hood there is a code in 'mkspecs/features/uikit/default_post.prf' that does the job. How to inactivate that code (without changing the Qt's sources)?
If you want to use your own Launch.storyboard file you have to add something like this in your .pro file:
ios {
QMAKE_INFO_PLIST = ios/Info.plist
ios_icon.files = $$files($$PWD/ios/*.png)
QMAKE_BUNDLE_DATA *= ios_icon
app_launch_images.files = $$files($$PWD/ios/splash_image.png)
QMAKE_BUNDLE_DATA *= app_launch_images
app_launch_screen.files = $$files($$PWD/ios/Launch.storyboard)
QMAKE_BUNDLE_DATA *= app_launch_screen
}
With that options Qt should use your custom file instead of the default one.

coc.nvim having issues with background color and error messages

https://i.stack.imgur.com/4RWsz.png
Above is what I see in NeoVim 0.4.4 (on Ubuntu) when I get a type error using coc.nvim and the Haskell Language Server. My configuration for all background and theme related things are:
syntax on
set t_Co=256
" Enable italics
set t_ZH=^[[3m
set t_ZR=^[[23m
" Initialize colorscheme
highlight Normal ctermbg=NONE
let g:lightline = {
\ 'colorscheme': 'nord',
\ }
set noshowmode " nvim no longer shows the mode we're in; that's shown by lightline
let g:nord_cursor_line_number_background = 1
let g:nord_italic = 1
let g:nord_italic_comments = 1
let g:nord_underline = 1
let g:nord_bold = 1
"let g:gruvbox_itaic = 1
colorscheme nord
hi! clear Conceal
I do not know what could be causing the error, and as far as I remember, this was never an issue until recently. I have not tweaked my config in the time that has lapsed before this error appeared and after. I am also using tmux as well, but the error persists whether I open NeoVim in tmux or not. How should I go about solving this problem, and are there any places I could look to learn more about resolving such issues like this in the future?
I had the same problem and solved it with highlight CocErrorFloat ctermfg=White guifg=#ffffff which shows error message text in white color. You can change text color to whatever you like which you should specify in ctermfg=Color guifg=colorCode

How to correctly add a spinner on macOS Catalina as Style.spinning is deprecated?

I always create a spinner with NSProgressIndicator like this
let spinner = NSProgressIndicator()
spinner.style = .spinning
It works fine, but I recently found the
NSProgressIndicator.Style.spinning is deprecated. I have went searched around, but did not quite find out what is the recommended way right now to create a spinner on macOS. Can anyone please help here?
Thank you
It looks like an error in the documentation. In macOS 10.15 NSProgressIndicatorBarStyle and NSProgressIndicatorSpinningStyle are deprecated. Somehow NSProgressIndicatorStyleBar and NSProgressIndicatorStyleSpinning, .bar and .spinning in Swift, were also deprecated in the documentation but they aren't in NSProgressIndicator.h.
typedef NS_ENUM(NSUInteger, NSProgressIndicatorStyle) {
NSProgressIndicatorStyleBar = 0,
NSProgressIndicatorStyleSpinning = 1
};
and
/* Please instead use the more modern versions of these constants.
*/
static const NSProgressIndicatorStyle NSProgressIndicatorBarStyle API_DEPRECATED_WITH_REPLACEMENT("NSProgressIndicatorStyleBar", macos(10.2,10.14)) = NSProgressIndicatorStyleBar;
static const NSProgressIndicatorStyle NSProgressIndicatorSpinningStyle API_DEPRECATED_WITH_REPLACEMENT("NSProgressIndicatorStyleSpinning", macos(10.2,10.14)) = NSProgressIndicatorStyleSpinning;
The style isn't deprecated; they've just been making the names consistent so it's easier to turn them into Swift.

Change from one Unity app (.exe) to another Unity app (.exe)

Is there a way to change from one Unity app to another? I am not talking about scene changing but the whole application itself. Like:
(a) Changing from Game_1.exe to Game_2.exe
(b) Changing from Game_1.apk to Game_2.apk
You can launch a new process (e.g .exe) by using the process.Start()method, as explained in the docs here
Example from the above docs:
using (Process myProcess = new Process())
{
myProcess.StartInfo.UseShellExecute = false;
// You can start any process, HelloWorld is a do-nothing example.
myProcess.StartInfo.FileName = "C:\\HelloWorld.exe";
myProcess.StartInfo.CreateNoWindow = true;
myProcess.Start();
}

Eclipse setInitialSize doesn't work

I'm trying to set my Eclipse RCP Application's initial size in the suggested way but it doesnt affect the actual size of the window. It doesn't matter what I set the size to the window always appears as fixed with 1020*765 dimensions.
See attached picture (I blanked out some sensitive info). I set the point to 600*400 yet the window appears with the same dimensions. So far no values entered affected the actual size.
I clear the workspace each time and even use -clearPersistedState
Any help would be appreciated
If you are running Eclipse 4.3 or 4.2 this is Eclipse bug 418615 the fix is scheduled for 4.3.2
By Greg's suggestion I looked for a different way and I could manage by using this code. Seems that under 4.3.1 the configurer's initialSize property never gets used but set to 1024*768 by default. This sets the Application window to the display's size:
#Override
public void postWindowOpen() {
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell().setBounds(getDisplaySize());
}
private Rectangle getDisplaySize() {
try {
Display display = Display.getCurrent();
Monitor monitor = display.getPrimaryMonitor();
Rectangle rect = monitor.getBounds();
return rect;
}
catch ( Throwable ignore ) {
return new Rectangle(0,0,1024,768);
}
}
Also for a maximized state you can use:
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell().setMaximized(true);