Untrack/Remove git files

If you accidentally committed files on git because you didn’t have a .gitignore file or you just updated it, you can untrack files with: git rm --cached <file> or if you have several files: git rm --cached `git ls-files -i -c --exclude-from=.gitignore`

April 15, 2024 · 1 min · Elvin Guti

Configure Touchpad options on Xorg after installing i3wm

If you just installed i3 on a laptop and for some reason you can’t tap or the scrolling behavior doesn’t like you, you can update how the touchpad behaves using a xorg config file. In my case the scrolling behaviour wasn’t the one I like, so I modified the NaturalScrolling property. ## /etc/X11/xorg.conf.d/30-touchpad.conf Section "InputClass" Identifier "touchpad" Driver "libinput" MatchIsTouchpad "on" Option "Tapping" "on" Option "NaturalScrolling" "true" EndSection You can see all the available options....

April 13, 2024 · 1 min · Elvin Guti

How to setup multiple ssh keys for different github repos

Create key and add it to github Create ssh key: ssh-keygen -t ed25519 -C "your_email@example.com" Add your key to agent: ssh-add ~/.ssh/elvinguti_key Add key to github. Update config Update ~/.ssh/config: Host github.com HostName github.com IdentityFile ~/.ssh/my_work_key IdentitiesOnly yes Host elvinguti.github.com HostName github.com User elvinguti IdentityFile ~/.ssh/elvinguti_key IdentitiesOnly yes you might need to restart the ssh-agent: eval $(ssh-agent -s) Then you should be able to clone a repo or update the git remote url:...

April 12, 2024 · 1 min · Elvin Guti

Passing environment variables to GUI apps on i3wm

I started using i3 as my window manager, and at some point started having some issues with env variables on GUI apps. This is because we usually add env variables to the shell config file, in my case the .zshrc file, however, .zshrc will set the env variables only in your shell and not all the apps. So, when setting up a project using git with ssh and a passphrase as authentication (and after doing all the setup for the gnome keyring) I realized that my VSCode wasn’t actually using the keyring and was asking for the ssh passphrase always, however, this wasn’t happening on my shell....

April 12, 2024 · 1 min · Elvin Guti