Skip to content

Conversation

shobu13
Copy link

@shobu13 shobu13 commented Apr 6, 2022

add a basic terminal for Windows Terminal,
with the current version, you can set Windows Terminal as your default terminal emulator, but if you launch a command using Flow, Windows Terminal don't use your the matching profile, but a default profile instead.

So i've added a "use windows terminal" property to specify usage of WT, and a Textbox where you can input the Profile you want to use.

Then, on query process, the plugin call WT, passing the Profile as -p option, followed by the actual query.

add a basic terminal for Windows Terminal, 
with the current version, you can set Windows Terminal as your default terminal emulator, but if you launch a command using Flow, Windows Terminal don't use your the matching profile, but a default profile instead.

So i've added a "use windows terminal" property to specify usage of WT, and a Textbox where you can input the Profile you want to use. 

Then, on query process, the plugin call WT, passing the Profile as -p option, followed by the actual query.
@taooceros
Copy link
Member

Thanks for contribution and the code looks good, but I currently are busy to give a comprehensive review and test till weekend. Note: you can install the built version of this pr via the CI pipeline https://ci.appveyor.com/project/JohnTheGr8/flow-launcher/builds/43144820/artifacts.

@taooceros
Copy link
Member

Will this resolve #187?

@taooceros taooceros added the enhancement New feature or request label Apr 6, 2022
@taooceros taooceros added this to the 1.10.0 milestone Apr 6, 2022
@shobu13
Copy link
Author

shobu13 commented Apr 6, 2022

No problem, take your time,
i'm not a pro C# dev, so i'm pretty sure there is a better way to do that, so if you have have some remarks, i'll be happy to hear them !

@shobu13
Copy link
Author

shobu13 commented Apr 6, 2022

Will this resolve #187?

don't think so, this code only allow to choose between multiple Profile of Windows Terminal, so you can't launch ConEmu for exemple.
But it's a step in this direction, similary to the switch-case choosing what Terminal you use (powershell or CMD), we can imagine a switch case to implement each terminal emulator.

@shobu13
Copy link
Author

shobu13 commented Apr 6, 2022

Also, instead of implementing each terminal emulator use case, we can juste provide a template field for the user to provide a custom launch command.
ex:
"C:\Program Files\ConEmu\ConEmu64.exe" -run ${COMMAND_INPUT}

so, if y query

ping 8.8.8.8
with terminal set on "powershell" and NoExit

COMMAND_INPUT = powershell.exe -NoExit ping 8.8.8.8

final command:
"C:\Program Files\ConEmu\ConEmu64.exe" -run powershell.exe -NoExit ping 8.8.8.8

forget to add Verb & working directory to Windows Terminal section, + iterate on info.Arguments instead of parsing it to String
@taooceros
Copy link
Member

Also, instead of implementing each terminal emulator use case, we can juste provide a template field for the user to provide a custom launch command. ex: "C:\Program Files\ConEmu\ConEmu64.exe" -run ${COMMAND_INPUT}

so, if y query

ping 8.8.8.8
with terminal set on "powershell" and NoExit

COMMAND_INPUT = powershell.exe -NoExit ping 8.8.8.8

final command: "C:\Program Files\ConEmu\ConEmu64.exe" -run powershell.exe -NoExit ping 8.8.8.8

Yeah I do have that thought a long time ago, but haven't implemented it till now. It would be great if you want to handle that. Probably we can have ui like the custom explorer

@taooceros
Copy link
Member

I check the code. Do you assume that the profile will align with the command prompt we want to execute with? I think it would be better to put the file name as well as the arguments after wt.exe -p "profile name"

@shobu13
Copy link
Author

shobu13 commented Apr 9, 2022

I check the code. Do you assume that the profile will align with the command prompt we want to execute with? I think it would be better to put the file name as well as the arguments after wt.exe -p "profile name"

I don't thing i have understand your concern, but with WT, you can set multiple profile with different interpreter / theming / ect...
The -p argument is just here to provide what profile the user want to use,
for exemple:
by default, WT have profiles "Windows PowerShell" "CMD", ect...
if i want to execute the command "ping 8.8.8.8" with the pwsh interpreter, using the CMD profile, i juste set my profile name to CMD, interpreter type in the dropdown to Pwsh and it will execute the command wt.exe -p "CMD" Pwsh.exe -blabla ping 8.8.8.8.

@taooceros
Copy link
Member

oh sorry I read it wrongly.

@shobu13
Copy link
Author

shobu13 commented Apr 9, 2022

Yeah I do have that thought a long time ago, but haven't implemented it till now. It would be great if you want to handle that. Probably we can have ui like the custom explorer

yush, no problem, but later if you don't mind 'cause i'm a little busy for now :)

@taooceros
Copy link
Member

Yeah I do have that thought a long time ago, but haven't implemented it till now. It would be great if you want to handle that. Probably we can have ui like the custom explorer

yush, no problem, but later if you don't mind 'cause i'm a little busy for now :)

yeah no worries take your time.

@shobu13
Copy link
Author

shobu13 commented Apr 9, 2022

Should i start a new branch for this feature or continue in this branch ?

@taooceros
Copy link
Member

taooceros commented Apr 9, 2022

Should i start a new branch for this feature or continue in this branch ?

It depends on you. However, I think that merge conflict is a bit annoying. Although it may be clearer to split🤣

@shobu13
Copy link
Author

shobu13 commented Apr 9, 2022

Should i start a new branch for this feature or continue in this branch ?

It depends on you. However, I think that merge conflict is a bit annoying. Although it may be clearer to split🤣

there is no merge conflict if i start a new branch starting from the merged dev with this one

@taooceros
Copy link
Member

Then feel free to start another pull request.

@shobu13
Copy link
Author

shobu13 commented Apr 10, 2022

I wait until this one is merged to avoid conflict :), starting a new branch from this merge

@taooceros
Copy link
Member

taooceros commented Apr 15, 2022

@shobu13 Could you implement the Profile Selection with a combobox that has the profiles of windows terminal?
You can reference to Powertoy's implementation of WindowsTerminal plugin. https://github.com/microsoft/PowerToys/tree/main/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsTerminal

It's weird to manually type the profile name.

@shobu13
Copy link
Author

shobu13 commented Apr 15, 2022

Sorry i'm pretty busy for the next month, but yes, i can implement this later.

@taooceros
Copy link
Member

Sorry i'm pretty busy for the next month, but yes, i can implement this later.

yeah take you time.

@jjw24 jjw24 modified the milestones: 1.10.0, Future Nov 25, 2022
@taooceros
Copy link
Member

@shobu13 Any Update?😉

@shobu13
Copy link
Author

shobu13 commented Feb 4, 2023

Heyaaa, sorry i've been kinda busy this days and i've switch to fedora kde now x') but i gonna try to check it soon

@taooceros
Copy link
Member

Heyaaa, sorry i've been kinda busy this days and i've switch to fedora kde now x') but i gonna try to check it soon

Ah No worry! 😉 (I got a friend contributing to kde connect XD

@VictoriousRaptor
Copy link
Contributor

Close as #3225 implements it.

@Jack251970 Jack251970 closed this Feb 17, 2025
@jjw24 jjw24 removed this from the Future milestone Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants