Skip to content

Commit

Permalink
Merge pull request #32 from Crequency/dev=main
Browse files Browse the repository at this point in the history
[Pull Request] Crequency/KitX#278
  • Loading branch information
Dynesshely authored Feb 25, 2024
2 parents c24497b + c3e8d9b commit 9245b7f
Show file tree
Hide file tree
Showing 143 changed files with 4,587 additions and 4,997 deletions.
2 changes: 1 addition & 1 deletion KitX Dashboard Assets/KitX.Dashboard.Assets.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<TrimMode>copyused</TrimMode>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
Expand Down
1 change: 1 addition & 0 deletions KitX Dashboard Assets/KitX.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion KitX Dashboard Core/KitX.Dashboard.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion KitX Dashboard Fonts/KitX.Dashboard.Fonts.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<TrimMode>copyused</TrimMode>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PublishAot>true</PublishAot>
Expand Down
32 changes: 24 additions & 8 deletions KitX Dashboard Repair Tool/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
KitX Repair Tool (C) Crequency
Environment: {Environment.Version}
OS Version: {Environment.OSVersion}
""");
"""
);
};

var log_exception = (Exception e) =>
Expand All @@ -15,25 +16,35 @@ KitX Repair Tool (C) Crequency
Console.WriteLine(e.StackTrace);
};

T? ask<T>(string tip = "Input: ", Func<string?, T>? parse = null)
static T? ask<T>(string tip = "Input: ", Func<string?, T>? parse = null)
{
Console.Write(tip);
string? input = Console.ReadLine();

var input = Console.ReadLine();

if (input is null) return default(T);
if (parse is not null) return parse(input);
else throw new Exception(input);

if (parse is not null)
return parse(input);
else
throw new Exception(input);
};

var menu = () =>
{
Console.WriteLine(
"""
1. (root) Linux wayland repair (add `LC_ALL=C` to environment variables)
""");
return ask("Your select: ", x => int.TryParse(x, out int y) ? y : -1);
"""
);
return ask("You selected: ", x => int.TryParse(x, out int y) ? y : -1);
};



tip_copyright();

switch (menu())
{
case 1:
Expand All @@ -44,7 +55,12 @@ KitX Repair Tool (C) Crequency
}
try
{
File.AppendAllLines("/etc/environment", new string[] { "LC_ALL=C" });
await File.AppendAllLinesAsync(
"/etc/environment",
[
"LC_ALL=C"
]
);
}
catch (Exception e)
{
Expand Down
2 changes: 1 addition & 1 deletion KitX Dashboard Updater/KitX.Dashboard.Updater.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
15 changes: 12 additions & 3 deletions KitX Dashboard/App.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@

<Application.Resources>
<ResourceDictionary>
<x:String x:Key="TrayIconText">KitX</x:String>

<SolidColorBrush x:Key="ThemePrimaryAccent" Color="#FF3873D9"/>
<SolidColorBrush x:Key="ThemePrimaryAccentTransparentAA" Color="#AA3873D9"/>
<SolidColorBrush x:Key="ThemePrimaryAccentTransparentBB" Color="#BB3873D9"/>
Expand All @@ -32,23 +30,34 @@

<FontFamily x:Key="SarasaMonoCL">avares://KitX.Dashboard.Fonts/sarasa-mono-cl-regular.ttf#Sarasa Mono CL</FontFamily>
<FontFamily x:Key="SourceHanSans">avares://KitX.Dashboard.Fonts/SourceHanSans-VF.ttf#Source Han Sans VF</FontFamily>

<ResourceDictionary.MergedDictionaries>

</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>

<Application.Styles>
<sty:FluentAvaloniaTheme/>
<materialIcons:MaterialIconStyles/>

<StyleInclude Source="avares://AvaloniaEdit/Themes/Fluent/AvaloniaEdit.xaml"/>
<StyleInclude Source="avares://AvaloniaProgressRing/Styles/ProgressRing.xaml"/>
<StyleInclude Source="/Styles/FontsStyles.axaml"/>
</Application.Styles>

<TrayIcon.Icons>
<TrayIcons>
<TrayIcon Command="{Binding TrayIconClickedCommand}"
Icon="resm:KitX.Dashboard.Assets.KitX-Icon-256x256.ico"
IsVisible="True"
ToolTipText="{DynamicResource TrayIconText}">
ToolTipText="{Binding TrayIconText}">
<TrayIcon.Menu>
<NativeMenu>
<NativeMenuItem Command="{Binding TrayIconClickedCommand}" Header="{DynamicResource Text_Public_ShowMainWindow}"/>
<NativeMenuItem Command="{Binding PluginLauncherCommand}" Header="{DynamicResource Text_Public_ShowLauncherWindow}"/>
<NativeMenuItemSeparator/>
<NativeMenuItem Command="{Binding ViewLatestAnnouncementsCommand}" Header="{DynamicResource Text_Public_ShowAnnouncements}"/>
<NativeMenuItemSeparator/>
<NativeMenuItem Command="{Binding ExitCommand}" Header="{DynamicResource Text_Public_Exit}"/>
</NativeMenu>
Expand Down
Loading

0 comments on commit 9245b7f

Please sign in to comment.