Skip to content

Instantly share code, notes, and snippets.

@kitt-cat
kitt-cat / editor-uri-scheme.md
Created October 11, 2025 10:30
editor URI scheme

editor:// URI scheme (draft)

this is a proposal for a uri scheme based on the [file uri scheme described in rfc8089][file-uri], but with an extension for targeting a line and column or range.

examples

what does this scheme look like?

link to line 22

@kitt-cat
kitt-cat / PKGBUILD
Last active July 21, 2025 22:48
tilemap-studio with bundled fltk
# Maintainer: Hyperdriveguy <hyperdriveguy@gmail.com>
pkgname=tilemap-studio
pkgver=4.0.1
pkgrel=1
pkgdesc="A tilemap editor for Game Boy, GBC, GBA, or SNES projects."
arch=('x86_64')
url='https://github.com/Rangi42/tilemap-studio'
license=('LGPL')
makedepends=('git' 'make' 'gcc')
source=("${pkgname}"::'git+https://github.com/Rangi42/tilemap-studio.git'
pkgname=hdrop
pkgver=0.4.2
pkgrel=1
epoch=1
pkgdesc="Emulate 'tdrop' (dropdown windows) in Hyprland"
arch=(i686 x86_64)
url="https://github.com/Schweber/hdrop"
license=('AGPL-3.0-or-later')
depends=(bash jq)
makedepends=(scdoc)
@kitt-cat
kitt-cat / darkreader_flicker.html
Created May 10, 2023 00:40
minimal example showing color scheme flicker behavior in dark reader
<!DOCTYPE html>
<html>
<head>
<title>Darkreader Flicker</title>
</head>
<body>
<input type="button" value="insert light-mode iframe">
<script>
const button = document.querySelector('input');
button.addEventListener('click', () => {
@kitt-cat
kitt-cat / PKGBUILD
Created April 22, 2023 06:51
wxwidgets-gtk without egl support
# this is a version of wxwidgets-gtk built with egl support disabled
# to help debug this issue with slade:
# https://github.com/sirjuddington/SLADE/issues/1390
# modified from the official PKGBUILD:
# https://github.com/archlinux/svntogit-packages/blob/packages/wxwidgets/trunk/PKGBUILD
pkgname=wxwidgets-gtk3-no-egl-debug
pkgver=3.2.2.1
pkgrel=1
@kitt-cat
kitt-cat / minimal_popup.py
Created August 3, 2022 08:55
Minimal demo of a working passive keyboard grab in X11 from a kitten for kitty terminal emulator
#!/usr/bin/env python3
import os
import sys
from Xlib import X
from typing import List
from kitty.constants import is_macos
# Installation: place minimal_popup.py in your ~/.config/kitty
#!/usr/bin/zsh
# Adjust the panning of applications based on window position.. Enjoy <3
# Very hacky, no guarantees it wont hurt your ears so be careful!
#
# Requires:
# pulseaudio (or pipewire)
# xdotool
# awk
# use this to move where the "center" is, useful for multi-monitor setups
#!/usr/bin/python
import array
from ola.ClientWrapper import ClientWrapper
def DmxSent(state):
wrapper.Stop()
universe = 0
@kitt-cat
kitt-cat / set_active_window_volume.sh
Last active August 22, 2018 08:32
A little script to control volume for the active window
#!/usr/bin/bash
# simple script to set the volume of pulseaudio sinks for the currently focused window
# takes a single argument which is passed to pactl to set the volume; [+-]n% to adjust by n% up or down, respectively
# from https://superuser.com/a/784102/319302
pidtree() (
[ -n "$ZSH_VERSION" ] && setopt shwordsplit
declare -A CHILDS
while read P PP;do
CHILDS[$PP]+=" $P"
@kitt-cat
kitt-cat / SE_kbd_script.user.js
Last active August 8, 2024 13:25
kbd formatting button for stackexchange
// ==UserScript==
// @name kbd formatting button for stackexchange
// @namespace http://blender.org
// @include *.stackexchange.com/*
// @include http://stackoverflow.com/*
// @include http://askubuntu.com/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @version 7
// @grant GM_getValue
// @grant GM_setValue