Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions QuickShell.Core.Tests/RunGlobalQueryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public void TryActivate_PluginName_EntersBrowseMode(string query)
Assert.True(RunGlobalQuery.TryActivate(query, rawQuery: null, out var remaining));

Assert.Equal(string.Empty, remaining);

}


Expand All @@ -41,7 +40,6 @@ public void TryActivate_PluginNameWithFilter_StripsPrefix()
Assert.True(RunGlobalQuery.TryActivate("quick shell api", rawQuery: null, out var remaining));

Assert.Equal("api", remaining);

}


Expand All @@ -55,7 +53,6 @@ public void TryActivate_RawQueryFallback_ActivatesWhenSearchEmpty()
Assert.True(RunGlobalQuery.TryActivate(string.Empty, "Quick Shell", out var remaining));

Assert.Equal(string.Empty, remaining);

}


Expand All @@ -69,7 +66,6 @@ public void TryActivate_UnrelatedQuery_DoesNotActivate()
Assert.False(RunGlobalQuery.TryActivate("my api project", rawQuery: null, out var remaining));

Assert.Equal("my api project", remaining);

}


Expand All @@ -83,7 +79,6 @@ public void ShouldSuppressEmptyGlobalQuery_BlocksBareGlobalSearch()
var context = new QueryActivationContext(HasActionKeyword: false, Search: string.Empty);

Assert.True(RunGlobalQuery.ShouldSuppressEmptyGlobalQuery(context));

}


Expand All @@ -97,9 +92,7 @@ public void ShouldSuppressEmptyGlobalQuery_AllowsActionKeywordBrowse()
var context = new QueryActivationContext(HasActionKeyword: true, Search: string.Empty);

Assert.False(RunGlobalQuery.ShouldSuppressEmptyGlobalQuery(context));

}

}


1 change: 0 additions & 1 deletion QuickShell.Core.Tests/TestQuickShellServicesFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -187,5 +187,4 @@ private static (AppDataPaths appDataPaths, TerminalLaunchGlyphs glyphs, Terminal
var prewarm = new TerminalCatalogPrewarm(bundle.Catalog);
return (appDataPaths, glyphs, listIcons, prewarm);
}

}
1 change: 0 additions & 1 deletion QuickShell.Core/Models/TerminalShortcut.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ internal sealed class TerminalShortcut
/// for the workspace directory. Mirrored from the first <see cref="CompanionApps"/> entry.
/// </summary>
public string? CompanionAppArguments { get; set; }

}


1 change: 0 additions & 1 deletion QuickShell.Core/Models/WorkspaceSecurityMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ internal sealed record WorkspaceSecurityMetadata
public bool IsTrusted { get; init; } = true;

public long Revision { get; init; } = 1;

}

internal sealed record StoredWorkspace(
Expand Down
6 changes: 0 additions & 6 deletions QuickShell.Core/Services/ShortcutLaunchFormJson.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public sealed class LaunchRowDraft


public bool IsEnabled { get; set; } = true;

}


Expand Down Expand Up @@ -122,7 +121,6 @@ public static string BuildCommandRowsJson(
blocks.Add("""{ "type": "Container", "spacing": "Medium", "items": [] }""");

return string.Join(',', blocks);

}


Expand Down Expand Up @@ -166,7 +164,6 @@ public static string BuildLaunchRowsJson(IReadOnlyList<LaunchRowDraft> launches,
{

return string.Empty;

}


Expand Down Expand Up @@ -518,13 +515,11 @@ public static string BuildLaunchRowsJson(IReadOnlyList<LaunchRowDraft> launches,
}

""");

}



return string.Join(',', blocks);

}


Expand All @@ -538,5 +533,4 @@ public static string WrapLaunchRowsForTest(string launchRows) =>
private static string Escape(string? value) =>

(value ?? string.Empty).Replace("\\", "\\\\").Replace("\"", "\\\"");

}
22 changes: 7 additions & 15 deletions QuickShell.Core/Services/TerminalHostIds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ public static string ResolveEffectiveApplication(string terminalApplicationId)
{
if (terminalApplicationId.Equals(LetWindowsChoose, StringComparison.OrdinalIgnoreCase))
{
return WindowsDefaultTerminalReader.ReadApplicationId();
}
return WindowsDefaultTerminalReader.ReadApplicationId(); }

return terminalApplicationId;
}
return terminalApplicationId; }

public static bool UsesWindowsTerminalProfiles(string terminalApplicationId) =>
!ResolveEffectiveApplication(terminalApplicationId)
Expand All @@ -40,31 +38,25 @@ public static string HostExecutable(string terminalApplicationId)
var effective = ResolveEffectiveApplication(terminalApplicationId);
return effective.Equals(IntelligentTerminal, StringComparison.OrdinalIgnoreCase)
? "wtai.exe"
: "wt.exe";
}
: "wt.exe"; }

public static string ProfileIdPrefix(string terminalApplicationId)
{
var effective = ResolveEffectiveApplication(terminalApplicationId);
return effective.Equals(IntelligentTerminal, StringComparison.OrdinalIgnoreCase)
? IntelligentTerminal
: WindowsTerminal;
}
: WindowsTerminal; }

public static string SourceLabel(string terminalApplicationId)
{
if (terminalApplicationId.Equals(LetWindowsChoose, StringComparison.OrdinalIgnoreCase))
{
return "Let Windows choose";
}
return "Let Windows choose"; }

if (terminalApplicationId.Equals(WindowsConsoleHost, StringComparison.OrdinalIgnoreCase))
{
return "Windows Console Host";
}
return "Windows Console Host"; }

return ResolveEffectiveApplication(terminalApplicationId).Equals(IntelligentTerminal, StringComparison.OrdinalIgnoreCase)
? "Intelligent Terminal"
: "Windows Terminal";
}
}
: "Windows Terminal"; }}
Expand Down
29 changes: 0 additions & 29 deletions QuickShell.Run/QuickShellRunSettingsWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ public QuickShellRunSettingsWindow(
SelectedValuePath = "Id",

Margin = new Thickness(0, 0, 0, 8),

};

root.Children.Add(_defaultProfileBox);
Expand All @@ -117,7 +116,6 @@ public QuickShellRunSettingsWindow(
Content = "Block launch when dirty and branch would change",

Margin = new Thickness(0, 0, 0, 8),

};

root.Children.Add(_blockDirtyBranchBox);
Expand All @@ -137,7 +135,6 @@ public QuickShellRunSettingsWindow(
Content = "Show recent workspaces",

Margin = new Thickness(0, 0, 0, 8),

};

root.Children.Add(_showRecentsBox);
Expand All @@ -153,7 +150,6 @@ public QuickShellRunSettingsWindow(
Content = "Open multiple commands in one Windows Terminal window",

Margin = new Thickness(0, 0, 0, 8),

};

root.Children.Add(_singleWindowTabsBox);
Expand Down Expand Up @@ -223,7 +219,6 @@ public QuickShellRunSettingsWindow(
Margin = new Thickness(0, 12, 0, 12),

Foreground = System.Windows.Media.Brushes.Gray,

};

root.Children.Add(_statusText);
Expand Down Expand Up @@ -269,7 +264,6 @@ public QuickShellRunSettingsWindow(
LoadCurrentValues();

_baseline = CaptureSnapshot();

}


Expand All @@ -289,7 +283,6 @@ private void LoadCurrentValues()
_showRecentsBox.IsChecked = QuickShellRecentSettings.IsEnabled(_settings.ReadRecentWorkspaceCount());

_singleWindowTabsBox.IsChecked = !_settings.ReadSeparateWindowsForMultiLaunch();

}


Expand All @@ -305,7 +298,6 @@ private void RestoreBaseline()
_settings.SaveRecentWorkspaceCount(_baseline.RecentCount);

_settings.SaveMultiLaunchPresentation(_baseline.SingleWindowTabs);

}


Expand Down Expand Up @@ -341,7 +333,6 @@ private void ReloadProfileChoices()
{

_defaultProfileBox.Items.Add(new { choice.Id, choice.Label });

}


Expand All @@ -353,7 +344,6 @@ private void ReloadProfileChoices()
? selected

: TerminalHostIds.DefaultProfile;

}


Expand Down Expand Up @@ -389,7 +379,6 @@ private bool Save()
_baseline = CaptureSnapshot();

return true;

}


Expand All @@ -403,9 +392,7 @@ private void ExportShortcuts()
{

SetStatus(message);

}

}


Expand All @@ -421,9 +408,7 @@ private void ImportShortcuts(bool replace)
{

SetStatus(message);

}

}


Expand All @@ -441,7 +426,6 @@ private void ImportShortcuts(bool replace)
FontWeight = FontWeights.SemiBold,

Margin = new Thickness(0, 12, 0, 8),

};


Expand All @@ -453,7 +437,6 @@ private void ImportShortcuts(bool replace)
Text = text,

Margin = new Thickness(0, 0, 0, 4),

};


Expand All @@ -471,7 +454,6 @@ private void ImportShortcuts(bool replace)
Foreground = System.Windows.Media.Brushes.Gray,

FontSize = 12,

};


Expand All @@ -489,21 +471,18 @@ private static ComboBox Combo(IReadOnlyList<(string Id, string Label)> choices)
SelectedValuePath = "Id",

Margin = new Thickness(0, 0, 0, 8),

};

foreach (var choice in choices)

{

box.Items.Add(new { choice.Id, choice.Label });

}



return box;

}


Expand All @@ -525,13 +504,11 @@ private static Button TooltipButton(string text, string tooltip, Action action)
MinWidth = 220,

ToolTip = tooltip,

};

button.Click += (_, _) => action();

return button;

}


Expand All @@ -547,7 +524,6 @@ private readonly record struct SettingsSnapshot(
int RecentCount,

bool SingleWindowTabs);

}


Expand All @@ -571,7 +547,6 @@ void ShowWindow()
var window = new QuickShellRunSettingsWindow(settings, shortcuts, projectAnalysis, catalog);

window.ShowDialog();

}


Expand All @@ -583,19 +558,15 @@ void ShowWindow()
{

ShowWindow();

}

else

{

app?.Dispatcher.Invoke(ShowWindow);

}

}

}


Loading
Loading