TINT2

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.

Gradients

(Available since 0.13.0)

Most of the panel elements that accept backgrounds also allow specifying one or more gradient layers that are drawn on top of the solid color background.

First the user must define one or more gradients in the config file, each starting with gradient = TYPE. These should be added ideally after backgrounds but before all the other options.

Then gradients can be added by index to elements, using *_gradient_id = INDEX, where * is an element name, for example panel, and INDEX is the gradient index, starting from 1. The *_gradient_id option can be repeated for the same element, which results in multiple gradients being drawn on top of each other in the given order.

Simple gradients

These are gradients that vary from fixed control points (top-to-bottom, left-to-right or center-to-corners). The user must specify the start and end colors, and can optionally add extra color stops in between.

Vertical gradient, with color varying from the top edge to the bottom edge, two colors
gradient = vertical
start_color = #rrggbb opacity
end_color = #rrggbb opacity
Horizontal gradient, with color varying from the left edge to the right edge, two colors
gradient = horizontal
start_color = #rrggbb opacity
end_color = #rrggbb opacity
Centered radial gradient, with color varying from the center to the corner, two colors:
gradient = centered
start_color = #rrggbb opacity
end_color = #rrggbb opacity
Adding extra color stops (0% and 100% remain fixed, more colors at x% between the start and end control points)
color_stop = percentage #rrggbb opacity

Advanced gradients

These gradient types allow specifying the control points. This permits, for example, adding off-center radial glow effects, linear gradients with arbitrary angles, or using another element's edge as a control point.

Note: updates are currently a little buggy for task buttons.

Linear or radial gradients, with arbitrary control points (and orientation)
gradient = linear | radial
# Geometry
from_offset_x = SIZE_EXPRESSION
from_offset_y = SIZE_EXPRESSION
# from_offset_r for radial only
from_offset_r = SIZE_EXPRESSION
to_offset_x = SIZE_EXPRESSION
to_offset_y = SIZE_EXPRESSION
# to_offset_r for radial only
to_offset_r = SIZE_EXPRESSION
# Colors
start_color = #rrggbb opacity
end_color = #rrggbb opacity
# Optional: more color stops
color_stop = percentage #rrggbb opacity
color_stop = percentage #rrggbb opacity

SIZE_EXPRESSION is an expression that encodes an offset, following the grammar:

SIZE_EXPRESSION = number |
                  SIZE |
                  SIZE * number |
                  SIZE * number%
SIZE = width | height | radius | left | right | top | bottom | centerx | centery |
       ELEMENT width | ELEMENT height | ELEMENT radius | ELEMENT left | ELEMENT right | ELEMENT top | ELEMENT bottom | ELEMENT centerx | ELEMENT centery
ELEMENT = self | parent | panel

All coordinates are computed in the drawn element's coordinate system, with origin in the top-left corner and the vertical axis growing down.

Numbers are any real numbers. Negative numbers must not have spaces between the minus sign and the first digit, for example -1.234 is correct, while - 1.234 is not.

Multiple *_offset_* can be given, in which case they are added together.

Gradient examples

# Gradient 1: thin film effect
gradient = horizontal
start_color = #111122 30
end_color = #112211 30
color_stop = 60 #221111 30

# Gradient 2: center glow
gradient = centered
start_color = #ffffff 20
end_color = #ffffff 0

# Gradient 3: glow
gradient = radial
start_color = #ffffff 20
end_color = #ffffff 0
from_offset_x = width * 0.28
from_offset_y = height * 0.28
from_offset_r = 0
to_offset_x = width * 0.28
to_offset_y = height * 0.28
to_offset_r = radius * 2

# Gradient 4: aurora
gradient = linear
start_color = #ffffff 0
end_color = #ffffff 0
from_offset_x = panel left
from_offset_y = panel top
to_offset_x = panel width * 3
to_offset_x = panel height * 3
to_offset_y = panel width
to_offset_y = panel height
color_stop = 0.1 #ffffff 30
color_stop = 0.8 #ffffff 30
color_stop = 2.1 #7777aa 30
color_stop = 3.1 #7777aa 30
color_stop = 4.0 #ffffaa 30
color_stop = 4.8 #aa7733 30
color_stop = 5.1 #ff7733 30
color_stop = 6.5 #337788 30
color_stop = 9.2 #ffffaa 30
color_stop = 10.1 #777777 30
color_stop = 12.1 #aaaaff 30
color_stop = 14.0 #77ff77 30
color_stop = 18.0 #ffff77 30
color_stop = 19.8 #77ffaa 30
color_stop = 21.1 #ffffaa 20
color_stop = 23.5 #337733 30
color_stop = 25.5 #337733 30
color_stop = 29.2 #77ffff 30
color_stop = 30.1 #77ffaa 30
color_stop = 31.0 #ffffaa 30
color_stop = 34.8 #aa7733 30

# Gradient 5: elegant black
gradient = vertical
start_color = #444444 100
end_color = #222222 100

# Gradient 6: elegant black
gradient = horizontal
start_color = #111111 100
end_color = #222222 100

[....]

panel_gradient_id = 5

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
execp = new
execp_command = free -s 2 | awk '/^-/ { printf "Mem: '$(free -h | awk '/^Mem:/ { print $2 }')' %.0f%\n", 100*$3/($3+$4); fflush(stdout) }'
execp_interval = 1
execp_continuous = 1
Network load
# Note the use of "stdbuf -oL" to force the program to flush the output line by line.
execp = new
execp_command = stdbuf -oL bwm-ng -o csv -t 1000 | awk -F ';' '/total/ { printf "Net: %.0f Mb/s\n", ($5*8/1.0e6) }; fflush(stdout)'
execp_continuous = 1
execp_interval = 1

Separator

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 originally 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.

This documentation is also provided in HTML and Markdown format in the system's default location for documentation files, usually /usr/share/doc/tint2 or /usr/local/share/doc/tint2.