Skip to content

Instantly share code, notes, and snippets.

@serafeimgr
serafeimgr / alacritty-tmux-vim_truecolor.md
Created February 26, 2024 01:24 — forked from andersevenrud/alacritty-tmux-vim_truecolor.md
True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).

Testing colors

Running this script should look the same in tmux as without.

curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh
@serafeimgr
serafeimgr / set-tmux-title.sh
Created February 6, 2024 12:35 — forked from nevesnunes/set-tmux-title.sh
Set tmux pane title to short hostname on ssh connections
ssh() {
# grep -w: match command names such as "tmux-2.1" or "tmux: server"
if ps -p $$ -o ppid= \
| xargs -i ps -p {} -o comm= \
| grep -qw tmux; then
# Note: Options without parameter were hardcoded,
# in order to distinguish an option's parameter from the destination.
#
# s/[[:space:]]*\(\( | spaces before options
# \(-[46AaCfGgKkMNnqsTtVvXxYy]\)\| | option without parameter
@serafeimgr
serafeimgr / .vimrc
Created August 9, 2020 08:15 — forked from miguelgrinberg/.vimrc
My .vimrc configuration for working in Python with vim
" plugins
let need_to_install_plugins = 0
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
"autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
let need_to_install_plugins = 1
endif
call plug#begin()
@serafeimgr
serafeimgr / pihole-dnsmasq-cloudflared.conf
Created November 11, 2019 22:16 — forked from bendews/pihole-dnsmasq-cloudflared.conf
Ansible Playbook to set up PiHole with DNS-Over-HTTPS via cloudflared
server=127.0.0.1#5053
@serafeimgr
serafeimgr / jenkins-config.sh
Created October 4, 2019 09:45
jenkins-config.sh
#!/bin/bash
# Jenkins Configurations Directory
cd $JENKINS_HOME
# make sure we're in a git working directory
if [ ! -d .git ]; then
echo "error: there is no .git directory here. Make sure you're in the right place."
@serafeimgr
serafeimgr / upgrade_pip_packages.py
Created September 5, 2017 16:26
A python script to upgrade all outdated python packages.
"""
This script upgrades all outdated python packages.
"""
__author__ = "serafeimgr"
from multiprocessing import Pool, cpu_count
from subprocess import PIPE, Popen
def run_command(command):