mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-11 04:55:39 +02:00
add command option -hotkey to allow customization, such as -hotkey "Q", change default hotkey to (Alt+)W
This commit is contained in:
parent
307963f851
commit
466517da1e
3 changed files with 32 additions and 17 deletions
|
@ -71,6 +71,7 @@ namespace PersistentWindows.SystrayShell
|
|||
bool legacy_icon = false;
|
||||
bool waiting_taskbar = false;
|
||||
bool hotkey_window = true;
|
||||
uint hotkey = 'W'; //Alt + W
|
||||
|
||||
foreach (var arg in args)
|
||||
{
|
||||
|
@ -118,6 +119,11 @@ namespace PersistentWindows.SystrayShell
|
|||
pwp.SetIgnoreProcess(arg);
|
||||
continue;
|
||||
}
|
||||
else if (hotkey == 1)
|
||||
{
|
||||
hotkey = arg[0];
|
||||
continue;
|
||||
}
|
||||
|
||||
switch(arg)
|
||||
{
|
||||
|
@ -197,6 +203,9 @@ namespace PersistentWindows.SystrayShell
|
|||
case "-hotkey_window=0":
|
||||
hotkey_window = false;
|
||||
break;
|
||||
case "-hotkey":
|
||||
hotkey = 1;
|
||||
break;
|
||||
case "-prompt_session_restore":
|
||||
prompt_session_restore = true;
|
||||
break;
|
||||
|
@ -345,7 +354,7 @@ namespace PersistentWindows.SystrayShell
|
|||
pwp.SetIgnoreProcess(ignore_process);
|
||||
|
||||
if (hotkey_window)
|
||||
HotKeyForm.Start();
|
||||
HotKeyForm.Start(hotkey);
|
||||
|
||||
if (!pwp.Start(auto_restore_from_db_at_startup))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue