A pleasant walk through computing

Home

Tid Bits: VS Code: Orange Icon Resurrection

   

I never understood why so many developers--people who generally have no visual design sense--decided that the orange Visual Studio Code icon was where they would take their stand.

I liked the orange, for a few reasons:

  1. It stood out from my purple Visual Studio icon.
  2. It was bold.
  3. I don't have some childhood trauma related to orange.

On Windows, it's not practical to change the icon completely back to orange. That would require modifying the code.exe file. But you can get most of the way there. The steps below will change the icon for:

  1. Right-click folder/file > Open with VS Code
  2. Right-click pinned shortcut > Visual Studio Code
  3. Shortcut

It won't change the icon in the VS Code editor, or in context menu Right-click pinned shortcut > New Window

Here's a 7z file with the orange icons and Powershell script.

vs-code-orange.7z

Replace the VS Code icons

There are three icons in C:\Program Files\Microsoft VS Code\resources\app\resources\win32. Backup and replace all three with the same sizes and names. For the .png files, Paint.Net will work. For the .ico file, I like Greenfish Icon Editor Pro.

Update the Registry

There are four registry keys that point to Code.exe for the icon. Change these to C:\Program Files\Microsoft VS Code\resources\app\resources\win32\code_file.ico.

Here's a Powershell script.

$path = "C:\Program Files\Microsoft VS Code\resources\app\resources\win32\code_file.ico"

New-PSDrive -PSProvider registry -Root HKEY_CLASSES_ROOT -Name HKCR
Write-Output "Setting..."
Set-ItemProperty -LiteralPath "HKCR:\*\shell\VSCode" -Name Icon -Value $path
Set-ItemProperty -Path HKCR:\Directory\Background\shell\VSCode -Name Icon -Value $path
Set-ItemProperty -Path HKCR:\Drive\shell\VSCode -Name Icon -Value $path
Set-ItemProperty -Path HKCU:\Software\Classes\Directory\shell\VSCode -Name Icon -Value $path
Write-Output "Finished."
Pause

Use a Shortcut to Open VS Code

  1. Right-click in a folder, choose New > Shortcut
  2. Item location: "C:\Program Files\Microsoft VS Code\Code.exe"
  3. Name: "VS Code"
  4. Right-click the shortcut, click Change Icon.
  5. Select C:\Program Files\Microsoft VS Code\resources\app\resources\win32\code_file.ico

You can now drag this icon into the task bar to pin it.

Tid Bits: Use Visual Studio for Git Diff/Merge

The instructions below are for Visual Studio 2017 Community Edition. Substitute Professional or Enterprise as needed.

[difftool "vstudio"]
  cmd = 'C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer/vsDiffMerge.exe' $LOCAL $REMOTE Source Target //t
[mergetool "vstudio"]
  cmd = 'C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer/vsDiffMerge.exe' $LOCAL $REMOTE $BASE $MERGED //m
  trustedExitCode = true


# To use as default
[diff]
	tool = vstudio
[merge]
	tool = vstudio
	conflictstyle = diff3
[mergetool]
	keepBackup = false

Command line use:

git mergetool
git difftool

git mergetool --tool=vstudio
git difftool --tool-vstudio

Variables, prefixed with $, are specifying file paths. Note they are enclosed in quote marks, so that spaces in file paths won’t break the command. Source and Target are just labels Visual Studio will use for the files . The /t flag will open the diff in a temporary tab instead of a persisted tab. The /mflag denotes it is a merge in contrast to diff.

3 Chrome Extensions for Performance, Research, and Blogging

Efficiency Rag 1

I like to be efficient in my work. But I don't like to use technology when I don't have to. I've found too much technology reduces productivity. So, I might try out a whole bunch of utilities to make my life better, then settle on just a few of them.

These three Chrome extensions are useful, simple and don't use much memory.

OneTab

I often find myself with twenty or thirty tabs open when I'm trying to solve a programming problem or learn a software tool (or buy new flashlight). Just as often, I want to temporarily save those tabs and look them up later. I previously used Chrome's right-click > bookmark all tabs feature. That worked, but OneTab is much better.

OneTab will collapse all open tabs (except pinned) to a single tab containing links that can be ordered. A set of tabs can be named. Clicking on a link restores the tab and removes the link. Ctrl-click restores and keeps the link. This makes it easy to research a subject, keep a set of tabs around for a week or so, then dump them.

Added huge benefit? Collapsing to a single tab reduces memory consumption tremendously.

The Great Suspender

Even when I'm not researching, I'll have a dozen tabs open. But I won't be using them all. The Great Suspender suspends tabs after a period of time, reducing memory usage. Open the tab, choose Click to Reload, and it comes back up.

I love a simple tool that keeps my computer running at its peak.

Create Link

Create Link has made my tech writing, email and--especially--blogging life not just simpler but more enjoyable. In the past, to create a Markdown link of a web page, I'd type or copy/paste the title, then copy the URL, then select the text in my editor and create the link.

With Create Link, I press CTRL-M (a configurable shortcut key), and a Markdown link is created in my clipboard. I paste it to my editor, and I might have to edit the title text. I love this!

The utility also lets you create a link in HTML, plain text and MediaWiki.

(By the way...SVG does not suck)

   Older