Created
January 29, 2025 23:13
-
-
Save ormaaj/00e9983192e28315d346c028542a89f8 to your computer and use it in GitHub Desktop.
tmux panes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%hidden trace='strace -DDYYyqqqf' | |
%hidden el=/usr/bin/execlineb | |
%hidden bashargs='-sipo vi +o posix +o histexpand -O lastpipe -O extglob -O expand_aliases +O array_expand_once +O sourcepath' | |
%hidden kshargs='-sipo vi -o posix' | |
%hidden shexec='import os, os.path, sys, pwd; \ | |
os.sched_setscheduler(0, os.SCHED_OTHER, os.sched_param(0)); \ | |
os.nice(-os.getpriority(os.PRIO_PROCESS, 0)); \ | |
os.environ.setdefault("TMPDIR", "/tmp"); \ | |
os.environ.setdefault("BASH_COMPAT", "51"); \ | |
p = { k: str(v) for k, v in zip(("USER", None, "UID", "GID", None, "HOME", "SHELL"), pwd.getpwuid(os.geteuid())) if k }; \ | |
os.execve(p["SHELL"], (lambda sh: [sh, *(sh == "bash" and sys.argv[1:] or [])])(os.path.basename(os.path.realpath(p["SHELL"]))), { **os.environ, **p })' | |
set -g default-shell $el | |
set -g default-command "bash $bashargs" | |
run-shell -C "bind -T prefix c new-window -- python -c \$shexec $bashargs" | |
run-shell -C "bind -T prefix '\"' split-window -v -- python -c \$shexec $bashargs" | |
run-shell -C "bind -T prefix % split-window -h -- python -c \$shexec $bashargs" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment