diff --git a/docs/docs/customization.mdx b/docs/docs/customization.mdx index e91cd7e12..8c186dd0b 100644 --- a/docs/docs/customization.mdx +++ b/docs/docs/customization.mdx @@ -59,7 +59,7 @@ There is no UI to edit your default terminal font family. But, it _can_ be overr See [Custom Widgets](/customwidgets) for detailed documentation around changing what appears in your right widget sidebar. -Using widgets.json (and defaultwidgets.json) you'll be able to remove any default widgets and add widgets of your own. You can fully customize the icons, colors, text, and defaults (like directories, webpages, AI model, remote connection, commands, etc.) of your custom widgets. +Using widgets.json, you'll be able to remove any default widgets and add widgets of your own. You can fully customize the icons, colors, text, and defaults (like directories, webpages, AI model, remote connection, commands, etc.) of your custom widgets. You can also suppress the help widgets in the bottom right by setting the config key `widget:showhelp` to `false`. diff --git a/frontend/app/workspace/workspace.tsx b/frontend/app/workspace/workspace.tsx index 157ab070c..ffe3925b8 100644 --- a/frontend/app/workspace/workspace.tsx +++ b/frontend/app/workspace/workspace.tsx @@ -53,15 +53,9 @@ const Widgets = memo(() => { }, }; const showHelp = fullConfig?.settings?.["widget:showhelp"] ?? true; - const showDivider = keyLen(fullConfig?.defaultwidgets) > 0 && keyLen(fullConfig?.widgets) > 0; - const defaultWidgets = sortByDisplayOrder(fullConfig?.defaultwidgets); const widgets = sortByDisplayOrder(fullConfig?.widgets); return (
- {defaultWidgets.map((data, idx) => ( - - ))} - {showDivider ?
: null} {widgets?.map((data, idx) => )} {showHelp ? ( <> diff --git a/frontend/types/gotypes.d.ts b/frontend/types/gotypes.d.ts index d8010a9fb..a83e91f31 100644 --- a/frontend/types/gotypes.d.ts +++ b/frontend/types/gotypes.d.ts @@ -259,7 +259,6 @@ declare global { type FullConfigType = { settings: SettingsType; mimetypes: {[key: string]: MimeTypeConfigType}; - defaultwidgets: {[key: string]: WidgetConfigType}; widgets: {[key: string]: WidgetConfigType}; presets: {[key: string]: MetaType}; termthemes: {[key: string]: TermThemeType}; diff --git a/pkg/wconfig/defaultconfig/defaultwidgets.json b/pkg/wconfig/defaultconfig/widgets.json similarity index 87% rename from pkg/wconfig/defaultconfig/defaultwidgets.json rename to pkg/wconfig/defaultconfig/widgets.json index b59e5c59a..85a4d308f 100644 --- a/pkg/wconfig/defaultconfig/defaultwidgets.json +++ b/pkg/wconfig/defaultconfig/widgets.json @@ -1,6 +1,6 @@ { "defwidget@terminal": { - "display:order": 1, + "display:order": -5 "icon": "square-terminal", "label": "terminal", "blockdef": { @@ -11,7 +11,7 @@ } }, "defwidget@files": { - "display:order": 2, + "display:order": -4, "icon": "folder", "label": "files", "blockdef": { @@ -22,7 +22,7 @@ } }, "defwidget@web": { - "display:order": 3, + "display:order": -3, "icon": "globe", "label": "web", "blockdef": { @@ -32,7 +32,7 @@ } }, "defwidget@ai": { - "display:order": 4, + "display:order": -2, "icon": "sparkles", "label": "ai", "blockdef": { @@ -42,7 +42,7 @@ } }, "defwidget@sysinfo": { - "display:order": 5, + "display:order": -1, "icon": "chart-line", "label": "sysinfo", "blockdef": { diff --git a/pkg/wconfig/settingsconfig.go b/pkg/wconfig/settingsconfig.go index 4a3078a50..3a31bcedd 100644 --- a/pkg/wconfig/settingsconfig.go +++ b/pkg/wconfig/settingsconfig.go @@ -119,13 +119,12 @@ type ConfigError struct { } type FullConfigType struct { - Settings SettingsType `json:"settings" merge:"meta"` - MimeTypes map[string]MimeTypeConfigType `json:"mimetypes"` - DefaultWidgets map[string]WidgetConfigType `json:"defaultwidgets"` - Widgets map[string]WidgetConfigType `json:"widgets"` - Presets map[string]waveobj.MetaMapType `json:"presets"` - TermThemes map[string]TermThemeType `json:"termthemes"` - ConfigErrors []ConfigError `json:"configerrors" configfile:"-"` + Settings SettingsType `json:"settings" merge:"meta"` + MimeTypes map[string]MimeTypeConfigType `json:"mimetypes"` + Widgets map[string]WidgetConfigType `json:"widgets"` + Presets map[string]waveobj.MetaMapType `json:"presets"` + TermThemes map[string]TermThemeType `json:"termthemes"` + ConfigErrors []ConfigError `json:"configerrors" configfile:"-"` } func goBackWS(barr []byte, offset int) int {