diff --git a/CMakeLists.txt b/CMakeLists.txt index 9480494..b4a1089 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -244,7 +244,8 @@ install( FILES tint2.desktop DESTINATION ${DATADIR}/applications ) install( CODE "execute_process(COMMAND gtk-update-icon-cache -f -t ${DATADIR}/icons/hicolor WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX})" ) install( FILES themes/tint2rc DESTINATION ${SYSCONFDIR}/xdg/tint2 ) install( FILES default_icon.png DESTINATION ${DATADIR}/tint2 ) -install( FILES AUTHORS ChangeLog README.md doc/tint2.md DESTINATION ${DOCDIR} ) +install( FILES AUTHORS ChangeLog README.md doc/tint2.md doc/manual.html doc/readme.html DESTINATION ${DOCDIR} ) +install( DIRECTORY doc/images DESTINATION ${DOCDIR} ) install( FILES doc/tint2.1 DESTINATION ${MANDIR}/man1 ) if( ENABLE_EXTRA_THEMES ) add_subdirectory(themes) diff --git a/INSTALL.txt b/INSTALL.txt deleted file mode 100644 index 541b8d0..0000000 --- a/INSTALL.txt +++ /dev/null @@ -1,10 +0,0 @@ -To build and install tint2 you need CMake. -These steps should be enough for building tint2: - -mkdir build -cd build -cmake -DCMAKE_INSTALL_PREFIX=/usr ../ -make -sudo make install - -To see additional options you can set at the 'cmake' step, run 'cmake -L ../' diff --git a/README.md b/README.md index ec78e26..8471f58 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ Changes: https://gitlab.com/o9000/tint2/blob/0.12.11/ChangeLog Documentation: [doc/tint2.md](doc/tint2.md) Compile it with (see also [dependencies](https://gitlab.com/o9000/tint2/wikis/Install#dependencies)): + ``` git clone https://gitlab.com/o9000/tint2.git cd tint2 @@ -15,6 +16,7 @@ make -j4 ``` To install, run (as root): + ``` make install ``` diff --git a/doc/footer.html b/doc/footer.html new file mode 100644 index 0000000..308b1d0 --- /dev/null +++ b/doc/footer.html @@ -0,0 +1,2 @@ + + diff --git a/doc/generate-doc.sh b/doc/generate-doc.sh new file mode 100755 index 0000000..5a4ee29 --- /dev/null +++ b/doc/generate-doc.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# You can install md2man with gem install md2man. You need gem and ruby-dev. + +md2man-roff tint2.md > tint2.1 + +cat header.html > manual.html +cat tint2.md | sed 's/^# TINT2 .*$/# TINT2/g' | md2man-html >> manual.html +cat footer.html >> manual.html + +cat header.html > readme.html +cat ../README.md | sed 's|doc/tint2.md|manual.html|g' | md2man-html >> readme.html +cat footer.html >> readme.html diff --git a/doc/header.html b/doc/header.html new file mode 100644 index 0000000..664316b --- /dev/null +++ b/doc/header.html @@ -0,0 +1,201 @@ + + + + + + + diff --git a/doc/images/panel_padding.jpg b/doc/images/panel_padding.jpg new file mode 100644 index 0000000..752f4ff Binary files /dev/null and b/doc/images/panel_padding.jpg differ diff --git a/doc/images/panel_size_margin.jpg b/doc/images/panel_size_margin.jpg new file mode 100644 index 0000000..ecbd577 Binary files /dev/null and b/doc/images/panel_size_margin.jpg differ diff --git a/doc/images/task_padding.jpg b/doc/images/task_padding.jpg new file mode 100644 index 0000000..eadafd4 Binary files /dev/null and b/doc/images/task_padding.jpg differ diff --git a/doc/images/taskbar_padding.jpg b/doc/images/taskbar_padding.jpg new file mode 100644 index 0000000..e393d14 Binary files /dev/null and b/doc/images/taskbar_padding.jpg differ diff --git a/doc/manual.html b/doc/manual.html new file mode 100644 index 0000000..8b87ecd --- /dev/null +++ b/doc/manual.html @@ -0,0 +1,727 @@ + + + + + + + +

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.

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

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.

+ + diff --git a/doc/readme.html b/doc/readme.html new file mode 100644 index 0000000..4e97361 --- /dev/null +++ b/doc/readme.html @@ -0,0 +1,253 @@ + + + + + + + +

Latest stable release: 0.12.11

Changes: https://gitlab.com/o9000/tint2/blob/0.12.11/ChangeLog

Documentation: manual.html

Compile it with (see also dependencies):

git clone https://gitlab.com/o9000/tint2.git
+cd tint2
+git checkout 0.12.11
+mkdir build
+cd build
+cmake ..
+make -j4
+
+

To install, run (as root):

make install
+
+

And then you can run the panel tint2 and the configuration program tint2conf.

Please report any problems to https://gitlab.com/o9000/tint2/issues. Your feedback is much appreciated.

P.S. GitLab is now the official location of the tint2 project, migrated from Google Code, which is shutting down. In case you are wondering why not GitHub, BitBucket etc., we chose GitLab because it is open source, it is mature and works well, looks cool and has a very nice team.

What is tint2?

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.). It is based on ttm https://code.google.com/p/ttm/.

Features

+ +

Goals

+ +

I want it!

+ +

How do I ...

+ +

How can I help out?

+ +

Links

+ +

Screenshots

Default config:

Screenshot_2016-01-23_14-42-57

Various configs:

screenshot

+ + diff --git a/doc/tint2.1 b/doc/tint2.1 index 307df6e..5b1e377 100644 --- a/doc/tint2.1 +++ b/doc/tint2.1 @@ -65,7 +65,7 @@ Battery \[la]#battery\[ra] .IP \(bu 2 Executor \[la]#executor\[ra] .IP \(bu 2 -Example \[la]#an-example-tint2rc\[ra] +Example configuration \[la]#example-configuration\[ra] .RE .SS Introduction .PP @@ -89,7 +89,7 @@ The tint2 config file starts with the options defining background elements with .IP \(bu 2 \fB\fCborder_width = integer\fR : the border width in pixels .IP \(bu 2 -\fB\fCborder_sides = LRTB\fR : the sides to draw the border on (left, right, top, bottom). If not specified, all sides are used. +\fB\fCborder_sides = LRTB\fR : the sides to draw the border on (left, right, top, bottom). If not specified, all sides are used. \fI(since 0.12.12)\fP .IP \(bu 2 \fB\fCbackground_color = color opacity\fR .RS @@ -107,7 +107,7 @@ The tint2 config file starts with the options defining background elements with \fB\fCopacity\fR varies from (0 to 100), where 0 is fully transparent, 100 is fully opaque .RE .IP \(bu 2 -\fB\fCbackground_color_hover = color opacity\fR (default: same as background_color) \fI(since 0.12.3)\fP +\fB\fCbackground_color_hover = color opacity\fR (default: same as \fB\fCbackground_color\fR) \fI(since 0.12.3)\fP .RS .IP \(bu 2 \fB\fCcolor\fR is specified in hex RGB, e.g. #ff0000 is red @@ -115,7 +115,7 @@ The tint2 config file starts with the options defining background elements with \fB\fCopacity\fR 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) .RE .IP \(bu 2 -\fB\fCborder_color_hover = color opacity\fR (default: same as border_color) \fI(since 0.12.3)\fP +\fB\fCborder_color_hover = color opacity\fR (default: same as \fB\fCborder_color\fR) \fI(since 0.12.3)\fP .RS .IP \(bu 2 \fB\fCcolor\fR is specified in hex RGB, e.g. #ff0000 is red @@ -123,7 +123,7 @@ The tint2 config file starts with the options defining background elements with \fB\fCopacity\fR varies from (0 to 100), where 0 is fully transparent, 100 is fully opaque .RE .IP \(bu 2 -\fB\fCbackground_color_pressed = color opacity\fR (default: same as background\fIcolor\fPhover) \fI(since 0.12.3)\fP +\fB\fCbackground_color_pressed = color opacity\fR (default: same as \fB\fCbackground_color_hover\fR) \fI(since 0.12.3)\fP .RS .IP \(bu 2 \fB\fCcolor\fR is specified in hex RGB, e.g. #ff0000 is red @@ -131,7 +131,7 @@ The tint2 config file starts with the options defining background elements with \fB\fCopacity\fR 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) .RE .IP \(bu 2 -\fB\fCborder_color_pressed = color opacity\fR (default: same as border\fIcolor\fPhover) \fI(since 0.12.3)\fP +\fB\fCborder_color_pressed = color opacity\fR (default: same as \fB\fCborder_color_hover\fR) \fI(since 0.12.3)\fP .RS .IP \(bu 2 \fB\fCcolor\fR is specified in hex RGB, e.g. #ff0000 is red @@ -205,7 +205,7 @@ Use \fB\fCpanel_monitor = all\fR to get a separate panel per monitor \fB\fCprimary_monitor_first = boolean (0 or 1)\fR : Place the primary monitor before all the other monitors in the list. \fI(since 0.12.4)\fP .RE .PP -[\[la]http://farm4.static.flickr.com/3425/3265475271_81e8ed56e0.jpg](http://farm4.static.flickr.com/3425/3265475271_81e8ed56e0.jpg)\[ra] +[](images/panel_padding.jpg) .RS .IP \(bu 2 \fB\fCpanel_position = vertical_position horizontal_position orientation\fR @@ -237,13 +237,13 @@ panel_size = 94% 30 \fB\fCpanel_margin = horizontal_margin vertical_margin\fR : The margins define the distance between the panel and the horizontal/vertical monitor edge. Use \fB\fC0\fR to obtain a panel with the same size as the edge of the monitor (no margin). .RE .PP -[\[la]http://farm4.static.flickr.com/3438/3266303192_476a188196.jpg](http://farm4.static.flickr.com/3438/3266303192_476a188196.jpg)\[ra] +[](images/panel\fIsize\fPmargin.jpg) .RS .IP \(bu 2 \fB\fCpanel_padding = horizontal_padding vertical_padding spacing\fR : Please refer to the image below. .RE .PP -[\[la]http://farm4.static.flickr.com/3425/3265475271_81e8ed56e0.jpg](http://farm4.static.flickr.com/3425/3265475271_81e8ed56e0.jpg)\[ra] +[](images/panel_padding.jpg) .RS .IP \(bu 2 \fB\fCfont_shadow = boolean (0 or 1)\fR @@ -331,7 +331,7 @@ You can switch between virtual desktops. \fB\fCtaskbar_padding = horizontal_padding vertical_padding spacing\fR .RE .PP -[\[la]http://farm4.static.flickr.com/3521/3266303292_14d9b6b623.jpg](http://farm4.static.flickr.com/3521/3266303292_14d9b6b623.jpg)\[ra] +[](images/taskbar_padding.jpg) .RS .IP \(bu 2 \fB\fCtaskbar_background_id = integer\fR : Which background to use @@ -400,7 +400,7 @@ The following options configure the task buttons in the taskbar: \fB\fCurgent_nb_of_blink = integer\fR : Number of blinks on 'get attention' events. .RE .PP -[\[la]http://farm4.static.flickr.com/3086/3265475337_262799ded3.jpg](http://farm4.static.flickr.com/3086/3265475337_262799ded3.jpg)\[ra] +[](images/task_padding.jpg) .RS .IP \(bu 2 \fB\fCtask_font = [FAMILY\-LIST] [STYLE\-OPTIONS] [SIZE]\fR @@ -511,9 +511,9 @@ To hide the clock, comment \fB\fCtime1_format\fR and \fB\fCtime2_format\fR\&. .IP \(bu 2 \fB\fCtooltip_padding = horizontal_padding vertical_padding\fR .IP \(bu 2 -\fB\fCtooltip_show_timeout = float\fR : Delay to show the tooltip in seconds. Use '.' as decimal separator. +\fB\fCtooltip_show_timeout = float\fR : Delay to show the tooltip in seconds. Use \fB\fC\&.\fR as decimal separator. .IP \(bu 2 -\fB\fCtooltip_hide_timeout = float\fR : Delay to hide the tooltip in seconds. Use '.' as decimal separator. +\fB\fCtooltip_hide_timeout = float\fR : Delay to hide the tooltip in seconds. Use \fB\fC\&.\fR as decimal separator. .IP \(bu 2 \fB\fCtooltip_background_id = integer\fR : Which background to use for tooltips. Note that with fake transparency the alpha channel and corner radius options are not respected. .IP \(bu 2 @@ -569,9 +569,9 @@ To hide the clock, comment \fB\fCtime1_format\fR and \fB\fCtime2_format\fR\&. .IP \(bu 2 \fB\fCexecp_has_icon = boolean (0 or 1)\fR : If \fB\fCexecp_has_icon = 1\fR, the first line printed by the command is interpreted as a path to an image file. \fI(since 0.12.4)\fP .IP \(bu 2 -\fB\fCexecp_cache_icon = boolean (0 or 1)\fR : If execp\fIcache\fPicon = 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 \fB\fCexecp_command\fR). \fI(since 0.12.4)\fP +\fB\fCexecp_cache_icon = boolean (0 or 1)\fR : If \fB\fCexecp_cache_icon = 0\fR, the image is reloaded each time the command is executed (useful if the image file is changed on disk by the program executed by \fB\fCexecp_command\fR). \fI(since 0.12.4)\fP .IP \(bu 2 -\fB\fCexecp_icon_w = integer\fR : You can use execp\fIicon\fPw and execp\fIicon\fPh 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. \fI(since 0.12.4)\fP +\fB\fCexecp_icon_w = integer\fR : You can use \fB\fCexecp_icon_w\fR and \fB\fCexecp_icon_h\fR 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. \fI(since 0.12.4)\fP .IP \(bu 2 \fB\fCexecp_icon_h = integer\fR : See \fB\fCexecp_icon_w\fR\&. \fI(since 0.12.4)\fP .IP \(bu 2 @@ -689,7 +689,7 @@ execp_continuous = 1 execp_interval = 1 .fi .RE -.SH EXAMPLE CONFIG +.SS Example configuration .PP .RS .nf @@ -834,7 +834,7 @@ strut_policy = minimum tint2 was written by Thierry Lorthiois \[la]lorthiois@bbsoft.fr\[ra]\&. It is based on ttm, originally written by Pål Staurland \[la]staura@gmail.com\[ra]\&. .PP -This manual page was written by Daniel Moerner \[la]dmoerner@gmail.com\[ra], for the Debian project (but may be used by others). +This manual page was originally written by Daniel Moerner \[la]dmoerner@gmail.com\[ra], for the Debian project (but may be used by others). It was adopted from the tint2 docs. .SH SEE ALSO .PP diff --git a/doc/tint2.html b/doc/tint2.html new file mode 100644 index 0000000..033dc77 --- /dev/null +++ b/doc/tint2.html @@ -0,0 +1,524 @@ +

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

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.

diff --git a/doc/tint2.md b/doc/tint2.md index b43c7b1..2ca8bbe 100644 --- a/doc/tint2.md +++ b/doc/tint2.md @@ -56,7 +56,7 @@ Goals: * [Executor](#executor) - * [Example](#an-example-tint2rc) + * [Example configuration](#example-configuration) ### Introduction @@ -80,7 +80,7 @@ The tint2 config file starts with the options defining background elements with * `border_width = integer` : the border width in pixels - * `border_sides = LRTB` : the sides to draw the border on (left, right, top, bottom). If not specified, all sides are used. + * `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)* * `background_color = color opacity` * `color` is specified in hex RGB, e.g. #ff0000 is red @@ -90,19 +90,19 @@ The tint2 config file starts with the options defining background elements with * `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 - * `background_color_hover = color opacity` (default: same as background_color) *(since 0.12.3)* + * `background_color_hover = color opacity` (default: same as `background_color`) *(since 0.12.3)* * `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_hover = color opacity` (default: same as border_color) *(since 0.12.3)* + * `border_color_hover = color opacity` (default: same as `border_color`) *(since 0.12.3)* * `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 - * `background_color_pressed = color opacity` (default: same as background_color_hover) *(since 0.12.3)* + * `background_color_pressed = color opacity` (default: same as `background_color_hover`) *(since 0.12.3)* * `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_pressed = color opacity` (default: same as border_color_hover) *(since 0.12.3)* + * `border_color_pressed = color opacity` (default: same as `border_color_hover`) *(since 0.12.3)* * `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 @@ -153,7 +153,7 @@ Identifier 0 refers to a special background which is fully transparent, identifi * `primary_monitor_first = boolean (0 or 1)` : Place the primary monitor before all the other monitors in the list. *(since 0.12.4)* -![http://farm4.static.flickr.com/3425/3265475271_81e8ed56e0.jpg](http://farm4.static.flickr.com/3425/3265475271_81e8ed56e0.jpg) +![](images/panel_padding.jpg) * `panel_position = vertical_position horizontal_position orientation` * `vertical_position` is one of: `bottom`, `top`, `center` @@ -171,11 +171,11 @@ panel_size = 94% 30 * `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). -![http://farm4.static.flickr.com/3438/3266303192_476a188196.jpg](http://farm4.static.flickr.com/3438/3266303192_476a188196.jpg) +![](images/panel_size_margin.jpg) * `panel_padding = horizontal_padding vertical_padding spacing` : Please refer to the image below. -![http://farm4.static.flickr.com/3425/3265475271_81e8ed56e0.jpg](http://farm4.static.flickr.com/3425/3265475271_81e8ed56e0.jpg) +![](images/panel_padding.jpg) * `font_shadow = boolean (0 or 1)` @@ -245,7 +245,7 @@ panel_size = 94% 30 * `taskbar_padding = horizontal_padding vertical_padding spacing` -![http://farm4.static.flickr.com/3521/3266303292_14d9b6b623.jpg](http://farm4.static.flickr.com/3521/3266303292_14d9b6b623.jpg) +![](images/taskbar_padding.jpg) * `taskbar_background_id = integer` : Which background to use @@ -300,7 +300,7 @@ The following options configure the task buttons in the taskbar: * `urgent_nb_of_blink = integer` : Number of blinks on 'get attention' events. -![http://farm4.static.flickr.com/3086/3265475337_262799ded3.jpg](http://farm4.static.flickr.com/3086/3265475337_262799ded3.jpg) +![](images/task_padding.jpg) * `task_font = [FAMILY-LIST] [STYLE-OPTIONS] [SIZE]` @@ -399,9 +399,9 @@ The action semantics: * `tooltip_padding = horizontal_padding vertical_padding` - * `tooltip_show_timeout = float` : Delay to show the tooltip in seconds. Use '.' as decimal separator. + * `tooltip_show_timeout = float` : Delay to show the tooltip in seconds. Use `.` as decimal separator. - * `tooltip_hide_timeout = float` : Delay to hide the tooltip in seconds. Use '.' as decimal separator. + * `tooltip_hide_timeout = float` : Delay to hide the tooltip in seconds. Use `.` as decimal separator. * `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. @@ -455,9 +455,9 @@ The action semantics: * `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)* - * `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)* + * `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)* - * `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)* + * `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)* * `execp_icon_h = integer` : See `execp_icon_w`. *(since 0.12.4)* @@ -564,7 +564,8 @@ execp_continuous = 1 execp_interval = 1 ``` -# EXAMPLE CONFIG +### Example configuration + ``` #--------------------------------------------- ## TINT2 CONFIG FILE @@ -706,7 +707,7 @@ strut_policy = minimum tint2 was written by Thierry Lorthiois . It is based on ttm, originally written by Pål Staurland . -This manual page was written by Daniel Moerner , for the Debian project (but may be used by others). +This manual page was originally written by Daniel Moerner , for the Debian project (but may be used by others). It was adopted from the tint2 docs. ## SEE ALSO