Difference between revisions of "Windows"

From Jon's Wiki
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
I hardly use Windows XP any more, but it can be made slightly more bearable by installing these:
+
== Windows 10 ==
  
* [http://fy.chalmers.se/~appro/nt/TXMouse/ TXMouse] gives you middle-click paste and focus follow.
+
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 [https://scoop.sh/ Scoop] command line installer. I tried to like [https://chocolatey.org/install Chocolatey] but it's a bit bollocks.
* [http://www.cs.utoronto.ca/~iheckman/allsnap/ AllSnap] gives you snappy window edges.
+
 
* Yoink nifty things off the web from the command-line with [http://gnuwin32.sourceforge.net/packages/wget.htm wget for windows]. See [[Quicktime]] for how to yoink Apple trailers.
+
To install Scoop, see the instructions on their site, but last time I checked, in Powershell:
* Get your X-style compose key with [http://code.google.com/p/freecompose/ freecompose]. Makes typing áàâåāčçöµ© much easier.
+
 
 +
iwr -useb get.scoop.sh | iex
 +
 
 +
Now we can have stuff installed without twelve different updater taskbar icons running. Scoop installs stuff under your User directory wherever possible, avoiding admin permissions. Here's a bunch of popular apps in the Scoop repos (called ''buckets'') which can be enabled thus:
 +
 
 +
scoop bucket add extras nonportable
 +
scoop install grep vim sudo wget dos2unix unzip
 +
    openssl docker waypoint azure-cli terraform nomad go rustup
 +
    atom windows-terminal powertoys wincompose greenshot
 +
    ffmpeg k-lite-codec-pack-mega-np youtube-dl handbrake shotcut
 +
    musescore audacity inkscape gimp sumatrapdf
 +
    discord telegram whatsapp thunderbird keepassxc nextcloud
 +
 
 +
Some stuff needs to be installed globally:
 +
 
 +
sudo scoop install -g sshfs-np winfsp-np virtualbox-ng
 +
 
 +
[https://github.com/samhocevar/wincompose/releases/latest Wincompose] turns right-Alt into an X-style compose key, which makes typing áàâåāčçöµ© much easier. KeepassXC is a password manager, with plugins for Firefox and Chrome.
 +
 
 +
=== 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
 +
 
 +
=== Delete or move Saved Pictures and Camera Roll ===
 +
 
 +
Move them to the profile root, or just delete them.<ref name="auslogics-1">{{Cite web |title=How to hide, move, or delete saved pictures and camera roll in Windows 10 |last=Nnabeze |first=Tobenna |work=Auslogics Blog |date=8 July 2020 |access-date=24 April 2021 |url= https://www.auslogics.com/en/articles/how-to-manage-camera-roll/ }}</ref>
 +
 
 +
=== Remove Cortana ===
 +
 
 +
Run this at an admin Windows PowerShell (< v7) prompt:
 +
 
 +
Get-AppxPackage -allusers Microsoft.549981C3F5F10 | Remove-AppxPackage
 +
 
 +
And just to be sure, edit the registry:
 +
 
 +
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search]
 +
"AllowCortana"="0"
 +
 
 +
=== Reboot when you're good and ready, and not before ===
 +
 
 +
Nuke the UpdateOrchestrator Reboot tasks in the Task Scheduler by replacing them with directories to trip it up when Windows tries to recreate them. See this [https://superuser.com/a/1529456 answer] to this [https://superuser.com/questions/957267 Superuser question].
 +
 
 +
cd C:\Windows\System32\Tasks\Microsoft\Windows
 +
takeown /F UpdateOrchestrator /A /R /D y
 +
icacls UpdateOrchestrator /reset /T /C
 +
icacls UpdateOrchestrator /T /C /grant *S-1-5-32-544:F
 +
cd UpdateOrchestrator
 +
mv Reboot Reboot.backup
 +
mv Reboot_Battery Reboot_Battery.backup
 +
mv Reboot_AC Reboot_AC.backup
 +
mv USO_UxBroker USO_UxBroker.backup
 +
mkdir Reboot & mkdir Reboot_Battery & mkdir Reboot_AC & mkdir USO_UxBroker
 +
copy NUL Reboot\empty_file & copy NUL Reboot_Battery\empty_file
 +
copy NUL Reboot_AC\empty_file & copy NUL USO_UxBroker\empty_file
 +
 
 +
=== 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 scoop, 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:
 +
<pre>"fontFace": "Cascadia Code PL"</pre></li>
 +
<li>In Powershell, install these modules:<pre>
 +
Install-Module posh-git -Scope CurrentUser
 +
Install-Module oh-my-posh -Scope CurrentUser
 +
Install-Module -Name PSReadLine -Scope CurrentUser -Force -SkipPublisherCheck
 +
</pre></li>
 +
<li>Add this to your PowerShell profile, in your Documents\WindowsPowerShell folder:<pre>
 +
Import-Module posh-git
 +
Import-Module oh-my-posh
 +
Set-Theme Paradox
 +
</pre></li>
 +
</ol>
 +
 
 +
=== Connecting to network drives with SSH ===
 +
 
 +
Install sshfs-win with Scoop and map remote drives using SSH:
 +
 
 +
<pre>net use N: \\sshfs\me@myserver\path\to\mystuff</pre>

Latest revision as of 20:54, 13 January 2022

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. I tried to like Chocolatey but it's a bit bollocks.

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

iwr -useb get.scoop.sh | iex

Now we can have stuff installed without twelve different updater taskbar icons running. Scoop installs stuff under your User directory wherever possible, avoiding admin permissions. Here's a bunch of popular apps in the Scoop repos (called buckets) which can be enabled thus:

scoop bucket add extras nonportable
scoop install grep vim sudo wget dos2unix unzip
   openssl docker waypoint azure-cli terraform nomad go rustup
   atom windows-terminal powertoys wincompose greenshot
   ffmpeg k-lite-codec-pack-mega-np youtube-dl handbrake shotcut
   musescore audacity inkscape gimp sumatrapdf
   discord telegram whatsapp thunderbird keepassxc nextcloud

Some stuff needs to be installed globally:

sudo scoop install -g sshfs-np winfsp-np virtualbox-ng

Wincompose turns right-Alt into an X-style compose key, which makes typing áàâåāčçöµ© much easier. KeepassXC is a password manager, with plugins for Firefox and Chrome.

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

Delete or move Saved Pictures and Camera Roll

Move them to the profile root, or just delete them.[1]

Remove Cortana

Run this at an admin Windows PowerShell (< v7) prompt:

Get-AppxPackage -allusers Microsoft.549981C3F5F10 | Remove-AppxPackage

And just to be sure, edit the registry:

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search]
"AllowCortana"="0"

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

Nuke the UpdateOrchestrator Reboot tasks in the Task Scheduler by replacing them with directories to trip it up when Windows tries to recreate them. See this answer to this Superuser question.

cd C:\Windows\System32\Tasks\Microsoft\Windows
takeown /F UpdateOrchestrator /A /R /D y
icacls UpdateOrchestrator /reset /T /C
icacls UpdateOrchestrator /T /C /grant *S-1-5-32-544:F 
cd UpdateOrchestrator
mv Reboot Reboot.backup
mv Reboot_Battery Reboot_Battery.backup
mv Reboot_AC Reboot_AC.backup
mv USO_UxBroker USO_UxBroker.backup
mkdir Reboot & mkdir Reboot_Battery & mkdir Reboot_AC & mkdir USO_UxBroker
copy NUL Reboot\empty_file & copy NUL Reboot_Battery\empty_file
copy NUL Reboot_AC\empty_file & copy NUL USO_UxBroker\empty_file

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 scoop, 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, in your Documents\WindowsPowerShell folder:
     Import-Module posh-git
     Import-Module oh-my-posh
     Set-Theme Paradox
    

Connecting to network drives with SSH

Install sshfs-win with Scoop and map remote drives using SSH:

net use N: \\sshfs\me@myserver\path\to\mystuff