Add public-safe example config

This commit is contained in:
Ray Berezowski
2026-06-02 18:09:57 -04:00
parent 332b796258
commit d328c38f31
6 changed files with 74 additions and 3 deletions

View File

@@ -57,6 +57,14 @@ Release zips are written to:
builds/releases/
```
## Config Files
`config.json` is local runtime data and is ignored by Git. Keep your personal launcher menu there for testing.
`config.example.json` is a public-safe sample config for documentation and reference. New users do not need to copy it; if `config.json` is missing, the app creates a clean starter config on first run.
Personal test configs should stay in `config.json`; release packages do not include it unless the release script is run with `-IncludeCurrentConfig`.
## Versioning
The app version is controlled in `TaskbarLauncher.csproj`.

View File

@@ -52,6 +52,8 @@ public static class IconService
return null;
}
path = Environment.ExpandEnvironmentVariables(path);
try
{
uint flags = ShgfiIcon | (large ? ShgfiLargeIcon : ShgfiSmallIcon);

View File

@@ -95,12 +95,14 @@ public sealed class LauncherController : IDisposable
return;
}
string target = Environment.ExpandEnvironmentVariables(item.Target);
ProcessStartInfo startInfo = new()
{
FileName = item.Target,
FileName = target,
Arguments = item.Arguments ?? "",
UseShellExecute = true,
WorkingDirectory = Directory.Exists(item.Target) ? item.Target : ConfigService.AppFolder
WorkingDirectory = Directory.Exists(target) ? target : ConfigService.AppFolder
};
Process.Start(startInfo);

View File

@@ -7,7 +7,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<UseWPF>true</UseWPF>
<UseWindowsForms>true</UseWindowsForms>
<DefaultItemExcludes>$(DefaultItemExcludes);bin\**;obj\**;..\TaskbarLauncher-build\**</DefaultItemExcludes>
<DefaultItemExcludes>$(DefaultItemExcludes);bin\**;obj\**;builds\**;_*\**;..\TaskbarLauncher-build\**</DefaultItemExcludes>
<Version>1.0.0</Version>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>

53
config.example.json Normal file
View File

@@ -0,0 +1,53 @@
{
"Hotkey": "Ctrl+Alt+Space",
"DisplayMode": "CompactList",
"Items": [
{
"Title": "Folders",
"Type": "Menu",
"Target": "",
"Arguments": null,
"IconPath": null,
"DisplayMode": "CompactList",
"Children": [
{
"Title": "Documents",
"Type": "Folder",
"Target": "%USERPROFILE%\\Documents",
"Arguments": null,
"IconPath": "%USERPROFILE%\\Documents",
"DisplayMode": "CompactList",
"Children": []
},
{
"Title": "Downloads",
"Type": "Folder",
"Target": "%USERPROFILE%\\Downloads",
"Arguments": null,
"IconPath": "%USERPROFILE%\\Downloads",
"DisplayMode": "CompactList",
"Children": []
}
]
},
{
"Title": "Apps",
"Type": "Menu",
"Target": "",
"Arguments": null,
"IconPath": null,
"DisplayMode": "CompactList",
"Children": [
{
"Title": "Notepad",
"Type": "App",
"Target": "notepad.exe",
"Arguments": null,
"IconPath": "notepad.exe",
"DisplayMode": "CompactList",
"Children": []
}
]
}
]
}

View File

@@ -45,3 +45,9 @@ config.json
Keep `config.json` beside `TaskbarLauncher.exe`.
If `config.json` is missing, the app creates a clean starter config on first run.
## Example Config
The source repository includes `config.example.json` as a public-safe example. It is not required for normal installation.
Paths in config may use Windows environment variables such as `%USERPROFILE%`.