Difference between revisions of "Windows"

From Jon's Wiki
Line 32: Line 32:
  
 
Change the UpdateOrchestrator Reboot task in the Task Scheduler to pop up a message instead of rebooting. See this [https://superuser.com/questions/957267/how-to-disable-automatic-reboots-in-windows-10/1124533#comment1733748_1124533 comment] on this [https://superuser.com/a/1124533 Superuser answer].
 
Change the UpdateOrchestrator Reboot task in the Task Scheduler to pop up a message instead of rebooting. See this [https://superuser.com/questions/957267/how-to-disable-automatic-reboots-in-windows-10/1124533#comment1733748_1124533 comment] on this [https://superuser.com/a/1124533 Superuser answer].
 +
 +
=== Nifty Windows Terminal PowerShell prompt with git indicators ===
 +
 +
We can get this going using Windows Terminal and Powerline. Windows documentation for these are [https://docs.microsoft.com/en-us/windows/terminal/customize-settings/profile-settings#text-settings here] and [https://docs.microsoft.com/en-us/windows/terminal/tutorials/powerline-setup here], but essentially it is this:
 +
 +
<ol>
 +
<li>Install [[Git]] (using choco, or the [https://git-scm.com/downloads Windows installer]).
 +
</li><li>Install the [https://github.com/microsoft/cascadia-code/releases Cascadia Code PL] font, which includes extra private-space glyphs that the Powerline prompt will use.
 +
</li><li>Add the font to the PowerShell profile in the Windows Terminal <tt>settings.json</tt> file:
 +
"fontFace": "Cascadia Code PL"
 +
</li><li>In Powershell, install these modules:
 +
Install-Module posh-git -Scope CurrentUser
 +
Install-Module oh-my-posh -Scope CurrentUser
 +
Install-Module -Name PSReadLine -Scope CurrentUser -Force -SkipPublisherCheck
 +
</li><li>Add this to your PowerShell profile:
 +
Import-Module posh-git
 +
Import-Module oh-my-posh
 +
Set-Theme Paradox
 +
</li>
 +
</ol>

Revision as of 22:57, 4 August 2020

Windows 10

I hardly use Windows these days, except to play games on Steam and arrange music in Sibelius. It can be made slightly more bearable by installing the Scoop command line installer, and Chocolatey for bigger GUI apps.

To install Scoop, see the instructions on their site, but last time I checked, in Powershell:

iwr -useb get.scoop.sh | iex

And Chocolatey, seems to want you to type all this in:

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

Now we can install useful stuff and get on with it, without having to have an entire Linux OS installed or use a VM:

scoop install wget youtube-dl git-with-openssh
choco install keepassxc wincompose

Keepass XC password manager, and an X-style compose key with wincompose which makes typing áàâåāčçöµ© much easier.

Remove OneDrive

In a cmd window run these:

%SYSTEMROOT%\SysWOW64\OneDriveSetup.exe /uninstall
rd "%USERPROFILE%\OneDrive" /Q /S
rd "%LOCALAPPDATA%\Microsoft\OneDrive" /Q /S
rd "%PROGRAMDATA%\Microsoft OneDrive" /Q /S
REG DELETE "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f
REG DELETE "HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f

Reboot when you're good and ready, and not before

Change the UpdateOrchestrator Reboot task in the Task Scheduler to pop up a message instead of rebooting. See this comment on this Superuser answer.

Nifty Windows Terminal PowerShell prompt with git indicators

We can get this going using Windows Terminal and Powerline. Windows documentation for these are here and here, but essentially it is this:

  1. Install Git (using choco, or the Windows installer).
  2. Install the Cascadia Code PL font, which includes extra private-space glyphs that the Powerline prompt will use.
  3. Add the font to the PowerShell profile in the Windows Terminal settings.json file: "fontFace": "Cascadia Code PL"
  4. In Powershell, install these modules: Install-Module posh-git -Scope CurrentUser Install-Module oh-my-posh -Scope CurrentUser Install-Module -Name PSReadLine -Scope CurrentUser -Force -SkipPublisherCheck
  5. Add this to your PowerShell profile: Import-Module posh-git Import-Module oh-my-posh Set-Theme Paradox