Skip to content

Commit 4892dd0

Browse files
committed
Experiments with weird terminal behaviors
1 parent 3a25852 commit 4892dd0

File tree

3 files changed

+71
-61
lines changed

3 files changed

+71
-61
lines changed

home/sme/global/default.nix

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ in {
134134
# };
135135

136136
envExtra = ''
137-
export TERM=xterm-24bit
138137
export ZSH_AUTOSUGGEST_USE_ASYNC=true;
139138
'';
140139
# alias assume="source ${pkgs.granted}/bin/.assume-wrapped"
@@ -229,59 +228,60 @@ in {
229228
# lla = "eza -la";
230229
};
231230

232-
programs.tmux = {
233-
enable = true;
234-
shortcut = "j";
235-
baseIndex = 1;
236-
# Stop tmux+escape printing nonsense
237-
# https://github.com/tmux-plugins/tmux-sensible/issues/61
238-
escapeTime = 1;
239-
mouse = true;
240-
keyMode = "vi";
231+
# programs.tmux = {
232+
# enable = true;
233+
# shortcut = "j";
234+
# baseIndex = 1;
235+
# # Stop tmux+escape printing nonsense
236+
# # https://github.com/tmux-plugins/tmux-sensible/issues/61
237+
# escapeTime = 1;
238+
# mouse = true;
239+
# keyMode = "vi";
241240

242-
newSession = false;
243-
# Force tmux to use /tmp for sockets (WSL2 compat)
244-
secureSocket = false;
245-
clock24 = true;
246-
plugins = with pkgs.tmuxPlugins; [
247-
# First plugins that adjust the right status bar
248-
{
249-
plugin = tmux-tokyo-night;
250-
extraConfig = ''
251-
set -g @theme_plugin_datetime_format '%b %d %H:%M'
252-
set -g @theme_left_separator ''
253-
set -g @theme_right_separator ''
254-
'';
255-
}
256-
# Then resurrect and continuum pair
257-
{
258-
plugin = resurrect;
259-
extraConfig = ''
260-
set -g @resurrect-capture-pane-contents 'on'
261-
'';
262-
}
263-
{
264-
plugin = continuum;
265-
extraConfig = ''
266-
set -g @continuum-restore 'on'
267-
set -g @continuum-boot 'on'
268-
set -g @continuum-save-interval '15' # minutes
269-
'';
270-
}
271-
sensible
272-
better-mouse-mode
273-
extrakto # prefix + tab
274-
fzf-tmux-url # prefix + u
275-
pain-control # sensible splits and movement
276-
tmux-thumbs # prefix + space
277-
# TODO: add TMUX_FZF_MENU= for custom menu using extraConfig, for assume and pass
278-
# https://github.com/sainnhe/tmux-fzf#user-menu
279-
tmux-fzf
280-
yank
281-
];
241+
# newSession = false;
242+
# # Force tmux to use /tmp for sockets (WSL2 compat)
243+
# secureSocket = false;
244+
# terminal = "tmux-256color";
245+
# clock24 = true;
246+
# # plugins = with pkgs.tmuxPlugins; [
247+
# # # First plugins that adjust the right status bar
248+
# # # {
249+
# # # plugin = tmux-tokyo-night;
250+
# # # extraConfig = ''
251+
# # # set -g @theme_plugin_datetime_format '%b %d %H:%M'
252+
# # # set -g @theme_left_separator ''
253+
# # # set -g @theme_right_separator ''
254+
# # # '';
255+
# # # }
256+
# # # Then resurrect and continuum pair
257+
# # # {
258+
# # # plugin = resurrect;
259+
# # # extraConfig = ''
260+
# # # set -g @resurrect-capture-pane-contents 'on'
261+
# # # '';
262+
# # # }
263+
# # # {
264+
# # # plugin = continuum;
265+
# # # extraConfig = ''
266+
# # # set -g @continuum-restore 'on'
267+
# # # set -g @continuum-boot 'on'
268+
# # # set -g @continuum-save-interval '15' # minutes
269+
# # # '';
270+
# # # }
271+
# # # sensible
272+
# # better-mouse-mode
273+
# # extrakto # prefix + tab
274+
# # fzf-tmux-url # prefix + u
275+
# # pain-control # sensible splits and movement
276+
# # tmux-thumbs # prefix + space
277+
# # # TODO: add TMUX_FZF_MENU= for custom menu using extraConfig, for assume and pass
278+
# # # https://github.com/sainnhe/tmux-fzf#user-menu
279+
# # tmux-fzf
280+
# # yank
281+
# # ];
282282

283-
extraConfig = builtins.readFile ./includes/tmux.conf;
284-
};
283+
# extraConfig = builtins.readFile ./includes/tmux.conf;
284+
# };
285285

286286
home.file.".gemrc".text = "gem: --no-ri --no-rdoc";
287287
home.file.".p10k.zsh".source = ./includes/p10k.zsh;

home/sme/global/includes/tmux.conf

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,20 @@
22
# https://old.reddit.com/r/tmux/comments/mesrci/tmux_2_doesnt_seem_to_use_256_colors/
33
# https://github.com/syl20bnr/spacemacs/wiki/Terminal
44

5-
if -b 'test $TERM = xterm-24bit' 'set -g default-terminal "xterm-24bit"' 'set -g default-terminal "xterm-256color"'
6-
if -b 'test $TERM = xterm-24bit' 'set -g terminal-overrides ",xterm-24bit:Tc"' 'set -ga terminal-overrides ",*256col*:Tc"'
7-
if -b 'test $TERM = xterm-24bit' 'set -ga terminal-overrides "*:Ss=\E[%p1%d q:Se=\E[ q"'
8-
if -b 'test $TERM = xterm-24bit' 'set-environment -g COLORTERM "truecolor"'
5+
# if -b 'test $TERM = xterm-24bit' 'set -g default-terminal "xterm-24bit"' 'set -g default-terminal "xterm-256color"'
6+
# if -b 'test $TERM = xterm-24bit' 'set -g terminal-overrides ",xterm-24bit:Tc"' 'set -ga terminal-overrides ",*256col*:Tc"'
7+
# if -b 'test $TERM = xterm-24bit' 'set -ga terminal-overrides "*:Ss=\E[%p1%d q:Se=\E[ q"'
8+
# if -b 'test $TERM = xterm-24bit' 'set-environment -g COLORTERM "truecolor"'
9+
10+
if -b 'test $TERM = xterm-256color' 'set -g default-terminal "tmux-256color"'
11+
if -b 'test $TERM = xterm-256color' 'set -sg terminal-overrides ",*:RGB"'
12+
13+
# https://github.com/fabioluciano/tmux-tokyo-night
14+
# not yet packaged in nixpkgs
15+
# set -g @plugin 'fabioluciano/tmux-tokyo-night'
16+
# set -g @theme_plugin_datetime_format '%b %d %H:%M'
17+
# set -g @theme_left_separator ''
18+
# set -g @theme_right_separator ''
919

1020
# Set titles
1121
set-option -g set-titles on

hosts/galvatron-wsl/configuration.nix

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@
180180

181181
# Mainly for Emacs 28
182182
# https://github.com/emacs-mirror/emacs/blob/master/etc/NEWS.28#L179-L183
183-
COLORTERM = "truecolor";
183+
# COLORTERM = "truecolor";
184184

185185
# BAT_THEME = "base16-256";
186186

@@ -210,6 +210,9 @@
210210
# doom
211211
doom = "~/.config/emacs/bin/doom";
212212

213+
# git
214+
gst = "git status";
215+
213216
# kube
214217
k = "kubectl";
215218
kx = "kubectx";
@@ -227,10 +230,7 @@
227230
# running the command: tic -x -o ~/.terminfo xterm-24bit.terminfo
228231
# no idea yet how to integrate this into nixos
229232
# https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/mtm/default.nix#L24
230-
export TERM=xterm-24bit
231-
232-
# maybe if ssh breaks
233-
# alias ssh="TERM=xterm-256color ssh"
233+
# export TERM=xterm-24bit
234234
235235
# remove agents arg if using only gpg
236236
# BE06ADB38C7F719D must exist, not managing gpg setup with nix yet

0 commit comments

Comments
 (0)