Skip to content

Instantly share code, notes, and snippets.

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)
@gandalf3
gandalf3 / 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', () => {
@gandalf3
gandalf3 / 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
@gandalf3
gandalf3 / 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
@gandalf3
gandalf3 / 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"
@gandalf3
gandalf3 / SE_kbd_script.user.js
Created March 30, 2018 20:45
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
@gandalf3
gandalf3 / rofi_help_output
Created May 27, 2017 22:32
Rofi config for bug report
rofi usage:
rofi [-options ...]
Command line only options:
-no-config Do not load configuration, use default values.
-v,-version Print the version number and exit.
-dmenu Start in dmenu mode.
-display [string] X server to contact.
${DISPLAY}
-h,-help This help message.
@gandalf3
gandalf3 / uncertain_redirects
Last active November 24, 2015 01:09
Blender wiki -> manual redirect list
# This file contains auto-detected incorrect matches, in the format of
#
# Doc:2.6/wiki/url
# /possible/manual/url/number1 path_similarity file_similarity
# /possible/manual/url/number2 path_similarity file_similarity
# /possible/manual/url/number3 path_similarity file_similarity
# /possible/manual/url/number4 path_similarity file_similarity
# /possible/manual/url/number5 path_similarity file_similarity