Skip to content

Instantly share code, notes, and snippets.

@yetone
yetone / macos-tmux-256color.md
Created January 9, 2022 17:27 — forked from bbqtd/macos-tmux-256color.md
Installing tmux-256color for macOS

Installing tmux-256color for macOS

  • macOS 10.15.5
  • tmux 3.1b

macOS has ncurses version 5.7 which does not ship the terminfo description for tmux. There're two ways that can help you to solve this problem.

The Fast Blazing Solution

Instead of tmux-256color, use screen-256color which comes with system. Place this command into ~/.tmux.conf or ~/.config/tmux/tmux.conf(for version 3.1 and later):

{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
@yetone
yetone / cloudSettings
Last active July 8, 2021 07:11
vscode-settings-public
{"lastUpload":"2020-05-13T10:46:00.823Z","extensionVersion":"v3.4.3"}
@yetone
yetone / gist:7a7bac261f96657aeef5fd98be50b5ff
Created November 15, 2019 14:34 — forked from pfreixes/gist:3187511
Supervisorctl bash autocomplete
# pfreixes, 2012-07-27
# Add to /etc/bash_completion.d/supervisorctl
_supervisor()
{
local cur prev opts base
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
from threading import RLock
from typing import Dict
class _RLockWrapper:
def __init__(self):
self.lock = RLock()
self.count = 0
def acquire(self, blocking: bool = ..., timeout: float = ...) -> bool:
" Selected Intellimacs modules
source ~/.intellimacs/spacemacs.vim
source ~/.intellimacs/extra.vim
source ~/.intellimacs/major.vim
source ~/.intellimacs/hybrid.vim
" My own vim commands
nnoremap Y y$
" Comma for major mode
{
"Ansi 4 Color" : {
"Red Component" : 0.34117650985717773,
"Color Space" : "sRGB",
"Blue Component" : 0.99999994039535522,
"Alpha Component" : 1,
"Green Component" : 0.78039222955703735
},
"Tags" : [
__cursor_pos () {
local pos
exec {tty}<>/dev/tty
echo -n '\e[6n' >&$tty; read -rsdR pos <&$tty
exec {tty}>&-
[[ $pos =~ '([0-9]+);([0-9]+)$' ]]
print $match[1] $match[2]
}
__calc_height () {
@yetone
yetone / karabiner.json
Last active September 6, 2021 05:02
Karabiner 通过 left shift 来切换中英文
{
"description": "Switch between zh-Hans <-> en (left_shift)",
"manipulators": [
{
"conditions": [
{
"input_sources": [
{
"language": "en"
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.0</real>