Skip to content

Instantly share code, notes, and snippets.

View TauPan's full-sized avatar
🏠
Working from home

Friedrich Delgado TauPan

🏠
Working from home
View GitHub Profile
@TauPan
TauPan / config.py
Last active February 7, 2024 20:31
My current qtile config
# -*- coding: utf-8 -*-
import distutils.spawn
import os
import re
import socket
import subprocess
import xcffib.xproto
from libqtile import layout, bar, widget, hook
from libqtile.command import lazy
@TauPan
TauPan / weechat-light-terminal.conf
Created April 25, 2018 07:50
All my colour settings for a light (not white) terminal in weechat. I simply filtered my fset buffer with "color"
# Comma separated list of channels
/set colorize_nicks.look.blacklist_channels ""
# Comma separated list of nicks
/set colorize_nicks.look.blacklist_nicks "so,root"
# Whether to colorize input
/set colorize_nicks.look.colorize_input off
# If off, then use lazy matching instead
@TauPan
TauPan / fonts-st.conf
Created January 30, 2021 19:41
Disable noto color emoji for st only
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- ~/.config/fontconfig/fonts-st.conf file for st only -->
<fontconfig>
<include>/etc/fonts/fonts.conf</include>
<selectfont>
<rejectfont>
<pattern>
<patelt name="family" >
<string>Noto Color Emoji</string>
@TauPan
TauPan / .mailcap snippet
Created January 11, 2016 10:55
Displaying and replying to ms-tnef / winmail.dat attachments from #outlook in #mutt
application/ms-tnef; tnefsmime %s; copiousoutput
@TauPan
TauPan / .Xdefaults-excerpt
Created December 23, 2021 09:16
My rofi config in ~/.Xdefaults
rofi.modi: combi,window,ssh,drun,run
rofi.combi-modi: window,ssh,drun,run
rofi.terminal: xdotool search stuff\|0fdf windowraise windowactivate
rofi.ssh-command: sh -c "{terminal}; tmux-ssh -n {host}"
rofi.run-shell-command: sh -c "{terminal}; tmux-select-or-new-window '{cmd}' '{cmd}'"
(setq weechat-timestamp-regex
"\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}\\)?[[:blank:]]?\\([0-9]\\{2\\}:[0-9]\\{2\\}:[0-9]\\{2\\}\\)")
(setq weechat-timestamp-prefix-regex
(format "^[[:blank:]]*%s"
weechat-timestamp-regex))
(setq weechat-info-line-regex
(format "%s[[:blank:]]+\\(<?-->?\\)[[:blank:]]+\\(.+\\)"
weechat-timestamp-prefix-regex))
(setq weechat-msg-line-regex
(format "%s[[:blank:]]+\\([^[:blank:]]+\\)[[:blank:]]+\\(.+\\)"
#!/usr/bin/env bash
name="$1"
shift
args="$*"
tmux-select-window-globally "$name" || tmux -2 new-window -n "$name" "$args"
# exit status 1 if window does not exist afterwards
sleep 0.1
tmux select-window -t "$name"
@TauPan
TauPan / shell loop
Created April 3, 2020 11:52
starting my window manager in ~/.xsession
while true
do
if [ -r $HOME/.tmpwm ]
then
sh $HOME/.tmpwm
else
# See https://bugs.archlinux.org/task/46374#comment139060
dbus-launch $HOME/bin/qtile > $HOME/.qtile-out.log 2> $HOME/.qtile-errors.log
fi
done
@TauPan
TauPan / functions.sh
Created October 4, 2019 07:45
Tell emacs about (ssh-related) environment variables from your shell, via emacsclient.
emacsclient_set_env_vars () {
for name in $@
do
emacsclient -e "(setenv \"$name\" \"$(eval echo \${${name}})\")"
done
}
ssh-copy-ssh-vars-to-emacs () {
emacsclient_set_env_vars $(env|grep SSH_|cut -f1 -d=)
}
@TauPan
TauPan / conftest.py
Last active July 18, 2018 13:31 — forked from asfaltboy/conftest.py
A pytest fixture to test Django data migrations
# based on https://gist.github.com/asfaltboy/b3e6f9b5d95af8ba2cc46f2ba6eae5e2
# based on https://gist.github.com/blueyed/4fb0a807104551f103e6
from django.db import connection
from django.db.migrations.executor import MigrationExecutor
from django.core.management import call_command
import pytest