Skip to content

Commit 31908da

Browse files
committed
Version 2.0 (all as one commit :P)
1 parent 7924580 commit 31908da

12 files changed

Lines changed: 651 additions & 218 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
test.cs
12
## Ignore Visual Studio temporary files, build results, and
23
## files generated by popular Visual Studio add-ons.
34
##

.idea/.idea.FlowLauncher Add2Path Plugin/.idea/workspace.xml

Lines changed: 11 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
:: Hacked (skidded?) together with ChatGPT
2+
3+
@echo off
4+
setlocal
5+
6+
:: Define the path to the Flow.Launcher executable
7+
set "exePath=%LocalAppData%\FlowLauncher\Flow.Launcher.exe"
8+
9+
:: Check if the executable exists
10+
if exist "%exePath%" (
11+
echo Flow.Launcher executable found at %exePath%
12+
) else (
13+
echo Flow.Launcher executable not found at %exePath%
14+
set /p "exePath=Please enter the path to the Flow.Launcher executable (the file itself, not the folder): "
15+
)
16+
17+
18+
:: Check if the file at the provided path exists
19+
if not exist "%exePath%" (
20+
echo file not found at this path
21+
pause
22+
goto :end
23+
)
24+
)
25+
26+
:: Display the path to the user
27+
echo Using executable: %exePath%
28+
29+
:: Use PowerShell to set the executable to always run as administrator
30+
powershell -command "Set-ItemProperty -Path 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers' -Name '%exePath%' -Value 'RUNASADMIN'"
31+
32+
echo The Flow.Launcher executable has been set to always run as administrator.
33+
pause
34+
:end

Extensions.cs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
using System;
2+
using System.Linq;
3+
using System.Collections;
4+
using System.Collections.Generic;
5+
6+
namespace Flow.Launcher.Plugin.Add2Path
7+
{
8+
9+
static class ZipStringExtension
10+
{
11+
public static IEnumerable<List<char>> Zip(this string str1, string str2)
12+
{
13+
/* Zips two strings together, so that they may be iterated over.
14+
* Wrapper for Enumerable.Zip() method; convenient because it converts strings to lists and specifies to return zipped element as an
15+
* IEnumerable containing List<char>'s of the two chars for each index
16+
* Returns an IEnumerable containing Lists of two chars each.
17+
* The function can be called and iterated over like this:
18+
* foreach (List<char> chars in Zip(str1, str2)
19+
{
20+
char char1 = chars[0]; char char2 = chars[1];
21+
}
22+
*/
23+
return str1.ToList().Zip(str2.ToList(), (char1, char2) => new List<char>() { char1, char2 });
24+
}
25+
}
26+
}
Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,39 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
2-
3-
<PropertyGroup>
4-
<TargetFramework>net7.0-windows</TargetFramework>
5-
<AssemblyName>Flow.Launcher.Plugin.Add2Path</AssemblyName>
6-
<PackageId>Flow.Launcher.Plugin.Add2Path</PackageId>
7-
<Authors>HorridModz</Authors>
8-
<PackageProjectUrl>https://github.com/HorridModz/Flow.Launcher.Plugin.Add2Path</PackageProjectUrl>
9-
<RepositoryUrl>https://github.com/HorridModz/Flow.Launcher.Plugin.Add2Path</RepositoryUrl>
10-
<PackageTags>flow-launcher flow-plugin</PackageTags>
11-
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
12-
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
13-
<GenerateDocumentationFile>true</GenerateDocumentationFile>
14-
<Configurations>Debug;Release</Configurations>
15-
<Platforms>AnyCPU</Platforms>
16-
</PropertyGroup>
1+
<Project Sdk="Microsoft.NET.Sdk">
172

18-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
19-
<DebugSymbols>false</DebugSymbols>
20-
<DebugType>None</DebugType>
21-
</PropertyGroup>
3+
<PropertyGroup>
4+
<TargetFramework>net7.0-windows</TargetFramework>
5+
<AssemblyName>Flow.Launcher.Plugin.Add2Path</AssemblyName>
6+
<PackageId>Flow.Launcher.Plugin.Add2Path</PackageId>
7+
<Authors>HorridModz</Authors>
8+
<PackageProjectUrl>https://github.com/HorridModz/Flow.Launcher.Plugin.Add2Path</PackageProjectUrl>
9+
<RepositoryUrl>https://github.com/HorridModz/Flow.Launcher.Plugin.Add2Path</RepositoryUrl>
10+
<PackageTags>flow-launcher flow-plugin</PackageTags>
11+
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
12+
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
13+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
14+
<Configurations>Debug;Release</Configurations>
15+
<Platforms>AnyCPU</Platforms>
16+
<RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
17+
<SignAssembly>False</SignAssembly>
18+
</PropertyGroup>
2219

23-
<ItemGroup>
24-
<Content Include="plugin.json">
25-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
26-
</Content>
20+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
21+
<DebugSymbols>false</DebugSymbols>
22+
<DebugType>None</DebugType>
23+
</PropertyGroup>
2724

28-
<Content Include="icon.png">
29-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
30-
</Content>
31-
</ItemGroup>
25+
<ItemGroup>
26+
<Content Include="plugin.json">
27+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
28+
</Content>
3229

33-
<ItemGroup>
34-
<PackageReference Include="Flow.Launcher.Plugin" Version="4.1.0" />
35-
</ItemGroup>
30+
<Content Include="icon.png">
31+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
32+
</Content>
33+
</ItemGroup>
3634

37-
</Project>
35+
<ItemGroup>
36+
<PackageReference Include="Flow.Launcher.Plugin" Version="4.1.0" />
37+
</ItemGroup>
38+
39+
</Project>

FlowLauncher.Plugin.Add2Path.sln

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,23 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
44
VisualStudioVersion = 17.6.33829.357
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Flow.Launcher.Plugin.Add2Path", "Flow.Launcher.Plugin.Add2Path.csproj", "{0D5934A1-77FE-4AEC-82F5-CDD2710B5CC8}"
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Flow.Launcher.Plugin.Add2Path", "Flow.Launcher.Plugin.Add2Path.csproj", "{0D5934A1-77FE-4AEC-82F5-CDD2710B5CC8}"
77
EndProject
88
Global
9-
GlobalSection(SolutionProperties) = preSolution
10-
HideSolutionNode = FALSE
11-
EndGlobalSection
12-
GlobalSection(ExtensibilityGlobals) = postSolution
13-
SolutionGuid = {89387D62-9F6E-4E65-8943-3E6F0CD7C3FE}
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
1412
EndGlobalSection
1513
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{0D5934A1-77FE-4AEC-82F5-CDD2710B5CC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{0D5934A1-77FE-4AEC-82F5-CDD2710B5CC8}.Debug|Any CPU.Build.0 = Debug|Any CPU
1616
{0D5934A1-77FE-4AEC-82F5-CDD2710B5CC8}.Release|Any CPU.ActiveCfg = Release|Any CPU
1717
{0D5934A1-77FE-4AEC-82F5-CDD2710B5CC8}.Release|Any CPU.Build.0 = Release|Any CPU
1818
EndGlobalSection
19-
GlobalSection(SolutionConfigurationPlatforms) = preSolution
20-
Release|Any CPU = Release|Any CPU
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {89387D62-9F6E-4E65-8943-3E6F0CD7C3FE}
2124
EndGlobalSection
2225
EndGlobal

0 commit comments

Comments
 (0)