From 8810da0fb6144ae3911b8e6de0a7bd549190b18b Mon Sep 17 00:00:00 2001 From: Cody Duong Date: Tue, 28 Nov 2023 05:31:34 -0600 Subject: [PATCH] Windows 1.9.0 - Switch from cargo ripgrep to winget ripgrep install - Add mingw64 install via msys2 - Disable Powertoys Run from running in fullscreen applications - Remove grep aliased to findstr, instead rely on msys2 grep.exe --- .../PowerToys/PowerToys Run/settings.json | 2 +- windows/aliases.ps1 | 2 +- windows/profile.ps1 | 2 +- windows/scripts/install.ps1 | 52 +++++++++++++++++-- windows/scripts/utils.ps1 | 24 +++++++-- 5 files changed, 70 insertions(+), 12 deletions(-) diff --git a/windows/.files/%LOCALAPPDATA%/Microsoft/PowerToys/PowerToys Run/settings.json b/windows/.files/%LOCALAPPDATA%/Microsoft/PowerToys/PowerToys Run/settings.json index ed43fb9..8766b0c 100644 --- a/windows/.files/%LOCALAPPDATA%/Microsoft/PowerToys/PowerToys Run/settings.json +++ b/windows/.files/%LOCALAPPDATA%/Microsoft/PowerToys/PowerToys Run/settings.json @@ -1 +1 @@ -{"properties":{"search_result_preference":"most_recently_used","search_type_preference":"application_name","maximum_number_of_results":4,"open_powerlauncher":{"win":false,"ctrl":false,"alt":true,"shift":false,"code":68,"key":""},"open_file_location":{"win":false,"ctrl":false,"alt":false,"shift":false,"code":0,"key":""},"copy_path_location":{"win":false,"ctrl":false,"alt":false,"shift":false,"code":0,"key":""},"open_console":{"win":false,"ctrl":false,"alt":false,"shift":false,"code":0,"key":""},"override_win_r_key":false,"override_win_s_key":false,"ignore_hotkeys_in_fullscreen":false,"clear_input_on_launch":false,"tab_selects_context_buttons":true,"theme":0,"startupPosition":2,"use_centralized_keyboard_hook":false,"search_query_results_with_delay":true,"search_input_delay":150,"search_input_delay_fast":0,"search_clicked_item_weight":5,"search_query_tuning_enabled":false,"search_wait_for_slow_results":false,"generate_thumbnails_from_files":true},"plugins":[{"Id":"CEA0FDFC6D3B4085823D60DC76F28855","Name":"Calculator","Description":"Does mathematical calculations (e.g. 5*3-2).","Author":"cxfksword","Disabled":false,"IsGlobal":true,"ActionKeyword":"=","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\Calculator\\Images\\calculator.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\Calculator\\Images\\calculator.light.png","AdditionalOptions":[{"Key":"InputUseEnglishFormat","DisplayLabel":"Use English (United States) number format for input","DisplayDescription":"Ignores your system setting and expects numbers in the format '1,000.55'.","Value":false},{"Key":"OutputUseEnglishFormat","DisplayLabel":"Use English (United States) number format for output","DisplayDescription":"Ignores your system setting and returns numbers in the format '1000.55'.","Value":false}]},{"Id":"B4D3B69656E14D44865C8D818EAE47C4","Name":"Folder","Description":"Navigates folders starting from a drive letter 'C:\\' or from the user home '~'.","Author":"qianlifeng","Disabled":false,"IsGlobal":true,"ActionKeyword":"","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\Folder\\Images\\folder.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\Folder\\Images\\folder.light.png","AdditionalOptions":[]},{"Id":"C88512156BB74580AADF7252E130BA8D","Name":"History","Description":"Quick access to previously selected results.","Author":"jefflord","Disabled":false,"IsGlobal":false,"ActionKeyword":"!!","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\History\\Images\\history.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\History\\Images\\history.light.png","AdditionalOptions":[]},{"Id":"2140FC9819AD43A3A616E2735815C27C","Name":"Windows Search","Description":"Searches files and folders.","Author":"Microsoft","Disabled":false,"IsGlobal":true,"ActionKeyword":"?","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\Indexer\\Images\\indexer.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\Indexer\\Images\\indexer.light.png","AdditionalOptions":[{"Key":"DisableDriveDetectionWarning","DisplayLabel":"Disable non-indexed files warning","DisplayDescription":null,"Value":false}]},{"Id":"0778F0C264114FEC8A3DF59447CF0A74","Name":"OneNote","Description":"Searches your local OneNote notebooks. This plugin requires the OneNote desktop app which is included in Microsoft Office.","Author":"palenshus","Disabled":true,"IsGlobal":true,"ActionKeyword":"o:","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\OneNote\\Images\\oneNote.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\OneNote\\Images\\oneNote.light.png","AdditionalOptions":[]},{"Id":"791FC278BA414111B8D1886DFE447410","Name":"Program","Description":"Searches programs.","Author":"qianlifeng","Disabled":false,"IsGlobal":true,"ActionKeyword":".","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\Program\\Images\\app.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\Program\\Images\\app.light.png","AdditionalOptions":[]},{"Id":"303417D927BF4C97BCFFC78A123BE0C8","Name":"Registry Plugin","Description":"Navigates inside the Windows Registry.","Author":"TobiasSekan","Disabled":false,"IsGlobal":false,"ActionKeyword":":","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\Registry\\Images\\reg.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\Registry\\Images\\reg.light.png","AdditionalOptions":[]},{"Id":"11A6C36E4E91439CA69F702CBD364EF7","Name":"Service","Description":"Manages Windows services.","Author":"davidegiacometti","Disabled":false,"IsGlobal":false,"ActionKeyword":"!","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\Service\\Images\\service.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\Service\\Images\\service.light.png","AdditionalOptions":[]},{"Id":"D409510CD0D2481F853690A07E6DC426","Name":"Shell","Description":"Executes commands (e.g 'ping', 'cmd').","Author":"qianlifeng","Disabled":false,"IsGlobal":false,"ActionKeyword":">","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\Shell\\Images\\shell.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\Shell\\Images\\shell.light.png","AdditionalOptions":[]},{"Id":"CEA08895D2544B019B2E9C5009600DF4","Name":"Windows System Commands","Description":"Executes system commands (e.g. 'shutdown', 'lock', 'sleep').","Author":"Wox","Disabled":false,"IsGlobal":true,"ActionKeyword":"","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\System\\Images\\lock.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\System\\Images\\lock.light.png","AdditionalOptions":[{"Key":"ConfirmSystemCommands","DisplayLabel":"Show a dialog to confirm system commands","DisplayDescription":null,"Value":false},{"Key":"ShowSuccessOnEmptyRB","DisplayLabel":"Show a success message after emptying the Recycle Bin","DisplayDescription":null,"Value":false},{"Key":"LocalizeSystemCommands","DisplayLabel":"Use localized system commands instead of English ones","DisplayDescription":null,"Value":true},{"Key":"SeparateResultEmptyRB","DisplayLabel":"Show separate result for Empty Recycle Bin command","DisplayDescription":null,"Value":false},{"Key":"ReduceNetworkResultScore","DisplayLabel":"Reduce the priority of 'IP' and 'MAC' results to improve the order in the global results","DisplayDescription":"With this setting enabled, you have to type more characters to find the results.","Value":true}]},{"Id":"5D69806A5A474115821C3E4C56B9C793","Name":"Time and Date","Description":"Provides time and date values for the system time or a custom time stamp (Examples: 'Day', 'Day::4/28/2023', 'Time::10:57:37 PM', 'Calendar week::4/28/2023')","Author":"htcfreek","Disabled":false,"IsGlobal":true,"ActionKeyword":")","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\TimeDate\\Images\\timeDate.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\TimeDate\\Images\\timeDate.light.png","AdditionalOptions":[{"Key":"OnlyDateTimeNowGlobal","DisplayLabel":"Show only 'Time', 'Date' and 'Now' result for system time on global queries","DisplayDescription":"Regardless of this setting, for global queries the first word of the query has to be a complete match.","Value":true},{"Key":"TimeWithSeconds","DisplayLabel":"Show time with seconds","DisplayDescription":"This setting applies to the 'Time' and 'Now' result.","Value":false},{"Key":"DateWithWeekday","DisplayLabel":"Show date with weekday and name of month","DisplayDescription":"This setting applies to the 'Date' and 'Now' result.","Value":false},{"Key":"HideNumberMessageOnGlobalQuery","DisplayLabel":"Hide 'Invalid number input' error message on global queries","DisplayDescription":null,"Value":false}]},{"Id":"aa0ee9daff654fb7be452c2d77c471b9","Name":"Unit Converter","Description":"Provides unit conversion (e.g. 10 ft in m).","Author":"ThiefZero","Disabled":false,"IsGlobal":false,"ActionKeyword":"%%","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\UnitConverter\\Images\\unitconverter.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\UnitConverter\\Images\\unitconverter.light.png","AdditionalOptions":[]},{"Id":"03276A39D4E9417C8FFD200B0EE5E871","Name":"URI Handler","Description":"Opens URLs and UNC network shares.","Author":"Microsoft","Disabled":false,"IsGlobal":true,"ActionKeyword":"//","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\Uri\\Images\\uri.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\Uri\\Images\\uri.light.png","AdditionalOptions":[]},{"Id":"525995402BEF4A8CA860D92F6D108092","Name":"Visual Studio Code Workspaces","Description":"Opens workspaces, remote machines (SSH or Codespaces) and containers, previously opened in VS Code. The VS Code instance needs to be in PATH.","Author":"ricardosantos9521","Disabled":true,"IsGlobal":false,"ActionKeyword":"{","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\VSCodeWorkspace\\Images\\code-dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\VSCodeWorkspace\\Images\\code-light.png","AdditionalOptions":[]},{"Id":"9F1B49201C3F4BF781CAAD5CD88EA4DC","Name":"Web Search","Description":"Search the web with your default search engine.","Author":"cyberrex5","Disabled":false,"IsGlobal":true,"ActionKeyword":"??","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\WebSearch\\Images\\WebSearch.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\WebSearch\\Images\\WebSearch.light.png","AdditionalOptions":[{"Key":"NotGlobalIfUri","DisplayLabel":"Don't include in global results on queries that are URIs","DisplayDescription":null,"Value":false}]},{"Id":"5043CECEE6A748679CBE02D27D83747A","Name":"Windows settings","Description":"Plugin to search for Windows settings","Author":"TobiasSekan","Disabled":false,"IsGlobal":false,"ActionKeyword":"$","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\WindowsSettings\\Images\\WindowsSettings.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\WindowsSettings\\Images\\WindowsSettings.light.png","AdditionalOptions":[]},{"Id":"F59BA85006B14389A72A0EA756695F1D","Name":"Windows Terminal","Description":"Open Windows Terminal profiles.","Author":"davidegiacometti","Disabled":true,"IsGlobal":true,"ActionKeyword":"_","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\WindowsTerminal\\Images\\WindowsTerminal.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\WindowsTerminal\\Images\\WindowsTerminal.light.png","AdditionalOptions":[{"Key":"OpenNewTab","DisplayLabel":"Open profiles in a new tab","DisplayDescription":null,"Value":false},{"Key":"OpenQuake","DisplayLabel":"Open profiles in the quake window","DisplayDescription":"Windows Terminal supports a \"quake\" feature where a terminal window is accessible using a global hotkey. Enable this option to open profiles in a new tab in this window.","Value":false},{"Key":"ShowHiddenProfiles","DisplayLabel":"Show hidden profiles","DisplayDescription":null,"Value":false}]},{"Id":"F737A9223560B3C6833B5FFB8CDF78E5","Name":"Window Walker","Description":"Switches between open windows.","Author":"betadele","Disabled":false,"IsGlobal":true,"ActionKeyword":"<","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\WindowWalker\\Images\\windowwalker.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\WindowWalker\\Images\\windowwalker.light.png","AdditionalOptions":[{"Key":"ResultsFromVisibleDesktopOnly","DisplayLabel":"Show only results from visible desktop","DisplayDescription":null,"Value":false},{"Key":"SubtitleShowPid","DisplayLabel":"Show process id in the subtitle","DisplayDescription":null,"Value":false},{"Key":"SubtitleShowDesktopName","DisplayLabel":"Show desktop name in the subtitle","DisplayDescription":"This information is only shown in subtitle and tool tip, if you have at least two desktops.","Value":true},{"Key":"ConfirmKillProcess","DisplayLabel":"Request confirmation when killing a process","DisplayDescription":null,"Value":true},{"Key":"KillProcessTree","DisplayLabel":"Kill process and its child processes","DisplayDescription":"Be careful when activating this. Killing the whole process tree can lead to problematic application crashes.","Value":false},{"Key":"OpenAfterKillAndClose","DisplayLabel":"Stay open after closing windows and killing processes","DisplayDescription":"This feature won't work if the kill process confirmation is enabled.","Value":false},{"Key":"HideKillProcessOnElevatedProcesses","DisplayLabel":"Hide \"kill process\" button if additional permissions required","DisplayDescription":null,"Value":false},{"Key":"HideExplorerSettingInfo","DisplayLabel":"Hide Explorer process information","DisplayDescription":"This message is only shown when searching with a direct activation command.","Value":false}]}],"name":"PowerToys Run","version":"1.0"} \ No newline at end of file +{"properties":{"search_result_preference":"most_recently_used","search_type_preference":"application_name","maximum_number_of_results":4,"open_powerlauncher":{"win":false,"ctrl":false,"alt":true,"shift":false,"code":68,"key":""},"open_file_location":{"win":false,"ctrl":false,"alt":false,"shift":false,"code":0,"key":""},"copy_path_location":{"win":false,"ctrl":false,"alt":false,"shift":false,"code":0,"key":""},"open_console":{"win":false,"ctrl":false,"alt":false,"shift":false,"code":0,"key":""},"override_win_r_key":false,"override_win_s_key":false,"ignore_hotkeys_in_fullscreen":true,"clear_input_on_launch":false,"tab_selects_context_buttons":true,"theme":0,"startupPosition":2,"use_centralized_keyboard_hook":false,"search_query_results_with_delay":true,"search_input_delay":150,"search_input_delay_fast":0,"search_clicked_item_weight":5,"search_query_tuning_enabled":false,"search_wait_for_slow_results":false,"generate_thumbnails_from_files":true},"plugins":[{"Id":"CEA0FDFC6D3B4085823D60DC76F28855","Name":"Calculator","Description":"Does mathematical calculations (e.g. 5*3-2).","Author":"cxfksword","Disabled":false,"IsGlobal":true,"ActionKeyword":"=","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\Calculator\\Images\\calculator.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\Calculator\\Images\\calculator.light.png","AdditionalOptions":[{"Key":"InputUseEnglishFormat","DisplayLabel":"Use English (United States) number format for input","DisplayDescription":"Ignores your system setting and expects numbers in the format '1,000.55'.","Value":false},{"Key":"OutputUseEnglishFormat","DisplayLabel":"Use English (United States) number format for output","DisplayDescription":"Ignores your system setting and returns numbers in the format '1000.55'.","Value":false}]},{"Id":"B4D3B69656E14D44865C8D818EAE47C4","Name":"Folder","Description":"Navigates folders starting from a drive letter 'C:\\' or from the user home '~'.","Author":"qianlifeng","Disabled":false,"IsGlobal":true,"ActionKeyword":"","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\Folder\\Images\\folder.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\Folder\\Images\\folder.light.png","AdditionalOptions":[]},{"Id":"C88512156BB74580AADF7252E130BA8D","Name":"History","Description":"Quick access to previously selected results.","Author":"jefflord","Disabled":false,"IsGlobal":false,"ActionKeyword":"!!","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\History\\Images\\history.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\History\\Images\\history.light.png","AdditionalOptions":[]},{"Id":"2140FC9819AD43A3A616E2735815C27C","Name":"Windows Search","Description":"Searches files and folders.","Author":"Microsoft","Disabled":false,"IsGlobal":true,"ActionKeyword":"?","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\Indexer\\Images\\indexer.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\Indexer\\Images\\indexer.light.png","AdditionalOptions":[{"Key":"DisableDriveDetectionWarning","DisplayLabel":"Disable non-indexed files warning","DisplayDescription":null,"Value":false}]},{"Id":"0778F0C264114FEC8A3DF59447CF0A74","Name":"OneNote","Description":"Searches your local OneNote notebooks. This plugin requires the OneNote desktop app which is included in Microsoft Office.","Author":"palenshus","Disabled":true,"IsGlobal":true,"ActionKeyword":"o:","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\OneNote\\Images\\oneNote.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\OneNote\\Images\\oneNote.light.png","AdditionalOptions":[]},{"Id":"791FC278BA414111B8D1886DFE447410","Name":"Program","Description":"Searches programs.","Author":"qianlifeng","Disabled":false,"IsGlobal":true,"ActionKeyword":".","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\Program\\Images\\app.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\Program\\Images\\app.light.png","AdditionalOptions":[]},{"Id":"303417D927BF4C97BCFFC78A123BE0C8","Name":"Registry Plugin","Description":"Navigates inside the Windows Registry.","Author":"TobiasSekan","Disabled":false,"IsGlobal":false,"ActionKeyword":":","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\Registry\\Images\\reg.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\Registry\\Images\\reg.light.png","AdditionalOptions":[]},{"Id":"11A6C36E4E91439CA69F702CBD364EF7","Name":"Service","Description":"Manages Windows services.","Author":"davidegiacometti","Disabled":false,"IsGlobal":false,"ActionKeyword":"!","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\Service\\Images\\service.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\Service\\Images\\service.light.png","AdditionalOptions":[]},{"Id":"D409510CD0D2481F853690A07E6DC426","Name":"Shell","Description":"Executes commands (e.g 'ping', 'cmd').","Author":"qianlifeng","Disabled":false,"IsGlobal":false,"ActionKeyword":">","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\Shell\\Images\\shell.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\Shell\\Images\\shell.light.png","AdditionalOptions":[]},{"Id":"CEA08895D2544B019B2E9C5009600DF4","Name":"Windows System Commands","Description":"Executes system commands (e.g. 'shutdown', 'lock', 'sleep').","Author":"Wox","Disabled":false,"IsGlobal":true,"ActionKeyword":"","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\System\\Images\\lock.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\System\\Images\\lock.light.png","AdditionalOptions":[{"Key":"ConfirmSystemCommands","DisplayLabel":"Show a dialog to confirm system commands","DisplayDescription":null,"Value":false},{"Key":"ShowSuccessOnEmptyRB","DisplayLabel":"Show a success message after emptying the Recycle Bin","DisplayDescription":null,"Value":false},{"Key":"LocalizeSystemCommands","DisplayLabel":"Use localized system commands instead of English ones","DisplayDescription":null,"Value":true},{"Key":"SeparateResultEmptyRB","DisplayLabel":"Show separate result for Empty Recycle Bin command","DisplayDescription":null,"Value":false},{"Key":"ReduceNetworkResultScore","DisplayLabel":"Reduce the priority of 'IP' and 'MAC' results to improve the order in the global results","DisplayDescription":"With this setting enabled, you have to type more characters to find the results.","Value":true}]},{"Id":"5D69806A5A474115821C3E4C56B9C793","Name":"Time and Date","Description":"Provides time and date values for the system time or a custom time stamp (Examples: 'Day', 'Day::4/28/2023', 'Time::10:57:37 PM', 'Calendar week::4/28/2023')","Author":"htcfreek","Disabled":false,"IsGlobal":true,"ActionKeyword":")","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\TimeDate\\Images\\timeDate.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\TimeDate\\Images\\timeDate.light.png","AdditionalOptions":[{"Key":"OnlyDateTimeNowGlobal","DisplayLabel":"Show only 'Time', 'Date' and 'Now' result for system time on global queries","DisplayDescription":"Regardless of this setting, for global queries the first word of the query has to be a complete match.","Value":true},{"Key":"TimeWithSeconds","DisplayLabel":"Show time with seconds","DisplayDescription":"This setting applies to the 'Time' and 'Now' result.","Value":false},{"Key":"DateWithWeekday","DisplayLabel":"Show date with weekday and name of month","DisplayDescription":"This setting applies to the 'Date' and 'Now' result.","Value":false},{"Key":"HideNumberMessageOnGlobalQuery","DisplayLabel":"Hide 'Invalid number input' error message on global queries","DisplayDescription":null,"Value":false}]},{"Id":"aa0ee9daff654fb7be452c2d77c471b9","Name":"Unit Converter","Description":"Provides unit conversion (e.g. 10 ft in m).","Author":"ThiefZero","Disabled":false,"IsGlobal":false,"ActionKeyword":"%%","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\UnitConverter\\Images\\unitconverter.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\UnitConverter\\Images\\unitconverter.light.png","AdditionalOptions":[]},{"Id":"03276A39D4E9417C8FFD200B0EE5E871","Name":"URI Handler","Description":"Opens URLs and UNC network shares.","Author":"Microsoft","Disabled":false,"IsGlobal":true,"ActionKeyword":"//","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\Uri\\Images\\uri.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\Uri\\Images\\uri.light.png","AdditionalOptions":[]},{"Id":"525995402BEF4A8CA860D92F6D108092","Name":"Visual Studio Code Workspaces","Description":"Opens workspaces, remote machines (SSH or Codespaces) and containers, previously opened in VS Code. The VS Code instance needs to be in PATH.","Author":"ricardosantos9521","Disabled":true,"IsGlobal":false,"ActionKeyword":"{","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\VSCodeWorkspace\\Images\\code-dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\VSCodeWorkspace\\Images\\code-light.png","AdditionalOptions":[]},{"Id":"9F1B49201C3F4BF781CAAD5CD88EA4DC","Name":"Web Search","Description":"Search the web with your default search engine.","Author":"cyberrex5","Disabled":false,"IsGlobal":true,"ActionKeyword":"??","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\WebSearch\\Images\\WebSearch.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\WebSearch\\Images\\WebSearch.light.png","AdditionalOptions":[{"Key":"NotGlobalIfUri","DisplayLabel":"Don't include in global results on queries that are URIs","DisplayDescription":null,"Value":false}]},{"Id":"5043CECEE6A748679CBE02D27D83747A","Name":"Windows settings","Description":"Plugin to search for Windows settings","Author":"TobiasSekan","Disabled":false,"IsGlobal":false,"ActionKeyword":"$","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\WindowsSettings\\Images\\WindowsSettings.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\WindowsSettings\\Images\\WindowsSettings.light.png","AdditionalOptions":[]},{"Id":"F59BA85006B14389A72A0EA756695F1D","Name":"Windows Terminal","Description":"Open Windows Terminal profiles.","Author":"davidegiacometti","Disabled":true,"IsGlobal":true,"ActionKeyword":"_","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\WindowsTerminal\\Images\\WindowsTerminal.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\WindowsTerminal\\Images\\WindowsTerminal.light.png","AdditionalOptions":[{"Key":"OpenNewTab","DisplayLabel":"Open profiles in a new tab","DisplayDescription":null,"Value":false},{"Key":"OpenQuake","DisplayLabel":"Open profiles in the quake window","DisplayDescription":"Windows Terminal supports a \"quake\" feature where a terminal window is accessible using a global hotkey. Enable this option to open profiles in a new tab in this window.","Value":false},{"Key":"ShowHiddenProfiles","DisplayLabel":"Show hidden profiles","DisplayDescription":null,"Value":false}]},{"Id":"F737A9223560B3C6833B5FFB8CDF78E5","Name":"Window Walker","Description":"Switches between open windows.","Author":"betadele","Disabled":false,"IsGlobal":true,"ActionKeyword":"<","WeightBoost":0,"IconPathDark":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\WindowWalker\\Images\\windowwalker.dark.png","IconPathLight":"C:\\Program Files\\PowerToys\\modules\\launcher\\Plugins\\WindowWalker\\Images\\windowwalker.light.png","AdditionalOptions":[{"Key":"ResultsFromVisibleDesktopOnly","DisplayLabel":"Show only results from visible desktop","DisplayDescription":null,"Value":false},{"Key":"SubtitleShowPid","DisplayLabel":"Show process id in the subtitle","DisplayDescription":null,"Value":false},{"Key":"SubtitleShowDesktopName","DisplayLabel":"Show desktop name in the subtitle","DisplayDescription":"This information is only shown in subtitle and tool tip, if you have at least two desktops.","Value":true},{"Key":"ConfirmKillProcess","DisplayLabel":"Request confirmation when killing a process","DisplayDescription":null,"Value":true},{"Key":"KillProcessTree","DisplayLabel":"Kill process and its child processes","DisplayDescription":"Be careful when activating this. Killing the whole process tree can lead to problematic application crashes.","Value":false},{"Key":"OpenAfterKillAndClose","DisplayLabel":"Stay open after closing windows and killing processes","DisplayDescription":"This feature won't work if the kill process confirmation is enabled.","Value":false},{"Key":"HideKillProcessOnElevatedProcesses","DisplayLabel":"Hide \"kill process\" button if additional permissions required","DisplayDescription":null,"Value":false},{"Key":"HideExplorerSettingInfo","DisplayLabel":"Hide Explorer process information","DisplayDescription":"This message is only shown when searching with a direct activation command.","Value":false}]}],"name":"PowerToys Run","version":"1.0"} \ No newline at end of file diff --git a/windows/aliases.ps1 b/windows/aliases.ps1 index ab1297f..1585eef 100644 --- a/windows/aliases.ps1 +++ b/windows/aliases.ps1 @@ -31,6 +31,6 @@ Set-Alias unmute Set-SoundUnmute Set-Alias update System-Update Set-Alias vim nvim -Set-Alias grep findstr +# Set-Alias grep findstr Set-Alias _ sudo Set-Alias procexp procexp64 \ No newline at end of file diff --git a/windows/profile.ps1 b/windows/profile.ps1 index 0baeef1..5e3e671 100644 --- a/windows/profile.ps1 +++ b/windows/profile.ps1 @@ -1,4 +1,4 @@ -# version 1.8.1 +# version 1.9.0 Push-Location (Split-Path -parent "$profile") "components", diff --git a/windows/scripts/install.ps1 b/windows/scripts/install.ps1 index 2dd63c4..5fccd42 100644 --- a/windows/scripts/install.ps1 +++ b/windows/scripts/install.ps1 @@ -24,11 +24,12 @@ else { InstallerPromptUpdateOutdated } +$script:currentPath = [System.Environment]::GetEnvironmentVariable('PATH', [System.EnvironmentVariableTarget]::User) + ### Update Help for Modules # Write-Host "Updating Help..." -ForegroundColor "Yellow" # Update-Help -Force - ### Package Providers # Write-Host "`nInstalling Package Providers" -ForegroundColor "Yellow" # Get-PackageProvider NuGet -Force | Out-Null @@ -91,13 +92,12 @@ Install-Winget jftuga.less # Install-Powershell GoogleCloud -Scope CurrentUser # Todo enable once we configure a gcloud init prompt (see https://cloud.google.com/tools/powershell/docs/quickstart) Install-Winget Microsoft.Sysinternals.ProcessExplorer +Install-Winget BurntSushi.ripgrep.MSVC Write-Host "`nInstalling Languages..." -ForegroundColor "Yellow" Write-Host "NodeJS" -ForegroundColor "Cyan" ### NodeJS -# TODO fix nodejs install -# Install-Winget OpenJS.NodeJS.LTS -# Install-Winget OpenJS.NodeJS +Install-Winget OpenJS.NodeJS.LTS Install-Winget CoreyButler.NVMforWindows npm install -g npm@latest npm install -g yarn @@ -128,7 +128,49 @@ Install-Winget Rustlang.Rustup -GetCurrent { [version]"0.0.0" } } -cargo install ripgrep + +Write-Host "`nC/C++" -ForegroundColor "Cyan" +$script:msys2Path = "C:\msys64\usr\bin" +$script:mingwPath = "C:\msys64\ucrt64\bin" +# This has an superfluous call but idgaf. We really only care when the gcc version is updated, so use that as our baseline lib for when to upgrade +$script:msys2Remote = Invoke-RestMethod https://api.github.com/repos/msys2/msys2-installer/releases/latest +$script:msys2PackagesAsset = $msys2Remote.assets | Where-Object { $_.name -match "msys2-base-x86_64-latest.packages.txt" } +$script:msys2PackagesTxt = Join-Path $env:TEMP "Github" $msys2PackagesAsset.name +Invoke-WebRequest -Uri $msys2PackagesAsset.browser_download_url -OutFile $msys2PackagesTxt +$script:msys2RemoteVersion = if (Get-Content -Path $msys2PackagesTxt | Where-Object { $_ -match "(?<=gcc-libs )(\d+\.\d+\.\d+)" }) { $matches[0] } else { "0.0.0" } +# We use head instead of cat because there is some fuckery going on with Neovim/bin/cat.exe being on PATH that sometimes blows up msys2 bash cat +$script:msys2LocalVersion = "0.0.0" +try { + $script:msys2LocalVersion = if ( + $(& $msys2Path\bash.exe -c "head /proc/version") -match "(?<=gcc version )\d+\.\d+\.\d+" + ) { $matches[0] } else { "0.0.0" } +} +catch { Write-Warning $_ } +Install-GitHubRelease msys2 msys2/msys2-installer "msys2-x86_64-latest\.exe$" -version $msys2LocalVersion -remoteVersion $msys2RemoteVersion + +# install mingw +Write-Verbose $(& $msys2Path\bash.exe -c "pacman -Syu base-devel mingw-w64-ucrt-x86_64-toolchain --noconfirm") + +# Check if the path is already in the PATH variable +if ($currentPath -notlike "*$msys2Path*") { + # Add the MSYS2 path to the PATH variable + $newPath = $currentPath + ";" + $msys2Path + [System.Environment]::SetEnvironmentVariable('PATH', $newPath, [System.EnvironmentVariableTarget]::User) + Write-Host "$msys2Path added to the PATH" -ForegroundColor "Green" +} +else { + Write-Verbose "$msys2Path is already in the PATH" +} + +if ($currentPath -notlike "*$mingwPath*") { + # Add the MSYS2 path to the PATH variable + $newPath = $currentPath + ";" + $mingwPath + [System.Environment]::SetEnvironmentVariable('PATH', $newPath, [System.EnvironmentVariableTarget]::User) + Write-Host "$mingwPath added to the PATH" -ForegroundColor "Green" +} +else { + Write-Verbose "$mingwPath is already in the PATH" +} ############## # Desktop Apps diff --git a/windows/scripts/utils.ps1 b/windows/scripts/utils.ps1 index f5efbc1..969c784 100644 --- a/windows/scripts/utils.ps1 +++ b/windows/scripts/utils.ps1 @@ -333,6 +333,10 @@ function Install-GitHubRelease { [semver] ${Version}, + [Parameter(ValueFromPipelineByPropertyName)] + [semver] + ${RemoteVersion}, + [Parameter(ValueFromPipelineByPropertyName)] [switch] ${WhatIf} @@ -376,6 +380,10 @@ function Update-GitHubRelease { [string] ${Match}, + [Parameter(ValueFromPipelineByPropertyName)] + [semver] + ${RemoteVersion}, + [Parameter(ValueFromPipelineByPropertyName)] [switch] ${WhatIf} @@ -383,12 +391,12 @@ function Update-GitHubRelease { # get remote version $Remote = Invoke-RestMethod https://api.github.com/repos/$Repository/releases/latest - $LatestVersion = [semver]$($Remote.tag_name.TrimStart("v")) + $LatestVersion = $RemoteVersion ?? [semver]$($Remote.tag_name.TrimStart("v")) Write-Verbose "Local $Name version: v$Version" Write-Verbose "Latest $Name version: v$LatestVersion" - if ($LatestVersion -eq $Version) { + if ($LatestVersion -eq $Version -or $Version -ge $LatestVersion) { Write-Host "$Name $Version found, skipping..." -ForegroundColor $InstallationIndicatorColorFound return $null } @@ -400,15 +408,23 @@ function Update-GitHubRelease { New-Item $Temp -ItemType Directory -Force -ErrorAction SilentlyContinue | Out-Null Invoke-WebRequest -Uri $Url -OutFile $File - if ($LatestVersion -eq [semver]"0.0.0") { + if ($Version -eq [semver]"0.0.0") { Write-Host "Installing $Name..." -ForegroundColor $InstallationIndicatorColorInstalling } elseif ($LatestVersion -gt $Version) { Write-Host "Updating $Name from $Version to $LatestVersion..." -ForegroundColor $InstallationIndicatorColorUpdating } + # Handle zipped files + if ($File -match ".*\.zip") { + $Destination = ($File -replace "\.zip$", "") + Expand-Archive -LiteralPath $File -DestinationPath $Temp + $File = $Destination + # Todo iterate over inside files to find msixbundle or exe. If the .exe is an installer specify with installer flag + # otherwise add binary to path + } # Handle .msixbundle with AppX - if ($File -match ".*\.msixbundle$") { + elseif ($File -match ".*\.msixbundle$") { Add-AppxPackage -Path $File -WhatIf:$WhatIf } # Handle .exe