Skip to content
Permalink
Browse files

Tmux: fixed less highligtning issue

  • Loading branch information...
docent-net committed Dec 21, 2015
1 parent ea68dfb commit d314aedd61e6973df3de16bd557de7e3f3aecb3d
@@ -10,6 +10,7 @@
- packages
- git
- oh-my-zsh
- tmux
- tmuxinator
- guake
- dropbox
@@ -4,7 +4,6 @@
- terminator
- cmake
- vim
- tmux
- keepassx
- wget
- git
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

screen_terminfo="screen-256color"
infocmp "$screen_terminfo" | sed \
-e 's/^screen[^|]*|[^,]*,/screen-256color|screen with italics support,/' \
-e 's/%?%p1%t;3%/%?%p1%t;7%/' \
-e 's/smso=[^,]*,/smso=\\E[7m,/' \
-e 's/rmso=[^,]*,/rmso=\\E[27m,/' \
-e '$s/$/ sitm=\\E[3m, ritm=\\E[23m,/' > /tmp/screen.terminfo

tic /tmp/screen.terminfo
@@ -0,0 +1,4 @@
---
# this playbook includes tmux installer and configurator
- include: tmux_installer.yml
tags: tmux
@@ -0,0 +1,37 @@
---
# Fixing colors for "less"
# see http://stackoverflow.com/questions/10535432/tmux-man-page-search-highlighting for details

# Basic procedure:
# $ mkdir $HOME/.terminfo/
# $ screen_terminfo="screen-256color"
# $ infocmp "$screen_terminfo" | sed \
# -e 's/^screen[^|]*|[^,]*,/screen-256color|screen with italics support,/' \
# -e 's/%?%p1%t;3%/%?%p1%t;7%/' \
# -e 's/smso=[^,]*,/smso=\\E[7m,/' \
# -e 's/rmso=[^,]*,/rmso=\\E[27m,/' \
# -e '$s/$/ sitm=\\E[3m, ritm=\\E[23m,/' > /tmp/screen.terminfo
# $ tic /tmp/screen.terminfo
# cp ~/.terminfo

- name: Fix highligtning
file: >
path={{ home_dir }}/.terminfo
state=directory
owner={{ user }}
group={{ group }}
mode=0700
- name: Fix highligtning
copy: >
src=infocmp.sh
dest=/tmp/infocmp.sh
mode=0700
owner={{ user }}
group={{ group }}
- name: Fix highligtning
shell: /tmp/infocmp.sh

- name: Fix highligtning
command: rsync -rP {{ home_dir }}/.terminfo /root/.
@@ -0,0 +1,9 @@
---
# This playbook installs Tmux

- name: Install prerequisites
dnf: name=tmux state=latest

# Fix background color highlightning:
# see http://stackoverflow.com/questions/10535432/tmux-man-page-search-highlighting for details
- include: tmux_fix_less.yml

0 comments on commit d314aed

Please sign in to comment.
You can’t perform that action at this time.