Skip to content

Instantly share code, notes, and snippets.

@codyzu
Last active May 25, 2022 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codyzu/d60540ec3199d35557dc2d4ab695ebc8 to your computer and use it in GitHub Desktop.
Save codyzu/d60540ec3199d35557dc2d4ab695ebc8 to your computer and use it in GitHub Desktop.
Linux Tips and Tricks

PopOS (System76 Darter Pro)

Broken emojis in chrome

sudo apt remove fonts-noto-color-emoji
sudo apt install fonts-noto-color-emoji

reference

Gnome extensions

Zsh

Favorite console tools

Upgrade to 20.04

Varmilo va87m Keyboard

Fn key not working and media keys always active

Test the fix by running:

sudo sh -c "echo 2 >> /sys/module/hid_apple/parameters/fnmode"

Make the solution permanent by:

  1. Create /etc/modprobe.d/hid_apple.conf with:
    options hid_apple fnmode=2
    
  2. Update initramfs: sudo update-initramfs -u -k all
  3. Reboot

References:

If the meta (windows) key stops working

Hit Fn + meta to enable/disable the key.

References:

Extra wide monitor

Install coder-server

curl -fsSL https://code-server.dev/install.sh | sh

Autostart after install

sudo systemctl enable --now code-server@$USER

Add fira code nerd font

  1. sudo nano /usr/lib/code-server/vendor/modules/code-oss-dev/out/vs/code/browser/workbench/workbench.html

    <head>
      <style>
        @import url('https://mshaugh.github.io/nerdfont-webfonts/build/firacode-nerd-font.css');
      </style>
      ...
    </head>
  2. Run the following lines from /usr/lib/code-server

    grep -rl "style-src 'self' 'unsafe-inline'" . | sudo xargs sed -i "s/style-src 'self' 'unsafe-inline'/style-src 'self' 'unsafe-inline' mshaugh.github.io/g"
    grep -rl "font-src 'self' blob:" . | sudo xargs sed -i "s/font-src 'self' blob:/font-src 'self' blob: mshaugh.github.io/g"
    
  3. Restart the server sudo systemctl restart code-server@$USER

References:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment