tint2.md 36.2 KB
Newer Older
Chris Lee's avatar
Chris Lee committed
1
# TINT2 1 "2018-05-03" 16.4
o9000's avatar
o9000 committed
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

## NAME
tint2 - lightweight panel/taskbar

## 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:

  * Panel with taskbar, system tray, clock and launcher icons;
  * Easy to customize: color/transparency on fonts, icons, borders and backgrounds;
  * Pager like capability: move tasks between workspaces (virtual desktops), switch between workspaces;
  * Multi-monitor capability: create one panel per monitor, showing only the tasks from the current monitor;
  * Customizable mouse events.

Goals:

  * Be unintrusive and light (in terms of memory, CPU and aesthetic);
  * Follow the freedesktop.org specifications;
  * Make certain workflows, such as multi-desktop and multi-monitor, easy to use.

o9000's avatar
o9000 committed
24 25 26
## SYNOPSIS
`tint2 [OPTION...]`

o9000's avatar
o9000 committed
27 28 29 30
## OPTIONS
`-c path_to_config_file`
  Specifies which configuration file to use instead of the default.

o9000's avatar
o9000 committed
31 32 33 34 35 36 37
`-v, --version`
  Prints version information and exits.

`-h, --help`
  Display this help and exits.


o9000's avatar
o9000 committed
38 39
## CONFIGURATION

o9000's avatar
o9000 committed
40 41 42 43 44 45
### Table of contents

  * [Introduction](#introduction)

  * [Backgrounds and borders](#backgrounds-and-borders)

o9000's avatar
o9000 committed
46 47
  * [Gradients](#gradients)

o9000's avatar
o9000 committed
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
  * [Panel](#panel)

  * [Launcher](#launcher)

  * [Taskbar/Pager](#taskbar-pager)

  * [Taskbar buttons](#taskbar-buttons)

  * [Mouse actions for taskbar buttons](#mouse-actions-for-taskbar-buttons)

  * [System tray](#system-tray)

  * [Clock](#clock)

  * [Tooltip](#tooltip)

  * [Battery](#battery)

  * [Executor](#executor)

o9000's avatar
o9000 committed
68 69
  * [Button](#button)

70 71
  * [Separator](#separator)

o9000's avatar
o9000 committed
72
  * [Example configuration](#example-configuration)
o9000's avatar
o9000 committed
73

o9000's avatar
o9000 committed
74 75
### Introduction

o9000's avatar
o9000 committed
76 77 78
These are instructions for configuring tint2 directly by editing its config file.
You may also use instead the graphical interface `tint2conf`.

o9000's avatar
o9000 committed
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
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:

  * `rounded = number_of_pixels` : the corner radius

  * `border_width = integer` : the border width in pixels

o9000's avatar
o9000 committed
96
  * `border_sides = LRTB` : the sides to draw the border on (left, right, top, bottom). If not specified, all sides are used. *(since 0.12.12)*
o9000's avatar
o9000 committed
97 98 99 100 101 102 103 104 105

  * `background_color = color opacity`
    * `color` is specified in hex RGB, e.g. #ff0000 is red
    * `opacity` varies from (0 to 100), where 0 is fully transparent, 100 is fully opaque. Note that for a transparent panel you need to enable a desktop compositor (such as compton or compiz).

  * `border_color = color opacity`
    * `color` is specified in hex RGB, e.g. #ff0000 is red
    * `opacity` varies from (0 to 100), where 0 is fully transparent, 100 is fully opaque

o9000's avatar
o9000 committed
106
  * `background_color_hover = color opacity` (default: same as `background_color`) *(since 0.12.3)*
o9000's avatar
o9000 committed
107 108 109
    * `color` is specified in hex RGB, e.g. #ff0000 is red
    * `opacity` varies from (0 to 100), where 0 is fully transparent, 100 is fully opaque. Note that for a transparent panel you need to enable a desktop compositor (such as compton or compiz)

o9000's avatar
o9000 committed
110
  * `border_color_hover = color opacity` (default: same as `border_color`) *(since 0.12.3)*
o9000's avatar
o9000 committed
111 112 113
    * `color` is specified in hex RGB, e.g. #ff0000 is red
    * `opacity` varies from (0 to 100), where 0 is fully transparent, 100 is fully opaque

o9000's avatar
o9000 committed
114
  * `background_color_pressed = color opacity` (default: same as `background_color_hover`) *(since 0.12.3)*
o9000's avatar
o9000 committed
115 116 117
    * `color` is specified in hex RGB, e.g. #ff0000 is red
    * `opacity` varies from (0 to 100), where 0 is fully transparent, 100 is fully opaque. Note that for a transparent panel you need to enable a desktop compositor (such as compton or compiz)

o9000's avatar
o9000 committed
118
  * `border_color_pressed = color opacity` (default: same as `border_color_hover`) *(since 0.12.3)*
o9000's avatar
o9000 committed
119 120 121
    * `color` is specified in hex RGB, e.g. #ff0000 is red
    * `opacity` varies from (0 to 100), where 0 is fully transparent, 100 is fully opaque

122 123 124 125
  * `border_content_tint_weight = integer` : Mixes the border color with the content color (for tasks, this is the average color of the window icon). Values must be between 0 (no mixing) and 100 (fully replaces the color). *(since 16.0)*

  * `background_content_tint_weight = integer` : Mixes the background color with the content color (for tasks, this is the average color of the window icon). Values must be between 0 (no mixing) and 100 (fully replaces the color). *(since 16.0)*

o9000's avatar
o9000 committed
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
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.

o9000's avatar
o9000 committed
154 155 156 157
### Gradients

(Available since 0.13.0)

158
Backgrounds also allow specifying gradient layers
159
that are drawn on top of the solid color background.
o9000's avatar
o9000 committed
160 161

First the user must define one or more gradients in the config file,
162
each starting with `gradient = TYPE`. These must be added before backgrounds.
o9000's avatar
o9000 committed
163

164
Then gradients can be added by index to backgrounds,
o9000's avatar
o9000 committed
165 166
using the `gradient_id = INDEX`, `gradient_id_hover = INDEX` and
`gradient_id_pressed = INDEX`, where `INDEX` is
167
the gradient index, starting from 1.
o9000's avatar
o9000 committed
168

o9000's avatar
o9000 committed
169
#### Gradient types
o9000's avatar
o9000 committed
170

o9000's avatar
o9000 committed
171 172 173 174 175 176 177
Gradients vary the color between fixed control points:
* vertical gradients: top-to-bottom;
* horizontal gradients: left-to-right;
* radial gradients: center-to-corners.

The user must specify the start and end colors, and can optionally add extra color stops in between
using the `color_stop` option, as explained below.
o9000's avatar
o9000 committed
178

o9000's avatar
o9000 committed
179
##### Vertical gradient, with color varying from the top edge to the bottom edge, two colors
o9000's avatar
o9000 committed
180 181 182 183 184 185 186

```
gradient = vertical
start_color = #rrggbb opacity
end_color = #rrggbb opacity
```

o9000's avatar
o9000 committed
187
##### Horizontal gradient, with color varying from the left edge to the right edge, two colors
o9000's avatar
o9000 committed
188 189 190 191 192 193 194

```
gradient = horizontal
start_color = #rrggbb opacity
end_color = #rrggbb opacity
```

o9000's avatar
o9000 committed
195
##### Radial gradient, with color varying from the center to the corner, two colors:
o9000's avatar
o9000 committed
196 197

```
o9000's avatar
o9000 committed
198
gradient = radial
o9000's avatar
o9000 committed
199 200 201 202
start_color = #rrggbb opacity
end_color = #rrggbb opacity
```

o9000's avatar
o9000 committed
203
##### Adding extra color stops (0% and 100% remain fixed, more colors at x% between the start and end control points)
o9000's avatar
o9000 committed
204 205 206 207 208

```
color_stop = percentage #rrggbb opacity
```

o9000's avatar
o9000 committed
209
#### Gradient examples
o9000's avatar
o9000 committed
210 211 212 213 214 215 216 217

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

o9000's avatar
o9000 committed
218
# Gradient 2: radial glow
o9000's avatar
o9000 committed
219 220 221
gradient = radial
start_color = #ffffff 20
end_color = #ffffff 0
o9000's avatar
o9000 committed
222 223

# Gradient 3: elegant black
o9000's avatar
o9000 committed
224 225 226 227
gradient = vertical
start_color = #444444 100
end_color = #222222 100

o9000's avatar
o9000 committed
228
# Gradient 4: elegant black
o9000's avatar
o9000 committed
229 230 231 232
gradient = horizontal
start_color = #111111 100
end_color = #222222 100

233 234 235 236 237 238 239 240 241 242 243
# Background 1: Active desktop name
rounded = 2
border_width = 1
border_sides = TBLR
background_color = #555555 10
border_color = #ffffff 60
background_color_hover = #555555 10
border_color_hover = #ffffff 60
background_color_pressed = #555555 10
border_color_pressed = #ffffff 60
gradient_id = 3
o9000's avatar
o9000 committed
244 245
gradient_id_hover = 4
gradient_id_pressed = 2
246 247

[...]
o9000's avatar
o9000 committed
248 249
```

o9000's avatar
o9000 committed
250 251 252 253 254 255 256 257
### Panel

  * `panel_items = LTSBC` defines the items tint2 will show and the order of those items. Each letter refers to an item, defined as:
    * `L` shows the Launcher
    * `T` shows the Taskbar
    * `S` shows the Systray (also called notification area)
    * `B` shows the Battery status
    * `C` shows the Clock
258
    * `F` adds an extensible spacer (freespace). You can specify more than one. Has no effect if `T` is also present. *(since 0.12)*
o9000's avatar
o9000 committed
259
    * `E` adds an executor plugin. You can specify more than one. *(since 0.12.4)*
o9000's avatar
o9000 committed
260
    * `P` adds a push button. You can specify more than one. *(since 0.14)*
261
    * `:` adds a separator. You can specify more than one. *(since 0.13.0)*
o9000's avatar
o9000 committed
262 263 264

    For example, `panel_items = STC` will show the systray, the taskbar and the clock (from left to right).

265
  * `panel_monitor = monitor (all or primary or 1 or 2 or ...)` : Which monitor tint2 draws the panel on
o9000's avatar
o9000 committed
266 267 268
    * The first monitor is `1`
    * Use `panel_monitor = all` to get a separate panel per monitor

o9000's avatar
o9000 committed
269
  * `primary_monitor_first = boolean (0 or 1)` : Place the primary monitor before all the other monitors in the list. *(since 0.12.4; removed in 1.0, use `primary` instead)*
o9000's avatar
o9000 committed
270

o9000's avatar
o9000 committed
271
![](images/panel_padding.jpg)
o9000's avatar
o9000 committed
272 273 274 275 276 277 278 279 280 281

  * `panel_position = vertical_position horizontal_position orientation`
    * `vertical_position` is one of: `bottom`, `top`, `center`
    * `horizontal_position` is one of: `left`, `right`, `center`
    * `orientation` is one of: `horizontal`, `vertical`

  * `panel_size = width height`
    * `width` and `height` can be specified without units (e.g. `123`) as pixels, or followed by `%` as percentages of the monitor size (e.g. `50%`). Use `100%` for full monitor width/height.
      Example:

282 283
  * `scale_relative_to_dpi = integer` : If set to a non-zero value, HiDPI scaling is enabled. Each panel is visible on a different monitor. Thus each panel has a specific scaling factor. The scaling factor is computed as the ratio between the monitor DPI (obtained from the dimensions in pixels and millimeters from RandR) and a configured reference DPI - this is the DPI for which exising user configs looked normal, for backward compatibility.

o9000's avatar
o9000 committed
284 285
  * `scale_relative_to_screen_height = integer` : Similar to `scale_relative_to_dpi`, except the scaling factor is computed as the ratio between the monitor height and `scale_relative_to_screen_height`. The effect is cumulative with `scale_relative_to_dpi`, i.e. if both options are present, the factors are multiplied.

o9000's avatar
o9000 committed
286 287 288 289 290
```
# The panel's width is 94% the size of the monitor, the height is 30 pixels:
panel_size = 94% 30
```

291
  * `panel_shrink = boolean (0 or 1)` : If set to 1, the panel will shrink to a compact size dynamically. *(since 0.13)*
292

o9000's avatar
o9000 committed
293 294
  * `panel_margin = horizontal_margin vertical_margin` : The margins define the distance between the panel and the horizontal/vertical monitor edge. Use `0` to obtain a panel with the same size as the edge of the monitor (no margin).

o9000's avatar
o9000 committed
295
![](images/panel_size_margin.jpg)
o9000's avatar
o9000 committed
296 297 298

  * `panel_padding = horizontal_padding vertical_padding spacing` : Please refer to the image below.

o9000's avatar
o9000 committed
299
![](images/panel_padding.jpg)
o9000's avatar
o9000 committed
300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364

  * `font_shadow = boolean (0 or 1)`

  * `panel_background_id = integer` : Which background to use for the panel.

  * `wm_menu = boolean (0 or 1)` : Defines if tint2 forwards unhandled mouse events to your window manager. Useful for window managers such as openbox, which display the start menu if you right click on the desktop.

  * `panel_dock = boolean (0 or 1)` : Defines if tint2 is placed into the window manager's dock. For the openbox window manager it is advised to also use a modifier for the moveButton option, otherwise the mouse click is not forwarded to tint2 (in ~/.config/openbox/rc.xml).

  * `panel_layer = bottom/normal/top` : Places tint2 into the bottom/normal/top layer. This is helpful for specifying if the panel can be covered by other windows or not. The default is the bottom layer, but with real transparency normal or top layer may be a nice alternative.

  * `strut_policy = follow_size/minimum/none` : STRUTs are used by the window manager to decide the size of maximized windows. Note: on multi-monitor (Xinerama) setups, the panel must be placed at the edge (not in the middle) of the virtual screen for this to work correctly.
    * `follow_size` means that the maximized windows always resize to have a common edge with tint2.
    * `minimum` means that the maximized windows always expand to have a common edge with the hidden panel. This is useful if the `autohide` option is enabled.
    * `none` means that the maximized windows use the full screen size.

  * `panel_window_name = string` : Defines the name of the panel's window. Default: 'tint2'. *(since 0.12)*

  * `disable_transparency = boolean (0 or 1)` : Whether to disable transparency instead of detecting if it is supported. Useful on broken graphics stacks. *(since 0.12)*

  * `mouse_effects = boolean (0 or 1)` : Whether to enable mouse hover effects for clickable items. *(since 0.12.3)*

  * `mouse_hover_icon_asb = alpha (0 to 100) saturation (-100 to 100) brightness (-100 to 100)` : Adjusts the icon color and transparency on mouse hover (works only when mouse_effects = 1).` *(since 0.12.3)*

  * `mouse_pressed_icon_asb = alpha (0 to 100) saturation (-100 to 100) brightness (-100 to 100)` : Adjusts the icon color and transparency on mouse press (works only when mouse_effects = 1).` *(since 0.12.3)*

  * `autohide = boolean (0 or 1)` : Whether to enable panel hiding when the mouse cursor exists the panel.

  * `autohide_show_timeout = float` : Show timeout in seconds after the mouse cursor enters the panel. Use '.' as decimal separator.

  * `autohide_hide_timeout = float` : Hide timeout in seconds after the mouse cursor exits the panel. Use '.' as decimal separator.

  * `autohide_height = integer` : panel height (width for vertical panels) in hidden mode.

### Launcher
  * `launcher_item_app = path_to_application` : Each `launcher_item_app` must be a file path to a .desktop file following the freedesktop.org [specification](http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html). The paths may begin with `~`, which is expanded to the path of the user's home directory. If only a file name is specified, the file is search in the standard application directories (`$XDG_DATA_HOME/applications`, `~/.local/share/applications`, `$XDG_DATA_DIRS/applications`, `/usr/local/share/applications`, `/usr/share/applications`, `/opt/share/applications`).

  * `launcher_apps_dir = path_to_directory` : Specifies a path to a directory from which the launcher is loading all .desktop files (all subdirectories are explored recursively). Can be used multiple times. The path may begin with `~`, which is expanded to the path of the user's home directory. *(since 0.12)*

  * `launcher_background_id = integer` : Defines which background to use.

  * `launcher_icon_background_id = integer` : Defines which background to use for icons.

  * `launcher_padding = horizontal_padding vertical_padding spacing`

  * `launcher_icon_size = integer` : The launcher icon size, in pixels.

  * `launcher_icon_theme = name_of_theme` : (Optional) Uses the specified icon theme to display shortcut icons. Note that tint2 will detect and use the icon theme of your desktop if you have an XSETTINGS manager running (which you probably do), unless `launcher_icon_theme_override = 1`.

  * `launcher_icon_theme_override = boolean (0 or 1)` : Whether `launcher_icon_theme` overrides the value obtained from the XSETTINGS manager. *(since 0.12)*

  * `launcher_icon_asb = alpha (0 to 100) saturation (-100 to 100) brightness (-100 to 100)` : Adjusts the icon color and transparency.

  * `launcher_tooltip = boolean (0 or 1)` : Whether to show tooltips for the launcher icons.

  * `startup_notifications = boolean (0 or 1)` : Whether to show startup notifications when starting applications from the launcher. *(since 0.12)*

### Taskbar / Pager

  * `taskbar_mode = single_desktop/multi_desktop`
    * `single_desktop` : Shows a normal taskbar listing the tasks running on the current virtual desktop (also known as 'workspace');
    * `multi_desktop` : Pager like capability. Shows multiple taskbars, one per virtual desktop, with which:
      * You can drag-and-drop tasks between virtual desktops;
      * You can switch between virtual desktops.

365
  * `taskbar_hide_if_empty = boolean (0 or 1)` : If enabled, in multi-desktop mode the taskbars corresponding to empty desktops different from the current desktop are hidden. *(since 0.13)*
366 367

  * `taskbar_distribute_size = boolean (0 or 1)` : If enabled, in multi-desktop mode distributes between taskbars the available size proportionally to the number of tasks. Default: disabled. *(since 0.12)*
o9000's avatar
o9000 committed
368 369 370

  * `taskbar_padding = horizontal_padding vertical_padding spacing`

o9000's avatar
o9000 committed
371
![](images/taskbar_padding.jpg)
o9000's avatar
o9000 committed
372 373 374 375 376 377 378 379 380

  * `taskbar_background_id = integer` : Which background to use

  * `taskbar_active_background_id = integer` : Which background to use for the taskbar of the current virtual desktop.

  * `taskbar_hide_inactive_tasks = boolean (0 or 1)` :  If enabled, the taskbar shows only the active task. *(since 0.12)*

  * `taskbar_hide_different_monitor = boolean (0 or 1)` :  If enabled, the taskbar shows only the tasks from the current monitor. Useful when running different tint2 instances on different monitors, each one having its own config. *(since 0.12)*

o9000's avatar
o9000 committed
381
  * `taskbar_hide_different_desktop = boolean (0 or 1)` :  If enabled, the taskbar shows only the tasks from the current desktop. Useful to make multi-desktop taskbars more compact, but still allow desktop switching with mouse click. *(since 1.0)*
o9000's avatar
o9000 committed
382

o9000's avatar
o9000 committed
383 384 385 386 387
  * `taskbar_always_show_all_desktop_tasks = boolean (0 or 1)` :  Has effect only if `taskbar_mode = multi_desktop`. If enabled, tasks that appear on all desktops are shown on all taskbars. Otherwise, they are shown only on the taskbar of the current desktop. *(since 0.12.4)*

  * `taskbar_sort_order = none/title/center` : Specifies the sort order of the tasks on the taskbar.  *(since 0.12)*
    * `none` : No sorting. New tasks are simply appended at the end of the taskbar when they appear.
    * `title` : Sorts the tasks by title.
388
    * `application` : Sorts the tasks by application name. *(since 16.3)*
o9000's avatar
o9000 committed
389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412
    * `center` : Sorts the tasks by their window centers.
    * `mru` : Shows the most recently used tasks first. *(since 0.12.4)*
    * `lru` : Shows the most recently used tasks last. *(since 0.12.4)*

  * `task_align = left/center/right` : Specifies the alignment of the tasks on the taskbar. Default: left.

  * `taskbar_name = boolean (0 or 1)` :  Whether to show the virtual desktop name in the taskbar.

  * `taskbar_name_padding = padding` :  Padding for the virtual desktop name.

  * `taskbar_name_background_id = integer` :  Which background to use for the desktop name.

  * `taskbar_name_font = [FAMILY-LIST] [STYLE-OPTIONS] [SIZE]` :  Font configuration for the desktop name.

  * `taskbar_name_font_color = color opacity (0 to 100)` :  Font color for the desktop name.

  * `taskbar_name_active_background_id = integer` :  Which background to use for the name of the current desktop.

  * `taskbar_name_active_font_color = color opacity (0 to 100)` :  Font color for the name of the current desktop.

# Taskbar buttons

The following options configure the task buttons in the taskbar:

o9000's avatar
o9000 committed
413
  * `task_icon = boolean (0 or 1)` : Whether to display the task icon. There is no explicit option to control the task icon size; it depends on the vertical padding set with `task_padding`.
o9000's avatar
o9000 committed
414 415 416 417 418 419 420

  * `task_text = boolean (0 or 1)` : Whether to display the task text.

  * `task_centered = boolean (0 or 1)` : Whether the task text is centered.

  * `task_tooltip = boolean (0 or 1)` : Whether to show tooltips for tasks.

o9000's avatar
o9000 committed
421
  * `task_thumbnail = boolean (0 or 1)` : Whether to show thumbnail tooltips for tasks. *(since 16.0)*
422

o9000's avatar
o9000 committed
423
  * `task_thumbnail_size = width` : Thumbnail size. *(since 16.0)*
424

o9000's avatar
o9000 committed
425 426 427 428 429 430 431 432
  * `task_maximum_size = width height`
    * `width` is used with horizontal panels to limit the size of the tasks. Use `width = 0` to get full taskbar width.
    * `height` is used with vertical panels.

  * `task_padding = horizontal_padding vertical_padding spacing`

  * `urgent_nb_of_blink = integer` : Number of blinks on 'get attention' events.

o9000's avatar
o9000 committed
433
![](images/task_padding.jpg)
o9000's avatar
o9000 committed
434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488

  * `task_font = [FAMILY-LIST] [STYLE-OPTIONS] [SIZE]`

  * `task_font_color = color opacity (0 to 100)`

  * `task_icon_asb = alpha (0 to 100) saturation (-100 to 100) brightness (-100 to 100)` : Adjust the task icon's color and transparency.

  * `task_background_id = integer` : Which background to use for non selected tasks

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

  * `task_STATUS_icon_asb = alpha (0 to 100) saturation (-100 to 100) brightness (-100 to 100)` : Adjusts the task icon's color and transparency.

  * `task_STATUS_background_id = integer` : Which background to use for the task.

### 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

  * `systray_padding = horizontal_padding vertical_padding spacing`

  * `systray_background_id = integer` : Which background to use.

  * `systray_sort = ascending/descending/left2right/right2left` : Specifies the sorting order for the icons in the systray: in ascending/descending alphabetical order of the icon title, or always add icons to the right/left (note that with `left2right` or `right2left` the order can be different on panel restart).

  * `systray_icon_size = max_icon_size` : Set the maximum system tray icon size to `number`. Set to `0` for automatic icon sizing.

  * `systray_icon_asb = alpha (0 to 100) saturation (-100 to 100) brightness (-100 to 100)` : Adjust the systray icons color and transparency.

489
  * `systray_monitor = integer (1, 2, ...) or primary` :  On which monitor to draw the systray. The first monitor is `1`. *(since 0.12)*
o9000's avatar
o9000 committed
490

o9000's avatar
o9000 committed
491
  * `systray_name_filter = string` :  Regular expression to identify icon names to be hidden. For example, `^audacious$` will hide icons with the exact name `audacious`, while `aud` will hide any icons having `aud` in the name. *(since 0.13.1)*
492

o9000's avatar
o9000 committed
493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533
### Clock

  * `time1_format = %H:%M` : The format used by the first line of the clock.
    * `time1_format`, `time2_format` and `clock_tooltip` use the 'strftime' syntax. More info can be found here: http://www.manpagez.com/man/3/strftime/
    * To hide the clock, comment `time1_format` and `time2_format`.

  * `time1_timezone = :US/Hawaii`
    * `time1_timezone`, `time2_timezone` and `clock_tooltip_timezone` can be used to specify a timezone. If you do not specify a value the system-wide timezone is used. The timezones can usually be found in `/usr/share/zoneinfo`. If your timezones are in a different directory, you need to specify the absolute path, e.g. `time1_timezone = :/different/zoneinfo/dir/US/Hawaii` Always prepend the timezone with a ':'

  * `time1_font = [FAMILY-LIST] [STYLE-OPTIONS] [SIZE]`

  * `time2_format = %A %d %B`

  * `time2_timezone = :Europe/Berlin`

  * `time2_font = [FAMILY-LIST] [STYLE-OPTIONS] [SIZE]`

  * `clock_font_color = color opacity (0 to 100)`

  * `clock_padding = horizontal_padding vertical_padding`

  * `clock_background_id = integer` : Which background to use

  * `clock_tooltip = %a, %d. %b %Y` : Format for the clock's tooltip.

  * `clock_tooltip_timezone = :UTC`

  * `clock_lclick_command = text` : Command to execute on left click.

  * `clock_rclick_command = text` : Command to execute on right click.

  * `clock_mclick_command = text` : Command to execute on middle click. *(since 0.12.1)*

  * `clock_uwheel_command = text` : Command to execute on wheel scroll up. *(since 0.12.1)*

  * `clock_dwheel_command = text` : Command to execute on wheel scroll down. *(since 0.12.1)*

### Tooltip

  * `tooltip_padding = horizontal_padding vertical_padding`

o9000's avatar
o9000 committed
534
  * `tooltip_show_timeout = float` : Delay to show the tooltip in seconds. Use `.` as decimal separator.
o9000's avatar
o9000 committed
535

o9000's avatar
o9000 committed
536
  * `tooltip_hide_timeout = float` : Delay to hide the tooltip in seconds. Use `.` as decimal separator.
o9000's avatar
o9000 committed
537 538 539 540 541 542 543 544 545 546 547 548 549 550 551

  * `tooltip_background_id = integer` : Which background to use for tooltips. Note that with fake transparency the alpha channel and corner radius options are not respected.

  * `tooltip_font_color = color opacity  (0 to 100)`

  * `tooltip_font = [FAMILY-LIST] [STYLE-OPTIONS] [SIZE]`

### Battery

  * `battery_hide = never/integer (0 to 100)` : At what battery percentage the battery item is hidden.

  * `battery_low_status = integer`: At what battery percentage the low command is executed.

  * `battery_low_cmd = notify-send "battery low"` : Command to execute when the battery is low.

552 553
  * `battery_full_cmd = notify-send "battery full"` : Command to execute when the battery is full.

o9000's avatar
o9000 committed
554 555 556 557 558 559
  * `bat1_font = [FAMILY-LIST] [STYLE-OPTIONS] [SIZE]`

  * `bat2_font = [FAMILY-LIST] [STYLE-OPTIONS] [SIZE]`

  * `battery_font_color = color opacity (0 to 100)`

o9000's avatar
o9000 committed
560
  * `bat1_format = FORMAT_STRING` : Format for battery line 1. Default: %p. *(since 1.0)* Format specification:
561
    * %s: State (charging, discharging, full, unknown).
o9000's avatar
o9000 committed
562 563 564 565
    * %m: Minutes left until completely charged/discharged (estimated).
    * %h: Hours left until completely charged/discharged (estimated).
    * %t: Time left. Shows "hrs:mins" when charging/discharging, or "Ful\" when full.
    * %p: Percentage. Includes the % sign.
566

o9000's avatar
o9000 committed
567
  * `bat2_format = FORMAT_STRING` : Format for battery line 2. Default: %t. *(since 1.0)*
568

o9000's avatar
o9000 committed
569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600
  * `battery_padding = horizontal_padding vertical_padding`

  * `battery_background_id = integer` : Which background to use for the battery.

  * `battery_tooltip_enabled = boolean (0 or 1)` : Enable/disable battery tooltips. *(since 0.12.3)*

  * `battery_lclick_command = text` : Command to execute on left click. *(since 0.12.1)*

  * `battery_rclick_command = text` : Command to execute on right click. *(since 0.12.1)*

  * `battery_mclick_command = text` : Command to execute on middle click. *(since 0.12.1)*

  * `battery_uwheel_command = text` : Command to execute on wheel scroll up. *(since 0.12.1)*

  * `battery_dwheel_command = text` : Command to execute on wheel scroll down. *(since 0.12.1)*

  * `ac_connected_cmd = text` : Command to execute when the power adapter is plugged in. *(since 0.12.3)*

  * `ac_disconnected_cmd = text` : Command to execute when the power adapter is unplugged. *(since 0.12.3)*

### Executor

  * `execp = new` : Begins the configuration of a new executor plugin. Multiple such plugins are supported; just use multiple `E`s in `panel_items`. *(since 0.12.4)*

  * `execp_command = text` : Command to execute. *(since 0.12.4)*

  * `execp_interval = integer` : The command is executed again after `execp_interval` seconds from the moment it exits. If zero, the command is executed only once. *(since 0.12.4)*

  * `execp_continuous = integer` : If non-zero, the last `execp_continuous` lines from the output of the command are displayed, every `execp_continuous` lines; this is useful for showing the output of commands that run indefinitely, such as `ping 127.0.0.1`. If zero, the output of the command is displayed after it finishes executing. *(since 0.12.4)*

  * `execp_has_icon = boolean (0 or 1)` : If `execp_has_icon = 1`, the first line printed by the command is interpreted as a path to an image file. *(since 0.12.4)*

o9000's avatar
o9000 committed
601
  * `execp_cache_icon = boolean (0 or 1)` : If `execp_cache_icon = 0`, the image is reloaded each time the command is executed (useful if the image file is changed on disk by the program executed by `execp_command`). *(since 0.12.4)*
o9000's avatar
o9000 committed
602

o9000's avatar
o9000 committed
603
  * `execp_icon_w = integer` : You can use `execp_icon_w` and `execp_icon_h` to resize the image. If one of them is zero/missing, the image is rescaled proportionally. If both of them are zero/missing, the image is not rescaled. *(since 0.12.4)*
o9000's avatar
o9000 committed
604 605 606

  * `execp_icon_h = integer` : See `execp_icon_w`. *(since 0.12.4)*

607
  * `execp_tooltip = text` : The tooltip. If left empty, no tooltip is displayed. If missing, the standard error of the command is shown as a tooltip (an ANSI clear screen sequence can reset the contents, bash: `printf '\e[2J'`, C: `printf("\x1b[2J");`). If the standard error is empty, the tooltip will show information about the time when the command was last executed. *(since 0.12.4)*
o9000's avatar
o9000 committed
608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684

  * `execp_font = [FAMILY-LIST] [STYLE-OPTIONS] [SIZE]` : The font used to draw the text.  *(since 0.12.4)*

  * `execp_font_color = color opacity` : The font color. *(since 0.12.4)*

  * `execp_markup = boolean (0 or 1)` : If non-zero, the output of the command is treated as Pango markup, which allows rich text formatting. The format is [documented here](https://developer.gnome.org/pygtk/stable/pango-markup-language.html). Note that using this with commands that print data downloaded from the Internet is a possible security risk. *(since 0.12.4)*

  * `execp_background_id = integer` : Which background to use. *(since 0.12.4)*

  * `execp_centered = boolean (0 or 1)` : Whether to center the text. *(since 0.12.4)*

  * `execp_padding = horizontal_padding vertical_padding spacing_between_icon_and_text` *(since 0.12.4)*

  * `execp_lclick_command = text` : Command to execute on left click. If not defined, `execp_command` is  executed immediately, unless it is currently running. *(since 0.12.4)*
  * `execp_mclick_command = text` : Command to execute on right click. If not defined, `execp_command` is  executed immediately, unless it is currently running. *(since 0.12.4)*
  * `execp_rclick_command = text` : Command to execute on middle click. If not defined, `execp_command` is  executed immediately, unless it is currently running. *(since 0.12.4)*
  * `execp_uwheel_command = text` : Command to execute on wheel scroll up. If not defined, `execp_command` is  executed immediately, unless it is currently running. *(since 0.12.4)*
  * `execp_dwheel_command = text` : Command to execute on wheel scroll down. If not defined, `execp_command` is  executed immediately, unless it is currently running. *(since 0.12.4)*

#### Executor samples

##### Print the hostname

```
execp = new
execp_command = hostname
execp_interval = 0
```

##### Print disk usage for the root partition every 10 seconds

```
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
o9000's avatar
o9000 committed
685 686
execp_command = ping -i 1 -c 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 = 0
o9000's avatar
o9000 committed
687 688 689 690 691 692 693 694
execp_interval = 1
execp_markup = 1
```

##### Memory usage

```
execp = new
o9000's avatar
o9000 committed
695
execp_command = free | awk '/^-/ { printf "Mem: '$(free -h | awk '/^Mem:/ { print $2 }')' %.0f%%\n", 100*$3/($3+$4); fflush(stdout) }'
o9000's avatar
o9000 committed
696 697
execp_interval = 5
execp_continuous = 0
o9000's avatar
o9000 committed
698 699 700 701 702 703 704 705 706 707 708 709
```

##### 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
```

o9000's avatar
o9000 committed
710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728
### Button

  * `button = new` : Begins the configuration of a new button. Multiple such plugins are supported; just use multiple `P`s in `panel_items`. *(since 0.14)*

  * `button_icon = text` : Name or path of icon (or empty). *(since 0.14)*

  * `button_text = text` : Text to display (or empty). *(since 0.14)*

  * `button_tooltip = text` : The tooltip (or empty). *(since 0.14)*

  * `button_font = [FAMILY-LIST] [STYLE-OPTIONS] [SIZE]` : The font used to draw the text.  *(since 0.14)*

  * `button_font_color = color opacity` : The font color. *(since 0.14)*

  * `button_background_id = integer` : Which background to use. *(since 0.14)*

  * `button_centered = boolean (0 or 1)` : Whether to center the text. *(since 0.14)*

  * `button_padding = horizontal_padding vertical_padding spacing_between_icon_and_text` *(since 0.14)*
o9000's avatar
o9000 committed
729
  * `button_max_icon_size = integer` : Sets a limit to the icon size. Otherwise, the icon will expand to the edges. *(since 0.14)*
o9000's avatar
o9000 committed
730 731 732 733 734 735 736

  * `button_lclick_command = text` : Command to execute on left click. If not defined, `execp_command` is  executed immediately, unless it is currently running. *(since 0.14)*
  * `button_mclick_command = text` : Command to execute on right click. If not defined, `execp_command` is  executed immediately, unless it is currently running. *(since 0.14)*
  * `button_rclick_command = text` : Command to execute on middle click. If not defined, `execp_command` is  executed immediately, unless it is currently running. *(since 0.14)*
  * `button_uwheel_command = text` : Command to execute on wheel scroll up. If not defined, `execp_command` is  executed immediately, unless it is currently running. *(since 0.14)*
  * `button_dwheel_command = text` : Command to execute on wheel scroll down. If not defined, `execp_command` is  executed immediately, unless it is currently running. *(since 0.14)*

737 738 739 740 741 742 743 744 745 746 747 748 749 750
### Separator

  * `separator = new` : Begins the configuration of a new separator. Multiple such plugins are supported; just use multiple `:`s in `panel_items`. *(since 0.13.0)*

  * `separator_background_id = integer` : Which background to use. *(since 0.13.0)*

  * `separator_color = color opacity` : The foreground color. *(since 0.13.0)*

  * `separator_style = [empty | line | dots]` : The separator style. *(since 0.13.0)*

  * `separator_size = integer` : The thickness of the separator. Does not include the border and padding. For example, if the style is `line`, this is the line thickness; if the style is `dots`, this is the dot's diameter. *(since 0.13.0)*

  * `separator_padding = side_padding cap_padding` : The padding to add to the sides of the separator, in pixels. *(since 0.13.0)*

o9000's avatar
o9000 committed
751 752
### Example configuration

o9000's avatar
o9000 committed
753
See /etc/xdg/tint2/tint2rc.
o9000's avatar
o9000 committed
754 755 756 757 758

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

o9000's avatar
o9000 committed
759
This manual page was originally written by Daniel Moerner <dmoerner@gmail.com>, for the Debian project (but may be used by others).
o9000's avatar
o9000 committed
760 761
It was adopted from the tint2 docs.

o9000's avatar
o9000 committed
762 763 764
## SEE ALSO
The main website https://gitlab.com/o9000/tint2
and the wiki page at https://gitlab.com/o9000/tint2/wikis/home.
o9000's avatar
o9000 committed
765 766 767

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`.
o9000's avatar
o9000 committed
768
.