refactor: centralize common strings, paths, and default values into a new Constants class.
This commit is contained in:
@@ -28,7 +28,7 @@ public class TextInjector : ITextInjector
|
||||
Logger.LogDebug($"Injecting text using wtype...");
|
||||
pInfo = new ProcessStartInfo
|
||||
{
|
||||
FileName = "wtype",
|
||||
FileName = Toak.Core.Constants.Commands.TypeWayland,
|
||||
Arguments = $"\"{text.Replace("\"", "\\\"")}\"",
|
||||
UseShellExecute = false,
|
||||
CreateNoWindow = true
|
||||
@@ -39,7 +39,7 @@ public class TextInjector : ITextInjector
|
||||
Logger.LogDebug($"Injecting text using xdotool...");
|
||||
pInfo = new ProcessStartInfo
|
||||
{
|
||||
FileName = "xdotool",
|
||||
FileName = Toak.Core.Constants.Commands.TypeX11,
|
||||
Arguments = $"type --clearmodifiers --delay 0 \"{text.Replace("\"", "\\\"")}\"",
|
||||
UseShellExecute = false,
|
||||
CreateNoWindow = true
|
||||
@@ -67,7 +67,7 @@ public class TextInjector : ITextInjector
|
||||
Logger.LogDebug($"Setting up stream injection using wtype...");
|
||||
pInfo = new ProcessStartInfo
|
||||
{
|
||||
FileName = "wtype",
|
||||
FileName = Toak.Core.Constants.Commands.TypeWayland,
|
||||
Arguments = "-",
|
||||
UseShellExecute = false,
|
||||
CreateNoWindow = true,
|
||||
@@ -79,7 +79,7 @@ public class TextInjector : ITextInjector
|
||||
Logger.LogDebug($"Setting up stream injection using xdotool...");
|
||||
pInfo = new ProcessStartInfo
|
||||
{
|
||||
FileName = "xdotool",
|
||||
FileName = Toak.Core.Constants.Commands.TypeX11,
|
||||
Arguments = "type --clearmodifiers --delay 0 --file -",
|
||||
UseShellExecute = false,
|
||||
CreateNoWindow = true,
|
||||
|
||||
Reference in New Issue
Block a user