Home > other >  Remove widgets from other themes in Sublime Text 4
Remove widgets from other themes in Sublime Text 4

Time:11-23

I installed the Guna theme which brings a nice color scheme that I would like to keep; however, the theme comes with a clock and weather widget that I can't remove even if I set the theme back to default.

Clock widget from the Guna theme, still showing in the Default theme.

I have tried setting the layer where the clock texture is contained, to have zero opacity, but then the most I got it to do was showing the clock in a different color.

Thanks in advance!

The following lines are in the Guna theme's default settings, starting at line 166:

{
    "class": "sidebar_container",
    "layer0.texture": "Guna/assets/simple/sidebar/sidebar-bg-clock-nb.png",
    "layer0.inner_margin": [15, 55, 15, 0],
    //"layer0.inner_margin": [15, 70, 15, 0],
    //"layer0.inner_margin": [15, 92, 15, 0],
    "layer0.tint": "color(var(--background))",
    "layer0.opacity": 1,
    "content_margin": [0, 45, 0, 0],
    //"content_margin": [0, 60, 0, 0],
    //"content_margin": [0, 82, 0, 0],
},
{
    "class": "sidebar_container",
    "settings": ["gnwidgx"],
    "layer0.texture": "Guna/assets/simple/sidebar/sidebar-bg-nb.png",
    "layer0.inner_margin": [15, 55, 15, 0],
    "layer0.tint": "color(var(--background))",
    "layer0.opacity": 1,
    "content_margin": [0, 0, 0, 0]
}

I tried setting the content margin to [0,0] for the clock widget (like I've seen it's possible to do to hide file icons), like so:

{
    "variables": {

    },
    "rules":
    [
        {
            "class": "sidebar_container",
            "content_margin": [0,0],
            "layer0.opacity": 0
        },
        {
            "class": "sidebar_container",
            "content_margin": [0,0],
            "layer1.opacity": 0
        }
    ]
}

And the result is this: every sidebar element, including the files and folders, bugs out and leaves a trail as if I were shift dragging everything in mspaint.

Result of my custom theme settings

CodePudding user response:

Apparently Guna has a setting that adds the widgets (clock, weather, etc.) to all themes. Fortunately, it can be turned off. Select Preferences → Package Settings → Guna → Settings and add the following to the right pane:

    "sidebar_widget_on_other_theme": false,

You can turn off the widgets in Guna itself with this setting:

    "sidebar_widget": [],

Valid values for that array are empty (as above) or any combination of "clock", "weather", and "date".

Save the right pane when you're done, and the settings should be applied immediately. If not, you might need to restart Sublime.

  • Related