Wiki

Introduction

This is a living document that will expand alongside my own personal experiences and knowledge. Topics range from device settings, computer configurations, household product serial numbers / expiry dates, and so on. Hopefully this can end up being helpful to others as well.

Void Suck

Lightweight Desktop installer for Void Linux based on the suckless philosophy. Includes my own custom set of suckless tools (dwm, slstatus, dmenu, etc.)

Alpine Suck

Lightweight Desktop installer for Alpine Linux based on the suckless philosophy. Includes my own custom set of suckless tools (dwm, slstatus, dmenu, etc.)

Alpine Linux (Wayland)

The most up-to-date settings (along with a handy installer) can be found here: https://git.sr.ht/~bt/alpine-linux-setup.

vimrc

" Don't try to be vi compatible
set nocompatible

" Helps force plugins to load correctly when it is turned back on below
filetype off

" TODO: Load plugins here (pathogen or vundle)

" Turn on syntax highlighting
syntax on

" For plugins to load correctly
filetype plugin indent on

" TODO: Pick a leader key
" let mapleader = ","

" Security
set modelines=0

" Show line numbers
set number

" Show file stats
set ruler

" Blink cursor on error instead of beeping (grr)
set visualbell

" Encoding
set encoding=utf-8

" Whitespace
set wrap
set textwidth=79
set formatoptions=tcqrn1
set tabstop=2
set shiftwidth=2
set softtabstop=2
set expandtab
set noshiftround

" Cursor motion
set scrolloff=3
set backspace=indent,eol,start
set matchpairs+=<:> " use % to jump between pairs
runtime! macros/matchit.vim

" Move up/down editor lines
nnoremap j gj
nnoremap k gk

" Allow hidden buffers
set hidden

" Rendering
set ttyfast

" Status bar
set laststatus=2

" Last line
set showmode
set showcmd

" Searching
nnoremap / /\v
vnoremap / /\v
set hlsearch
set incsearch
set ignorecase
set smartcase
set showmatch
map <leader><space> :let @/=''<cr> " clear search

" Remap help key.
inoremap <F1> <ESC>:set invfullscreen<CR>a
nnoremap <F1> :set invfullscreen<CR>
vnoremap <F1> :set invfullscreen<CR>

" Textmate holdouts

" Formatting
map <leader>q gqip

" Visualize tabs and newlines
set listchars=tab:▸\ ,eol:¬
" Uncomment this to enable by default:
" set list " To enable by default
" Or use your leader key + l to toggle on/off
map <leader>l :set list!<CR> " Toggle tabs and EOL

" Color scheme (terminal)
set t_Co=256
set background=dark
let g:solarized_termcolors=256
let g:solarized_termtrans=1
" put https://raw.github.com/altercation/vim-colors-solarized/master/colors/solarized.vim
" in ~/.vim/colors/ and uncomment:
" colorscheme solarized

.zshrc extras / aliases

export EDITOR="/bin/vim"

alias suck="sudo rm -rf config.h ; sudo make install"
alias fixmonitor="xrandr --auto --output eDP1 --mode 1366x768 --below DP2-2"

mimeapps.list

Place this file under /usr/share/applications/mimeapps.list

[Default Applications]
x-scheme-handler/http=firefox.desktop
x-scheme-handler/https=firefox.desktop
x-scheme-handler/ftp=firefox.desktop
x-scheme-handler/chrome=firefox.desktop
text/html=firefox.desktop
application/x-extension-htm=firefox.desktop
application/x-extension-html=firefox.desktop
application/x-extension-shtml=firefox.desktop
application/xhtml+xml=firefox.desktop
application/x-extension-xhtml=firefox.desktop
application/x-extension-xht=firefox.desktop
image/jpeg=feh
image/png=feh
image/webp=feh

qutebrowser

Greasemonkey

All of these scripts should be added under ~/.local/share/qutebrowser/greasemonkey/. Then be sure to run the proper command within qutebrowser: :greasemonkey-reload

Auto Skip YouTube Ads

// ==UserScript==
// @name         Auto Skip YouTube Ads 
// @version      1.0.0
// @description  Speed up and skip YouTube ads automatically 
// @author       jso8910
// @match        *://*.youtube.com/*
// @exclude      *://*.youtube.com/subscribe_embed?*
// ==/UserScript==
setInterval(() => {
    const btn = document.querySelector('.videoAdUiSkipButton,.ytp-ad-skip-button')
    if (btn) {
        btn.click()
    }
    const ad = [...document.querySelectorAll('.ad-showing')][0];
    if (ad) {
        document.querySelector('video').playbackRate = 10;
    }
}, 50)

ffmpeg to MP4

ffmpeg -i input_filename.avi -c:v copy -c:a copy -y output_filename.mp4

Mount USB HDD via CLI

mkdir /media/usb-drive
mount /dev/sdX /media/usb-drive/

Run OpenVPN via CLI on Alpine Linux (PIA)

# Possibly run if reporting errors
sudo modprobe tun

# Install / configure everything
apk add openvpn
wget https://www.privateinternetaccess.com/openvpn/openvpn.zip
sudo unzip openvpn.zip -d /etc/openvpn/pia
sudo vim /etc/openvpn/pia/.secret

Add your credentials inside .secret:

USERNAME
PASSWORD

Save and exit and then:

#Change permissions to be readable only by root
sudo chmod 700 /etc/openvpn/pia/.secret

# Run OpenVPN
sudo openvpn --config /etc/openvpn/pia/FILENAME.ovpn --auth-user-pass /etc/openvpn/pia/.secret

Fix screen tearing

sudo micro /etc/X11/xorg.conf.d/20-intel.conf

Add the following contents to 20-intel.conf:

Section "OutputClass"
    Identifier  "Intel Graphics"
    MatchDriver "i915"
    Driver      "intel"
    Option      "DRI"       "3"
    Option      "TearFree"  "1"
EndSection

Enabling "tap to click"

sudo micro /etc/X11/xorg.conf.d/30-touchpad.conf

Add the following contents to 30-touchpad.conf:

Section "InputClass"
    Identifier "touchpad"
    Driver "libinput"
    MatchIsTouchpad "on"
    Option "Tapping" "on"
    Option "TappingButtonMap" "lmr"
EndSection