TINT2 1 2016-05-22

NAME

tint2 - lightweight panel/taskbar

SYNOPSIS

tint2 [-c path_to_config_file]

DESCRIPTION

tint2 is a simple panel/taskbar made for modern X window managers. It was specifically made for Openbox but it should also work with other window managers (GNOME, KDE, XFCE etc.).

Features:

Goals:

OPTIONS

-c path_to_config_file
Specifies which configuration file to use instead of the default.

CONFIGURATION

Table of contents

Introduction

These are instructions for configuring tint2 directly by editing its config file. You may also use instead the graphical interface tint2conf.

The first time you run tint2, it will create the config file in $HOME/.config/tint2/tint2rc (This applies if you have done a clean install. Running tint2 in the source directory without doing 'make install' will not create the config file.)

You can also specify another file on the command line with the -c option, e.g.: tint2 -c $HOME/tint2.conf. This can be used to run multiple instances of tint2 that use different settings.

If you change the config file while tint2 is running, the command killall -SIGUSR1 tint2 will force tint2 to reload it.

All the configuration options supported in the config file are listed below. Try to respect as much as possible the order of the options as given below.

Backgrounds and borders

The tint2 config file starts with the options defining background elements with borders:

You can define as many backgrounds as you want. For example, the following config defines two backgrounds:

rounded = 1
border_width = 0
background_color = #282828 100
border_color = #000000 0

rounded = 1
border_width = 0
background_color = #f6b655 90
border_color = #cccccc 40

tint2 automatically identifies each background with a number starting from 1 (1, 2, ...). Afterwards, you can apply a background to objects (panel, taskbar, task, clock, systray) using the background id, for example:

panel_background_id = 1
taskbar_background_id = 0
task_background_id = 0
task_active_background_id = 2
systray_background_id = 0
clock_background_id = 0

Identifier 0 refers to a special background which is fully transparent, identifier 1 applies the first background defined in the config file etc.

Panel

# The panel's width is 94% the size of the monitor, the height is 30 pixels:
panel_size = 94% 30

Launcher

Taskbar / Pager

Taskbar buttons

The following options configure the task buttons in the taskbar:

For the next 3 options STATUS can be active / iconified / urgent:
* task_STATUS_font_color = color opacity (0 to 100)

Mouse actions for taskbar buttons

The possible mouse events are: left, middle, right, scroll_up, scroll_down.

The possible mouse actions are: none, close, toggle, iconify, shade, toggle_iconify, maximize_restore, desktop_left, desktop_right, next_task, prev_task.

Use mouse_event = action to customize mouse actions. Example: mouse_middle = none mouse_right = close mouse_scroll_up = toggle mouse_scroll_down = iconify

The action semantics:
* none : If wm_menu = 1 is set, the mouse event is forwarded to the window manager. Otherwise it is ignored. * close : close the task * toggle : toggle the task * iconify : iconify (minimize) the task * toggle_iconify : toggle or iconify the task * maximize_restore : maximized or minimized the task * shade : shades (collapses) the task * desktop_left : send the task to the desktop on the left * desktop_right : send the task to the desktop on the right * next_task : send the focus to next task * prev_task : send the focus to previous task

System Tray

Clock

Tooltip

Battery

Executor

Executor samples

execp = new
execp_command = hostname
execp_interval = 0
execp = new
execp_command = df -h | awk '/\/$/ { print $6 ": " $2 " " $5}'
execp_interval = 10
Button with icon and rich text, executes command when clicked
execp = new
execp_command = echo /usr/share/icons/elementary-xfce/emblems/24/emblem-colors-blue.png; echo '<span foreground="#7f7">Click</span> <span foreground="#77f">me</span> <span foreground="#f77">pls</span>'
execp_has_icon = 1
execp_interval = 0
execp_centered = 1
execp_font = sans 9
execp_markup = 1
execp_font_color = #aaffaa 100
execp_padding = 2 0
execp_tooltip = I will tell you a secret...
execp_lclick_command = zenity --info "--text=$(uname -sr)"
execp_background_id = 2
Desktop pager with text
execp = new
execp_command = xprop -root -spy | awk '/^_NET_CURRENT_DESKTOP/ { print "Workspace " ($3 + 1) ; fflush(); }'
execp_interval = 1
execp_continuous = 1
Desktop pager with icon
execp_command = xprop -root -spy | awk -v home="$HOME" '/^_NET_CURRENT_DESKTOP/ { print home "/.config/myPager/" ($3 + 1) ".png\n" ; fflush(); }'
execp_interval = 1
execp_has_icon = 1
execp_cache_icon = 1
execp_continuous = 2
Round-trip time to the gateway, refreshed every second
execp = new
execp_command = ping -i 1 -W 1 -O -D -n $(ip route | grep default | grep via | grep -o '[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*') | awk '/no/ { print "<span foreground=\"#faa\">timeout</span>"; fflush(); }; /time=/ { gsub(/time=/, "", $8); printf "<span foreground=\"#7af\">%3.0f %s</span>\n", $8, $9; fflush(); } '
execp_continuous = 1
execp_interval = 1
execp_markup = 1
Memory usage
# Note the use of "stdbuf -oL" to force the program to flush the output line by line.
execp = new
execp_command = free -b -s1 | stdbuf -oL awk '/^Mem:/ { printf "Mem: %s %.0f%%\n", $2, 100 * ($2 - $7) / $2 }' | stdbuf -oL numfmt --to=iec-i --field=2 -d' '
execp_interval = 1
execp_continuous = 1
Network load
execp = new
execp_command = stdbuf -oL bwm-ng -o csv -t 1000 | stdbuf -oL awk -F ';' '/total/ { printf "Net: %.0f Mb/s\n", ($5*8/1.0e6) }'
execp_continuous = 1
execp_interval = 1

Example configuration

#---------------------------------------------
## TINT2 CONFIG FILE
#---------------------------------------------

#---------------------------------------------
## BACKGROUND AND BORDER
#---------------------------------------------
rounded = 7
border_width = 2
background_color = #000000 60
border_color = #ffffff 18

rounded = 5
border_width = 0
background_color = #ffffff 40
border_color = #ffffff 50

rounded = 5
border_width = 0
background_color = #ffffff 18
border_color = #ffffff 70

#---------------------------------------------
## PANEL
#---------------------------------------------
panel_monitor = all
panel_position = bottom center
panel_size = 94% 30
panel_margin = 0 0
panel_padding = 7 0
font_shadow = 0
panel_background_id = 1
wm_menu = 0
panel_dock = 0
panel_layer = bottom

#---------------------------------------------
## TASKBAR
#---------------------------------------------
#taskbar_mode = multi_desktop
taskbar_mode = single_desktop
taskbar_padding = 2 3 2
taskbar_background_id = 0
#taskbar_active_background_id = 0

#---------------------------------------------
## TASKS
#---------------------------------------------
task_icon = 1
task_text = 1
task_maximum_size = 140 35
task_centered = 1
task_padding = 6 3
task_font = sans 7
task_font_color = #ffffff 70
task_background_id = 3
task_icon_asb = 100 0 0
## replace STATUS by 'urgent', 'active' or 'iconfied'
#task_STATUS_background_id = 2
#task_STATUS_font_color = #ffffff 85
#task_STATUS_icon_asb = 100 0 0
## example:
task_active_background_id = 2
task_active_font_color = #ffffff 85
task_active_icon_asb = 100 0 0
urgent_nb_of_blink = 8

#---------------------------------------------
## SYSTRAYBAR
#---------------------------------------------
systray = 1
systray_padding = 0 4 5
systray_background_id = 0
systray_sort = left2right
systray_icon_size = 0
systray_icon_asb = 100 0 0

#---------------------------------------------
## CLOCK
#---------------------------------------------
time1_format = %H:%M
time1_font = sans 8
time2_format = %A %d %B
time2_font = sans 6
clock_font_color = #ffffff 76
clock_padding = 1 0
clock_background_id = 0
#clock_lclick_command = xclock
clock_rclick_command = orage
#clock_tooltip = %A %d %B
#time1_timezone = :US/Hawaii
#time2_timezone = :Europe/Berlin
#clock_tooltip_timezone = :/usr/share/zoneinfo/Europe/Paris

#---------------------------------------------
## BATTERY
#---------------------------------------------
battery = 0
battery_hide = 98
battery_low_status = 10
battery_low_cmd = notify-send "battery low"
bat1_font = sans 8
bat2_font = sans 6
battery_font_color = #ffffff 76
battery_padding = 1 0
battery_background_id = 0

#---------------------------------------------
## TOOLTIP
#---------------------------------------------
tooltip = 0
tooltip_padding = 2 2
tooltip_show_timeout = 0.7
tooltip_hide_timeout = 0.3
tooltip_background_id = 1
tooltip_font_color = #OOOOOO 80
tooltip_font = sans 10

#---------------------------------------------
## MOUSE ACTION ON TASK
#---------------------------------------------
mouse_middle = none
mouse_right = close
mouse_scroll_up = toggle
mouse_scroll_down = iconify

#---------------------------------------------
## AUTOHIDE OPTIONS
#---------------------------------------------
autohide = 0
autohide_show_timeout = 0.3
autohide_hide_timeout = 2
autohide_height = 4
strut_policy = minimum

AUTHOR

tint2 was written by Thierry Lorthiois lorthiois@bbsoft.fr. It is based on ttm, originally written by Pål Staurland staura@gmail.com.

This manual page was written by Daniel Moerner dmoerner@gmail.com, for the Debian project (but may be used by others). It was adopted from the tint2 docs.

SEE ALSO

The main website https://gitlab.com/o9000/tint2 and the wiki page at https://gitlab.com/o9000/tint2/wikis/home.