startup_message off
defscrollback 1000
defbce on # erase background with current bg color
defflow off # disable Ctrl-S/Ctrl-Q "flow control"
nonblock on # If a window goes unresponsive, don't block the whole session waiting for it.
defutf8 on
encoding UTF-8 #UTF-8
defencoding UTF-8
setenv LANG en_GB.UTF-8
term xterm-256color
# Rebind to Ctrl-a
set -g prefix C-a
unbind C-b
# Allows us to use C-a a <command> to send commands to a TMUX session inside another TMUX session
bind a send-prefix
bind C-a last-window
bind '"' choose-window
# Rebind pane splitting
unbind %
bind - split-window -v
bind _ split-window -h
#bind-key | split-window -h
# Set status bar
set -g status-bg colour236
set -g status-fg white
set -g status-left ""
set -g status-right "#[fg=green]#H"
# Highlight active window
set-window-option -g window-status-current-bg colour164
# use UTF8
set -g utf8
set-window-option -g utf8 on
# Allows for faster key repetition
set -s escape-time 0
# Rather than constraining window size to the maximum size of any client
# connected to the *session*, constrain window size to the maximum size of any
# client connected to *that window*. Much more reasonable.
setw -g aggressive-resize on
# Activity monitoring
setw -g monitor-activity on
# Refresh the status bar every 30 seconds. Try to keep the nzb folder to a reasonable number
set-option -g status-interval 10
set -g status-right "#[fg=yellow]#(free -m | grep '+' | awk '{ print \"Ram Used: \"$3\" MB, Ram Free: \"$4\" MB\";}')#(free -m | grep 'Swap' | awk '{ print \",Swap: \"$3\" MB\";}') #[fg=cyan]%m-%d-%Y #(uptime)"
set-option -g status-right-length 200
#reduce memory and scrollback buffer
set -g history-limit 1000
#mouse - allows selct pane and resize with mouse
set -g mode-mouse on
set -g mouse-resize-pane on
set -g mouse-select-pane on
set -g mouse-select-window on
bind m \
set -g mode-mouse on \;\
set -g mouse-resize-pane on \;\
set -g mouse-select-pane on \;\
set -g mouse-select-window on \;\
display 'Mouse: ON'
bind M \
set -g mode-mouse off \;\
set -g mouse-resize-pane off \;\
set -g mouse-select-pane off \;\
set -g mouse-select-window off \;\
display 'Mouse: OFF'
Can you advise a config which is working fine for you?
I also noticed non-bold and otherwise "unusual" rendering on newer distros, interesting that screen does it "right". And I don't have any putty involved, just Linux.
set -g default-terminal "screen-256color"
# Rebind to Ctrl-a
set -g prefix C-a
unbind C-b
# Allows us to use C-a a <command> to send commands to a TMUX session inside another TMUX session
bind a send-prefix
bind C-a last-window
bind '"' choose-window
# Bind Power detach and logout to C-a C-d
bind C-d detach -P
#set 256 color display
set -g default-terminal "screen-256color"
2. /etc/init.d/rtorrent init script (a part of it)
isRunning() {
if [ -s ${sessiondir}/rtorrent.lock ] ; then
pid=`cat ${sessiondir}/rtorrent.lock | awk -F: '{print($2)}' | sed "s/[^0-9]//g"`
# make sure the pid doesn't belong to another process : this will match lines containing rtorrent, which grep '[r]torrent' does not!
ps aux | grep -sq ${pid}.*[r]torrent && echo true
fi
}
d_start() {
[ -d "$base" ] && cd "$base"
# if STDIN is a terminal (we are using interactive mode)
[ -t 0 ] && stty stop undef && stty start undef
# start the default 2 tmux window (bash and mc) if there isn't tmux session called rtorrent
if ! su -c "tmux ls | grep -sq ${NAME}: " $user ; then
su -c "tmux -2u new-session -d -s ${NAME} -n 'shell1'" $user
su -c "tmux -2u new-window -t ${NAME}:1 -n 'mc1' 'mc'" $user
fi
# start rtorrent in another tmux window if it's not running
if [ ! "$(isRunning)" = true ]; then
su -c "tmux -2u new-window -t ${NAME}:2 -n ${DESC} ${DDIR}/${DAEMON} ${options}" $user
fi
}
d_stop() {
if [ "$(isRunning)" = true ]; then
kill -s INT ${pid}
fi
}
# Automatically reattach the rtorrent session or create a new one only if STDIN is a terminal (we are using interactive mode)
if [ -t 0 ] && [ -z "$TMUX" ]; then
tmux -2u new-session -A -s rtorrent
fi