Skip to content

FrancescElies/windows-for-linux-and-macos-devs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Windows for Linux and MacOS devs

GitHub Page

A hitchhiker's guide for Linux or MacOS devs who need to use windows.

Going from MacOS or Linux to windows, why would you even do that? You might ask. Maybe you have to share a laptop with family members who have Windows installed? Would you really want to spend your energy convincing them that Linux is a much better option? Or convince them to buy a expensive Mac? Making the sweet promise that all their IT problems will be gone later on; they just needed a bit of help. A different thing would be if they have an old laptop that doesn't get any mac updates or they have windows but this old machine became slower and slower because newer windows require a more powerful machine, in that case, yes install a Linux and tell them you just saved their laptop, no need to buy a new one.

Would you turn down an interesting job offer just because they use Windows? They do some cool stuff, but their clients are using Windows. What would you do? Convince the client mega-corporation to switch to Linux? Dump the offer and continue at your non-fulfilling job because they gave you a Mac?

Unless you are in a privileged position where you can choose the OS you develop on, chances are that you will have to touch other Operating Systems in the future too.

We have several options, never touch windows, one could throw away tools that don't work on windows and learn different tools for each OS or you could throw away tools that are not cross-platform and learn tools that you can use on every OS.

If you use apps that work on multiple operating systems you won't need to keep forgetting and relearning different tools that solve the same problem on each OS. In a way the OS becomes something like your graphics cards driver, you don't care much about it as long as it does it's job, even though not completely the OS starts getting out of the way.

Finding good resources is not easy, I did not come across many resources covering this topic, but the ones I found where mainly saying, use WSL and run the tools you are used to over there, e.g. tmux. I think WSL is amazing, but in my experience, it's works great until you need to do native things and then you are again left naked in the middle of the blue ocean. At the end of the day in my opinion not very good advice.

Luckily Chris Patti & Ned Batchelder have some good advice on their pages.

This are notes I wished I found before I went through discovering what worked and what did not work so well on windows. E.g. using emacs on windows was a pain, git was extremely slow and I had to make a prayer every time I updated packages, things getting broken became the norm and on top of that I faced gpg errors during updates, maybe things changed now but moved on to something else.

A package manager

There are other package managers too but winget is from microsoft itself and you can get a lot of stuff from one command already.

winget install wez.wezterm Nushell.Nushell Dystroy.broot sysinternals BurntSushi.ripgrep.MSVC sharkdp.fd junegunn.fzf JesseDuffield.lazygit Git.Git GitHub.GitHubDesktop GitHub.GitLFS GitHub.cli Flameshot.Flameshot Python.Python.3.12 GoLang.Go Rustlang.Rustup OBSProject.OBSStudio Neovim.Neovim GIMP.GIMP vscode VideoLAN.VLC SumatraPDF.SumatraPDF glzr-io.glazewm

Looking for a package, use winget search or look winget-pkgs

Are you an European coder?

If you are non english native speaker you can use The Layout for Europeans, Coders and Translators eurkey. It has all the advantages of the US standard layout for programming while you still have access to most western-european characters, e.g. çßàáäßæå can be written with ease using AltGr. For other languages like Thai, Chineese, russian ... I don't have any suggestions.

example

Throw away tools that are not cross-platform and learn tools that you can use on every OS

Wezterm as of today to my knowledge the only terminal with tmux like capabilities that works nicely across all major three OS. Check Default Key Assignments, ctrl + shift + alt + " for vertical splits ctrl + shift + alt + % for horizontal splits and ctrl + shift + z to zoom should be enough to get you started, eventually you will probably want to define your own shortcuts, create new sessions with ease (see here), all can be done with Lua within .wezterm.lua in your home folder. I personally like alt + h j k l for moving between splits and alt + - and alt + \ for vertical and horizontal splits (see here).

Nushell is a cross platform shell with clearer error messages with cues from bash and powershell, it also uses coreutils internally, so many unix utilities you know they are already available without having to install something like cygwin. Coming form bash is a good place to start. If you like fzf search for change_dir_with_fzf in here has a low effort snippet to change directories effectively, I personally prefer broot for that but just use whatever floats your boat.

Flameshot is an easy to use tool to share screenshots explaining what's going on, good for making bug reports and explaining things.

Windows specific stuff

Some stuff will be very windows specific but that's ok, at the end of the day you are here using windows right?

Disable annoying default hotkeys

If you accidentally press Win + SPACE , ALT + SHIFT or CTRL + SHIFT keyboard layouts and languages will change behind the scenes. This was never what I wanted. Disable them and save you headaches.

Open example

And remove all key sequences example

Jumping between windows

Turn off animations

We don't care about animations, we just need to switch between different windows often and we want to do it as fast as Windows the OS allows us to.

Press Windows+i to open settings, go to Accessibility, select visual effects and toggle Animation effects off.

Press Windows+r, type SystemPropertiesPerformance and in the performance options window unselect everything except smooth edges for screen font otherwise things look pretty ugly. SystemPropertiesPerformance

Window manager

i3 like window managers

As of today no cross platform window manager, but what can be "cross platformish" are the motions between certain window managers, there are some decent i3-compatible compositors. On windows

OS Column2
macos aerospace
windows glazewm
linux i3 sway

This is actually good enough for me and might be good enough for you as well

On windows if something gets wanky you can always stop glazewm with alt+shift+p and reactivate it again with the same shortcut.

Other options

Windows+<Arrow-left/right> to move window to one side of the screen.

alt+tab has nice animations but when you do a lot of it, it can feel annoyingly slow. Instead you can use alt+esc which will switch no next windows without asking, that feels better, if you combine it with a remap of Caps Lock to esc, isn't that bad after all.

Good to install

If you install one thing only, install system-informer or process explorer. A better task manager, impressive, play around with it to see what it can do for you. Many things Sysinternals do, you can do it directly from system-informer.

Troubleshooting an issue?

Even if they are not the same sysinternals seems to be the closest thing for Instruments or dtrace on mac or strace, lsof and friends on Linux.

Not windows but for MacOS and Linux brendangregg is worth to read.

On linux: http://upstate.net/jen/linux_performance_tuning.jpg

Linux MacOS Windows
strace dtrace procmon
TODO TODO TODO
  • strace

For more low level stuff like dtrace or ebpf look at ebpf-for-windows.

Below a non exhaustive list of things you can do with it:

  • Need a monitoring tool (something like lsof or strace)? procmon shows real-time file system, Registry and process/thread activity. When first having a look at an issue, this is a good tool to start with it. ProcMon-for-Linux exists too.
  • Need to generate process dumps when a process has a hung or crashes? Use procdump, it works on linux too ProcDump-for-Linux exists too.
  • Need to monitor and log system activity across system reboots? sysmon. Sysmon-for-Linux exists too.
  • See what files are open by which processes? Use handle handle -v | fzf to filter or do that in system-informer.
  • Programs configured to startup automatically? Use autoruns
  • Having to do technical presentations or a demo? zoomit allows you to screen zoom, do annotations and so on.

Windbg

Install it winget install "windows driver kit" WinDbg

See [[./windbg.md]] for useful commands.

rust-windbg

Analyze heap memory allocations

UMDH

About

A hitchhiker's guide for MacOS or Linux devs who need to use windows

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published