Sublime Forum

Subl_text ignores gtk3, and blinds me with whiteness

#1

I used to love using Sublime Text, seriously. Been a big fan of it for years, and done some fantastic work with it. After a involuntary hiatus from use, I have returned to find myself at odds with it’s use. The menu bar is blinding me with whiteness, and according to my gtk3 settings it shouldn’t be.

I am more productive at night, late at night, so this is when I do all of my coding. Which is why this particular issue is such a problem. I do have my gtk3 settings set to use a dark theme, and I even have the 'prefer-dark-theme` set. The only thing I can think of that might be throwing a wrench in this would be my use of wayland.

I do have the menu bar set to autohide, but by default the menu is shown, disappears when I begin to type, and then reappears anytime the mouse is bumped. Which effectively is useless, and only means I am blinded periodically, rather than continually.

Any suggestions would be great.

[Settings]
gtk-theme-name=Kali-Dark
gtk-icon-theme-name=Flat-Remix-Blue-Dark
gtk-font-name=JetBrainsMono Nerd Font 10
gtk-cursor-theme-name=Adwaita
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=1
gtk-menu-images=1
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintslight
gtk-xft-rgba=rgb
gtk-application-prefer-dark-theme = true
0 Likes

#2

Why not make the menu bar dark?

0 Likes

#3

Sublime Text queries the dark mode by looking at the assigned theme, checking for known dark modes. Unfortunately Kali-Dark doesn’t match this check due to the capitalization of Dark.

In the case of that check failing it checks whether the background color of a GtkWindow is more dark than light (rgb all <0.5). I’m not sure why this check would fail for your theme though.

0 Likes

#4

Dark-mode detection works as expected testing with the latest Kali:

0 Likes

#5

…my use of wayland.

In particular, my use of sway.

@bschaaf Kali with X, is not the current working environment, but Kali with sway is the environment we are dealing with.

0 Likes

#6

That would be nice.

0 Likes

#7

I installed sway. As expected, it makes no difference:

0 Likes

#8

@bschaaf

What are you using to change the gtk3 style? Because sway does not have a native client for that. It looks Gnome-ish.

0 Likes

#9

It needs to change the gtk-theme-name. Gnome settings or xfce4 settings both change that setting correctly. You can see what I’m launching in the screenshot.

1 Like

#10

@bschaaf so weird… but thanks to you, I got it working. The resolution was not as expected.

Regardless of what the GTK config file is set too, it appears the settings parameter is retrieved from a running “xsettings daemon”. Which, I had installed on my system, but not running in the current session. The most universal and basic of these daemons is, rather obviously, “xsettingsd”, but each of the big name/popular window managers have their own. Lxsettings-daemon for lxde, gnome-settings-daemon for gnome, xfce-settings-daemon(?) for xfce, etc, etc…

In order for the daemon to run, the user is required to have an xsettings configuration file in ‘~/.xsettings’, and the daemon runs in the foreground, so it will need to be backgrounded. In short.

touch ~/.xsettings
nohup xsettingsd &

And we are off to the racetracks with a dark menubar. Hooray, Hoorah!

1 Like

#11

I am glad to be able to use sublime text again.

Once the issue was resolved, I was back to working on code with it.

0 Likes