fix terminal titles

This commit is contained in:
Sean Buckley 2024-06-22 13:12:18 -04:00
parent a50b4b1f79
commit 0be59680b4
2 changed files with 4 additions and 1 deletions

View file

@ -125,6 +125,7 @@
set -g history-limit 10000 set -g history-limit 10000
set -g pane-base-index 1 set -g pane-base-index 1
set -g renumber-windows on set -g renumber-windows on
set -g set-titles on
set -sa terminal-overrides ",*256color:Tc" set -sa terminal-overrides ",*256color:Tc"
# escape-time reduces the time where the escape key acts as an alt key # escape-time reduces the time where the escape key acts as an alt key
set -s escape-time 1 set -s escape-time 1

View file

@ -30,6 +30,8 @@ let
"-jobs $(jobs -pr | wc -l)" "-jobs $(jobs -pr | wc -l)"
]; ];
termtitle = ''\[\e]0;\u@\h: \w\a\]'';
in in
{ {
environment.systemPackages = [ environment.systemPackages = [
@ -48,7 +50,7 @@ in
local remote=y local remote=y
[ "$XDG_SESSION_TYPE" = "x11" ] && unset remote [ "$XDG_SESSION_TYPE" = "x11" ] && unset remote
[ "$XDG_SESSION_TYPE" = "wayland" ] && unset remote [ "$XDG_SESSION_TYPE" = "wayland" ] && unset remote
PS1="$(powerline-go ${toString args})" PS1="${termtitle}$(powerline-go ${toString args})"
} }
[ "$TERM" = "linux" ] || PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND" [ "$TERM" = "linux" ] || PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
''; '';