Gaming on Linux Gotchas

I've been PC gaming solely on Linux since the beginning of 2020 and generally things that are meant to work just work; it's just a case of installing a game through Lutris or switching on Proton for all games in Steam. But I've definitely experienced problems that have been some effort to resolve. I'll update this article over time as I find more things. Sometimes the Default Version of Proton Used is Out of Date At any time you will likely have many different versions of proton installed, so that if you have an issue, you can just toggle the version in the game's settings. For some reason when its set to "default" that doesn't always mean the latest version. I'm not sure if this is a bug or something Valve has done to certain games. In my case this was with Doom Eternal. GSync can Default to the Wrong Screen In your NVidia settings, there is a tab called "X Server XVideo Settings", which chooses which of your screens to apply GSync to. I

Fix Inability to Move Files to Trash in VSC

You need to configure an environment variable to tell Electron (what VSC is built on) how to trash things. In ~/.profile add: export ELECTRON_TRASH=trash-put You'll need to install trash-put separately. "gio trash" might be a pre-installed alternative. I thought that's what I was using but apparently not.

VSC Vanishing Go Imports

With the Go extension installed in VSC, by default if you have an unused import, when you save, it will disappear. If you're like me and you may habitually press ctrl+s, this is very frustrating. After a lot of messing around in VSC's settings. I learned that this "feature" has nothing to do with the settings pertaining to linting or formatting. It's actually to do with automatic import organisation, which you can configure as follows in VSC's settings.json. "[go]" : { "editor.codeActionsOnSave" : { "source.organizeImports" : false, }, } This solution comes from this StackOverflow answer. You can still organise imports with the shortcut shift+alt+o.

Fixing Gnome's Gnonsense

Although I spent a long time not liking Gnome, I've come round to it, and think it's the only desktop environment (on any OS) I can confidently recommend (I have not tried them all) (I used to be able to recommend Unity). Specifically, I recommend Gnome with Ubuntu's defaults and some additional extensions to improve the experience. Extensions Hide Top Bar — Makes the top bar only visible in the window spread / app list view. This makes the desktop cleaner and it's nice having the top of a window at the top of a screen. I prefer this to moving the top bar to the bottom because the top bar can only appear on one screen and I want my screens to look the same. No Topleft Hot Corner — It's too easy to trigger this by accident. Better OSD & Transparent OSD — I use these to improve the appearance of the volume indicator. By default it's too big, too central, and too opaque. These extensions change all of that. Volume Mixer —This lets you independ

How to Host TTT

1. Download add-ons Recommended Client Add-Ons Recommended Maps Recommended Server Add-Ons 2. Allow players to connect to your machine. In your router's settings create a new port forwarding rule. Forward TCP and UDP traffic on port 27015 to your computer. Different routers have different user interfaces, so you may have to dig a little to find the options. The settings will likely be presented to you as a of external ports mapped to a range of internal ports. Unless you have to doing something special, you just want all those values to be 27015. 3. Get players to connect to your machine. In your Steam profile settings, you should allow your friends to see your online activity. (View Profile -> Privacy Settings -> Game Details) Other players should be able to see that you are in game in their friends list. And by right-clicking on you, they should be able to join your game once you have your server running. This doesn't always seem to work, so you can allo

TypeScript: Turn an Array of Values into a Type Union

I found the answer I was looking for here: I wasn't sure that it would be possible. In fact, it turns out that the solution is far more impressive than I expected. What follows cuts to the core part of the article that I need solved my particular problem. Problem I want to have an object type with specific keys and I want a static array of those keys, but I don't want to have the same list of keys written out twice in case I mistakenly make them differ in the future type K = "a" | "b" | "c"; type O = Record<K, V>; const keys: K[] = ["a","b","c"]; I want to be sure that 'keys' contains every member of type 'K' exactly once and vice-versa. I want to use 'keys' to build an object of type 'O', so I can't just rely on using 'Object.keys' on an