Last active
February 25, 2026 01:44
-
-
Save unlomtrois/db99e6adb72615186780ccc2f87284ae to your computer and use it in GitHub Desktop.
nix-shell indicator in tmux
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
| # ... | |
| set -g status-left "[#S]#{?@nix-shell,#[fg=blue] nix}" |
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
| # ... | |
| # Update tmux pane option to reflect nix-shell status | |
| if [[ -n "$TMUX" ]]; then | |
| _update_tmux_nix_indicator() { | |
| if [[ -n "$IN_NIX_SHELL" ]]; then | |
| tmux set-option -qp @nix-shell "1" | |
| else | |
| tmux set-option -qp @nix-shell "" | |
| fi | |
| } | |
| precmd_functions+=(_update_tmux_nix_indicator) | |
| fi |
Author
unlomtrois
commented
Feb 25, 2026
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment