Skip to content

Instantly share code, notes, and snippets.

@Nervengift
Nervengift / snd-dmenu
Last active May 18, 2016 21:06
dmenu/rofi menu for Entropia's sound board
#!/usr/bin/bash
# use sound effects at Entropia via a dmenu
# run "snd update" to load and update the local cache of available sounds
#
# by Nervengift
[[ "x$XDG_CACHE_HOME" == "x" ]] && CACHEDIR="$HOME/.cache" || CACHEDIR="$XDG_CACHE_HOME"
[[ "x$1" == "xupdate" ]] && ssh [email protected] bash -c \'find /home/entropia/clubautomation/snd -type f -printf \"%P\\n\" \' | tee $CACHEDIR/snd_dmenu
@Nervengift
Nervengift / notmuch-notify.py
Created October 29, 2017 22:43
notification script for notmuch/afew
#!/usr/bin/env python3
# Send notifications for all mails with the "notify" tag via notify-send
#
# This is best used in combination with afew. To notify for all new messages just add
# the following filter to your ~/.config/afew/config just before [InboxFilter]:
#
# [Filter.0]
# message = notify
# query = tag:new AND NOT tag:killed AND NOT tag:spam
@Nervengift
Nervengift / ice-status.sh
Last active December 5, 2021 20:16
statusline for German high speed trains (ICE)
#!/bin/bash
set -e
tripInfo=$(curl -s https://iceportal.de/api1/rs/tripInfo/trip|jq '.trip')
status=$(curl -s https://iceportal.de/api1/rs/status)
next=$(echo $tripInfo|jq '.stopInfo.actualNext as $next|.stops[]|select(.station.evaNr == $next)')
if [ -z "$next" ]; then
echo "Endstation"
exit 0
fi
@Nervengift
Nervengift / apa102.js
Created March 23, 2019 10:34
apa102 LED driver for neonious one
// polyfill for Array.prototype.fill
if (!Array.prototype.fill) {
Object.defineProperty(Array.prototype, 'fill', {
value: function(value) {
if (this == null) {
throw new TypeError('this is null or not defined');
}
var O = Object(this);
@Nervengift
Nervengift / 50-wacom.conf
Last active May 1, 2019 17:03
Enable native libinput gestures for wacom displays (tested with Thinkpad X230t). Copy to /etc/X11/xorg.conf.d/50-wacom.conf
Section "InputClass"
Identifier "Wacom touch options"
MatchDriver "wacom"
MatchProduct "Finger"
Option "Gesture" "off"
EndSection
@Nervengift
Nervengift / 30-touchpad.conf
Created May 1, 2019 17:09
/etc/X11/xorg.conf.d/30-touchpad.conf
Section "InputClass"
Identifier "touchpad"
Driver "libinput"
MatchIsTouchpad "on"
Option "NaturalScrolling" "true"
Option "ClickMethod" "clickfinger"
Option "Tapping" "on"
EndSection