Skip to content

Instantly share code, notes, and snippets.

@zvakanaka
zvakanaka / md-link.lua
Created November 6, 2024 15:53
Markdown link from link
@zvakanaka
zvakanaka / script.js
Created October 4, 2024 06:53
Untitled
console.clear()
const j = getVil() // JSON.parse(require('fs').readFileSync('./peterxjang-crkbd-3x5_3.vil'))
const getMaxLength = (acc, cur) => {if (cur.length > acc) return cur.length;return acc;}
const maxKcLength = j.layout.flat().flat().reduce(getMaxLength,0)
const nRows = 3
const nCols = 6
const nThumbKeys = 3
const nThumbKeysStickingOut = 1
const layers = j.layout
@zvakanaka
zvakanaka / .vimrc
Last active September 10, 2024 19:00
" vertical bar as cursor in insert mode
let &t_SI = "\e[6 q"
let &t_EI = "\e[2 q"
" allow mouse
set mouse=a
" sync copy/paste with system clipboard (may need unnamedplus on Linux)
set clipboard+=unnamed
// ==UserScript==
// @name Youtube Show Likes Percentage
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Show likes/views percentage in search results.
// @author Adam Q.
// @match https://www.youtube.com/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant GM_xmlhttpRequest
// ==/UserScript==
Action Shortcut
about
arrange-items-menu
back Alt+Left
back-alt BackSpace
bookmarks-menu
cancel-search Escape
clear-directory-specific-settings
close-all-windows Ctrl+Shift+w

Fedora Sericea Setup

First things first, the default font is not intended for the swaybar config that comes with Sericea.

Install a Custom Font

Download a font (e.g. JetBrains Mono) from NerdFonts and extract to .local/share/fonts.

Terminal Config

The default terminal is foot, which can be customized by adding $HOME/.config/foot/foot.ini.

Sample foot config:

#!/bin/bash
# this is an updated fork
# <xbar.title>Octoprint</xbar.title>
# <xbar.author>m0a</xbar.author>
# <xbar.author.github>m0a</xbar.author.github>
# <xbar.version>v1.1</xbar.version>
# <xbar.desc>3dprinter control with octoprint api</xbar.desc>
# <xbar.image>http://i.imgur.com/biN2ISe.png</xbar.image>
# <xbar.dependencies></xbar.dependencies>
@zvakanaka
zvakanaka / scan.sh
Created August 21, 2023 03:34
Scan auto script with comments... delete this after updating repo
#!/bin/bash
INITIAL_COUNTER=0
function init_counter() {
for file in *; do
if [ -f "$file" ]; then
pattern='([[:digit:]]+)'
[[ "$file" =~ $pattern ]]
if [ $((BASH_REMATCH[0])) -gt $((INITIAL_COUNTER)) ]; then
Button Hex
Power BD807F
Up-Cup BD0AF5
Down-Cup BD8A75
Previous BD1AE5
Next BDEA15
Play/pause BDFA05
Source BD20DF
Up BDD02F