34 Commits

Author SHA1 Message Date
Ray Berezowski
86f667f595 Add selected item import export 2026-08-26 21:38:57 -04:00
Ray Berezowski
8ec53ff9d6 Move target validation to top of config menu 2026-08-26 21:34:16 -04:00
Ray Berezowski
691cb405fd Add target validation action 2026-08-26 21:30:13 -04:00
Ray Berezowski
992ac9a7b5 Add open containing folder action 2026-08-26 21:24:25 -04:00
Ray Berezowski
31c62bb89a Add disabled launcher items 2026-08-26 21:06:25 -04:00
Ray Berezowski
fe86573e10 Add popup pin toggle 2026-08-26 21:01:05 -04:00
Ray Berezowski
9f1b012d15 Add pinned launcher items 2026-08-26 20:41:20 -04:00
Ray Berezowski
749a856faa Add recent launcher items 2026-08-26 19:58:03 -04:00
Ray Berezowski
32f08bc0fd Add launcher edit action 2026-08-26 19:49:49 -04:00
Ray Berezowski
362cd94138 Add duplicate item action 2026-08-26 19:24:08 -04:00
Ray Berezowski
5aacdbb22c Add drag and drop item creation 2026-08-26 18:50:46 -04:00
Ray Berezowski
e8525e8f55 Bump build number to 1.0.1.1 2026-08-26 10:19:42 -04:00
Ray Berezowski
f8d0ca9dd7 Use sharp PNG header logo 2026-08-25 21:20:57 -04:00
Ray Berezowski
780f3fa038 Enlarge header app icon 2026-08-25 18:23:23 -04:00
Ray Berezowski
6b758d4c95 Use app icon in launcher headers 2026-08-25 17:52:51 -04:00
Ray Berezowski
ad68fade24 Tune color scheme palettes 2026-08-25 17:44:48 -04:00
Ray Berezowski
c5f4fe2d0e Add selectable color schemes 2026-08-25 17:31:54 -04:00
Ray Berezowski
8760d96310 Polish launcher visual design 2026-08-25 17:22:26 -04:00
Ray Berezowski
f3955b0ffc Add open all menu action 2026-06-03 17:17:29 -04:00
Ray Berezowski
15a7f81a28 Track future launcher ideas 2026-06-03 17:12:27 -04:00
Ray Berezowski
832f7f3012 Add launcher popup header icon 2026-06-02 22:15:37 -04:00
Ray Berezowski
3bd58af9d9 Theme config context menu 2026-06-02 22:12:43 -04:00
Ray Berezowski
28689bbd16 Avoid overwriting item display mode fallback 2026-06-02 22:06:30 -04:00
Ray Berezowski
1511aae219 Consolidate config actions into menu 2026-06-02 22:00:35 -04:00
Ray Berezowski
84e89ec11c Persist selected item display mode changes 2026-06-02 21:52:42 -04:00
Ray Berezowski
fb9258d339 Improve hotkey capture and validation 2026-06-02 21:47:00 -04:00
Ray Berezowski
8211200fcc Open import config from backups folder 2026-06-02 21:38:10 -04:00
Ray Berezowski
b0fc1b4679 Add config import and export 2026-06-02 21:28:59 -04:00
Ray Berezowski
835ce2159b Merge branch 'main' into dev 2026-06-02 21:19:56 -04:00
Ray Berezowski
44e9517453 Bump version to 1.0.1 2026-06-02 21:18:39 -04:00
Ray Berezowski
c35d687751 Add dev-only testing notes 2026-06-02 21:12:43 -04:00
Ray Berezowski
95f79ae6d0 Use cache-busting exact screenshot names 2026-06-02 21:07:00 -04:00
Ray Berezowski
6d5b9bc2a8 Tighten README screenshot crops 2026-06-02 21:02:27 -04:00
Ray Berezowski
d40f1f2935 Add README screenshots 2026-06-02 20:59:34 -04:00
22 changed files with 2101 additions and 135 deletions

View File

@@ -2,8 +2,8 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="About Taskbar Launcher"
Height="410"
Width="560"
Height="430"
Width="580"
ResizeMode="NoResize"
WindowStartupLocation="CenterOwner"
Background="{DynamicResource AppWindowBrush}"
@@ -15,6 +15,11 @@
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Border Background="{DynamicResource AppPanelBrush}"
BorderBrush="{DynamicResource AppBorderBrush}"
BorderThickness="1"
CornerRadius="16"
Padding="16">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="96"/>
@@ -25,7 +30,8 @@
Height="76"
BorderThickness="1"
BorderBrush="{DynamicResource AppAccentBrush}"
Background="{DynamicResource AppSurfaceBrush}"
Background="{DynamicResource AppOrangeSoftBrush}"
CornerRadius="14"
HorizontalAlignment="Left"
VerticalAlignment="Top">
<Image Source="pack://application:,,,/Assets/AboutLogo.png"
@@ -42,13 +48,15 @@
TextWrapping="Wrap"/>
</StackPanel>
</Grid>
</Border>
<Border Grid.Row="1"
Margin="0,22,0,18"
Padding="14"
BorderThickness="1"
BorderBrush="{DynamicResource AppBorderBrush}"
Background="{DynamicResource AppSurfaceBrush}">
Background="{DynamicResource AppSurfaceBrush}"
CornerRadius="14">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="120"/>
@@ -89,6 +97,7 @@
<Button Grid.Row="2"
Content="Close"
Click="Close_Click"
Padding="18,8"
HorizontalAlignment="Right"/>
</Grid>
</Window>

View File

@@ -14,7 +14,7 @@ public partial class AboutWindow : Window
AuthorText.Text = AppInfo.Author;
VersionText.Text = AppInfo.Version;
BuildText.Text = AppInfo.Build;
ConfigPathText.Text = ConfigService.ConfigPath;
ConfigPathText.Text = "config.json beside TaskbarLauncher.exe";
if (string.IsNullOrWhiteSpace(AppInfo.GiveawaySiteUrl))
{

164
App.xaml
View File

@@ -5,8 +5,10 @@
<Application.Resources>
<Style TargetType="Button">
<Setter Property="Margin" Value="0,2"/>
<Setter Property="Padding" Value="10,8"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="Padding" Value="12,8"/>
<Setter Property="MinHeight" Value="34"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Background" Value="{DynamicResource AppControlBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource AppBorderBrush}"/>
@@ -17,6 +19,7 @@
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="1"
CornerRadius="10"
Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
@@ -24,11 +27,11 @@
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="ButtonBorder" Property="Background" Value="{DynamicResource AppControlBrush}"/>
<Setter TargetName="ButtonBorder" Property="Background" Value="{DynamicResource AppControlHoverBrush}"/>
<Setter TargetName="ButtonBorder" Property="BorderBrush" Value="{DynamicResource AppAccentBrush}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="ButtonBorder" Property="Background" Value="{DynamicResource AppSurfaceBrush}"/>
<Setter TargetName="ButtonBorder" Property="Background" Value="{DynamicResource AppAccentSoftBrush}"/>
<Setter TargetName="ButtonBorder" Property="BorderBrush" Value="{DynamicResource AppAccentBrush}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
@@ -44,13 +47,42 @@
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource AppBorderBrush}"/>
<Setter Property="CaretBrush" Value="{DynamicResource AppAccentBrush}"/>
<Setter Property="Padding" Value="9,6"/>
<Setter Property="MinHeight" Value="34"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TextBox">
<Border x:Name="TextBoxBorder"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="1"
CornerRadius="10">
<ScrollViewer x:Name="PART_ContentHost"
Margin="{TemplateBinding Padding}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="TextBoxBorder" Property="Background" Value="{DynamicResource AppPanelBrush}"/>
<Setter TargetName="TextBoxBorder" Property="BorderBrush" Value="{DynamicResource AppAccentBrush}"/>
</Trigger>
<Trigger Property="IsKeyboardFocused" Value="True">
<Setter TargetName="TextBoxBorder" Property="Background" Value="{DynamicResource AppSurfaceBrush}"/>
<Setter TargetName="TextBoxBorder" Property="BorderBrush" Value="{DynamicResource AppAccentBrush}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.55"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="ComboBox">
<Setter Property="Background" Value="{DynamicResource AppSurfaceBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource AppBorderBrush}"/>
<Setter Property="Padding" Value="6,4"/>
<Setter Property="MinHeight" Value="28"/>
<Setter Property="Padding" Value="9,6"/>
<Setter Property="MinHeight" Value="34"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBox">
@@ -66,20 +98,21 @@
<Border x:Name="ComboToggleBorder"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="1">
BorderThickness="1"
CornerRadius="10">
<ContentPresenter/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="ComboToggleBorder" Property="Background" Value="{DynamicResource AppSurfaceBrush}"/>
<Setter TargetName="ComboToggleBorder" Property="Background" Value="{DynamicResource AppPanelBrush}"/>
<Setter TargetName="ComboToggleBorder" Property="BorderBrush" Value="{DynamicResource AppAccentBrush}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="ComboToggleBorder" Property="Background" Value="{DynamicResource AppSurfaceBrush}"/>
<Setter TargetName="ComboToggleBorder" Property="Background" Value="{DynamicResource AppAccentSoftBrush}"/>
<Setter TargetName="ComboToggleBorder" Property="BorderBrush" Value="{DynamicResource AppAccentBrush}"/>
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="ComboToggleBorder" Property="Background" Value="{DynamicResource AppSurfaceBrush}"/>
<Setter TargetName="ComboToggleBorder" Property="Background" Value="{DynamicResource AppAccentSoftBrush}"/>
<Setter TargetName="ComboToggleBorder" Property="BorderBrush" Value="{DynamicResource AppAccentBrush}"/>
</Trigger>
</ControlTemplate.Triggers>
@@ -114,6 +147,8 @@
<Border Background="{DynamicResource AppSurfaceBrush}"
BorderBrush="{DynamicResource AppBorderBrush}"
BorderThickness="1"
CornerRadius="10"
Padding="3"
MinWidth="{TemplateBinding ActualWidth}"
MaxHeight="{TemplateBinding MaxDropDownHeight}">
<ScrollViewer>
@@ -127,11 +162,11 @@
<Setter Property="Opacity" Value="0.55"/>
</Trigger>
<Trigger SourceName="ToggleButton" Property="IsMouseOver" Value="True">
<Setter TargetName="ToggleButton" Property="Background" Value="{DynamicResource AppSurfaceBrush}"/>
<Setter TargetName="ToggleButton" Property="Background" Value="{DynamicResource AppPanelBrush}"/>
<Setter TargetName="ToggleButton" Property="BorderBrush" Value="{DynamicResource AppAccentBrush}"/>
</Trigger>
<Trigger SourceName="ToggleButton" Property="IsPressed" Value="True">
<Setter TargetName="ToggleButton" Property="Background" Value="{DynamicResource AppSurfaceBrush}"/>
<Setter TargetName="ToggleButton" Property="Background" Value="{DynamicResource AppAccentSoftBrush}"/>
<Setter TargetName="ToggleButton" Property="BorderBrush" Value="{DynamicResource AppAccentBrush}"/>
</Trigger>
</ControlTemplate.Triggers>
@@ -142,21 +177,24 @@
<Style TargetType="ComboBoxItem">
<Setter Property="Background" Value="{DynamicResource AppSurfaceBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
<Setter Property="Padding" Value="6,4"/>
<Setter Property="Padding" Value="9,7"/>
<Style.Triggers>
<Trigger Property="IsHighlighted" Value="True">
<Setter Property="Background" Value="{DynamicResource AppAccentBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource AppSelectedTextBrush}"/>
<Setter Property="Background" Value="{DynamicResource AppAccentSoftBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="{DynamicResource AppAccentBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource AppSelectedTextBrush}"/>
<Setter Property="Background" Value="{DynamicResource AppAccentSoftBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="TreeView">
<Setter Property="Background" Value="{DynamicResource AppSurfaceBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource AppBorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="8"/>
</Style>
<Style TargetType="TreeViewItem">
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
@@ -168,12 +206,104 @@
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="ContextMenu">
<Setter Property="Background" Value="{DynamicResource AppSurfaceBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource AppBorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="2"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ContextMenu">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="10"
Padding="{TemplateBinding Padding}">
<ItemsPresenter/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="MenuItem">
<Setter Property="Background" Value="{DynamicResource AppSurfaceBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
<Setter Property="Padding" Value="12,8"/>
<Setter Property="MinWidth" Value="190"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="MenuItem">
<Border x:Name="MenuItemBorder"
Background="{TemplateBinding Background}"
Padding="{TemplateBinding Padding}"
CornerRadius="8">
<ContentPresenter ContentSource="Header"
RecognizesAccessKey="True"
VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsHighlighted" Value="True">
<Setter TargetName="MenuItemBorder" Property="Background" Value="{DynamicResource AppAccentSoftBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.55"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="Separator">
<Setter Property="Margin" Value="6,4"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Separator">
<Border Height="1" Background="{DynamicResource AppBorderBrush}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="GroupBox">
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource AppBorderBrush}"/>
<Setter Property="Padding" Value="12"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="GroupBox">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Border Grid.Row="1"
Margin="0,8,0,0"
Background="{DynamicResource AppSurfaceBrush}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="1"
CornerRadius="14"
Padding="{TemplateBinding Padding}">
<ContentPresenter/>
</Border>
<Border Grid.Row="0"
HorizontalAlignment="Left"
Background="{DynamicResource AppOrangeSoftBrush}"
BorderBrush="{DynamicResource AppBorderBrush}"
BorderThickness="1"
CornerRadius="999"
Padding="10,4">
<ContentPresenter ContentSource="Header"
RecognizesAccessKey="True"/>
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="CheckBox">
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
<Style TargetType="Expander">
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>

View File

@@ -10,9 +10,21 @@ public partial class App : System.Windows.Application
{
base.OnStartup(e);
ThemeService.Apply();
controller = new LauncherController();
controller.Start();
if (e.Args.Contains("--show-settings", StringComparer.OrdinalIgnoreCase))
{
controller.ShowSettings();
}
else if (e.Args.Contains("--show-about", StringComparer.OrdinalIgnoreCase))
{
controller.ShowAbout();
}
else if (e.Args.Contains("--show-launcher", StringComparer.OrdinalIgnoreCase))
{
controller.TogglePopup();
}
}
protected override void OnExit(System.Windows.ExitEventArgs e)

BIN
Assets/HeaderLogo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

View File

@@ -4,30 +4,81 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Title="Taskbar Launcher Settings" Height="700" Width="940"
MinHeight="620" MinWidth="820"
Title="Taskbar Launcher Settings" Height="740" Width="980"
MinHeight="660" MinWidth="860"
Background="{DynamicResource AppWindowBrush}"
Foreground="{DynamicResource AppTextBrush}">
<DockPanel Margin="18">
<StackPanel DockPanel.Dock="Top" Margin="0,0,0,14">
<TextBlock Text="Taskbar Launcher" FontSize="22" FontWeight="SemiBold"/>
<TextBlock x:Name="VersionText"
Foreground="{DynamicResource AppMutedTextBrush}"/>
<TextBlock Text="Portable launcher settings are stored beside the app in config.json."
Foreground="{DynamicResource AppMutedTextBrush}"/>
</StackPanel>
<Border DockPanel.Dock="Top"
Margin="0,0,0,16"
Padding="16,14"
Background="{DynamicResource AppPanelBrush}"
BorderBrush="{DynamicResource AppBorderBrush}"
BorderThickness="1"
CornerRadius="16">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border Width="56"
Height="56"
Margin="0,0,12,0"
Background="{DynamicResource AppOrangeSoftBrush}"
BorderBrush="{DynamicResource AppBorderBrush}"
BorderThickness="1"
CornerRadius="14">
<Image Source="pack://application:,,,/Assets/HeaderLogo.png"
Width="48"
Height="48"
Stretch="Uniform"/>
</Border>
<StackPanel Grid.Column="1" VerticalAlignment="Center">
<TextBlock Text="Taskbar Launcher" FontSize="23" FontWeight="SemiBold"/>
<TextBlock x:Name="VersionText"
Margin="0,2,0,0"
Foreground="{DynamicResource AppMutedTextBrush}"/>
<TextBlock Text="Portable launcher settings are stored beside the app in config.json."
Margin="0,2,0,0"
Foreground="{DynamicResource AppMutedTextBrush}"/>
</StackPanel>
</Grid>
</Border>
<Border DockPanel.Dock="Bottom" BorderThickness="1,0,0,0" Padding="0,12,0,0"
BorderBrush="{DynamicResource AppBorderBrush}">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<Border DockPanel.Dock="Bottom"
Margin="0,16,0,0"
Padding="12"
Background="{DynamicResource AppPanelBrush}"
BorderBrush="{DynamicResource AppBorderBrush}"
BorderThickness="1"
CornerRadius="14">
<WrapPanel HorizontalAlignment="Right">
<Button Content="Save" Click="Save_Click" Margin="0,0,8,0"/>
<Button Content="Backup Config" Click="BackupConfig_Click" Margin="0,0,8,0"/>
<Button Content="Restore Config" Click="RestoreConfig_Click" Margin="0,0,8,0"/>
<Button Content="Reload Config" Click="ReloadConfig_Click" Margin="0,0,8,0"/>
<Button Content="Open Config Folder" Click="OpenConfigFolder_Click" Margin="0,0,8,0"/>
<Button x:Name="ConfigMenuButton"
Content="Config..."
Click="ConfigMenuButton_Click"
Margin="0,0,8,0">
<Button.ContextMenu>
<ContextMenu>
<MenuItem Header="Validate Targets" Click="ValidateTargets_Click"/>
<Separator/>
<MenuItem Header="Backup Config" Click="BackupConfig_Click"/>
<MenuItem Header="Restore from Backup" Click="RestoreConfig_Click"/>
<Separator/>
<MenuItem Header="Export Config" Click="ExportConfig_Click"/>
<MenuItem Header="Import Config" Click="ImportConfig_Click"/>
<MenuItem Header="Export Selected Item" Click="ExportSelectedItem_Click"/>
<MenuItem Header="Import Item" Click="ImportItem_Click"/>
<Separator/>
<MenuItem Header="Reset to Defaults" Click="ResetConfig_Click"/>
<MenuItem Header="Reload Config" Click="ReloadConfig_Click"/>
<MenuItem Header="Open Config Folder" Click="OpenConfigFolder_Click"/>
</ContextMenu>
</Button.ContextMenu>
</Button>
<Button Content="About" Click="About_Click" Margin="0,0,8,0"/>
<Button Content="Close" Click="Close_Click"/>
</StackPanel>
</WrapPanel>
</Border>
<Grid>
@@ -36,9 +87,9 @@
<ColumnDefinition Width="3*"/>
</Grid.ColumnDefinitions>
<GroupBox Header="Launcher Items" Margin="0,0,12,0">
<DockPanel Margin="8">
<UniformGrid DockPanel.Dock="Bottom" Columns="2" Margin="0,8,0,0">
<GroupBox Header="Launcher Items" Margin="0,0,14,0">
<DockPanel>
<UniformGrid DockPanel.Dock="Bottom" Columns="2" Margin="0,10,0,0">
<Button Content="Add Root" Click="AddRoot_Click"/>
<Button Content="Add Top Menu" Click="AddTopMenu_Click"/>
<Button Content="Add Child" Click="AddChild_Click"/>
@@ -51,6 +102,7 @@
</UniformGrid>
<TreeView x:Name="ItemsTree"
AllowDrop="True"
Margin="0"
SelectedItemChanged="ItemsTree_SelectedItemChanged"
PreviewMouseMove="ItemsTree_PreviewMouseMove"
DragOver="ItemsTree_DragOver"
@@ -59,7 +111,7 @@
</GroupBox>
<GroupBox Header="Settings" Grid.Column="1">
<Grid Margin="12">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="16"/>
@@ -67,6 +119,11 @@
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Border Background="{DynamicResource AppPanelBrush}"
BorderBrush="{DynamicResource AppBorderBrush}"
BorderThickness="1"
CornerRadius="12"
Padding="12">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="110"/>
@@ -76,25 +133,38 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="Hotkey" VerticalAlignment="Center" Margin="0,0,8,8"/>
<TextBox x:Name="HotkeyBox" Grid.Column="1" Margin="0,0,0,8"/>
<TextBox x:Name="HotkeyBox" Grid.Column="1" Margin="0,0,0,8"
PreviewKeyDown="HotkeyBox_PreviewKeyDown"/>
<TextBlock Text="Default for New Items" Grid.Row="1" VerticalAlignment="Center" Margin="0,0,8,0"/>
<ComboBox x:Name="DisplayModeBox" Grid.Row="1" Grid.Column="1"/>
<ComboBox x:Name="DisplayModeBox" Grid.Row="1" Grid.Column="1" Margin="0,0,0,8"/>
<TextBlock Text="Startup" Grid.Row="2" VerticalAlignment="Center" Margin="0,8,8,0"/>
<CheckBox x:Name="StartWithWindowsBox" Grid.Row="2" Grid.Column="1"
<TextBlock Text="Color Scheme" Grid.Row="2" VerticalAlignment="Center" Margin="0,0,8,8"/>
<ComboBox x:Name="ThemeSchemeBox" Grid.Row="2" Grid.Column="1" Margin="0,0,0,8"
SelectionChanged="ThemeSchemeBox_SelectionChanged"/>
<TextBlock Text="Startup" Grid.Row="3" VerticalAlignment="Center" Margin="0,8,8,0"/>
<CheckBox x:Name="StartWithWindowsBox" Grid.Row="3" Grid.Column="1"
Content="Start with Windows"
Margin="0,8,0,0"
Checked="StartWithWindowsBox_Changed"
Unchecked="StartWithWindowsBox_Changed"/>
</Grid>
</Border>
<Separator Grid.Row="1" VerticalAlignment="Center"/>
<Grid Grid.Row="2">
<Border Grid.Row="2"
Background="{DynamicResource AppPanelBrush}"
BorderBrush="{DynamicResource AppBorderBrush}"
BorderThickness="1"
CornerRadius="12"
Padding="12">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="110"/>
<ColumnDefinition Width="*"/>
@@ -140,14 +210,15 @@
<TextBlock Text="Selected Item Display" Grid.Row="5" VerticalAlignment="Center" Margin="0,0,8,8"/>
<ComboBox x:Name="ItemDisplayModeBox" Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="2"
Margin="0,0,0,8" SelectionChanged="PreviewField_Changed"/>
Margin="0,0,0,8" SelectionChanged="ItemDisplayModeBox_SelectionChanged"/>
<TextBlock Text="Preview" Grid.Row="6" VerticalAlignment="Top" Margin="0,4,8,0"/>
<Border Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="2"
BorderThickness="1"
BorderBrush="{DynamicResource AppBorderBrush}"
Background="{DynamicResource AppControlBrush}"
Padding="8" MinHeight="72">
Background="{DynamicResource AppSurfaceBrush}"
CornerRadius="12"
Padding="10" MinHeight="76">
<StackPanel>
<ContentControl x:Name="PreviewHost"/>
<TextBlock x:Name="PreviewNote" Margin="0,8,0,0"
@@ -156,8 +227,9 @@
</StackPanel>
</Border>
</Grid>
</Border>
<TextBlock x:Name="StatusText" Grid.Row="3" Margin="0,14,0,0"
<TextBlock x:Name="StatusText" Grid.Row="3" Margin="4,14,4,0"
Foreground="{DynamicResource AppMutedTextBrush}"
TextWrapping="Wrap"/>
</Grid>

File diff suppressed because it is too large Load Diff

View File

@@ -6,6 +6,10 @@ public sealed class LauncherConfig
public LauncherDisplayMode DisplayMode { get; set; } = LauncherDisplayMode.CompactList;
public LauncherThemeScheme ThemeScheme { get; set; } = LauncherThemeScheme.MarkHaven;
public List<LauncherItem> RecentItems { get; set; } = [];
public List<LauncherItem> Items { get; set; } = [];
}
@@ -21,6 +25,10 @@ public sealed class LauncherItem
public string? IconPath { get; set; }
public bool IsFavorite { get; set; }
public bool IsDisabled { get; set; }
public LauncherDisplayMode DisplayMode { get; set; } = LauncherDisplayMode.CompactList;
public List<LauncherItem> Children { get; set; } = [];
@@ -42,3 +50,12 @@ public enum LauncherDisplayMode
LargeIconWithText,
CompactList
}
public enum LauncherThemeScheme
{
MarkHaven,
MGETBlueOrange,
MGETOrange,
System,
WindowsClassic
}

View File

@@ -13,7 +13,16 @@ Download the compiled Windows release from:
- System tray launcher
- Global hotkey, default `Ctrl+Alt+Space`
- Search/filter in the launcher popup
- Nested menus and drag/drop ordering in Settings
- Recent items section for quickly relaunching entries
- Nested menus, drag/drop ordering, and drag/drop item creation in Settings
- Right-click launcher entries to edit them in Settings
- Right-click launcher entries to pin or unpin them from the top
- Right-click launcher entries or Settings items to temporarily disable them
- Right-click app/file entries to open their containing folder
- Validate missing app, file, and folder targets from Settings
- Export and import selected items or menu sections
- Right-click item duplication in Settings
- Right-click items in Settings to pin them to the top of their menu
- Per-item icon and display mode
- Automatic icon selection from app/folder targets
- Portable `config.json`
@@ -21,6 +30,20 @@ Download the compiled Windows release from:
- Optional Start with Windows shortcut
- Windows light/dark theme support
## Screenshots
### Launcher Popup
![Taskbar Launcher popup](docs/screenshots/launcher-popup-exact.png)
### Settings
![Taskbar Launcher settings](docs/screenshots/settings-window-exact.png)
### About
![Taskbar Launcher about window](docs/screenshots/about-window-exact.png)
## Project Layout
```text

View File

@@ -36,7 +36,7 @@ public static class ConfigService
string json = File.ReadAllText(ConfigPath);
LauncherConfig config = JsonSerializer.Deserialize<LauncherConfig>(json, JsonOptions) ?? CreateDefaultConfig();
NormalizeDisplayModes(config);
NormalizeConfig(config);
Save(config);
return config;
}
@@ -61,18 +61,85 @@ public static class ConfigService
return backupPath;
}
public static LauncherConfig Restore(string sourcePath)
public static string ExportTo(string destinationPath, LauncherConfig config)
{
if (string.IsNullOrWhiteSpace(destinationPath))
{
throw new ArgumentException("Choose a destination path for the exported config.", nameof(destinationPath));
}
string? destinationFolder = Path.GetDirectoryName(destinationPath);
if (!string.IsNullOrWhiteSpace(destinationFolder))
{
Directory.CreateDirectory(destinationFolder);
}
NormalizeConfig(config);
string json = JsonSerializer.Serialize(config, JsonOptions);
File.WriteAllText(destinationPath, json);
return destinationPath;
}
public static string ExportItemTo(string destinationPath, LauncherItem item)
{
if (string.IsNullOrWhiteSpace(destinationPath))
{
throw new ArgumentException("Choose a destination path for the exported item.", nameof(destinationPath));
}
string? destinationFolder = Path.GetDirectoryName(destinationPath);
if (!string.IsNullOrWhiteSpace(destinationFolder))
{
Directory.CreateDirectory(destinationFolder);
}
NormalizeDisplayModes(item);
string json = JsonSerializer.Serialize(item, JsonOptions);
File.WriteAllText(destinationPath, json);
return destinationPath;
}
public static LauncherItem ImportItemFrom(string sourcePath)
{
if (!File.Exists(sourcePath))
{
throw new FileNotFoundException("The selected config file was not found.", sourcePath);
throw new FileNotFoundException("The selected item file was not found.", sourcePath);
}
string json = File.ReadAllText(sourcePath);
LauncherConfig config = JsonSerializer.Deserialize<LauncherConfig>(json, JsonOptions)
?? throw new InvalidDataException("The selected config file could not be read.");
LauncherItem item;
try
{
item = JsonSerializer.Deserialize<LauncherItem>(json, JsonOptions)
?? throw new InvalidDataException("The selected item file could not be read.");
}
catch (JsonException ex)
{
throw new InvalidDataException("The selected file is not a valid Taskbar Launcher item export.", ex);
}
NormalizeDisplayModes(config);
ValidateItem(item);
NormalizeDisplayModes(item);
return item;
}
public static LauncherConfig ImportFrom(string sourcePath)
{
LauncherConfig config = ReadConfigFile(sourcePath);
Save(config);
return config;
}
public static LauncherConfig ResetToDefaults()
{
LauncherConfig config = CreateDefaultConfig();
Save(config);
return config;
}
public static LauncherConfig Restore(string sourcePath)
{
LauncherConfig config = ReadConfigFile(sourcePath);
Save(config);
return config;
}
@@ -131,12 +198,97 @@ public static class ConfigService
]
};
NormalizeDisplayModes(config);
NormalizeConfig(config);
return config;
}
private static void NormalizeDisplayModes(LauncherConfig config)
private static LauncherConfig ReadConfigFile(string sourcePath)
{
if (!File.Exists(sourcePath))
{
throw new FileNotFoundException("The selected config file was not found.", sourcePath);
}
string json = File.ReadAllText(sourcePath);
LauncherConfig config;
try
{
config = JsonSerializer.Deserialize<LauncherConfig>(json, JsonOptions)
?? throw new InvalidDataException("The selected config file could not be read.");
}
catch (JsonException ex)
{
throw new InvalidDataException("The selected file is not a valid Taskbar Launcher config.", ex);
}
ValidateConfig(config);
NormalizeConfig(config);
return config;
}
private static void ValidateConfig(LauncherConfig config)
{
if (config.Items is null)
{
throw new InvalidDataException("The selected config is missing launcher items.");
}
if (config.RecentItems is null)
{
config.RecentItems = [];
}
foreach (LauncherItem item in config.Items)
{
ValidateItem(item);
}
foreach (LauncherItem item in config.RecentItems)
{
ValidateItem(item);
}
}
private static void ValidateItem(LauncherItem item)
{
if (item.Children is null)
{
throw new InvalidDataException($"The item '{item.Title}' has an invalid children list.");
}
if (!Enum.IsDefined(item.Type))
{
throw new InvalidDataException($"The item '{item.Title}' has an invalid type.");
}
foreach (LauncherItem child in item.Children)
{
ValidateItem(child);
}
}
private static void NormalizeConfig(LauncherConfig config)
{
if (!Enum.IsDefined(config.DisplayMode))
{
config.DisplayMode = LauncherDisplayMode.CompactList;
}
if (!Enum.IsDefined(config.ThemeScheme))
{
config.ThemeScheme = LauncherThemeScheme.MarkHaven;
}
config.RecentItems ??= [];
config.RecentItems.RemoveAll(item => item.Type == LauncherItemType.Menu || item.IsDisabled || string.IsNullOrWhiteSpace(item.Target));
foreach (LauncherItem item in config.RecentItems)
{
item.IsFavorite = false;
item.IsDisabled = false;
item.Children = [];
NormalizeDisplayModes(item);
}
foreach (LauncherItem item in config.Items)
{
NormalizeDisplayModes(item);

View File

@@ -1,4 +1,5 @@
using System.Runtime.InteropServices;
using System.ComponentModel;
using System.Windows;
using System.Windows.Input;
using System.Windows.Interop;
@@ -17,6 +18,7 @@ public sealed class HotkeyService : IDisposable
public void Register(string hotkey)
{
ParseHotkey(hotkey, out uint modifiers, out uint key);
Unregister();
window = new Window
@@ -37,8 +39,13 @@ public sealed class HotkeyService : IDisposable
source = HwndSource.FromHwnd(helper.Handle);
source?.AddHook(WndProc);
ParseHotkey(hotkey, out uint modifiers, out uint key);
RegisterHotKey(helper.Handle, HotkeyId, modifiers, key);
if (!RegisterHotKey(helper.Handle, HotkeyId, modifiers, key))
{
int error = Marshal.GetLastWin32Error();
throw new InvalidOperationException(
$"Windows could not register hotkey '{Normalize(hotkey)}'. It may already be used by another app.",
new Win32Exception(error));
}
};
window.Show();
@@ -78,12 +85,47 @@ public sealed class HotkeyService : IDisposable
return IntPtr.Zero;
}
public static string Normalize(string hotkey)
{
ParseHotkey(hotkey, out uint modifiers, out uint key);
Key parsedKey = KeyInterop.KeyFromVirtualKey((int)key);
List<string> parts = [];
if ((modifiers & 0x0002) != 0)
{
parts.Add("Ctrl");
}
if ((modifiers & 0x0001) != 0)
{
parts.Add("Alt");
}
if ((modifiers & 0x0004) != 0)
{
parts.Add("Shift");
}
if ((modifiers & 0x0008) != 0)
{
parts.Add("Win");
}
parts.Add(parsedKey.ToString());
return string.Join("+", parts);
}
private static void ParseHotkey(string hotkey, out uint modifiers, out uint key)
{
modifiers = 0;
key = (uint)KeyInterop.VirtualKeyFromKey(Key.Space);
key = 0;
foreach (string part in hotkey.Split('+', StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries))
string[] parts = hotkey
.Replace(",", "+", StringComparison.Ordinal)
.Replace(" ", "+", StringComparison.Ordinal)
.Split('+', StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries);
foreach (string part in parts)
{
if (part.Equals("Ctrl", StringComparison.OrdinalIgnoreCase) || part.Equals("Control", StringComparison.OrdinalIgnoreCase))
{
@@ -101,11 +143,45 @@ public sealed class HotkeyService : IDisposable
{
modifiers |= 0x0008;
}
else if (Enum.TryParse(part, true, out Key parsedKey))
else if (TryParseKey(part, out Key parsedKey))
{
key = (uint)KeyInterop.VirtualKeyFromKey(parsedKey);
}
else
{
throw new FormatException($"'{part}' is not a valid hotkey key.");
}
}
if (modifiers == 0)
{
throw new FormatException("Hotkeys must include at least one modifier: Ctrl, Alt, Shift, or Win.");
}
if (key == 0)
{
throw new FormatException("Hotkeys must include a final key, such as Space, S, F12, or D1.");
}
}
private static bool TryParseKey(string value, out Key key)
{
if (Enum.TryParse(value, true, out key))
{
return true;
}
if (value.Length == 1 && char.IsLetter(value[0]))
{
return Enum.TryParse(value.ToUpperInvariant(), out key);
}
if (value.Length == 1 && char.IsDigit(value[0]))
{
return Enum.TryParse($"D{value}", out key);
}
return false;
}
[DllImport("user32.dll", SetLastError = true)]

View File

@@ -9,6 +9,8 @@ namespace TaskbarLauncher.Services;
public sealed class LauncherController : IDisposable
{
private const int MaxRecentItems = 8;
private readonly HotkeyService hotkeyService = new();
private NotifyIcon? notifyIcon;
private LauncherPopup? popup;
@@ -20,6 +22,7 @@ public sealed class LauncherController : IDisposable
public void Start()
{
Config = ConfigService.Load();
ThemeService.Apply(Config.ThemeScheme);
CreateTrayIcon();
RegisterHotkey();
}
@@ -27,6 +30,7 @@ public sealed class LauncherController : IDisposable
public void ReloadConfig()
{
Config = ConfigService.Load();
ThemeService.Apply(Config.ThemeScheme);
RegisterHotkey();
popup?.Close();
popup = null;
@@ -39,6 +43,12 @@ public sealed class LauncherController : IDisposable
settingsWindow.Activate();
}
public void ShowSettings(LauncherItem itemToEdit)
{
settingsWindow ??= new MainWindow(this);
settingsWindow.SelectItemForEdit(itemToEdit);
}
public void ShowAbout()
{
if (aboutWindow?.IsVisible == true)
@@ -62,7 +72,7 @@ public sealed class LauncherController : IDisposable
return;
}
popup = new LauncherPopup(Config, LaunchItem, ShowSettings);
popup = new LauncherPopup(Config, LaunchItem, OpenAllItems, ShowSettings, ShowSettings, OpenContainingFolderFromPopup);
popup.Closed += (_, _) => popup = null;
popup.ShowNearTaskbar();
}
@@ -126,22 +136,163 @@ public sealed class LauncherController : IDisposable
private void LaunchItem(LauncherItem item)
{
if (item.Type == LauncherItemType.Menu || string.IsNullOrWhiteSpace(item.Target))
if (TryLaunchItem(item, out string? error))
{
RecordRecentItem(item);
popup?.Close();
return;
}
if (!string.IsNullOrWhiteSpace(error))
{
System.Windows.MessageBox.Show(error, "Taskbar Launcher");
}
}
private void RecordRecentItem(LauncherItem item)
{
if (item.Type == LauncherItemType.Menu || item.IsDisabled || string.IsNullOrWhiteSpace(item.Target))
{
return;
}
Config.RecentItems.RemoveAll(recent => IsSameRecentItem(recent, item));
Config.RecentItems.Insert(0, CreateRecentItem(item));
if (Config.RecentItems.Count > MaxRecentItems)
{
Config.RecentItems.RemoveRange(MaxRecentItems, Config.RecentItems.Count - MaxRecentItems);
}
ConfigService.Save(Config);
}
private static bool IsSameRecentItem(LauncherItem recent, LauncherItem item)
{
return string.Equals(recent.Target, item.Target, StringComparison.OrdinalIgnoreCase) &&
string.Equals(recent.Arguments ?? "", item.Arguments ?? "", StringComparison.OrdinalIgnoreCase);
}
private static LauncherItem CreateRecentItem(LauncherItem item)
{
return new LauncherItem
{
Title = item.Title,
Type = item.Type,
Target = item.Target,
Arguments = item.Arguments,
IconPath = item.IconPath,
IsFavorite = false,
IsDisabled = false,
DisplayMode = item.DisplayMode,
Children = []
};
}
private void OpenAllItems(LauncherItem menuItem)
{
List<string> failures = [];
int launchedCount = 0;
foreach (LauncherItem child in menuItem.Children)
{
if (child.Type == LauncherItemType.Menu || child.IsDisabled || string.IsNullOrWhiteSpace(child.Target))
{
continue;
}
if (TryLaunchItem(child, out string? error))
{
launchedCount++;
RecordRecentItem(child);
}
else if (!string.IsNullOrWhiteSpace(error))
{
failures.Add(error);
}
}
popup?.Close();
if (failures.Count > 0)
{
string message = $"Opened {launchedCount} item(s), but {failures.Count} item(s) failed:\n\n" +
string.Join("\n\n", failures.Take(5));
System.Windows.MessageBox.Show(message, "Taskbar Launcher");
}
}
private void OpenContainingFolderFromPopup(LauncherItem item)
{
if (!OpenContainingFolder(item, out string? error) && !string.IsNullOrWhiteSpace(error))
{
System.Windows.MessageBox.Show(error, "Taskbar Launcher");
}
}
public static bool OpenContainingFolder(LauncherItem item, out string? error)
{
error = null;
if (item.Type == LauncherItemType.Menu || string.IsNullOrWhiteSpace(item.Target))
{
return false;
}
string target = Environment.ExpandEnvironmentVariables(item.Target);
string? folderPath = Directory.Exists(target)
? target
: Path.GetDirectoryName(target);
if (string.IsNullOrWhiteSpace(folderPath) || !Directory.Exists(folderPath))
{
error = $"{item.Title}: Containing folder was not found.";
return false;
}
try
{
Process.Start(new ProcessStartInfo
{
FileName = folderPath,
UseShellExecute = true
});
return true;
}
catch (Exception ex)
{
error = $"{item.Title}: {ex.Message}";
return false;
}
}
private static bool TryLaunchItem(LauncherItem item, out string? error)
{
error = null;
if (item.Type == LauncherItemType.Menu || item.IsDisabled || string.IsNullOrWhiteSpace(item.Target))
{
return false;
}
string target = Environment.ExpandEnvironmentVariables(item.Target);
ProcessStartInfo startInfo = new()
try
{
FileName = target,
Arguments = item.Arguments ?? "",
UseShellExecute = true,
WorkingDirectory = Directory.Exists(target) ? target : ConfigService.AppFolder
};
ProcessStartInfo startInfo = new()
{
FileName = target,
Arguments = item.Arguments ?? "",
UseShellExecute = true,
WorkingDirectory = Directory.Exists(target) ? target : ConfigService.AppFolder
};
Process.Start(startInfo);
popup?.Close();
Process.Start(startInfo);
return true;
}
catch (Exception ex)
{
error = $"{item.Title}: {ex.Message}";
return false;
}
}
}

View File

@@ -1,6 +1,7 @@
using System.Windows;
using System.Windows.Media;
using Microsoft.Win32;
using TaskbarLauncher.Models;
using MediaColor = System.Windows.Media.Color;
namespace TaskbarLauncher.Services;
@@ -10,34 +11,32 @@ public static class ThemeService
private const string PersonalizeKey = @"Software\Microsoft\Windows\CurrentVersion\Themes\Personalize";
private const string DwmKey = @"Software\Microsoft\Windows\DWM";
public static void Apply()
public static void Apply(LauncherThemeScheme scheme = LauncherThemeScheme.MarkHaven)
{
bool isLight = IsLightTheme();
MediaColor accent = GetAccentColor();
MediaColor window = isLight ? MediaColor.FromRgb(0xF7, 0xF7, 0xF7) : MediaColor.FromRgb(0x20, 0x20, 0x20);
MediaColor surface = isLight ? System.Windows.Media.Colors.White : MediaColor.FromRgb(0x2B, 0x2B, 0x2B);
MediaColor control = isLight ? MediaColor.FromRgb(0xF3, 0xF3, 0xF3) : MediaColor.FromRgb(0x33, 0x33, 0x33);
MediaColor hover = isLight ? MediaColor.FromRgb(0xEA, 0xF3, 0xFF) : MediaColor.FromRgb(0x3B, 0x4A, 0x5C);
MediaColor text = isLight ? MediaColor.FromRgb(0x1A, 0x1A, 0x1A) : MediaColor.FromRgb(0xF3, 0xF3, 0xF3);
MediaColor muted = isLight ? MediaColor.FromRgb(0x66, 0x66, 0x66) : MediaColor.FromRgb(0xB8, 0xB8, 0xB8);
MediaColor border = isLight ? MediaColor.FromRgb(0xC8, 0xC8, 0xC8) : MediaColor.FromRgb(0x55, 0x55, 0x55);
ThemePalette palette = GetPalette(scheme, isLight);
MediaColor accent = palette.Accent;
MediaColor selectedText = IsDark(accent) ? System.Windows.Media.Colors.White : System.Windows.Media.Colors.Black;
SetBrush("AppWindowBrush", window);
SetBrush("AppSurfaceBrush", surface);
SetBrush("AppControlBrush", control);
SetBrush("AppControlHoverBrush", hover);
SetBrush("AppTextBrush", text);
SetBrush("AppMutedTextBrush", muted);
SetBrush("AppBorderBrush", border);
SetBrush("AppWindowBrush", palette.Window);
SetBrush("AppSurfaceBrush", palette.Surface);
SetBrush("AppPanelBrush", palette.Panel);
SetBrush("AppControlBrush", palette.Control);
SetBrush("AppControlHoverBrush", palette.Hover);
SetBrush("AppTextBrush", palette.Text);
SetBrush("AppMutedTextBrush", palette.Muted);
SetBrush("AppBorderBrush", palette.Border);
SetBrush("AppAccentBrush", accent);
SetBrush("AppAccentSoftBrush", palette.AccentSoft);
SetBrush("AppOrangeBrush", palette.Orange);
SetBrush("AppOrangeSoftBrush", palette.OrangeSoft);
SetBrush("AppSelectedTextBrush", selectedText);
SetBrush(System.Windows.SystemColors.WindowBrushKey, surface);
SetBrush(System.Windows.SystemColors.WindowTextBrushKey, text);
SetBrush(System.Windows.SystemColors.ControlBrushKey, control);
SetBrush(System.Windows.SystemColors.ControlTextBrushKey, text);
SetBrush(System.Windows.SystemColors.ControlDarkBrushKey, border);
SetBrush(System.Windows.SystemColors.WindowBrushKey, palette.Surface);
SetBrush(System.Windows.SystemColors.WindowTextBrushKey, palette.Text);
SetBrush(System.Windows.SystemColors.ControlBrushKey, palette.Control);
SetBrush(System.Windows.SystemColors.ControlTextBrushKey, palette.Text);
SetBrush(System.Windows.SystemColors.ControlDarkBrushKey, palette.Border);
SetBrush(System.Windows.SystemColors.HighlightBrushKey, accent);
SetBrush(System.Windows.SystemColors.HighlightTextBrushKey, selectedText);
}
@@ -62,6 +61,123 @@ public static class ThemeService
return MediaColor.FromRgb(0x00, 0x78, 0xD4);
}
private static ThemePalette GetPalette(LauncherThemeScheme scheme, bool isLight)
{
MediaColor windowsAccent = GetAccentColor();
MediaColor orange = MediaColor.FromRgb(0xD8, 0x78, 0x1D);
return scheme switch
{
LauncherThemeScheme.System => CreatePalette(
isLight,
windowsAccent,
orange,
window: LightDark(isLight, 0xF7F7F7, 0x202020),
surface: LightDark(isLight, 0xFFFFFF, 0x2B2B2B),
panel: LightDark(isLight, 0xF3F3F3, 0x333333),
control: LightDark(isLight, 0xF3F3F3, 0x333333),
hover: LightDark(isLight, 0xEAF3FF, 0x3B4A5C),
text: LightDark(isLight, 0x1A1A1A, 0xF3F3F3),
muted: LightDark(isLight, 0x666666, 0xB8B8B8),
border: LightDark(isLight, 0xC8C8C8, 0x555555)),
LauncherThemeScheme.WindowsClassic => CreatePalette(
isLight,
windowsAccent,
orange,
window: LightDark(isLight, 0xF0F0F0, 0x1F1F1F),
surface: LightDark(isLight, 0xFAFAFA, 0x2D2D30),
panel: LightDark(isLight, 0xFFFFFF, 0x252526),
control: LightDark(isLight, 0xF5F5F5, 0x333337),
hover: LightDark(isLight, 0xEDEDED, 0x3E3E42),
text: LightDark(isLight, 0x111111, 0xF1F1F1),
muted: LightDark(isLight, 0x5F5F5F, 0xBDBDBD),
border: LightDark(isLight, 0xD0D0D0, 0x565656)),
LauncherThemeScheme.MGETOrange => CreatePalette(
isLight,
orange,
orange,
window: LightDark(isLight, 0xF6F1EA, 0x181614),
surface: LightDark(isLight, 0xFFFCF8, 0x221F1B),
panel: LightDark(isLight, 0xFFF7EE, 0x2A241E),
control: LightDark(isLight, 0xFAF1E7, 0x322B24),
hover: LightDark(isLight, 0xFFEDDA, 0x423428),
text: LightDark(isLight, 0x241D17, 0xF8F2EA),
muted: LightDark(isLight, 0x75685C, 0xC3B5A6),
border: LightDark(isLight, 0xE4D1BC, 0x5B4B3C)),
LauncherThemeScheme.MGETBlueOrange => CreatePalette(
isLight,
LightDark(isLight, 0x1450A0, 0x78B4F0),
LightDark(isLight, 0xF4A000, 0xFFB400),
window: LightDark(isLight, 0xEEF3F9, 0x0D1424),
surface: LightDark(isLight, 0xFFFFFF, 0x141C2D),
panel: LightDark(isLight, 0xF5F8FC, 0x19243A),
control: LightDark(isLight, 0xFFF3DA, 0x2F2A20),
hover: LightDark(isLight, 0xE8F1FF, 0x203457),
text: LightDark(isLight, 0x162235, 0xEEF5FF),
muted: LightDark(isLight, 0x617086, 0xAAB8CC),
border: LightDark(isLight, 0xCBD7E7, 0x354762)),
_ => CreatePalette(
isLight,
LightDark(isLight, 0x146B52, 0x58D0A3),
LightDark(isLight, 0xB56B08, 0xF4BD54),
window: LightDark(isLight, 0xF9FBFA, 0x0D1A16),
surface: LightDark(isLight, 0xFFFFFF, 0x14231E),
panel: LightDark(isLight, 0xF9FBFA, 0x14231E),
control: LightDark(isLight, 0xEEF3F0, 0x1A2A24),
hover: LightDark(isLight, 0xE2F3EC, 0x163B2F),
text: LightDark(isLight, 0x192721, 0xEDF5F2),
muted: LightDark(isLight, 0x68766F, 0x9FB0A9),
border: LightDark(isLight, 0xD9E2DE, 0x30463D))
};
}
private static ThemePalette CreatePalette(
bool isLight,
MediaColor accent,
MediaColor orange,
MediaColor window,
MediaColor surface,
MediaColor panel,
MediaColor control,
MediaColor hover,
MediaColor text,
MediaColor muted,
MediaColor border)
{
return new ThemePalette(
window,
surface,
panel,
control,
hover,
text,
muted,
border,
accent,
Blend(accent, surface, isLight ? 0.14 : 0.24),
orange,
Blend(orange, surface, isLight ? 0.16 : 0.30));
}
private static MediaColor LightDark(bool isLight, int lightRgb, int darkRgb)
{
int rgb = isLight ? lightRgb : darkRgb;
return MediaColor.FromRgb((byte)(rgb >> 16), (byte)(rgb >> 8), (byte)rgb);
}
private static MediaColor Blend(MediaColor foreground, MediaColor background, double foregroundAmount)
{
double amount = Math.Clamp(foregroundAmount, 0, 1);
byte r = (byte)Math.Round((foreground.R * amount) + (background.R * (1 - amount)));
byte g = (byte)Math.Round((foreground.G * amount) + (background.G * (1 - amount)));
byte b = (byte)Math.Round((foreground.B * amount) + (background.B * (1 - amount)));
return MediaColor.FromRgb(r, g, b);
}
private static void SetBrush(string key, MediaColor color)
{
SolidColorBrush brush = new(color);
@@ -81,4 +197,18 @@ public static class ThemeService
double luminance = (0.299 * color.R) + (0.587 * color.G) + (0.114 * color.B);
return luminance < 140;
}
private sealed record ThemePalette(
MediaColor Window,
MediaColor Surface,
MediaColor Panel,
MediaColor Control,
MediaColor Hover,
MediaColor Text,
MediaColor Muted,
MediaColor Border,
MediaColor Accent,
MediaColor AccentSoft,
MediaColor Orange,
MediaColor OrangeSoft);
}

View File

@@ -11,14 +11,16 @@
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<Authors>Ray Berezowski</Authors>
<ApplicationIcon>Assets\AppIcon.ico</ApplicationIcon>
<Version>1.0.0</Version>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
<InformationalVersion>1.0.0</InformationalVersion>
<Version>1.0.1</Version>
<AssemblyVersion>1.0.1.12</AssemblyVersion>
<FileVersion>1.0.1.12</FileVersion>
<InformationalVersion>1.0.1</InformationalVersion>
</PropertyGroup>
<ItemGroup>
<Resource Include="Assets\AppIcon.ico" />
<Resource Include="Assets\AboutLogo.png" />
<Resource Include="Assets\HeaderLogo.png" />
<Resource Include="Assets\TrayIcon.ico" />
</ItemGroup>

View File

@@ -2,7 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Taskbar Launcher"
Width="360" SizeToContent="Height"
Width="380" SizeToContent="Height"
MaxHeight="720"
WindowStyle="None"
ResizeMode="NoResize"
@@ -13,17 +13,35 @@
<Border BorderThickness="1"
BorderBrush="{DynamicResource AppBorderBrush}"
Background="{DynamicResource AppSurfaceBrush}"
Padding="10">
CornerRadius="16"
Padding="12">
<DockPanel>
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Margin="0,0,0,8">
<TextBlock Text="Taskbar Launcher" FontWeight="SemiBold" VerticalAlignment="Center"/>
<Button Content="Settings" HorizontalAlignment="Right" Margin="12,0,0,0" Padding="8,4"
<Grid DockPanel.Dock="Top" Margin="0,0,0,10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Image Source="pack://application:,,,/Assets/HeaderLogo.png"
Width="28"
Height="28"
Margin="0,0,10,0"
Stretch="Uniform"
VerticalAlignment="Center"/>
<TextBlock Grid.Column="1"
Text="Taskbar Launcher"
FontWeight="SemiBold"
VerticalAlignment="Center"/>
<Button Grid.Column="2"
Content="Settings"
HorizontalAlignment="Right"
Padding="10,5"
Click="Settings_Click"/>
</StackPanel>
</Grid>
<TextBox x:Name="SearchBox"
DockPanel.Dock="Top"
Margin="0,0,0,8"
Padding="8,5"
Margin="0,0,0,10"
Padding="10,6"
TextChanged="SearchBox_TextChanged"
PreviewKeyDown="SearchBox_PreviewKeyDown"/>
<ScrollViewer x:Name="ItemsScrollViewer"

View File

@@ -17,14 +17,20 @@ public partial class LauncherPopup : Window
private readonly LauncherConfig config;
private readonly Action<LauncherItem> launchItem;
private readonly Action<LauncherItem> openAllItems;
private readonly Action showSettings;
private readonly Action<LauncherItem> editItem;
private readonly Action<LauncherItem> openContainingFolder;
public LauncherPopup(LauncherConfig config, Action<LauncherItem> launchItem, Action showSettings)
public LauncherPopup(LauncherConfig config, Action<LauncherItem> launchItem, Action<LauncherItem> openAllItems, Action showSettings, Action<LauncherItem> editItem, Action<LauncherItem> openContainingFolder)
{
InitializeComponent();
this.config = config;
this.launchItem = launchItem;
this.openAllItems = openAllItems;
this.showSettings = showSettings;
this.editItem = editItem;
this.openContainingFolder = openContainingFolder;
BuildItems();
SizeChanged += (_, _) => QueueReposition();
}
@@ -89,28 +95,53 @@ public partial class LauncherPopup : Window
{
ItemsPanel.Children.Clear();
visibleLaunchButtons.Clear();
if (config.RecentItems.Any(item => !item.IsDisabled))
{
ItemsPanel.Children.Add(CreateRecentItemsControl());
}
bool expandMenusByDefault = config.Items.Count <= 2;
foreach (LauncherItem item in config.Items)
foreach (LauncherItem item in GetDisplayItems(config.Items))
{
ItemsPanel.Children.Add(CreateItemControl(item, 0, expandMenusByDefault));
}
}
private FrameworkElement CreateItemControl(LauncherItem item, int depth, bool expandMenusByDefault)
private Expander CreateRecentItemsControl()
{
Expander expander = new()
{
Header = new TextBlock { Text = "Recent" },
IsExpanded = true,
Margin = new Thickness(0, 4, 0, 8)
};
StackPanel recentItems = new();
foreach (LauncherItem item in config.RecentItems.Where(item => !item.IsDisabled))
{
recentItems.Children.Add(CreateItemControl(item, 1, expandMenusByDefault: false, allowEdit: false));
}
expander.Content = recentItems;
return expander;
}
private FrameworkElement CreateItemControl(LauncherItem item, int depth, bool expandMenusByDefault, bool allowEdit = true)
{
if (item.Type == LauncherItemType.Menu)
{
Expander expander = new()
{
Header = item.Title,
Header = CreateMenuHeader(item),
IsExpanded = expandMenusByDefault,
Margin = new Thickness(depth * 12, 4, 0, 4)
};
StackPanel children = new();
foreach (LauncherItem child in item.Children)
foreach (LauncherItem child in GetDisplayItems(item.Children))
{
children.Children.Add(CreateItemControl(child, depth + 1, expandMenusByDefault));
children.Children.Add(CreateItemControl(child, depth + 1, expandMenusByDefault, allowEdit));
}
expander.Content = children;
@@ -122,10 +153,16 @@ public partial class LauncherPopup : Window
Content = CreateButtonContent(item),
Margin = new Thickness(depth * 12, 2, 0, 2),
MinHeight = DisplayModeMetrics.GetRowHeight(GetEffectiveDisplayMode(item)),
HorizontalContentAlignment = System.Windows.HorizontalAlignment.Left,
Tag = item
};
button.Click += (_, _) => launchItem(item);
if (allowEdit)
{
button.ContextMenu = CreateItemContextMenu(item);
}
button.KeyDown += (_, e) =>
{
if (e.Key == Key.Enter)
@@ -143,6 +180,128 @@ public partial class LauncherPopup : Window
return button;
}
private TextBlock CreateMenuHeader(LauncherItem item)
{
System.Windows.Controls.MenuItem openAllMenuItem = new()
{
Header = "Open All",
IsEnabled = item.Children.Any(IsLaunchable)
};
openAllMenuItem.Click += (_, e) =>
{
openAllItems(item);
e.Handled = true;
};
System.Windows.Controls.ContextMenu contextMenu = new();
contextMenu.Items.Add(openAllMenuItem);
contextMenu.Items.Add(new Separator());
contextMenu.Items.Add(CreatePinMenuItem(item));
contextMenu.Items.Add(CreateDisableMenuItem(item));
contextMenu.Items.Add(CreateEditMenuItem(item));
return new TextBlock
{
Text = item.Title,
ContextMenu = contextMenu
};
}
private System.Windows.Controls.ContextMenu CreateItemContextMenu(LauncherItem item)
{
System.Windows.Controls.ContextMenu contextMenu = new();
contextMenu.Items.Add(CreatePinMenuItem(item));
contextMenu.Items.Add(CreateDisableMenuItem(item));
contextMenu.Items.Add(CreateOpenContainingFolderMenuItem(item));
contextMenu.Items.Add(CreateEditMenuItem(item));
return contextMenu;
}
private System.Windows.Controls.MenuItem CreatePinMenuItem(LauncherItem item)
{
System.Windows.Controls.MenuItem pinMenuItem = new()
{
Header = item.IsFavorite ? "Unpin from Top" : "Pin to Top"
};
pinMenuItem.Click += (_, e) =>
{
item.IsFavorite = !item.IsFavorite;
ConfigService.Save(config);
BuildItems();
QueueReposition();
e.Handled = true;
};
return pinMenuItem;
}
private System.Windows.Controls.MenuItem CreateDisableMenuItem(LauncherItem item)
{
System.Windows.Controls.MenuItem disableMenuItem = new()
{
Header = item.IsDisabled ? "Enable Item" : "Disable Item"
};
disableMenuItem.Click += (_, e) =>
{
item.IsDisabled = !item.IsDisabled;
ConfigService.Save(config);
BuildItems();
QueueReposition();
e.Handled = true;
};
return disableMenuItem;
}
private System.Windows.Controls.MenuItem CreateOpenContainingFolderMenuItem(LauncherItem item)
{
System.Windows.Controls.MenuItem openFolderMenuItem = new()
{
Header = "Open Containing Folder",
IsEnabled = CanOpenContainingFolder(item)
};
openFolderMenuItem.Click += (_, e) =>
{
openContainingFolder(item);
e.Handled = true;
};
return openFolderMenuItem;
}
private System.Windows.Controls.MenuItem CreateEditMenuItem(LauncherItem item)
{
System.Windows.Controls.MenuItem editMenuItem = new()
{
Header = "Edit in Settings"
};
editMenuItem.Click += (_, e) =>
{
editItem(item);
Close();
e.Handled = true;
};
return editMenuItem;
}
private static bool IsLaunchable(LauncherItem item)
{
return item.Type != LauncherItemType.Menu && !item.IsDisabled && !string.IsNullOrWhiteSpace(item.Target);
}
private static bool CanOpenContainingFolder(LauncherItem item)
{
return item.Type is LauncherItemType.App or LauncherItemType.File && !string.IsNullOrWhiteSpace(item.Target);
}
private static IEnumerable<LauncherItem> GetDisplayItems(IEnumerable<LauncherItem> items)
{
return items
.Where(item => !item.IsDisabled)
.OrderByDescending(item => item.IsFavorite);
}
private void SearchBox_TextChanged(object sender, TextChangedEventArgs e)
{
string query = SearchBox.Text.Trim();
@@ -185,9 +344,9 @@ public partial class LauncherPopup : Window
private static void CollectMatches(IEnumerable<LauncherItem> items, string query, List<LauncherItem> matches)
{
foreach (LauncherItem item in items)
foreach (LauncherItem item in GetDisplayItems(items))
{
bool isLaunchable = item.Type != LauncherItemType.Menu;
bool isLaunchable = item.Type != LauncherItemType.Menu && !item.IsDisabled;
if (isLaunchable && Matches(item, query))
{
matches.Add(item);

View File

@@ -1,6 +1,8 @@
{
"Hotkey": "Ctrl+Alt+Space",
"DisplayMode": "CompactList",
"ThemeScheme": "MarkHaven",
"RecentItems": [],
"Items": [
{
"Title": "Folders",
@@ -8,6 +10,8 @@
"Target": "",
"Arguments": null,
"IconPath": null,
"IsFavorite": false,
"IsDisabled": false,
"DisplayMode": "CompactList",
"Children": [
{
@@ -16,6 +20,8 @@
"Target": "%USERPROFILE%\\Documents",
"Arguments": null,
"IconPath": "%USERPROFILE%\\Documents",
"IsFavorite": false,
"IsDisabled": false,
"DisplayMode": "CompactList",
"Children": []
},
@@ -25,6 +31,8 @@
"Target": "%USERPROFILE%\\Downloads",
"Arguments": null,
"IconPath": "%USERPROFILE%\\Downloads",
"IsFavorite": false,
"IsDisabled": false,
"DisplayMode": "CompactList",
"Children": []
}
@@ -36,6 +44,8 @@
"Target": "",
"Arguments": null,
"IconPath": null,
"IsFavorite": false,
"IsDisabled": false,
"DisplayMode": "CompactList",
"Children": [
{
@@ -44,6 +54,8 @@
"Target": "notepad.exe",
"Arguments": null,
"IconPath": "notepad.exe",
"IsFavorite": false,
"IsDisabled": false,
"DisplayMode": "CompactList",
"Children": []
}

47
docs/DEV-NOTES.md Normal file
View File

@@ -0,0 +1,47 @@
# Developer Notes
This document is for the `dev` branch only. Do not publish it on `main`.
## Screenshot and Testing Startup Switches
Taskbar Launcher supports a few command-line switches to open specific UI surfaces for documentation screenshots and manual testing:
```powershell
TaskbarLauncher.exe --show-settings
TaskbarLauncher.exe --show-about
TaskbarLauncher.exe --show-launcher
```
- `--show-settings` opens the Settings window after startup.
- `--show-about` opens the About window after startup.
- `--show-launcher` opens the launcher popup after startup.
These switches are not part of the normal user workflow. They exist so development and documentation captures can be repeated cleanly.
## Future Ideas
These ideas are intentionally tracked on `dev` only. Do not publish them on `main` until a feature is built, tested, and ready for users.
### Open All for Menu Sections
Add a simple right-click action on menu and submenu headers:
- `Open All`
Expected behavior:
- Right-click a top-level menu or submenu title.
- Click `Open All`.
- Launch each direct child item in that section.
- For nested submenus, decide later whether `Open All` should include only direct items or recursively include nested children.
- Skip unsupported items safely and show/log a clear result if something cannot be opened.
This keeps Taskbar Launcher focused as a launcher. It gives project-style behavior without adding a full project dashboard.
### Project Launcher Concept
Parked for later as a possible personal/custom feature:
- Project item type with actions for folder, VS Code, terminal, docs, Git/Gitea page, local server, Docker Compose, and helper scripts.
- Could become useful, but it is larger than the current public app direction.
- Do not start this until the simpler `Open All` behavior is tested and proves insufficient.

View File

@@ -19,6 +19,12 @@ Install the **.NET Desktop Runtime** for **Windows x64**.
2. Run `TaskbarLauncher.exe`.
3. The app appears in the system tray.
4. Press `Ctrl+Alt+Space` to open the launcher.
5. Right-click a launcher entry and choose **Edit in Settings** to jump to that item.
6. Right-click a launcher entry and choose **Pin to Top** or **Unpin from Top**.
7. Right-click a launcher entry and choose **Disable Item** to hide it until it is enabled again from Settings.
8. Right-click an app or file entry and choose **Open Containing Folder**.
Recently launched entries appear in the launcher popup under **Recent**.
## Configure
@@ -30,6 +36,13 @@ From Settings you can:
- Add submenus
- Add folders, apps, files, and websites
- Drag/drop items to reorder
- Drag/drop files, folders, shortcuts, or web links into the launcher item list
- Right-click an item and choose **Duplicate Item** to copy it
- Right-click an item and choose **Pin to Top** to show it first in its menu
- Right-click an item and choose **Disable Item** or **Enable Item** to hide or restore it
- Right-click an app or file item and choose **Open Containing Folder**
- Use **Config... > Validate Targets** to check for missing app, file, and folder targets
- Use **Config... > Export Selected Item** or **Import Item** to share one item or menu section
- Set per-item icon sizes
- Back up and restore `config.json`
- Enable Start with Windows

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB