Skip to main content

Overview

The left icon appears on the far left of your tmux status bar. It can display static text, your hostname, the current session name, or any tmux format variable.

Basic usage

Set the left icon to any static text or tmux format variable:
@dracula-show-left-icon
string
The content to display in the left icon. Can be static text or tmux format variables.Supports any tmux format variable for dynamic content.
# Static text
set -g @dracula-show-left-icon "tmux"

# Show hostname
set -g @dracula-show-left-icon "#h"

# Show session name
set -g @dracula-show-left-icon "#S"

Tmux format variables

You can use any tmux format variable in the left icon. Here are the most commonly used ones:
#H
format
Hostname of local host (fully qualified domain name).Example: mycomputer.local
#h
format
Hostname of local host without domain name.Example: mycomputer
#S
format
Name of the current tmux session.Example: main, work, devTip: Use tmux rename-session (or create an alias like alias trs='tmux rename-session') to set meaningful session names.
#W
format
Name of the current window.Example: bash, vim, 1:editor
set -g @dracula-show-left-icon "#h"
Combining hostname and session name is especially useful when:
  • You use tmux on multiple machines (SSH)
  • You run multiple tmux sessions simultaneously
  • You want quick context about your current environment

Advanced format variables

Besides the shorthand format variables like #H, you can use any tmux format variable with the full syntax #{variable_name}. This is equivalent to the shorthand versions:
# These are equivalent
set -g @dracula-show-left-icon "#h"
set -g @dracula-show-left-icon "#{host}"

# These are equivalent
set -g @dracula-show-left-icon "#S"
set -g @dracula-show-left-icon "#{session_name}"
For a complete list of available format variables, see the tmux manual page.

Icon padding

Control the spacing around the left icon content:
@dracula-left-icon-padding
number
default:"1"
The number of spaces to pad around the left icon content.Set to 0 to disable padding.
# One space on each side (default)
set -g @dracula-show-left-icon "#S"
set -g @dracula-left-icon-padding 1
# Result: " main "

Common use cases

If you use tmux on multiple machines, display the hostname to know where you are:
set -g @dracula-show-left-icon "#h"
Or combine it with the session name:
set -g @dracula-show-left-icon "#h | #S"
When running multiple tmux sessions at once, display the session name:
set -g @dracula-show-left-icon "#S"
Name your sessions meaningfully:
# Create named sessions
tmux new-session -s work
tmux new-session -s personal
tmux new-session -s dev

# Or rename an existing session
tmux rename-session project-x

# Create an alias for quick renaming
alias trs='tmux rename-session'
Use static text for a consistent look:
set -g @dracula-show-left-icon "tmux"
Or use Unicode/Nerd Font symbols:
set -g @dracula-show-left-icon " "
Create custom combinations that work for your workflow:
# Host with session and window
set -g @dracula-show-left-icon "#h:#S:#W"

# Session with time
set -g @dracula-show-left-icon "#S | %H:%M"

# Username and host
set -g @dracula-show-left-icon "#(whoami)@#h"

Complete example

Here’s a full configuration for a developer working on multiple machines:
# Show hostname and session name
set -g @dracula-show-left-icon "#h | #S"

# Add extra padding for readability
set -g @dracula-left-icon-padding 2

# Enable powerline for a polished look
set -g @dracula-show-powerline true
set -g @dracula-show-edge-icons true
Result: mycomputer | work

Tips

Rename sessions quickly: Create a shell alias for fast session renaming:
alias trs='tmux rename-session'
Then use: trs my-project
Keep it short: The left icon appears on every window, so keep it concise to save status bar space for plugins.
Format variables like #h and #S must be quoted when used in tmux configuration:
# Correct
set -g @dracula-show-left-icon "#h"

# Incorrect - shell will interpret #
set -g @dracula-show-left-icon #h

Build docs developers (and LLMs) love