https://gitlab.com/warningnonpotablewater/libinput-config
Clone the repo above.
git clone https://gitlab.com/warningnonpotablewater/libinput-config.git
https://gitlab.com/warningnonpotablewater/libinput-config
Clone the repo above.
git clone https://gitlab.com/warningnonpotablewater/libinput-config.git
Directories with 777
permissions look pretty ugly when you list files (see first example in picture below).
This happens if you do ls
in /mnt/c/
in WSL.
Simply changing the background to light gray makes a big difference. While I was fiddling around I discovered that I quite like having directories to be orange.
You can change this by simply adding the following line to your .bashrc
/.zshrc
/etc. Make sure to put it before the line
source $ZSH/oh-my-zsh.sh
, otherwise the autocompletion will use the default colors. source
Is your zsh
really slow when you go to a git repository in /mnt/c/
even though you don't have the git
plugin enabled?
It's probably because you use a oh my zsh
theme that has the git info in it.
A popular theme is robbyrussel
which has the git integration built in.
In ~/.oh-my-zsh/themes/robbyrussell.zsh-theme
you will find the following line:
PROMPT+=' $(git_prompt_info)'
My usecase for Expect is to automatically log in to a device over telnet, so that I don't have to write the password every time.
The easiest way is to simply run the expect script from WSL, but I'm lazy and want to run it directly from PowerShell. Here's how:
~/script.expect
(remember to make it executable)# Copy last command to clipboard | |
function cl() { | |
$last_command = (Get-History -Count 1).CommandLine | |
Set-Clipboard -Value $last_command | |
} | |
# Copy absolute path of a file or folder to clipboard | |
function cap($path) { | |
Set-Clipboard -Value (Resolve-Path $path) | |
} |
I use Darkreader to give any website a dark mode, which I highly recommend. Even with this plugin, there are breif moments when opening links, that the browser displays an entirely white screen. Thankfully, this can be mitigated!
toolkit.legacyUserProfileCustomizations.stylesheets
in about:config
/chrome/
, in your Firefox profile folderabout:support
C:\Users\<user>\AppData\Roaming\Mozilla\Firefox\Profiles\<profile>.default-release\chrome\userChrome.css
.css
files.GitHub supports Mermaid diagrams and renders them directly in Markdown files.
They aren't rendered in the preview tab, so it's best to design them else-where. With mermaid.live, for instance.
Here's a basic example of the syntax and the resulting diagram:
Some websites hijack the scrollwheel in order to implement smooth scrolling and other annoying stuff. The following javascript snippet can disable such features.
Create a bookmark, and add the javascript code to the address part of the bookmark. When you stumble upon a hijacking website, you simply click on the bookmark.
You can also use extensions like tampermonkey to automate this process.
Source: https://superuser.com/a/1263145
EDIT: Ignore this. It doesn't seem to work all the time anyway. Disable hardware acceleration in chrome instead.
TL;DR: If your screen gets a green tint when playing full screen videos. Resetting the mouse cursor size to 1 fixes it. The script below does that automatically for you.
When I play videos in fullscreen, I get some strange strange green tint over the video. A quick googling told me that simply resetting the cursor size to it's standard size should fix this. link
This does indeed work, even though my cursor size is always the default. But it only works temporarily...
Digging into the accessibility menu every time it happens is annoying, so I needed a script of some form. Thankfully the Stackoverflow user @Jw C showed me how its done! link
# The bluetooth connection to my stereo started crackling after being connected for a while. | |
# Reconnecting to it solved the problem, but got annoying to do manually. | |
# | |
# Installation: | |
# 1. Get the following dependencies | |
# * blueutil - https://github.com/toy/blueutil | |
# * terminal-notifier (optional) - https://github.com/julienXX/terminal-notifier | |
# 2. Find the MAC address of the bluetooth device of interest using `blueutil` | |
# * `blueutil --paired` | |
# 3. Add the function to your .bashrc (or .zshrc, etc.) |