Compare commits

...

48 Commits

Author SHA1 Message Date
aaaz
fcbdd00bce update clock at the beginning of seconds 2017-07-08 16:24:45 -05:00
o9000
491a56db10 Clock: Update correctly after suspend 2017-07-02 23:19:24 +02:00
o9000
cbe31981b3 Executor: fallback to old style tooltips if stderr is empty 2017-06-27 12:42:51 +02:00
o9000
dafe9824e3 Update changelog 2017-06-27 12:32:23 +02:00
o9000
b931066573 Executor: truncate very long tooltips 2017-06-27 12:27:50 +02:00
o9000
f45e107207 Executor: if no user tooltip is set, display stderr output 2017-06-27 12:24:52 +02:00
o9000
ece3bc4d85 Add some new themes, remove redundant ones 2017-06-27 11:04:12 +02:00
o9000
4b9ee685ac Update timers correctly after suspend 2017-06-27 00:53:17 +02:00
o9000
cfc43685a4 ChangeLog is in the same directory of get_version.sh, get it from there 2017-06-26 22:46:17 +02:00
o9000
d05d5f594b Revert change to ubuntu script 2017-06-26 22:36:42 +02:00
o9000
425036adc9 Get version script: allow running without path parameter 2017-06-26 22:34:48 +02:00
o9000
cb174592be Merge branch 'version' into 'master'
Fix finding Version

See merge request !26
2017-06-26 20:29:57 +00:00
Chris Mayo
7a350a5e83 Fix finding ChangeLog when building
Keep the first optional argument of get_version.sh as "--strict" and
make the second the PROJECT_SOURCE_DIR plus trailing slash from
CMakeLists.txt
2017-06-26 19:23:58 +01:00
Chris Mayo
afadf3ea3f Revert "Use double quoting in get_version.sh"
Fixed symptom not the underlying problem.

This reverts commit e39a841f6e.
2017-06-26 19:23:58 +01:00
o9000
c8ccf053ff tint2conf: fix segfault in corner case 2017-06-26 11:08:31 +02:00
o9000
2f74250634 Add some new themes, remove redundant ones 2017-06-26 11:01:07 +02:00
o9000
ad7faaab81 Make get_version.sh work in the current dir instead of build 2017-06-26 10:23:50 +02:00
o9000
e39a841f6e Use double quoting in get_version.sh 2017-06-26 10:19:08 +02:00
o9000
fc7c6afa81 Updated man page 2017-06-25 13:02:07 +02:00
o9000
51bc9d1569 Updated translation files 2017-06-22 22:11:06 +02:00
o9000
747bbd7c7b Update changelog 2017-06-22 20:43:13 +02:00
o9000
521ffbfaaf Remove primary_monitor_first and add primary as a possible monitor value (issue #614) 2017-06-22 19:57:23 +02:00
o9000
cd33e5b274 Battery: better Unknown state handling 2017-06-22 19:03:05 +02:00
o9000
201ea843a0 Battery: new config option battery_full_cmd (fixes issue #585) 2017-06-20 20:38:26 +02:00
o9000
dee210ceec Updated French translation 2017-06-20 20:25:07 +02:00
o9000
ea0e52c5a2 Battery format fixes 2017-06-20 18:58:22 +02:00
o9000
b5578ff5bc battery: Do not redefine strncat with different semantics 2017-06-20 16:18:28 +02:00
o9000
f9ad3cb029 Merge battery format from https://gitlab.com/berkley4/tint2 (issue #229) 2017-06-20 13:15:41 +02:00
o9000
30c24c59ed Hide executor if output is empty (issue #648) 2017-06-20 13:01:09 +02:00
o9000
6f05c9d327 Hide executor if output is empty (issue #648) 2017-06-20 12:57:35 +02:00
o9000
30429b88b3 Merge battery format from https://gitlab.com/berkley4/tint2 (issue #229) 2017-06-20 12:36:04 +02:00
o9000
394be61a65 Collapse executor if output is empty (fixes issue #648) 2017-06-20 11:38:37 +02:00
o9000
d55f6d7baa taskbar_hide_different_desktop 2017-06-20 05:06:37 +02:00
o9000
2dfcab170d Update packaging 2017-06-11 13:30:27 +02:00
o9000
59b2094ad1 Update packaging 2017-06-11 11:28:04 +02:00
o9000
8046600a55 Release 0.14.6 2017-06-11 11:15:36 +02:00
o9000
17a655b52a Update changelog 2017-06-11 11:14:57 +02:00
o9000
75b8587216 Update changelog 2017-06-05 17:07:04 +02:00
o9000
7c87ab88bc Reexecute on SIGUSR2 2017-06-05 16:56:40 +02:00
o9000
b87470a284 Update packaging script 2017-06-05 16:21:14 +02:00
o9000
948bf10bad Refactor text rendering 2017-06-05 16:12:51 +02:00
o9000
59c3761455 Refactor text rendering 2017-06-05 16:12:51 +02:00
o9000
b50f5ecf3e executor: do not output last line if it is not terminated by newline 2017-06-02 20:10:41 +02:00
o9000
be9c492406 Update changelog 2017-05-31 23:13:55 +02:00
o9000
85e1a356fe Fix incorrect config warning 2017-05-31 23:06:47 +02:00
o9000
5da4c1653a Clock: take into account borders and padding when computing size 2017-05-29 23:57:38 +02:00
o9000
64edd55add Task: take into account border width when computing text height 2017-05-28 14:46:50 +02:00
o9000
bd28ee77d9 Fix task icon size limits (https://forums.bunsenlabs.org/viewtopic.php?pid=51884) 2017-05-24 21:07:47 +02:00
60 changed files with 4979 additions and 5855 deletions

View File

@@ -29,6 +29,7 @@ Contributors:
Oskari Rauta : separator plugin, gradients
Michael Messmore : Support for Path in .desktop files
Matthew Otnel : config option systray_name_filter
Ryan Gray, Jeff Blake (https://gitlab.com/berkley4) : battery format
Translations:
Bosnian:

View File

@@ -217,7 +217,7 @@ else()
SET(ASAN_L_FLAGS "")
endif()
add_custom_target( version ALL "${PROJECT_SOURCE_DIR}/get_version.sh" "\"${PROJECT_SOURCE_DIR}\"" )
add_custom_target( version ALL "${PROJECT_SOURCE_DIR}/get_version.sh" -- "\"${PROJECT_SOURCE_DIR}/\"" )
link_directories( ${X11_LIBRARY_DIRS}
${PANGOCAIRO_LIBRARY_DIRS}

View File

@@ -1,3 +1,29 @@
2017-06-27 master
- Fixes:
- Clock, executors and other timers fire correctly after waking up from suspend
- Enhancements:
- Taskbar: new config option taskbar_hide_different_desktop
- Battery:
- New config option bat1_format and bat2_format
- New config option battery_full_cmd
- Better "Unknown" state handling
- Executor:
- Hide if output is empty
- If no user tooltip is set, displays the script standard error as tooltip.
Tooltip is multiline, can be cleared with the VT100 clear screen sequence, in shell: (>&2 echo -en "\033[2J").
Long tooltips are truncated to 4096 characters.
- Configuration changes:
- Removed primary_monitor_first as it was conflicting with taskbar behavior; use *_monitor = primary instead.
2017-06-11 0.14.6
- Fixes:
- Take into account border width when computing text height
- Taskbar: Fix task icon size limits
- Executor: Do not output last line if it is not terminated by newline
- Enhancements:
- Re-execute tint2 on SIGUSR2.
This is useful for preserving config options and environment when updating tint2.
2017-05-21 0.14.5
- Fixes:
- Fixed a couple of memory leaks

View File

@@ -1,5 +1,5 @@
# Latest stable release: 0.14.5
Changes: https://gitlab.com/o9000/tint2/blob/0.14.5/ChangeLog
# Latest stable release: 0.14.6
Changes: https://gitlab.com/o9000/tint2/blob/0.14.6/ChangeLog
Documentation: [doc/tint2.md](doc/tint2.md)
@@ -8,7 +8,7 @@ Compile it with (after you install the [dependencies](https://gitlab.com/o9000/t
```
git clone https://gitlab.com/o9000/tint2.git
cd tint2
git checkout 0.14.5
git checkout 0.14.6
mkdir build
cd build
cmake ..

View File

@@ -364,12 +364,12 @@ gradient_id_pressed = 2
<li><code>:</code> adds a separator. You can specify more than one. <em>(since 0.13.0)</em></li>
</ul>
<p>For example, <code>panel_items = STC</code> will show the systray, the taskbar and the clock (from left to right).</p></li>
<li><p><code>panel_monitor = monitor (all or 1 or 2 or ...)</code> : Which monitor tint2 draws the panel on</p>
<li><p><code>panel_monitor = monitor (all or primary or 1 or 2 or ...)</code> : Which monitor tint2 draws the panel on</p>
<ul>
<li>The first monitor is <code>1</code></li>
<li>Use <code>panel_monitor = all</code> to get a separate panel per monitor</li>
</ul></li>
<li><p><code>primary_monitor_first = boolean (0 or 1)</code> : Place the primary monitor before all the other monitors in the list. <em>(since 0.12.4)</em></p></li>
<li><p><code>primary_monitor_first = boolean (0 or 1)</code> : Place the primary monitor before all the other monitors in the list. <em>(since 0.12.4; removed in 1.0, use <code>primary</code> instead)</em></p></li>
</ul>
<p><img src="images/panel_padding.jpg" alt=""></p>
<ul>
@@ -456,6 +456,7 @@ panel_size = 94% 30
<li><p><code>taskbar_active_background_id = integer</code> : Which background to use for the taskbar of the current virtual desktop.</p></li>
<li><p><code>taskbar_hide_inactive_tasks = boolean (0 or 1)</code> : If enabled, the taskbar shows only the active task. <em>(since 0.12)</em></p></li>
<li><p><code>taskbar_hide_different_monitor = boolean (0 or 1)</code> : 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. <em>(since 0.12)</em></p></li>
<li><p><code>taskbar_hide_different_desktop = boolean (0 or 1)</code> : 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. <em>(since 1.0)</em></p></li>
<li><p><code>taskbar_always_show_all_desktop_tasks = boolean (0 or 1)</code> : Has effect only if <code>taskbar_mode = multi_desktop</code>. 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. <em>(since 0.12.4)</em></p></li>
<li><p><code>taskbar_sort_order = none/title/center</code> : Specifies the sort order of the tasks on the taskbar. <em>(since 0.12)</em></p>
<ul>
@@ -523,7 +524,7 @@ panel_size = 94% 30
<li><p><code>systray_sort = ascending/descending/left2right/right2left</code> : 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 <code>left2right</code> or <code>right2left</code> the order can be different on panel restart).</p></li>
<li><p><code>systray_icon_size = max_icon_size</code> : Set the maximum system tray icon size to <code>number</code>. Set to <code>0</code> for automatic icon sizing.</p></li>
<li><p><code>systray_icon_asb = alpha (0 to 100) saturation (-100 to 100) brightness (-100 to 100)</code> : Adjust the systray icons color and transparency.</p></li>
<li><p><code>systray_monitor = integer (1, 2, ...)</code> : On which monitor to draw the systray. The first monitor is <code>1</code>. <em>(since 0.12)</em></p></li>
<li><p><code>systray_monitor = integer (1, 2, ...) or primary</code> : On which monitor to draw the systray. The first monitor is <code>1</code>. <em>(since 0.12)</em></p></li>
<li><p><code>systray_name_filter = string</code> : Regular expression to identify icon names to be hidden. For example, <code>^audacious$</code> will hide icons with the exact name <code>audacious</code>, while <code>aud</code> will hide any icons having <code>aud</code> in the name. <em>(since 0.13.1)</em></p></li>
</ul>
<h3 id="clock">Clock<a name="clock" href="#clock" class="md2man-permalink" title="permalink"></a></h3>
@@ -566,9 +567,19 @@ panel_size = 94% 30
<li><p><code>battery_hide = never/integer (0 to 100)</code> : At what battery percentage the battery item is hidden.</p></li>
<li><p><code>battery_low_status = integer</code>: At what battery percentage the low command is executed.</p></li>
<li><p><code>battery_low_cmd = notify-send &quot;battery low&quot;</code> : Command to execute when the battery is low.</p></li>
<li><p><code>battery_full_cmd = notify-send &quot;battery full&quot;</code> : Command to execute when the battery is full.</p></li>
<li><p><code>bat1_font = [FAMILY-LIST] [STYLE-OPTIONS] [SIZE]</code></p></li>
<li><p><code>bat2_font = [FAMILY-LIST] [STYLE-OPTIONS] [SIZE]</code></p></li>
<li><p><code>battery_font_color = color opacity (0 to 100)</code></p></li>
<li><p><code>bat1_format = FORMAT_STRING</code> : Format for battery line 1. Default: %p. <em>(since 1.0)</em> Format specification:</p>
<ul>
<li>%s: State (charging, discharging, full, unknown).</li>
<li>%m: Minutes left until completely charged/discharged (estimated).</li>
<li>%h: Hours left until completely charged/discharged (estimated).</li>
<li>%t: Time left. Shows &quot;hrs:mins&quot; when charging/discharging, or &quot;Ful\&quot; when full.</li>
<li>%p: Percentage. Includes the % sign.</li>
</ul></li>
<li><p><code>bat2_format = FORMAT_STRING</code> : Format for battery line 2. Default: %t. <em>(since 1.0)</em></p></li>
<li><p><code>battery_padding = horizontal_padding vertical_padding</code></p></li>
<li><p><code>battery_background_id = integer</code> : Which background to use for the battery.</p></li>
<li><p><code>battery_tooltip_enabled = boolean (0 or 1)</code> : Enable/disable battery tooltips. <em>(since 0.12.3)</em></p></li>

View File

@@ -199,9 +199,9 @@ pre {
</style>
</head>
<body>
<h1 id="latest-stable-release-0-14-5"><span class="md2man-title">Latest</span> <span class="md2man-section">stable</span> <span class="md2man-date">release:</span> <span class="md2man-source">0.14.5</span><a name="latest-stable-release-0-14-5" href="#latest-stable-release-0-14-5" class="md2man-permalink" title="permalink"></a></h1><p>Changes: <a href="https://gitlab.com/o9000/tint2/blob/0.14.5/ChangeLog">https://gitlab.com/o9000/tint2/blob/0.14.5/ChangeLog</a></p><p>Documentation: <a href="manual.html">manual.html</a></p><p>Compile it with (after you install the <a href="https://gitlab.com/o9000/tint2/wikis/Install#dependencies">dependencies</a>):</p><pre class="highlight plaintext"><code>git clone https://gitlab.com/o9000/tint2.git
<h1 id="latest-stable-release-0-14-6"><span class="md2man-title">Latest</span> <span class="md2man-section">stable</span> <span class="md2man-date">release:</span> <span class="md2man-source">0.14.6</span><a name="latest-stable-release-0-14-6" href="#latest-stable-release-0-14-6" class="md2man-permalink" title="permalink"></a></h1><p>Changes: <a href="https://gitlab.com/o9000/tint2/blob/0.14.6/ChangeLog">https://gitlab.com/o9000/tint2/blob/0.14.6/ChangeLog</a></p><p>Documentation: <a href="manual.html">manual.html</a></p><p>Compile it with (after you install the <a href="https://gitlab.com/o9000/tint2/wikis/Install#dependencies">dependencies</a>):</p><pre class="highlight plaintext"><code>git clone https://gitlab.com/o9000/tint2.git
cd tint2
git checkout 0.14.5
git checkout 0.14.6
mkdir build
cd build
cmake ..

View File

@@ -1,4 +1,4 @@
.TH TINT2 1 "2017\-05\-21" 0.14.5
.TH TINT2 1 "2017\-06\-11" 0.14.6
.SH NAME
.PP
tint2 \- lightweight panel/taskbar
@@ -309,7 +309,7 @@ gradient_id_pressed = 2
.PP
For example, \fB\fCpanel_items = STC\fR will show the systray, the taskbar and the clock (from left to right).
.IP \(bu 2
\fB\fCpanel_monitor = monitor (all or 1 or 2 or ...)\fR : Which monitor tint2 draws the panel on
\fB\fCpanel_monitor = monitor (all or primary or 1 or 2 or ...)\fR : Which monitor tint2 draws the panel on
.RS
.IP \(bu 2
The first monitor is \fB\fC1\fR
@@ -317,7 +317,7 @@ The first monitor is \fB\fC1\fR
Use \fB\fCpanel_monitor = all\fR to get a separate panel per monitor
.RE
.IP \(bu 2
\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
\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; removed in 1.0, use \fB\fCprimary\fR instead)\fP
.RE
.PP
[](images/panel_padding.jpg)
@@ -461,6 +461,8 @@ You can switch between virtual desktops.
.IP \(bu 2
\fB\fCtaskbar_hide_different_monitor = boolean (0 or 1)\fR : 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. \fI(since 0.12)\fP
.IP \(bu 2
\fB\fCtaskbar_hide_different_desktop = boolean (0 or 1)\fR : 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. \fI(since 1.0)\fP
.IP \(bu 2
\fB\fCtaskbar_always_show_all_desktop_tasks = boolean (0 or 1)\fR : Has effect only if \fB\fCtaskbar_mode = multi_desktop\fR\&. 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. \fI(since 0.12.4)\fP
.IP \(bu 2
\fB\fCtaskbar_sort_order = none/title/center\fR : Specifies the sort order of the tasks on the taskbar. \fI(since 0.12)\fP
@@ -578,7 +580,7 @@ The action semantics:
.IP \(bu 2
\fB\fCsystray_icon_asb = alpha (0 to 100) saturation (\-100 to 100) brightness (\-100 to 100)\fR : Adjust the systray icons color and transparency.
.IP \(bu 2
\fB\fCsystray_monitor = integer (1, 2, ...)\fR : On which monitor to draw the systray. The first monitor is \fB\fC1\fR\&. \fI(since 0.12)\fP
\fB\fCsystray_monitor = integer (1, 2, ...) or primary\fR : On which monitor to draw the systray. The first monitor is \fB\fC1\fR\&. \fI(since 0.12)\fP
.IP \(bu 2
\fB\fCsystray_name_filter = string\fR : Regular expression to identify icon names to be hidden. For example, \fB\fC^audacious$\fR will hide icons with the exact name \fB\fCaudacious\fR, while \fB\fCaud\fR will hide any icons having \fB\fCaud\fR in the name. \fI(since 0.13.1)\fP
.RE
@@ -651,12 +653,30 @@ To hide the clock, comment \fB\fCtime1_format\fR and \fB\fCtime2_format\fR\&.
.IP \(bu 2
\fB\fCbattery_low_cmd = notify\-send "battery low"\fR : Command to execute when the battery is low.
.IP \(bu 2
\fB\fCbattery_full_cmd = notify\-send "battery full"\fR : Command to execute when the battery is full.
.IP \(bu 2
\fB\fCbat1_font = [FAMILY\-LIST] [STYLE\-OPTIONS] [SIZE]\fR
.IP \(bu 2
\fB\fCbat2_font = [FAMILY\-LIST] [STYLE\-OPTIONS] [SIZE]\fR
.IP \(bu 2
\fB\fCbattery_font_color = color opacity (0 to 100)\fR
.IP \(bu 2
\fB\fCbat1_format = FORMAT_STRING\fR : Format for battery line 1. Default: %p. \fI(since 1.0)\fP Format specification:
.RS
.IP \(bu 2
%s: State (charging, discharging, full, unknown).
.IP \(bu 2
%m: Minutes left until completely charged/discharged (estimated).
.IP \(bu 2
%h: Hours left until completely charged/discharged (estimated).
.IP \(bu 2
%t: Time left. Shows "hrs:mins" when charging/discharging, or "Ful\[rs]" when full.
.IP \(bu 2
%p: Percentage. Includes the % sign.
.RE
.IP \(bu 2
\fB\fCbat2_format = FORMAT_STRING\fR : Format for battery line 2. Default: %t. \fI(since 1.0)\fP
.IP \(bu 2
\fB\fCbattery_padding = horizontal_padding vertical_padding\fR
.IP \(bu 2
\fB\fCbattery_background_id = integer\fR : Which background to use for the battery.

View File

@@ -1,4 +1,4 @@
# TINT2 1 "2017-05-21" 0.14.5
# TINT2 1 "2017-06-11" 0.14.6
## NAME
tint2 - lightweight panel/taskbar
@@ -258,11 +258,11 @@ gradient_id_pressed = 2
For example, `panel_items = STC` will show the systray, the taskbar and the clock (from left to right).
* `panel_monitor = monitor (all or 1 or 2 or ...)` : Which monitor tint2 draws the panel on
* `panel_monitor = monitor (all or primary or 1 or 2 or ...)` : Which monitor tint2 draws the panel on
* The first monitor is `1`
* Use `panel_monitor = all` to get a separate panel per monitor
* `primary_monitor_first = boolean (0 or 1)` : Place the primary monitor before all the other monitors in the list. *(since 0.12.4)*
* `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)*
![](images/panel_padding.jpg)
@@ -370,6 +370,8 @@ panel_size = 94% 30
* `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)*
* `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)*
* `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)*
@@ -471,7 +473,7 @@ The action semantics:
* `systray_icon_asb = alpha (0 to 100) saturation (-100 to 100) brightness (-100 to 100)` : Adjust the systray icons color and transparency.
* `systray_monitor = integer (1, 2, ...)` : On which monitor to draw the systray. The first monitor is `1`. *(since 0.12)*
* `systray_monitor = integer (1, 2, ...) or primary` : On which monitor to draw the systray. The first monitor is `1`. *(since 0.12)*
* `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)*
@@ -534,12 +536,23 @@ The action semantics:
* `battery_low_cmd = notify-send "battery low"` : Command to execute when the battery is low.
* `battery_full_cmd = notify-send "battery full"` : Command to execute when the battery is full.
* `bat1_font = [FAMILY-LIST] [STYLE-OPTIONS] [SIZE]`
* `bat2_font = [FAMILY-LIST] [STYLE-OPTIONS] [SIZE]`
* `battery_font_color = color opacity (0 to 100)`
* `bat1_format = FORMAT_STRING` : Format for battery line 1. Default: %p. *(since 1.0)* Format specification:
* %s: State (charging, discharging, full, unknown).
* %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.
* `bat2_format = FORMAT_STRING` : Format for battery line 2. Default: %t. *(since 1.0)*
* `battery_padding = horizontal_padding vertical_padding`
* `battery_background_id = integer` : Which background to use for the battery.

View File

@@ -33,10 +33,11 @@ then
fi
VERSION=$(git describe --exact-match 2>/dev/null || echo "$MAJOR-git$(git show -s --pretty=format:%ci | cut -d ' ' -f 1 | tr -d '-').$(git show -s --pretty=format:%h)")$DIRTY
else
VERSION=$(head -n 1 ChangeLog || head -n 1 ../ChangeLog | cut -d ' ' -f 2)
if [ $VERSION = "master" ]
SCRIPT_DIR=$(dirname "$0")
VERSION=$(head -n 1 "${SCRIPT_DIR}/ChangeLog" | cut -d ' ' -f 2)
if [ "$VERSION" = "master" ]
then
VERSION=$VERSION-$(head -n 1 ChangeLog || head -n 1 ../ChangeLog | cut -d ' ' -f 1)
VERSION=$VERSION-$(head -n 1 "${SCRIPT_DIR}/ChangeLog" | cut -d ' ' -f 1)
fi
fi

View File

@@ -23,7 +23,8 @@ Homepage: https://gitlab.com/o9000/tint2/
Package: tint2
Architecture: any
Depends: ${shlibs:Depends},
${misc:Depends}
${misc:Depends},
procps
Description: lightweight taskbar
Tint is a simple panel/taskbar intentionally made for openbox3, but should
also work with other window managers. The taskbar includes transparency and

View File

@@ -0,0 +1,2 @@
pkill -SIGUSR2 tint2 || true

View File

@@ -49,7 +49,7 @@ echo "echo \"#define VERSION_STRING \\\"$VERSION\\\"\" > version.h" > $DIR/get_v
# Copy the debian files into the source directory
cp -r debian $DIR/debian
for DISTRO in precise trusty xenial yakkety zesty
for DISTRO in precise trusty xenial yakkety zesty artful
do
# Cleanup from previous builds
rm -rf tint2_$VERSION-*

View File

@@ -35,20 +35,25 @@ gboolean bat1_has_font;
PangoFontDescription *bat1_font_desc;
gboolean bat2_has_font;
PangoFontDescription *bat2_font_desc;
char *bat1_format;
char *bat2_format;
struct BatteryState battery_state;
gboolean battery_enabled;
gboolean battery_tooltip_enabled;
int percentage_hide;
static timeout *battery_timeout;
static char buf_bat_percentage[10];
static char buf_bat_time[20];
#define BATTERY_BUF_SIZE 256
static char buf_bat_line1[BATTERY_BUF_SIZE];
static char buf_bat_line2[BATTERY_BUF_SIZE];
int8_t battery_low_status;
gboolean battery_low_cmd_sent;
gboolean battery_full_cmd_sent;
char *ac_connected_cmd;
char *ac_disconnected_cmd;
char *battery_low_cmd;
char *battery_full_cmd;
char *battery_lclick_command;
char *battery_mclick_command;
char *battery_rclick_command;
@@ -70,14 +75,18 @@ void default_battery()
battery_found = FALSE;
percentage_hide = 101;
battery_low_cmd_sent = FALSE;
battery_full_cmd_sent = FALSE;
battery_timeout = NULL;
bat1_has_font = FALSE;
bat1_font_desc = NULL;
bat1_format = NULL;
bat2_has_font = FALSE;
bat2_font_desc = NULL;
bat2_format = NULL;
ac_connected_cmd = NULL;
ac_disconnected_cmd = NULL;
battery_low_cmd = NULL;
battery_full_cmd = NULL;
battery_lclick_command = NULL;
battery_mclick_command = NULL;
battery_rclick_command = NULL;
@@ -98,6 +107,12 @@ void cleanup_battery()
bat2_font_desc = NULL;
free(battery_low_cmd);
battery_low_cmd = NULL;
free(battery_full_cmd);
battery_full_cmd = NULL;
free(bat1_format);
bat1_format = NULL;
free(bat2_format);
bat2_format = NULL;
free(battery_lclick_command);
battery_lclick_command = NULL;
free(battery_mclick_command);
@@ -119,6 +134,91 @@ void cleanup_battery()
battery_os_free();
}
// Appends addendum to dest, and does not allow dest to grow over limit (including NULL terminator).
char *strnappend(char *dest, const char *addendum, size_t limit)
{
char *tmp = strdup(dest);
// Actually concatenate them.
snprintf(dest, limit, "%s%s", tmp, addendum);
free(tmp);
return dest;
}
void battery_update_text(char *dest, char *format)
{
if (!battery_enabled || !dest || !format)
return;
// We want to loop over the format specifier, replacing any known symbols with our battery data.
// First, erase anything already stored in the buffer.
// This ensures the string will always be null-terminated.
bzero(dest, BATTERY_BUF_SIZE);
for (size_t o = 0; o < strlen(format); o++) {
char buf[BATTERY_BUF_SIZE];
bzero(buf, BATTERY_BUF_SIZE);
char *c = &format[o];
// Format specification:
// %s : State (charging, discharging, full, unknown)
// %m : Minutes left (estimated).
// %h : Hours left (estimated).
// %t : Time left. This is equivalent to the old behaviour; i.e. "(plugged in)" or "hrs:mins" otherwise.
// %p : Percentage left. Includes the % sign.
if (*c == '%') {
c++;
o++; // Skip the format control character.
switch (*c) {
case 's':
// Append the appropriate status message to the string.
strnappend(dest,
(battery_state.state == BATTERY_CHARGING)
? "Charging"
: (battery_state.state == BATTERY_DISCHARGING)
? "Discharging"
: (battery_state.state == BATTERY_FULL)
? "Full"
: "Unknown",
BATTERY_BUF_SIZE);
break;
case 'm':
snprintf(buf, sizeof(buf), "%02d", battery_state.time.minutes);
strnappend(dest, buf, BATTERY_BUF_SIZE);
break;
case 'h':
snprintf(buf, sizeof(buf), "%02d", battery_state.time.hours);
strnappend(dest, buf, BATTERY_BUF_SIZE);
break;
case 'p':
snprintf(buf, sizeof(buf), "%d%%", battery_state.percentage);
strnappend(dest, buf, BATTERY_BUF_SIZE);
break;
case 't':
if (battery_state.state == BATTERY_FULL) {
snprintf(buf, sizeof(buf), "Full");
strnappend(dest, buf, BATTERY_BUF_SIZE);
} else {
snprintf(buf, sizeof(buf), "%02d:%02d", battery_state.time.hours, battery_state.time.minutes);
strnappend(dest, buf, BATTERY_BUF_SIZE);
}
break;
case '%':
case '\0':
strnappend(dest, "%", BATTERY_BUF_SIZE);
break;
default:
fprintf(stderr, "Battery: unrecognised format specifier '%%%c'.\n", *c);
buf[0] = *c;
strnappend(dest, buf, BATTERY_BUF_SIZE);
}
} else {
buf[0] = *c;
strnappend(dest, buf, BATTERY_BUF_SIZE);
}
}
}
void init_battery()
{
if (!battery_enabled)
@@ -169,6 +269,11 @@ void init_battery_panel(void *p)
if (battery_tooltip_enabled)
battery->area._get_tooltip_text = battery_get_tooltip;
instantiate_area_gradients(&battery->area);
if (!bat1_format && !bat2_format) {
bat1_format = strdup("%p");
bat2_format = strdup("%t");
}
}
void battery_init_fonts()
@@ -242,6 +347,16 @@ void update_battery_tick(void *arg)
battery_low_cmd_sent = FALSE;
}
if ((battery_state.percentage >= 100 || battery_state.state == BATTERY_FULL) &&
!battery_full_cmd_sent) {
tint_exec_no_sn(battery_full_cmd);
battery_full_cmd_sent = TRUE;
}
if (battery_state.percentage < 100 && battery_state.state != BATTERY_FULL &&
battery_full_cmd_sent) {
battery_full_cmd_sent = FALSE;
}
for (int i = 0; i < num_panels; i++) {
// Show/hide if needed
if (!battery_found) {
@@ -278,158 +393,51 @@ int update_battery()
battery_state.percentage = 100;
}
battery_update_text(buf_bat_line1, bat1_format);
if (bat2_format != 0) {
battery_update_text(buf_bat_line2, bat2_format);
}
return err;
}
int battery_compute_desired_size(void *obj)
{
Battery *battery = (Battery *)obj;
Panel *panel = (Panel *)battery->area.panel;
int bat_percentage_height, bat_percentage_width, bat_percentage_height_ink;
int bat_time_height, bat_time_width, bat_time_height_ink;
snprintf(buf_bat_percentage, sizeof(buf_bat_percentage), "%d%%", battery_state.percentage);
if (battery_state.state == BATTERY_FULL) {
strcpy(buf_bat_time, "Full");
} else {
snprintf(buf_bat_time, sizeof(buf_bat_time), "%02d:%02d", battery_state.time.hours, battery_state.time.minutes);
}
get_text_size2(bat1_font_desc,
&bat_percentage_height_ink,
&bat_percentage_height,
&bat_percentage_width,
panel->area.height,
panel->area.width,
buf_bat_percentage,
strlen(buf_bat_percentage),
PANGO_WRAP_WORD_CHAR,
PANGO_ELLIPSIZE_NONE,
FALSE);
get_text_size2(bat2_font_desc,
&bat_time_height_ink,
&bat_time_height,
&bat_time_width,
panel->area.height,
panel->area.width,
buf_bat_time,
strlen(buf_bat_time),
PANGO_WRAP_WORD_CHAR,
PANGO_ELLIPSIZE_NONE,
FALSE);
if (panel_horizontal) {
int new_size = (bat_percentage_width > bat_time_width) ? bat_percentage_width : bat_time_width;
new_size += 2 * battery->area.paddingxlr + left_right_border_width(&battery->area);
return new_size;
} else {
int new_size = bat_percentage_height + bat_time_height + 2 * battery->area.paddingxlr +
top_bottom_border_width(&battery->area);
return new_size;
}
return text_area_compute_desired_size(&battery->area, buf_bat_line1, buf_bat_line2, bat1_font_desc, bat2_font_desc);
}
gboolean resize_battery(void *obj)
{
Battery *battery = (Battery *)obj;
Panel *panel = (Panel *)battery->area.panel;
int bat_percentage_height, bat_percentage_width, bat_percentage_height_ink;
int bat_time_height, bat_time_width, bat_time_height_ink;
int ret = 0;
snprintf(buf_bat_percentage, sizeof(buf_bat_percentage), "%d%%", battery_state.percentage);
if (battery_state.state == BATTERY_FULL) {
strcpy(buf_bat_time, "Full");
} else {
snprintf(buf_bat_time, sizeof(buf_bat_time), "%02d:%02d", battery_state.time.hours, battery_state.time.minutes);
}
get_text_size2(bat1_font_desc,
&bat_percentage_height_ink,
&bat_percentage_height,
&bat_percentage_width,
panel->area.height,
panel->area.width,
buf_bat_percentage,
strlen(buf_bat_percentage),
PANGO_WRAP_WORD_CHAR,
PANGO_ELLIPSIZE_NONE,
FALSE);
get_text_size2(bat2_font_desc,
&bat_time_height_ink,
&bat_time_height,
&bat_time_width,
panel->area.height,
panel->area.width,
buf_bat_time,
strlen(buf_bat_time),
PANGO_WRAP_WORD_CHAR,
PANGO_ELLIPSIZE_NONE,
FALSE);
if (panel_horizontal) {
int new_size = (bat_percentage_width > bat_time_width) ? bat_percentage_width : bat_time_width;
new_size += 2 * battery->area.paddingxlr + left_right_border_width(&battery->area);
if (new_size > battery->area.width || new_size < battery->area.width - 2) {
// we try to limit the number of resize
battery->area.width = new_size;
battery->bat1_posy = (battery->area.height - bat_percentage_height - bat_time_height) / 2;
battery->bat2_posy = battery->bat1_posy + bat_percentage_height;
ret = 1;
}
} else {
int new_size = bat_percentage_height + bat_time_height + 2 * battery->area.paddingxlr +
top_bottom_border_width(&battery->area);
if (new_size > battery->area.height || new_size < battery->area.height - 2) {
battery->area.height = new_size;
battery->bat1_posy = (battery->area.height - bat_percentage_height - bat_time_height - 2) / 2;
battery->bat2_posy = battery->bat1_posy + bat_percentage_height + 2;
ret = 1;
}
}
schedule_redraw(&battery->area);
return ret;
return resize_text_area(&battery->area,
buf_bat_line1,
buf_bat_line2,
bat1_font_desc,
bat2_font_desc,
&battery->bat1_posy,
&battery->bat2_posy);
}
void draw_battery(void *obj, cairo_t *c)
{
Battery *battery = obj;
PangoLayout *layout = pango_cairo_create_layout(c);
pango_layout_set_font_description(layout, bat1_font_desc);
pango_layout_set_width(layout, battery->area.width * PANGO_SCALE);
pango_layout_set_alignment(layout, PANGO_ALIGN_CENTER);
pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR);
pango_layout_set_ellipsize(layout, PANGO_ELLIPSIZE_NONE);
pango_layout_set_text(layout, buf_bat_percentage, strlen(buf_bat_percentage));
cairo_set_source_rgba(c,
battery->font_color.rgb[0],
battery->font_color.rgb[1],
battery->font_color.rgb[2],
battery->font_color.alpha);
pango_cairo_update_layout(c, layout);
draw_text(layout, c, 0, battery->bat1_posy, &battery->font_color, ((Panel *)battery->area.panel)->font_shadow);
pango_layout_set_font_description(layout, bat2_font_desc);
pango_layout_set_indent(layout, 0);
pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR);
pango_layout_set_ellipsize(layout, PANGO_ELLIPSIZE_NONE);
pango_layout_set_text(layout, buf_bat_time, strlen(buf_bat_time));
pango_layout_set_width(layout, battery->area.width * PANGO_SCALE);
pango_cairo_update_layout(c, layout);
draw_text(layout, c, 0, battery->bat2_posy, &battery->font_color, ((Panel *)battery->area.panel)->font_shadow);
pango_cairo_show_layout(c, layout);
g_object_unref(layout);
Battery *battery = (Battery *)obj;
draw_text_area(&battery->area,
c,
buf_bat_line1,
buf_bat_line2,
bat1_font_desc,
bat2_font_desc,
battery->bat1_posy,
battery->bat2_posy,
&battery->font_color);
}
void battery_dump_geometry(void *obj, int indent)
{
Battery *battery = obj;
fprintf(stderr, "%*sText 1: y = %d, text = %s\n", indent, "", battery->bat1_posy, buf_bat_percentage);
fprintf(stderr, "%*sText 2: y = %d, text = %s\n", indent, "", battery->bat2_posy, buf_bat_time);
Battery *battery = (Battery *)obj;
fprintf(stderr, "%*sText 1: y = %d, text = %s\n", indent, "", battery->bat1_posy, buf_bat_line1);
fprintf(stderr, "%*sText 2: y = %d, text = %s\n", indent, "", battery->bat2_posy, buf_bat_line2);
}
char *battery_get_tooltip(void *obj)

View File

@@ -48,12 +48,15 @@ extern gboolean bat1_has_font;
extern PangoFontDescription *bat1_font_desc;
extern gboolean bat2_has_font;
extern PangoFontDescription *bat2_font_desc;
extern char *bat1_format;
extern char *bat2_format;
extern gboolean battery_enabled;
extern gboolean battery_tooltip_enabled;
extern int percentage_hide;
extern int8_t battery_low_status;
extern char *battery_low_cmd;
extern char *battery_full_cmd;
extern char *ac_connected_cmd;
extern char *ac_disconnected_cmd;

View File

@@ -446,6 +446,17 @@ int battery_os_update(BatteryState *state)
/* AC state */
state->ac_connected = ac_connected;
if (state->state == BATTERY_UNKNOWN) {
if (ac_connected) {
if (total_rate_now == 0 && state->percentage >= 90)
state->state = BATTERY_FULL;
else
state->state = BATTERY_CHARGING;
} else {
state->state = BATTERY_DISCHARGING;
}
}
return 0;
}

View File

@@ -337,6 +337,7 @@ gboolean resize_button(void *obj)
{
Button *button = (Button *)obj;
Panel *panel = (Panel *)button->area.panel;
Area *area = &button->area;
int horiz_padding = (panel_horizontal ? button->area.paddingxlr : button->area.paddingy);
int vert_padding = (panel_horizontal ? button->area.paddingy : button->area.paddingxlr);
int interior_padding = button->area.paddingx;
@@ -360,34 +361,29 @@ gboolean resize_button(void *obj)
if (button->frontend->icon_load_size != button->frontend->iconw)
button_reload_icon(button);
int available_w, available_h;
if (panel_horizontal) {
available_w = panel->area.width;
available_h = area->height - 2 * area->paddingy - left_right_border_width(area);
} else {
available_w =
area->width - icon_w - (icon_w ? interior_padding : 0) - 2 * horiz_padding - left_right_border_width(area);
available_h = panel->area.height;
}
int txt_height_ink, txt_height, txt_width;
if (button->backend->text) {
if (panel_horizontal) {
get_text_size2(button->backend->font_desc,
&txt_height_ink,
&txt_height,
&txt_width,
panel->area.height,
panel->area.width,
button->backend->text,
strlen(button->backend->text),
PANGO_WRAP_WORD_CHAR,
PANGO_ELLIPSIZE_NONE,
FALSE);
} else {
get_text_size2(button->backend->font_desc,
&txt_height_ink,
&txt_height,
&txt_width,
panel->area.height,
button->area.width - icon_w - (icon_w ? interior_padding : 0) - 2 * horiz_padding -
left_right_border_width(&button->area),
button->backend->text,
strlen(button->backend->text),
PANGO_WRAP_WORD_CHAR,
PANGO_ELLIPSIZE_NONE,
FALSE);
}
get_text_size2(button->backend->font_desc,
&txt_height_ink,
&txt_height,
&txt_width,
available_h,
available_w,
button->backend->text,
strlen(button->backend->text),
PANGO_WRAP_WORD_CHAR,
PANGO_ELLIPSIZE_NONE,
FALSE);
} else {
txt_height_ink = txt_height = txt_width = 0;
}

View File

@@ -77,6 +77,9 @@ void default_clock()
time1_font_desc = NULL;
time2_has_font = FALSE;
time2_font_desc = NULL;
buf_time[0] = 0;
buf_date[0] = 0;
buf_tooltip[0] = 0;
}
void cleanup_clock()
@@ -111,31 +114,6 @@ void cleanup_clock()
clock_timeout = NULL;
}
void update_clocks_sec(void *arg)
{
gettimeofday(&time_clock, 0);
if (time1_format) {
for (int i = 0; i < num_panels; i++)
panels[i].clock.area.resize_needed = 1;
}
schedule_panel_redraw();
}
void update_clocks_min(void *arg)
{
// remember old_sec because after suspend/hibernate the clock should be updated directly, and not
// on next minute change
time_t old_sec = time_clock.tv_sec;
gettimeofday(&time_clock, 0);
if (time_clock.tv_sec % 60 == 0 || time_clock.tv_sec - old_sec > 60) {
if (time1_format) {
for (int i = 0; i < num_panels; i++)
panels[i].clock.area.resize_needed = 1;
}
schedule_panel_redraw();
}
}
struct tm *clock_gettime_for_tz(const char *timezone)
{
if (timezone) {
@@ -152,6 +130,46 @@ struct tm *clock_gettime_for_tz(const char *timezone)
}
}
void update_clocks()
{
if (time1_format)
strftime(buf_time, sizeof(buf_time), time1_format, clock_gettime_for_tz(time1_timezone));
if (time2_format)
strftime(buf_date, sizeof(buf_date), time2_format, clock_gettime_for_tz(time2_timezone));
if (time1_format || time2_format) {
for (int i = 0; i < num_panels; i++)
panels[i].clock.area.resize_needed = 1;
}
schedule_panel_redraw();
}
int ms_until_second_change(struct timeval* tm)
{
long us_until_change = 1000000 - tm->tv_usec;
// compute ms, rounding up so we don't ask to wait too short
int ms = (us_until_change+999)/1000;
return ms;
}
void update_clocks_sec(void *arg)
{
gettimeofday(&time_clock, 0);
clock_timeout = add_timeout(ms_until_second_change(&time_clock), 0, update_clocks_sec, 0, NULL);
update_clocks();
}
void update_clocks_min(void *arg)
{
// remember old_sec because after suspend/hibernate the clock should be updated directly, and not
// on next minute change
static time_t old_sec = 0;
gettimeofday(&time_clock, 0);
clock_timeout = add_timeout(ms_until_second_change(&time_clock), 0, update_clocks_min, 0, NULL);
if (time_clock.tv_sec % 60 == 0 || time_clock.tv_sec - old_sec > 60)
update_clocks();
old_sec = time_clock.tv_sec;
}
gboolean time_format_needs_sec_ticks(char *time_format)
{
if (!time_format)
@@ -170,14 +188,6 @@ void init_clock_panel(void *p)
Panel *panel = (Panel *)p;
Clock *clock = &panel->clock;
if (!clock_timeout) {
if (time_format_needs_sec_ticks(time1_format) || time_format_needs_sec_ticks(time2_format)) {
clock_timeout = add_timeout(10, 1000, update_clocks_sec, 0, &clock_timeout);
} else {
clock_timeout = add_timeout(10, 1000, update_clocks_min, 0, &clock_timeout);
}
}
if (!clock->area.bg)
clock->area.bg = &g_array_index(backgrounds, Background, 0);
clock_init_fonts();
@@ -205,6 +215,14 @@ void init_clock_panel(void *p)
clock->area._get_tooltip_text = clock_get_tooltip;
strftime(buf_tooltip, sizeof(buf_tooltip), time_tooltip_format, clock_gettime_for_tz(time_tooltip_timezone));
}
if (!clock_timeout) {
if (time_format_needs_sec_ticks(time1_format) || time_format_needs_sec_ticks(time2_format)) {
update_clocks_sec(NULL);
} else {
update_clocks_min(NULL);
}
}
}
void clock_init_fonts()
@@ -243,7 +261,7 @@ void clock_default_font_changed()
schedule_panel_redraw();
}
void clock_compute_text_geometry(Panel *panel,
void clock_compute_text_geometry(Clock *clock,
int *time_height_ink,
int *time_height,
int *time_width,
@@ -251,131 +269,53 @@ void clock_compute_text_geometry(Panel *panel,
int *date_height,
int *date_width)
{
*date_height = *date_width = 0;
strftime(buf_time, sizeof(buf_time), time1_format, clock_gettime_for_tz(time1_timezone));
get_text_size2(time1_font_desc,
time_height_ink,
time_height,
time_width,
panel->area.height,
panel->area.width,
buf_time,
strlen(buf_time),
PANGO_WRAP_WORD_CHAR,
PANGO_ELLIPSIZE_NONE,
FALSE);
if (time2_format) {
strftime(buf_date, sizeof(buf_date), time2_format, clock_gettime_for_tz(time2_timezone));
get_text_size2(time2_font_desc,
date_height_ink,
date_height,
date_width,
panel->area.height,
panel->area.width,
buf_date,
strlen(buf_date),
PANGO_WRAP_WORD_CHAR,
PANGO_ELLIPSIZE_NONE,
FALSE);
}
area_compute_text_geometry(&clock->area,
buf_time,
time2_format ? buf_date : NULL,
time1_font_desc,
time2_font_desc,
time_height_ink,
time_height,
time_width,
date_height_ink,
date_height,
date_width);
}
int clock_compute_desired_size(void *obj)
{
Clock *clock = (Clock *)obj;
Panel *panel = (Panel *)clock->area.panel;
int time_height_ink, time_height, time_width, date_height_ink, date_height, date_width;
clock_compute_text_geometry(panel,
&time_height_ink,
&time_height,
&time_width,
&date_height_ink,
&date_height,
&date_width);
if (panel_horizontal) {
int new_size = (time_width > date_width) ? time_width : date_width;
new_size += 2 * clock->area.paddingxlr + left_right_border_width(&clock->area);
return new_size;
} else {
int new_size = time_height + date_height + 2 * clock->area.paddingxlr + top_bottom_border_width(&clock->area);
return new_size;
}
return text_area_compute_desired_size(&clock->area,
buf_time,
time2_format ? buf_date : NULL,
time1_font_desc,
time2_font_desc);
}
gboolean resize_clock(void *obj)
{
Clock *clock = (Clock *)obj;
Panel *panel = (Panel *)clock->area.panel;
gboolean result = FALSE;
schedule_redraw(&clock->area);
int time_height_ink, time_height, time_width, date_height_ink, date_height, date_width;
clock_compute_text_geometry(panel,
&time_height_ink,
&time_height,
&time_width,
&date_height_ink,
&date_height,
&date_width);
int new_size = clock_compute_desired_size(clock);
if (panel_horizontal) {
if (new_size > clock->area.width || new_size < (clock->area.width - 6)) {
// we try to limit the number of resizes
clock->area.width = new_size + 1;
clock->time1_posy = (clock->area.height - time_height) / 2;
if (time2_format) {
clock->time1_posy -= (date_height) / 2;
clock->time2_posy = clock->time1_posy + time_height;
}
result = TRUE;
}
} else {
if (new_size != clock->area.height) {
// we try to limit the number of resizes
clock->area.height = new_size;
clock->time1_posy = (clock->area.height - time_height) / 2;
if (time2_format) {
clock->time1_posy -= (date_height) / 2;
clock->time2_posy = clock->time1_posy + time_height;
}
result = TRUE;
}
}
return result;
return resize_text_area(&clock->area,
buf_time,
time2_format ? buf_date : NULL,
time1_font_desc,
time2_font_desc,
&clock->time1_posy,
&clock->time2_posy);
}
void draw_clock(void *obj, cairo_t *c)
{
Clock *clock = obj;
PangoLayout *layout = pango_cairo_create_layout(c);
pango_layout_set_font_description(layout, time1_font_desc);
pango_layout_set_width(layout, clock->area.width * PANGO_SCALE);
pango_layout_set_alignment(layout, PANGO_ALIGN_CENTER);
pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR);
pango_layout_set_ellipsize(layout, PANGO_ELLIPSIZE_NONE);
pango_layout_set_text(layout, buf_time, strlen(buf_time));
cairo_set_source_rgba(c, clock->font.rgb[0], clock->font.rgb[1], clock->font.rgb[2], clock->font.alpha);
pango_cairo_update_layout(c, layout);
draw_text(layout, c, 0, clock->time1_posy, &clock->font, ((Panel *)clock->area.panel)->font_shadow);
if (time2_format) {
pango_layout_set_font_description(layout, time2_font_desc);
pango_layout_set_indent(layout, 0);
pango_layout_set_text(layout, buf_date, strlen(buf_date));
pango_layout_set_width(layout, clock->area.width * PANGO_SCALE);
pango_cairo_update_layout(c, layout);
draw_text(layout, c, 0, clock->time2_posy, &clock->font, ((Panel *)clock->area.panel)->font_shadow);
}
g_object_unref(layout);
Clock *clock = (Clock *)obj;
draw_text_area(&clock->area,
c,
buf_time,
time2_format ? buf_date : NULL,
time1_font_desc,
time2_font_desc,
clock->time1_posy,
clock->time2_posy,
&clock->font);
}
void clock_dump_geometry(void *obj, int indent)

View File

@@ -135,27 +135,36 @@ int get_task_status(char *status)
int config_get_monitor(char *monitor)
{
if (strcmp(monitor, "all") != 0) {
char *endptr;
int ret_int = strtol(monitor, &endptr, 10);
if (*endptr == 0)
return ret_int - 1;
else {
// monitor specified by name, not by index
int i, j;
for (i = 0; i < server.num_monitors; ++i) {
if (server.monitors[i].names == 0)
// xrandr can't identify monitors
continue;
j = 0;
while (server.monitors[i].names[j] != 0) {
if (strcmp(monitor, server.monitors[i].names[j++]) == 0)
return i;
}
if (strcmp(monitor, "primary") == 0) {
for (int i = 0; i < server.num_monitors; ++i) {
if (server.monitors[i].primary)
return i;
}
return 0;
}
if (strcmp(monitor, "all") == 0) {
return -1;
}
char *endptr;
int ret_int = strtol(monitor, &endptr, 10);
if (*endptr == 0)
return ret_int - 1;
else {
// monitor specified by name, not by index
int i, j;
for (i = 0; i < server.num_monitors; ++i) {
if (server.monitors[i].names == 0)
// xrandr can't identify monitors
continue;
j = 0;
while (server.monitors[i].names[j] != 0) {
if (strcmp(monitor, server.monitors[i].names[j++]) == 0)
return i;
}
}
}
// monitor == "all" or monitor not found or xrandr can't identify monitors
// monitor not found or xrandr can't identify monitors => all
return -1;
}
@@ -381,8 +390,6 @@ void add_entry(char *key, char *value)
/* Panel */
else if (strcmp(key, "panel_monitor") == 0) {
panel_config.monitor = config_get_monitor(value);
} else if (strcmp(key, "primary_monitor_first") == 0) {
primary_monitor_first = atoi(value);
} else if (strcmp(key, "panel_shrink") == 0) {
panel_shrink = atoi(value);
} else if (strcmp(key, "panel_size") == 0) {
@@ -544,6 +551,11 @@ void add_entry(char *key, char *value)
#ifdef ENABLE_BATTERY
if (strlen(value) > 0)
battery_low_cmd = strdup(value);
#endif
} else if (strcmp(key, "battery_full_cmd") == 0) {
#ifdef ENABLE_BATTERY
if (strlen(value) > 0)
battery_full_cmd = strdup(value);
#endif
} else if (strcmp(key, "ac_connected_cmd") == 0) {
#ifdef ENABLE_BATTERY
@@ -564,6 +576,21 @@ void add_entry(char *key, char *value)
#ifdef ENABLE_BATTERY
bat2_font_desc = pango_font_description_from_string(value);
bat2_has_font = TRUE;
#endif
} else if (strcmp (key, "bat1_format") == 0) {
#ifdef ENABLE_BATTERY
if (strlen(value) > 0) {
free(bat1_format);
bat1_format = strdup(value);
battery_enabled = 1;
}
#endif
} else if (strcmp (key, "bat2_format") == 0) {
#ifdef ENABLE_BATTERY
if (strlen(value) > 0) {
free(bat2_format);
bat2_format = strdup(value);
}
#endif
} else if (strcmp(key, "battery_font_color") == 0) {
#ifdef ENABLE_BATTERY
@@ -652,8 +679,8 @@ void add_entry(char *key, char *value)
Execp *execp = get_or_create_last_execp();
execp->backend->interval = 0;
int v = atoi(value);
if (v < 1) {
fprintf(stderr, "execp_interval must be an integer >= 1\n");
if (v < 0) {
fprintf(stderr, "execp_interval must be an integer >= 0\n");
} else {
execp->backend->interval = v;
}
@@ -673,6 +700,7 @@ void add_entry(char *key, char *value)
Execp *execp = get_or_create_last_execp();
free_and_null(execp->backend->tooltip);
execp->backend->tooltip = strdup(value);
execp->backend->has_user_tooltip = TRUE;
} else if (strcmp(key, "execp_font") == 0) {
Execp *execp = get_or_create_last_execp();
pango_font_description_free(execp->backend->font_desc);
@@ -960,6 +988,8 @@ void add_entry(char *key, char *value)
hide_inactive_tasks = atoi(value);
} else if (strcmp(key, "taskbar_hide_different_monitor") == 0) {
hide_task_diff_monitor = atoi(value);
} else if (strcmp(key, "taskbar_hide_different_desktop") == 0) {
hide_task_diff_desktop = atoi(value);
} else if (strcmp(key, "taskbar_hide_if_empty") == 0) {
hide_taskbar_if_empty = atoi(value);
} else if (strcmp(key, "taskbar_always_show_all_desktop_tasks") == 0) {
@@ -1094,7 +1124,7 @@ void add_entry(char *key, char *value)
systray.saturation = atoi(value2);
systray.brightness = atoi(value3);
} else if (strcmp(key, "systray_monitor") == 0) {
systray_monitor = atoi(value) - 1;
systray_monitor = MAX(0, config_get_monitor(value));
} else if (strcmp(key, "systray_name_filter") == 0) {
if (systray_hide_name_filter)
free(systray_hide_name_filter);

View File

@@ -18,6 +18,8 @@
#include "timer.h"
#include "common.h"
#define MAX_TOOLTIP_LEN 4096
void execp_timer_callback(void *arg);
char *execp_get_tooltip(void *obj);
void execp_init_fonts();
@@ -30,9 +32,10 @@ void default_execp()
Execp *create_execp()
{
Execp *execp = calloc(1, sizeof(Execp));
execp->backend = calloc(1, sizeof(ExecpBackend));
execp->backend->child_pipe = -1;
Execp *execp = (Execp *)calloc(1, sizeof(Execp));
execp->backend = (ExecpBackend *)calloc(1, sizeof(ExecpBackend));
execp->backend->child_pipe_stdout = -1;
execp->backend->child_pipe_stderr = -1;
execp->backend->cmd_pids = g_tree_new(cmp_ptr);
execp->backend->interval = 30;
execp->backend->cache_icon = TRUE;
@@ -45,10 +48,10 @@ gpointer create_execp_frontend(gconstpointer arg, gpointer data)
{
Execp *execp_backend = (Execp *)arg;
Execp *execp_frontend = calloc(1, sizeof(Execp));
Execp *execp_frontend = (Execp *)calloc(1, sizeof(Execp));
execp_frontend->backend = execp_backend->backend;
execp_backend->backend->instances = g_list_append(execp_backend->backend->instances, execp_frontend);
execp_frontend->frontend = calloc(1, sizeof(ExecpFrontend));
execp_frontend->frontend = (ExecpFrontend *)calloc(1, sizeof(ExecpFrontend));
return execp_frontend;
}
@@ -72,16 +75,20 @@ void destroy_execp(void *obj)
imlib_free_image();
execp->backend->icon = NULL;
}
free_and_null(execp->backend->buf_output);
free_and_null(execp->backend->buf_stdout);
free_and_null(execp->backend->text);
free_and_null(execp->backend->icon_path);
if (execp->backend->child) {
kill(-execp->backend->child, SIGHUP);
execp->backend->child = 0;
}
if (execp->backend->child_pipe >= 0) {
close(execp->backend->child_pipe);
execp->backend->child_pipe = -1;
if (execp->backend->child_pipe_stdout >= 0) {
close(execp->backend->child_pipe_stdout);
execp->backend->child_pipe_stdout = -1;
}
if (execp->backend->child_pipe_stderr >= 0) {
close(execp->backend->child_pipe_stderr);
execp->backend->child_pipe_stderr = -1;
}
if (execp->backend->cmd_pids) {
g_tree_destroy(execp->backend->cmd_pids);
@@ -138,9 +145,11 @@ void init_execp()
// Set missing config options
if (!execp->backend->bg)
execp->backend->bg = &g_array_index(backgrounds, Background, 0);
execp->backend->buf_capacity = 1024;
execp->backend->buf_output = calloc(execp->backend->buf_capacity, 1);
execp->backend->text = strdup(" ");
execp->backend->buf_stdout_capacity = 1024;
execp->backend->buf_stdout = calloc(execp->backend->buf_stdout_capacity, 1);
execp->backend->buf_stderr_capacity = 1024;
execp->backend->buf_stderr = calloc(execp->backend->buf_stderr_capacity, 1);
execp->backend->text = strdup("");
execp->backend->icon_path = NULL;
}
}
@@ -188,6 +197,8 @@ void init_execp_panel(void *p)
if (!execp->backend->timer)
execp->backend->timer = add_timeout(10, 0, execp_timer_callback, execp, &execp->backend->timer);
execp_update_post_read(execp);
}
}
@@ -290,156 +301,138 @@ gboolean reload_icon(Execp *execp)
return FALSE;
}
int execp_compute_desired_size(void *obj)
void execp_compute_icon_text_geometry(Execp *execp,
int *horiz_padding,
int *vert_padding,
int *interior_padding,
int *icon_w,
int *icon_h,
gboolean *text_next_line,
int *txt_height_ink,
int *txt_height,
int *txt_width,
int *new_size,
gboolean *resized)
{
Execp *execp = (Execp *)obj;
Panel *panel = (Panel *)execp->area.panel;
int horiz_padding = (panel_horizontal ? execp->area.paddingxlr : execp->area.paddingy);
int vert_padding = (panel_horizontal ? execp->area.paddingy : execp->area.paddingxlr);
int interior_padding = execp->area.paddingx;
Area *area = &execp->area;
*horiz_padding = (panel_horizontal ? area->paddingxlr : area->paddingy);
*vert_padding = (panel_horizontal ? area->paddingy : area->paddingxlr);
*interior_padding = area->paddingx;
int icon_w, icon_h;
if (reload_icon(execp)) {
if (execp->backend->icon) {
imlib_context_set_image(execp->backend->icon);
icon_w = imlib_image_get_width();
icon_h = imlib_image_get_height();
*icon_w = imlib_image_get_width();
*icon_h = imlib_image_get_height();
} else {
icon_w = icon_h = 0;
*icon_w = *icon_h = 0;
}
} else {
icon_w = icon_h = 0;
*icon_w = *icon_h = 0;
}
int text_next_line = !panel_horizontal && icon_w > execp->area.width / 2;
*text_next_line = !panel_horizontal && *icon_w > area->width / 2;
int available_w, available_h;
if (panel_horizontal) {
available_w = panel->area.width;
available_h = area->height - 2 * area->paddingy - left_right_border_width(area);
} else {
available_w = !text_next_line
? area->width - *icon_w - (*icon_w ? *interior_padding : 0) - 2 * *horiz_padding -
left_right_border_width(area)
: area->width - 2 * *horiz_padding - left_right_border_width(area);
available_h = panel->area.height;
}
get_text_size2(execp->backend->font_desc,
txt_height_ink,
txt_height,
txt_width,
available_h,
available_w,
execp->backend->text,
strlen(execp->backend->text),
PANGO_WRAP_WORD_CHAR,
PANGO_ELLIPSIZE_NONE,
execp->backend->has_markup);
*resized = FALSE;
if (panel_horizontal) {
*new_size = *txt_width;
if (*icon_w)
*new_size += *interior_padding + *icon_w;
*new_size += 2 * *horiz_padding + left_right_border_width(area);
if (*new_size > area->width || *new_size < (area->width - 6)) {
// we try to limit the number of resize
*new_size += 1;
*resized = TRUE;
}
} else {
if (!*text_next_line) {
*new_size = *txt_height + 2 * *vert_padding + top_bottom_border_width(area);
*new_size = MAX(*new_size, *icon_h + 2 * *vert_padding + top_bottom_border_width(area));
} else {
*new_size = *icon_h + *interior_padding + *txt_height + 2 * *vert_padding + top_bottom_border_width(area);
}
if (*new_size != area->height) {
*resized = TRUE;
}
}
}
int execp_compute_desired_size(void *obj)
{
Execp *execp = (Execp *)obj;
int horiz_padding, vert_padding, interior_padding;
int icon_w, icon_h;
gboolean text_next_line;
int txt_height_ink, txt_height, txt_width;
if (panel_horizontal) {
get_text_size2(execp->backend->font_desc,
&txt_height_ink,
&txt_height,
&txt_width,
panel->area.height,
panel->area.width,
execp->backend->text,
strlen(execp->backend->text),
PANGO_WRAP_WORD_CHAR,
PANGO_ELLIPSIZE_NONE,
execp->backend->has_markup);
} else {
get_text_size2(execp->backend->font_desc,
&txt_height_ink,
&txt_height,
&txt_width,
panel->area.height,
!text_next_line
? execp->area.width - icon_w - (icon_w ? interior_padding : 0) - 2 * horiz_padding -
left_right_border_width(&execp->area)
: execp->area.width - 2 * horiz_padding - left_right_border_width(&execp->area),
execp->backend->text,
strlen(execp->backend->text),
PANGO_WRAP_WORD_CHAR,
PANGO_ELLIPSIZE_NONE,
execp->backend->has_markup);
}
int new_size;
gboolean resized;
execp_compute_icon_text_geometry(execp,
&horiz_padding,
&vert_padding,
&interior_padding,
&icon_w,
&icon_h,
&text_next_line,
&txt_height_ink,
&txt_height,
&txt_width,
&new_size,
&resized);
if (panel_horizontal) {
int new_size = txt_width;
if (icon_w)
new_size += interior_padding + icon_w;
new_size += 2 * horiz_padding + left_right_border_width(&execp->area);
return new_size;
} else {
int new_size;
if (!text_next_line) {
new_size = txt_height + 2 * vert_padding + top_bottom_border_width(&execp->area);
new_size = MAX(new_size, icon_h + 2 * vert_padding + top_bottom_border_width(&execp->area));
} else {
new_size =
icon_h + interior_padding + txt_height + 2 * vert_padding + top_bottom_border_width(&execp->area);
}
return new_size;
}
return new_size;
}
gboolean resize_execp(void *obj)
{
Execp *execp = (Execp *)obj;
Panel *panel = (Panel *)execp->area.panel;
int horiz_padding = (panel_horizontal ? execp->area.paddingxlr : execp->area.paddingy);
int vert_padding = (panel_horizontal ? execp->area.paddingy : execp->area.paddingxlr);
int interior_padding = execp->area.paddingx;
int horiz_padding, vert_padding, interior_padding;
int icon_w, icon_h;
if (reload_icon(execp)) {
if (execp->backend->icon) {
imlib_context_set_image(execp->backend->icon);
icon_w = imlib_image_get_width();
icon_h = imlib_image_get_height();
} else {
icon_w = icon_h = 0;
}
} else {
icon_w = icon_h = 0;
}
int text_next_line = !panel_horizontal && icon_w > execp->area.width / 2;
gboolean text_next_line;
int txt_height_ink, txt_height, txt_width;
if (panel_horizontal) {
get_text_size2(execp->backend->font_desc,
&txt_height_ink,
&txt_height,
&txt_width,
panel->area.height,
panel->area.width,
execp->backend->text,
strlen(execp->backend->text),
PANGO_WRAP_WORD_CHAR,
PANGO_ELLIPSIZE_NONE,
execp->backend->has_markup);
} else {
get_text_size2(execp->backend->font_desc,
&txt_height_ink,
&txt_height,
&txt_width,
panel->area.height,
!text_next_line
? execp->area.width - icon_w - (icon_w ? interior_padding : 0) - 2 * horiz_padding -
left_right_border_width(&execp->area)
: execp->area.width - 2 * horiz_padding - left_right_border_width(&execp->area),
execp->backend->text,
strlen(execp->backend->text),
PANGO_WRAP_WORD_CHAR,
PANGO_ELLIPSIZE_NONE,
execp->backend->has_markup);
}
int new_size;
gboolean resized;
execp_compute_icon_text_geometry(execp,
&horiz_padding,
&vert_padding,
&interior_padding,
&icon_w,
&icon_h,
&text_next_line,
&txt_height_ink,
&txt_height,
&txt_width,
&new_size,
&resized);
if (panel_horizontal)
execp->area.width = new_size;
else
execp->area.height = new_size;
gboolean result = FALSE;
if (panel_horizontal) {
int new_size = txt_width;
if (icon_w)
new_size += interior_padding + icon_w;
new_size += 2 * horiz_padding + left_right_border_width(&execp->area);
if (new_size > execp->area.width || new_size < (execp->area.width - 6)) {
// we try to limit the number of resize
execp->area.width = new_size + 1;
result = TRUE;
}
} else {
int new_size;
if (!text_next_line) {
new_size = txt_height + 2 * vert_padding + top_bottom_border_width(&execp->area);
new_size = MAX(new_size, icon_h + 2 * vert_padding + top_bottom_border_width(&execp->area));
} else {
new_size =
icon_h + interior_padding + txt_height + 2 * vert_padding + top_bottom_border_width(&execp->area);
}
if (new_size != execp->area.height) {
execp->area.height = new_size;
result = TRUE;
}
}
execp->frontend->textw = txt_width;
execp->frontend->texth = txt_height;
if (execp->backend->centered) {
@@ -479,13 +472,12 @@ gboolean resize_execp(void *obj)
}
schedule_redraw(&execp->area);
return result;
return resized;
}
void draw_execp(void *obj, cairo_t *c)
{
Execp *execp = obj;
Execp *execp = (Execp *)obj;
PangoLayout *layout = pango_cairo_create_layout(c);
if (execp->backend->has_icon && execp->backend->icon) {
@@ -518,7 +510,7 @@ void draw_execp(void *obj, cairo_t *c)
void execp_dump_geometry(void *obj, int indent)
{
Execp *execp = obj;
Execp *execp = (Execp *)obj;
if (execp->backend->has_icon && execp->backend->icon) {
Imlib_Image tmp = imlib_context_get_image();
@@ -547,7 +539,7 @@ void execp_dump_geometry(void *obj, int indent)
void execp_force_update(Execp *execp)
{
if (execp->backend->child_pipe > 0) {
if (execp->backend->child_pipe_stdout > 0) {
// Command currently running, nothing to do
} else {
if (execp->backend->timer)
@@ -559,7 +551,7 @@ void execp_force_update(Execp *execp)
void execp_action(void *obj, int button, int x, int y, Time time)
{
Execp *execp = obj;
Execp *execp = (Execp *)obj;
char *command = NULL;
switch (button) {
case 1:
@@ -603,38 +595,54 @@ void execp_cmd_completed(Execp *execp, pid_t pid)
void execp_timer_callback(void *arg)
{
Execp *execp = arg;
Execp *execp = (Execp *)arg;
if (!execp->backend->command)
return;
// Still running!
if (execp->backend->child_pipe > 0)
if (execp->backend->child_pipe_stdout > 0)
return;
int pipe_fd[2];
if (pipe(pipe_fd)) {
int pipe_fd_stdout[2];
if (pipe(pipe_fd_stdout)) {
// TODO maybe write this in tooltip, but if this happens we're screwed anyways
fprintf(stderr, "Execp: Creating pipe failed!\n");
return;
}
fcntl(pipe_fd[0], F_SETFL, O_NONBLOCK | fcntl(pipe_fd[0], F_GETFL));
fcntl(pipe_fd_stdout[0], F_SETFL, O_NONBLOCK | fcntl(pipe_fd_stdout[0], F_GETFL));
int pipe_fd_stderr[2];
if (pipe(pipe_fd_stderr)) {
close(pipe_fd_stdout[1]);
close(pipe_fd_stdout[0]);
// TODO maybe write this in tooltip, but if this happens we're screwed anyways
fprintf(stderr, "Execp: Creating pipe failed!\n");
return;
}
fcntl(pipe_fd_stderr[0], F_SETFL, O_NONBLOCK | fcntl(pipe_fd_stderr[0], F_GETFL));
// Fork and run command, capturing stdout in pipe
pid_t child = fork();
if (child == -1) {
// TODO maybe write this in tooltip, but if this happens we're screwed anyways
fprintf(stderr, "Fork failed.\n");
close(pipe_fd[1]);
close(pipe_fd[0]);
close(pipe_fd_stdout[1]);
close(pipe_fd_stdout[0]);
close(pipe_fd_stderr[1]);
close(pipe_fd_stderr[0]);
return;
} else if (child == 0) {
fprintf(stderr, "Executing: %s\n", execp->backend->command);
// We are in the child
close(pipe_fd[0]);
dup2(pipe_fd[1], 1); // 1 is stdout
close(pipe_fd[1]);
close(pipe_fd_stdout[0]);
dup2(pipe_fd_stdout[1], 1); // 1 is stdout
close(pipe_fd_stdout[1]);
close(pipe_fd_stderr[0]);
dup2(pipe_fd_stderr[1], 2); // 2 is stderr
close(pipe_fd_stderr[1]);
setpgid(0, 0);
execl("/bin/sh", "/bin/sh", "-c", execp->backend->command, NULL);
// This should never happen!
@@ -642,39 +650,38 @@ void execp_timer_callback(void *arg)
fflush(stdout);
exit(0);
}
close(pipe_fd[1]);
close(pipe_fd_stdout[1]);
close(pipe_fd_stderr[1]);
execp->backend->child = child;
execp->backend->child_pipe = pipe_fd[0];
execp->backend->buf_length = 0;
execp->backend->buf_output[execp->backend->buf_length] = '\0';
execp->backend->child_pipe_stdout = pipe_fd_stdout[0];
execp->backend->child_pipe_stderr = pipe_fd_stderr[0];
execp->backend->buf_stdout_length = 0;
execp->backend->buf_stdout[execp->backend->buf_stdout_length] = '\0';
execp->backend->buf_stderr_length = 0;
execp->backend->buf_stderr[execp->backend->buf_stderr_length] = '\0';
execp->backend->last_update_start_time = time(NULL);
}
gboolean read_execp(void *obj)
void read_from_pipe(int fd, char **buffer, ssize_t *buffer_length, ssize_t *buffer_capacity, gboolean *eof)
{
Execp *execp = (Execp *)obj;
if (execp->backend->child_pipe < 0)
return FALSE;
gboolean command_finished = FALSE;
*eof = FALSE;
while (1) {
// Make sure there is free space in the buffer
if (execp->backend->buf_capacity - execp->backend->buf_length < 1024) {
execp->backend->buf_capacity *= 2;
execp->backend->buf_output = realloc(execp->backend->buf_output, execp->backend->buf_capacity);
if (*buffer_capacity - *buffer_length < 1024) {
*buffer_capacity *= 2;
*buffer = (char *)realloc(*buffer, *buffer_capacity);
}
ssize_t count = read(execp->backend->child_pipe,
execp->backend->buf_output + execp->backend->buf_length,
execp->backend->buf_capacity - execp->backend->buf_length - 1);
ssize_t count = read(fd,
*buffer + *buffer_length,
*buffer_capacity - *buffer_length - 1);
if (count > 0) {
// Successful read
execp->backend->buf_length += count;
execp->backend->buf_output[execp->backend->buf_length] = '\0';
*buffer_length += count;
(*buffer)[*buffer_length] = '\0';
continue;
} else if (count == 0) {
// End of file
command_finished = TRUE;
*eof = TRUE;
break;
} else if (errno == EAGAIN || errno == EWOULDBLOCK) {
// No more data available at the moment
@@ -684,28 +691,87 @@ gboolean read_execp(void *obj)
continue;
} else {
// Error
command_finished = TRUE;
*eof = TRUE;
break;
}
break;
}
}
gboolean starts_with(char *s, char *prefix)
{
char *p, *q;
for (p = s, q = prefix; *p && *q; p++, q++) {
if (*p != *q)
return FALSE;
}
return *q == '\0';
}
char *last_substring(char *s, char *sub)
{
char *result = NULL;
for (char *p = s; *p; p++) {
if (starts_with(p, sub))
result = p;
}
return result;
}
void rstrip(char *s)
{
size_t len = strlen(s);
while (len > 0) {
if (s[len-1] == ' ' || s[len-1] == '\n') {
s[len-1] = 0;
len--;
} else {
break;
}
}
}
gboolean read_execp(void *obj)
{
Execp *execp = (Execp *)obj;
if (execp->backend->child_pipe_stdout < 0)
return FALSE;
gboolean stdout_eof, stderr_eof;
read_from_pipe(execp->backend->child_pipe_stdout,
&execp->backend->buf_stdout,
&execp->backend->buf_stdout_length,
&execp->backend->buf_stdout_capacity,
&stdout_eof);
read_from_pipe(execp->backend->child_pipe_stderr,
&execp->backend->buf_stderr,
&execp->backend->buf_stderr_length,
&execp->backend->buf_stderr_capacity,
&stderr_eof);
gboolean command_finished = stdout_eof && stderr_eof;
if (command_finished) {
execp->backend->child = 0;
close(execp->backend->child_pipe);
execp->backend->child_pipe = -1;
close(execp->backend->child_pipe_stdout);
execp->backend->child_pipe_stdout = -1;
close(execp->backend->child_pipe_stderr);
execp->backend->child_pipe_stderr = -1;
if (execp->backend->interval)
execp->backend->timer =
add_timeout(execp->backend->interval * 1000, 0, execp_timer_callback, execp, &execp->backend->timer);
}
char *ansi_clear_screen = (char*)"\x1b[2J";
if (!execp->backend->continuous && command_finished) {
// Handle stdout
free_and_null(execp->backend->text);
free_and_null(execp->backend->icon_path);
if (!execp->backend->has_icon) {
execp->backend->text = strdup(execp->backend->buf_output);
execp->backend->text = strdup(execp->backend->buf_stdout);
} else {
char *text = strchr(execp->backend->buf_output, '\n');
char *text = strchr(execp->backend->buf_stdout, '\n');
if (text) {
*text = '\0';
text++;
@@ -713,41 +779,75 @@ gboolean read_execp(void *obj)
} else {
execp->backend->text = strdup("");
}
execp->backend->icon_path = strdup(execp->backend->buf_output);
execp->backend->icon_path = strdup(execp->backend->buf_stdout);
}
int len = strlen(execp->backend->text);
if (len > 0 && execp->backend->text[len - 1] == '\n')
execp->backend->text[len - 1] = '\0';
execp->backend->buf_length = 0;
execp->backend->buf_output[execp->backend->buf_length] = '\0';
execp->backend->buf_stdout_length = 0;
execp->backend->buf_stdout[execp->backend->buf_stdout_length] = '\0';
// Handle stderr
if (!execp->backend->has_user_tooltip) {
free_and_null(execp->backend->tooltip);
char *start = last_substring(execp->backend->buf_stderr, ansi_clear_screen);
if (start)
start += strlen(ansi_clear_screen);
else
start = execp->backend->buf_stderr;
if (*start) {
execp->backend->tooltip = strdup(start);
rstrip(execp->backend->tooltip);
if (strlen(execp->backend->tooltip) > MAX_TOOLTIP_LEN)
execp->backend->tooltip[MAX_TOOLTIP_LEN] = '\0';
}
}
execp->backend->buf_stderr_length = 0;
execp->backend->buf_stderr[execp->backend->buf_stderr_length] = '\0';
//
execp->backend->last_update_finish_time = time(NULL);
execp->backend->last_update_duration =
execp->backend->last_update_finish_time - execp->backend->last_update_start_time;
return TRUE;
} else if (execp->backend->continuous > 0) {
// Handle stderr
if (!execp->backend->has_user_tooltip) {
free_and_null(execp->backend->tooltip);
char *start = last_substring(execp->backend->buf_stderr, ansi_clear_screen);
if (start) {
start += strlen(ansi_clear_screen);
memmove(execp->backend->buf_stderr, start, strlen(start) + 1);
execp->backend->buf_stderr_length = (ssize_t)strlen(execp->backend->buf_stderr);
}
if (execp->backend->buf_stderr_length > MAX_TOOLTIP_LEN) {
execp->backend->buf_stderr_length = MAX_TOOLTIP_LEN;
execp->backend->buf_stderr[execp->backend->buf_stderr_length] = '\0';
}
execp->backend->tooltip = strdup(execp->backend->buf_stderr);
rstrip(execp->backend->tooltip);
} else {
execp->backend->buf_stderr_length = 0;
execp->backend->buf_stderr[execp->backend->buf_stderr_length] = '\0';
}
// Handle stdout
// Count lines in buffer
int num_lines = 0;
char *last = execp->backend->buf_output;
char *end = NULL;
for (char *c = execp->backend->buf_output; *c; c++) {
for (char *c = execp->backend->buf_stdout; *c; c++) {
if (*c == '\n') {
num_lines++;
if (num_lines == execp->backend->continuous)
end = c;
}
last = c;
}
if (*last && *last != '\n')
num_lines++;
if (num_lines >= execp->backend->continuous) {
if (end)
*end = '\0';
free_and_null(execp->backend->text);
free_and_null(execp->backend->icon_path);
if (!execp->backend->has_icon) {
execp->backend->text = strdup(execp->backend->buf_output);
execp->backend->text = strdup(execp->backend->buf_stdout);
} else {
char *text = strchr(execp->backend->buf_output, '\n');
char *text = strchr(execp->backend->buf_stdout, '\n');
if (text) {
*text = '\0';
text++;
@@ -755,23 +855,23 @@ gboolean read_execp(void *obj)
} else {
execp->backend->text = strdup("");
}
execp->backend->icon_path = strdup(execp->backend->buf_output);
execp->backend->icon_path = strdup(execp->backend->buf_stdout);
}
int len = strlen(execp->backend->text);
size_t len = strlen(execp->backend->text);
if (len > 0 && execp->backend->text[len - 1] == '\n')
execp->backend->text[len - 1] = '\0';
if (end) {
char *next = end + 1;
int copied = next - execp->backend->buf_output;
int remaining = execp->backend->buf_length - copied;
ssize_t copied = next - execp->backend->buf_stdout;
ssize_t remaining = execp->backend->buf_stdout_length - copied;
if (remaining > 0) {
memmove(execp->backend->buf_output, next, remaining);
execp->backend->buf_length = remaining;
execp->backend->buf_output[execp->backend->buf_length] = '\0';
memmove(execp->backend->buf_stdout, next, (size_t)remaining);
execp->backend->buf_stdout_length = remaining;
execp->backend->buf_stdout[execp->backend->buf_stdout_length] = '\0';
} else {
execp->backend->buf_length = 0;
execp->backend->buf_output[execp->backend->buf_length] = '\0';
execp->backend->buf_stdout_length = 0;
execp->backend->buf_stdout[execp->backend->buf_stdout_length] = '\0';
}
}
@@ -806,7 +906,7 @@ const char *time_to_string(int seconds, char *buffer)
char *execp_get_tooltip(void *obj)
{
Execp *execp = obj;
Execp *execp = (Execp *)obj;
if (execp->backend->tooltip) {
if (strlen(execp->backend->tooltip) > 0)
@@ -820,7 +920,7 @@ char *execp_get_tooltip(void *obj)
char tmp_buf1[256];
char tmp_buf2[256];
char tmp_buf3[256];
if (execp->backend->child_pipe < 0) {
if (execp->backend->child_pipe_stdout < 0) {
// Not executing command
if (execp->backend->last_update_finish_time) {
// We updated at least once
@@ -858,3 +958,30 @@ char *execp_get_tooltip(void *obj)
}
return strdup(execp->backend->tooltip_text);
}
void execp_update_post_read(Execp *execp)
{
int icon_h, icon_w;
if (reload_icon(execp)) {
if (execp->backend->icon) {
imlib_context_set_image(execp->backend->icon);
icon_w = imlib_image_get_width();
icon_h = imlib_image_get_height();
} else {
icon_w = icon_h = 0;
}
} else {
icon_w = icon_h = 0;
}
if ((icon_h == 0 || icon_w == 0) && execp->backend->text[0] == 0) {
// Easy to test with bash -c 'R=$(( RANDOM % 2 )); [ $R -eq 0 ] && echo HELLO $R'
if (execp->area.on_screen)
hide(&execp->area);
} else {
if (!execp->area.on_screen)
show(&execp->area);
execp->area.resize_needed = TRUE;
schedule_panel_redraw();
}
}

View File

@@ -27,6 +27,7 @@ typedef struct ExecpBackend {
gboolean cache_icon;
int icon_w;
int icon_h;
gboolean has_user_tooltip;
char *tooltip;
gboolean centered;
gboolean has_font;
@@ -46,20 +47,24 @@ typedef struct ExecpBackend {
// Backend state:
timeout *timer;
int child_pipe;
int child_pipe_stdout;
int child_pipe_stderr;
pid_t child;
// Command output buffer
char *buf_output;
int buf_length;
int buf_capacity;
char *buf_stdout;
ssize_t buf_stdout_length;
ssize_t buf_stdout_capacity;
char *buf_stderr;
ssize_t buf_stderr_length;
ssize_t buf_stderr_capacity;
// Text extracted from the output buffer
char *text;
// Icon path extracted from the output buffer
char *icon_path;
Imlib_Image icon;
char tooltip_text[512];
gchar tooltip_text[512];
// The time the last command was started
time_t last_update_start_time;
@@ -138,6 +143,9 @@ void execp_cmd_completed(Execp *obj, pid_t pid);
// Returns 1 if the output has been updated and a redraw is needed.
gboolean read_execp(void *obj);
// Called for Execp front elements when the command output has changed.
void execp_update_post_read(Execp *execp);
void execp_default_font_changed();
#endif // EXECPLUGIN_H

View File

@@ -31,8 +31,6 @@
Server server;
gboolean primary_monitor_first = FALSE;
void server_catch_error(Display *d, XErrorEvent *ev)
{
}
@@ -268,13 +266,6 @@ int compare_monitor_pos(const void *monitor1, const void *monitor2)
const Monitor *m1 = (const Monitor *)monitor1;
const Monitor *m2 = (const Monitor *)monitor2;
if (primary_monitor_first) {
if (m1->primary && !m2->primary)
return -1;
if (!m1->primary && m2->primary)
return 1;
}
if (m1->x < m2->x) {
return -1;
} else if (m1->x > m2->x) {

View File

@@ -624,7 +624,7 @@ void set_task_state(Task *task, TaskState state)
}
}
if (task->current_state != state || hide_task_diff_monitor) {
if (task->current_state != state || hide_task_diff_monitor || hide_task_diff_desktop) {
GPtrArray *task_buttons = get_task_buttons(task->win);
if (task_buttons) {
for (int i = 0; i < task_buttons->len; ++i) {
@@ -648,6 +648,10 @@ void set_task_state(Task *task, TaskState state)
hide = TRUE;
}
}
if (hide_task_diff_desktop) {
if (taskbar->desktop != server.desktop)
hide = TRUE;
}
if (get_window_monitor(task->win) != ((Panel *)task->area.panel)->monitor &&
(hide_task_diff_monitor || num_panels > 1)) {
hide = TRUE;

View File

@@ -39,6 +39,7 @@ Task *active_task;
Task *task_drag;
gboolean taskbar_enabled;
gboolean taskbar_distribute_size;
gboolean hide_task_diff_desktop;
gboolean hide_inactive_tasks;
gboolean hide_task_diff_monitor;
gboolean hide_taskbar_if_empty;
@@ -74,6 +75,7 @@ void default_taskbar()
urgent_list = NULL;
taskbar_enabled = FALSE;
taskbar_distribute_size = FALSE;
hide_task_diff_desktop = FALSE;
hide_inactive_tasks = FALSE;
hide_task_diff_monitor = FALSE;
hide_taskbar_if_empty = FALSE;
@@ -238,9 +240,9 @@ void init_taskbar_panel(void *p)
if ((panel->g_task.config_background_mask & (1 << TASK_URGENT)) == 0)
panel->g_task.background[TASK_URGENT] = panel->g_task.background[TASK_ACTIVE];
if (!panel->g_task.maximum_width)
if (!panel->g_task.maximum_width || !panel_horizontal)
panel->g_task.maximum_width = server.monitors[panel->monitor].width;
if (!panel->g_task.maximum_height)
if (!panel->g_task.maximum_height || panel_horizontal)
panel->g_task.maximum_height = server.monitors[panel->monitor].height;
if (panel_horizontal) {
@@ -288,7 +290,8 @@ void init_taskbar_panel(void *p)
FALSE);
panel->g_task.text_posx = left_bg_border_width(panel->g_task.background[0]) + panel->g_task.area.paddingxlr;
panel->g_task.text_height = panel->g_task.area.height - (2 * panel->g_task.area.paddingy);
panel->g_task.text_height =
panel->g_task.area.height - (2 * panel->g_task.area.paddingy) - top_bottom_border_width(&panel->g_task.area);
if (panel->g_task.has_icon) {
panel->g_task.icon_size1 = MIN(MIN(panel->g_task.maximum_width, panel->g_task.maximum_height),
MIN(panel->g_task.area.width, panel->g_task.area.height)) -
@@ -534,6 +537,15 @@ void set_taskbar_state(Taskbar *taskbar, TaskbarState state)
for (; l; l = l->next)
schedule_redraw((Area *)l->data);
}
if (taskbar_mode == MULTI_DESKTOP && hide_task_diff_desktop) {
GList *l = taskbar->area.children;
if (taskbarname_enabled)
l = l->next;
for (; l; l = l->next) {
Task *task = (Task *)l->data;
set_task_state(task, task->current_state);
}
}
}
schedule_panel_redraw();
}

View File

@@ -49,6 +49,7 @@ typedef struct GlobalTaskbar {
extern gboolean taskbar_enabled;
extern gboolean taskbar_distribute_size;
extern gboolean hide_task_diff_desktop;
extern gboolean hide_inactive_tasks;
extern gboolean hide_task_diff_monitor;
extern gboolean hide_taskbar_if_empty;

View File

@@ -463,6 +463,7 @@ void init(int argc, char *argv[])
struct sigaction sa = {.sa_handler = signal_handler, .sa_flags = SA_RESTART};
sigaction(SIGUSR1, &sa, 0);
sigaction(SIGUSR2, &sa, 0);
sigaction(SIGINT, &sa, 0);
sigaction(SIGTERM, &sa, 0);
sigaction(SIGHUP, &sa, 0);
@@ -575,9 +576,6 @@ void init_X11_pre_config()
void init_X11_post_config()
{
if (primary_monitor_first)
sort_monitors();
server_init_visual();
gboolean need_sigchld = FALSE;
@@ -916,6 +914,8 @@ void event_button_motion_notify(XEvent *e)
task_drag->desktop = event_taskbar->desktop;
change_window_desktop(task_drag->win, event_taskbar->desktop);
if (hide_task_diff_desktop)
change_desktop(event_taskbar->desktop);
if (taskbar_sort_method != TASKBAR_NOSORT) {
sort_tasks(event_taskbar);
@@ -1832,7 +1832,12 @@ start:
}
for (GList *l = panel_config.execp_list; l; l = l->next) {
Execp *execp = (Execp *)l->data;
int fd = execp->backend->child_pipe;
int fd = execp->backend->child_pipe_stdout;
if (fd > 0) {
FD_SET(fd, &fdset);
maxfd = maxfd < fd ? fd : maxfd;
}
fd = execp->backend->child_pipe_stderr;
if (fd > 0) {
FD_SET(fd, &fdset);
maxfd = maxfd < fd ? fd : maxfd;
@@ -1861,9 +1866,8 @@ start:
if (read_execp(execp)) {
GList *l_instance;
for (l_instance = execp->backend->instances; l_instance; l_instance = l_instance->next) {
Execp *instance = l_instance->data;
instance->area.resize_needed = TRUE;
schedule_panel_redraw();
Execp *instance = (Execp *)l_instance->data;
execp_update_post_read(instance);
}
}
}
@@ -2177,6 +2181,12 @@ start:
// restart tint2
// SIGUSR1 used when : user's signal, composite manager stop/start or xrandr
goto start;
} else if (signal_pending == SIGUSR2) {
fprintf(stderr, YELLOW "%s %d: reexecuting tint2..." RESET "\n", __FILE__, __LINE__);
if (execvp(argv[0], argv) == -1) {
fprintf(stderr, RED "%s %d: failed!" RESET "\n", __FILE__, __LINE__);
return 1;
}
} else {
// SIGINT, SIGTERM, SIGHUP
exit(0);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,17 @@
#!/bin/bash
set -e
set -x
find .. -name '*.c' | sort -r | xargs xgettext --keyword=_ --language=C --output=tint2conf.pot -
sed -i "s/PACKAGE VERSION/tint2conf $(../../../get_version.sh | head -n1)/g" tint2conf.pot
sed -i "s/CHARSET/UTF-8/g" tint2conf.pot
for f in *.po
do
lang=$(basename $f .po)
echo $lang
msgmerge -i -o $lang.pox $lang.po tint2conf.pot
cat ${lang}.pox > ${lang}.po
rm ${lang}.pox
done

View File

@@ -31,7 +31,7 @@ GtkWidget *panel_window_name, *disable_transparency;
GtkWidget *panel_mouse_effects;
GtkWidget *mouse_hover_icon_opacity, *mouse_hover_icon_saturation, *mouse_hover_icon_brightness;
GtkWidget *mouse_pressed_icon_opacity, *mouse_pressed_icon_saturation, *mouse_pressed_icon_brightness;
GtkWidget *panel_primary_monitor_first, *panel_shrink;
GtkWidget *panel_shrink;
GtkListStore *panel_items, *all_items;
GtkWidget *panel_items_view, *all_items_view;
@@ -44,7 +44,7 @@ GtkWidget *notebook;
// taskbar
GtkWidget *taskbar_show_desktop, *taskbar_show_name, *taskbar_padding_x, *taskbar_padding_y, *taskbar_spacing;
GtkWidget *taskbar_hide_inactive_tasks, *taskbar_hide_diff_monitor;
GtkWidget *taskbar_hide_inactive_tasks, *taskbar_hide_diff_monitor, *taskbar_hide_diff_desktop;
GtkWidget *taskbar_name_padding_x, *taskbar_name_padding_y, *taskbar_name_inactive_color, *taskbar_name_active_color;
GtkWidget *taskbar_name_font, *taskbar_name_font_set;
GtkWidget *taskbar_active_background, *taskbar_inactive_background;
@@ -80,10 +80,10 @@ GtkWidget *clock_font_line1, *clock_font_line1_set, *clock_font_line2, *clock_fo
GtkWidget *clock_background;
// battery
GtkWidget *battery_hide_if_higher, *battery_alert_if_lower, *battery_alert_cmd;
GtkWidget *battery_hide_if_higher, *battery_alert_if_lower, *battery_alert_cmd, *battery_alert_full_cmd;
GtkWidget *battery_padding_x, *battery_padding_y;
GtkWidget *battery_font_line1, *battery_font_line1_set, *battery_font_line2, *battery_font_line2_set,
*battery_font_color;
*battery_font_color, *battery_format1, *battery_format2;
GtkWidget *battery_background;
GtkWidget *battery_tooltip;
GtkWidget *battery_left_command, *battery_mclick_command, *battery_right_command, *battery_uwheel_command,
@@ -477,6 +477,7 @@ void create_panel(GtkWidget *parent)
gtk_table_attach(GTK_TABLE(table), panel_combo_monitor, col, col + 1, row, row + 1, GTK_FILL, 0, 0, 0);
col++;
gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_monitor), _("All"));
gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_monitor), _("Primary"));
gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_monitor), _("1"));
gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_monitor), _("2"));
gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_monitor), _("3"));
@@ -486,24 +487,6 @@ void create_panel(GtkWidget *parent)
gtk_combo_box_set_active(GTK_COMBO_BOX(panel_combo_monitor), 0);
gtk_tooltips_set_tip(tooltips, panel_combo_monitor, _("The monitor on which the panel is placed"), NULL);
row++;
col = 2;
label = gtk_label_new(_("Primary monitor first"));
gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
gtk_widget_show(label);
gtk_table_attach(GTK_TABLE(table), label, col, col + 1, row, row + 1, GTK_FILL, 0, 0, 0);
col++;
panel_primary_monitor_first = gtk_check_button_new();
gtk_widget_show(panel_primary_monitor_first);
gtk_table_attach(GTK_TABLE(table), panel_primary_monitor_first, col, col + 1, row, row + 1, GTK_FILL, 0, 0, 0);
col++;
gtk_tooltips_set_tip(tooltips,
panel_primary_monitor_first,
_("If enabled, the primary monitor will have index 1 in the monitor list even if it is not "
"top-left."),
NULL);
row++;
col = 2;
label = gtk_label_new(_("Length"));
@@ -2651,6 +2634,19 @@ void create_taskbar(GtkWidget *parent)
"This behavior is enabled automatically if the panel monitor is set to 'All'."),
NULL);
col = 2;
row++;
label = gtk_label_new(_("Hide tasks from different desktops"));
gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
gtk_widget_show(label);
gtk_table_attach(GTK_TABLE(table), label, col, col + 1, row, row + 1, GTK_FILL, 0, 0, 0);
col++;
taskbar_hide_diff_desktop = gtk_check_button_new();
gtk_widget_show(taskbar_hide_diff_desktop);
gtk_table_attach(GTK_TABLE(table), taskbar_hide_diff_desktop, col, col + 1, row, row + 1, GTK_FILL, 0, 0, 0);
col++;
col = 2;
row++;
label = gtk_label_new(_("Always show all desktop tasks"));
@@ -5156,6 +5152,7 @@ void create_systemtray(GtkWidget *parent)
gtk_widget_show(systray_monitor);
gtk_table_attach(GTK_TABLE(table), systray_monitor, col, col + 1, row, row + 1, GTK_FILL, 0, 0, 0);
col++;
gtk_combo_box_append_text(GTK_COMBO_BOX(systray_monitor), _("Primary"));
gtk_combo_box_append_text(GTK_COMBO_BOX(systray_monitor), _("1"));
gtk_combo_box_append_text(GTK_COMBO_BOX(systray_monitor), _("2"));
gtk_combo_box_append_text(GTK_COMBO_BOX(systray_monitor), _("3"));
@@ -5419,6 +5416,19 @@ void create_battery(GtkWidget *parent)
_("Command to be executed when the alert threshold is reached."),
NULL);
row++, col = 2;
label = gtk_label_new(_("Battery full command"));
gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
gtk_widget_show(label);
gtk_table_attach(GTK_TABLE(table), label, col, col + 1, row, row + 1, GTK_FILL, 0, 0, 0);
col++;
battery_alert_full_cmd = gtk_entry_new();
gtk_widget_show(battery_alert_full_cmd);
gtk_entry_set_width_chars(GTK_ENTRY(battery_alert_full_cmd), 50);
gtk_table_attach(GTK_TABLE(table), battery_alert_full_cmd, col, col + 3, row, row + 1, GTK_FILL, 0, 0, 0);
col++;
change_paragraph(parent);
label = gtk_label_new(_("<b>AC connection events</b>"));
@@ -5736,6 +5746,46 @@ void create_battery(GtkWidget *parent)
_("Specifies the font clor used to display the battery text."),
NULL);
row++, col = 2;
label = gtk_label_new(_("First line format"));
gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
gtk_widget_show(label);
gtk_table_attach(GTK_TABLE(table), label, col, col + 1, row, row + 1, GTK_FILL, 0, 0, 0);
col++;
battery_format1 = gtk_entry_new();
gtk_widget_show(battery_format1);
gtk_entry_set_width_chars(GTK_ENTRY(battery_format1), 16);
gtk_table_attach(GTK_TABLE(table), battery_format1, col, col + 1, row, row + 1, GTK_FILL, 0, 0, 0);
col++;
char *bat_format_spec = "Format specification:\n"
" %s: State (charging, discharging, full, unknown).\n"
" %m: Minutes left until completely charged/discharged (estimated).\n"
" %h: Hours left until completely charged/discharged (estimated).\n"
" %t: Time left. Shows \"hrs:mins\" when charging/discharging, or \"Full\".\n"
" %p: Percentage. Includes the % sign.";
gtk_tooltips_set_tip(tooltips,
battery_format1,
_(bat_format_spec),
NULL);
row++, col = 2;
label = gtk_label_new(_("Second line format"));
gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
gtk_widget_show(label);
gtk_table_attach(GTK_TABLE(table), label, col, col + 1, row, row + 1, GTK_FILL, 0, 0, 0);
col++;
battery_format2 = gtk_entry_new();
gtk_widget_show(battery_format2);
gtk_entry_set_width_chars(GTK_ENTRY(battery_format2), 16);
gtk_table_attach(GTK_TABLE(table), battery_format2, col, col + 1, row, row + 1, GTK_FILL, 0, 0, 0);
col++;
gtk_tooltips_set_tip(tooltips,
battery_format2,
_(bat_format_spec),
NULL);
change_paragraph(parent);
}

View File

@@ -19,7 +19,7 @@ extern GtkWidget *panel_window_name, *disable_transparency;
extern GtkWidget *panel_mouse_effects;
extern GtkWidget *mouse_hover_icon_opacity, *mouse_hover_icon_saturation, *mouse_hover_icon_brightness;
extern GtkWidget *mouse_pressed_icon_opacity, *mouse_pressed_icon_saturation, *mouse_pressed_icon_brightness;
extern GtkWidget *panel_primary_monitor_first, *panel_shrink;
extern GtkWidget *panel_shrink;
enum { itemsColName = 0, itemsColValue, itemsNumCols };
extern GtkListStore *panel_items, *all_items;
@@ -49,7 +49,7 @@ extern GtkWidget *panel_background;
// taskbar
extern GtkWidget *taskbar_show_desktop, *taskbar_show_name, *taskbar_padding_x, *taskbar_padding_y, *taskbar_spacing;
extern GtkWidget *taskbar_hide_inactive_tasks, *taskbar_hide_diff_monitor;
extern GtkWidget *taskbar_hide_inactive_tasks, *taskbar_hide_diff_monitor, *taskbar_hide_diff_desktop;
extern GtkWidget *taskbar_name_padding_x, *taskbar_name_padding_y, *taskbar_name_inactive_color,
*taskbar_name_active_color;
extern GtkWidget *taskbar_name_font, *taskbar_name_font_set;
@@ -88,10 +88,10 @@ extern GtkWidget *clock_font_line1, *clock_font_line1_set, *clock_font_line2, *c
extern GtkWidget *clock_background;
// battery
extern GtkWidget *battery_hide_if_higher, *battery_alert_if_lower, *battery_alert_cmd;
extern GtkWidget *battery_hide_if_higher, *battery_alert_if_lower, *battery_alert_cmd, *battery_alert_full_cmd;
extern GtkWidget *battery_padding_x, *battery_padding_y;
extern GtkWidget *battery_font_line1, *battery_font_line1_set, *battery_font_line2, *battery_font_line2_set,
*battery_font_color;
*battery_font_color, *battery_format1, *battery_format2;
extern GtkWidget *battery_background;
extern GtkWidget *battery_tooltip;
extern GtkWidget *battery_left_command, *battery_mclick_command, *battery_right_command, *battery_uwheel_command,

View File

@@ -326,17 +326,15 @@ void config_write_panel(FILE *fp)
fprintf(fp, "\n");
fprintf(fp, "panel_monitor = ");
if (gtk_combo_box_get_active(GTK_COMBO_BOX(panel_combo_monitor)) == 0) {
if (gtk_combo_box_get_active(GTK_COMBO_BOX(panel_combo_monitor)) <= 0) {
fprintf(fp, "all");
} else if (gtk_combo_box_get_active(GTK_COMBO_BOX(panel_combo_monitor)) == 1) {
fprintf(fp, "primary");
} else {
fprintf(fp, "%d", gtk_combo_box_get_active(GTK_COMBO_BOX(panel_combo_monitor)));
fprintf(fp, "%d", gtk_combo_box_get_active(GTK_COMBO_BOX(panel_combo_monitor)) - 1);
}
fprintf(fp, "\n");
fprintf(fp,
"primary_monitor_first = %d\n",
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(panel_primary_monitor_first)) ? 1 : 0);
fprintf(fp, "panel_shrink = %d\n", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(panel_shrink)) ? 1 : 0);
fprintf(fp, "autohide = %d\n", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(panel_autohide)) ? 1 : 0);
@@ -401,6 +399,9 @@ void config_write_taskbar(FILE *fp)
fprintf(fp,
"taskbar_hide_different_monitor = %d\n",
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(taskbar_hide_diff_monitor)) ? 1 : 0);
fprintf(fp,
"taskbar_hide_different_desktop = %d\n",
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(taskbar_hide_diff_desktop)) ? 1 : 0);
fprintf(fp,
"taskbar_always_show_all_desktop_tasks = %d\n",
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(taskbar_always_show_all_desktop_tasks)) ? 1 : 0);
@@ -629,7 +630,11 @@ void config_write_systray(FILE *fp)
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(systray_icon_brightness)));
fprintf(fp, "systray_monitor = ");
fprintf(fp, "%d", MAX(1, 1 + gtk_combo_box_get_active(GTK_COMBO_BOX(systray_monitor))));
if (gtk_combo_box_get_active(GTK_COMBO_BOX(systray_monitor)) <= 0) {
fprintf(fp, "primary");
} else {
fprintf(fp, "%d", MAX(1, gtk_combo_box_get_active(GTK_COMBO_BOX(systray_monitor))));
}
fprintf(fp, "\n");
fprintf(fp, "systray_name_filter = %s\n", gtk_entry_get_text(GTK_ENTRY(systray_name_filter)));
@@ -752,6 +757,7 @@ void config_write_battery(FILE *fp)
fprintf(fp, "battery_tooltip = %d\n", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(battery_tooltip)) ? 1 : 0);
fprintf(fp, "battery_low_status = %g\n", gtk_spin_button_get_value(GTK_SPIN_BUTTON(battery_alert_if_lower)));
fprintf(fp, "battery_low_cmd = %s\n", gtk_entry_get_text(GTK_ENTRY(battery_alert_cmd)));
fprintf(fp, "battery_full_cmd = %s\n", gtk_entry_get_text(GTK_ENTRY(battery_alert_full_cmd)));
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(battery_font_line1_set)))
fprintf(fp, "bat1_font = %s\n", gtk_font_button_get_font_name(GTK_FONT_BUTTON(battery_font_line1)));
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(battery_font_line2_set)))
@@ -762,6 +768,8 @@ void config_write_battery(FILE *fp)
"battery_font_color",
color,
gtk_color_button_get_alpha(GTK_COLOR_BUTTON(battery_font_color)) * 100 / 0xffff);
fprintf(fp, "bat1_format = %s\n", gtk_entry_get_text(GTK_ENTRY(battery_format1)));
fprintf(fp, "bat2_format = %s\n", gtk_entry_get_text(GTK_ENTRY(battery_format2)));
fprintf(fp,
"battery_padding = %d %d\n",
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(battery_padding_x)),
@@ -1351,20 +1359,20 @@ void add_entry(char *key, char *value)
} else if (strcmp(key, "panel_monitor") == 0) {
if (strcmp(value, "all") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(panel_combo_monitor), 0);
else if (strcmp(value, "1") == 0)
else if (strcmp(value, "primary") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(panel_combo_monitor), 1);
else if (strcmp(value, "2") == 0)
else if (strcmp(value, "1") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(panel_combo_monitor), 2);
else if (strcmp(value, "3") == 0)
else if (strcmp(value, "2") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(panel_combo_monitor), 3);
else if (strcmp(value, "4") == 0)
else if (strcmp(value, "3") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(panel_combo_monitor), 4);
else if (strcmp(value, "5") == 0)
else if (strcmp(value, "4") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(panel_combo_monitor), 5);
else if (strcmp(value, "6") == 0)
else if (strcmp(value, "5") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(panel_combo_monitor), 6);
} else if (strcmp(key, "primary_monitor_first") == 0) {
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(panel_primary_monitor_first), atoi(value));
else if (strcmp(value, "6") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(panel_combo_monitor), 7);
} else if (strcmp(key, "panel_shrink") == 0) {
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(panel_shrink), atoi(value));
}
@@ -1403,12 +1411,18 @@ void add_entry(char *key, char *value)
gtk_spin_button_set_value(GTK_SPIN_BUTTON(battery_alert_if_lower), atof(value));
} else if (strcmp(key, "battery_low_cmd") == 0) {
gtk_entry_set_text(GTK_ENTRY(battery_alert_cmd), value);
} else if (strcmp(key, "battery_full_cmd") == 0) {
gtk_entry_set_text(GTK_ENTRY(battery_alert_full_cmd), value);
} else if (strcmp(key, "bat1_font") == 0) {
gtk_font_button_set_font_name(GTK_FONT_BUTTON(battery_font_line1), value);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(battery_font_line1_set), TRUE);
} else if (strcmp(key, "bat2_font") == 0) {
gtk_font_button_set_font_name(GTK_FONT_BUTTON(battery_font_line2), value);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(battery_font_line2_set), TRUE);
} else if (strcmp(key, "bat1_format") == 0) {
gtk_entry_set_text(GTK_ENTRY(battery_format1), value);
} else if (strcmp(key, "bat2_format") == 0) {
gtk_entry_set_text(GTK_ENTRY(battery_format2), value);
} else if (strcmp(key, "battery_font_color") == 0) {
extract_values(value, &value1, &value2, &value3);
GdkColor col;
@@ -1551,6 +1565,8 @@ void add_entry(char *key, char *value)
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(taskbar_hide_inactive_tasks), atoi(value));
} else if (strcmp(key, "taskbar_hide_different_monitor") == 0) {
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(taskbar_hide_diff_monitor), atoi(value));
} else if (strcmp(key, "taskbar_hide_different_desktop") == 0) {
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(taskbar_hide_diff_desktop), atoi(value));
} else if (strcmp(key, "taskbar_always_show_all_desktop_tasks") == 0) {
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(taskbar_always_show_all_desktop_tasks), atoi(value));
} else if (strcmp(key, "taskbar_name_padding") == 0) {
@@ -1747,18 +1763,20 @@ void add_entry(char *key, char *value)
} else if (strcmp(key, "systray_icon_size") == 0) {
gtk_spin_button_set_value(GTK_SPIN_BUTTON(systray_icon_size), atoi(value));
} else if (strcmp(key, "systray_monitor") == 0) {
if (strcmp(value, "1") == 0)
if (strcmp(value, "primary") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 0);
else if (strcmp(value, "2") == 0)
else if (strcmp(value, "1") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 1);
else if (strcmp(value, "3") == 0)
else if (strcmp(value, "2") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 2);
else if (strcmp(value, "4") == 0)
else if (strcmp(value, "3") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 3);
else if (strcmp(value, "5") == 0)
else if (strcmp(value, "4") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 4);
else if (strcmp(value, "6") == 0)
else if (strcmp(value, "5") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 5);
else if (strcmp(value, "6") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 6);
} else if (strcmp(key, "systray_icon_asb") == 0) {
extract_values(value, &value1, &value2, &value3);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(systray_icon_opacity), atoi(value1));

View File

@@ -145,10 +145,16 @@ void theme_list_append(const gchar *path)
GtkTreeIter iter;
gtk_list_store_append(theme_list_store, &iter);
gchar *name = strrchr(path, '/') + 1;
gchar *name, *dir;
gchar *dir = g_strdup(path);
strrchr(dir, '/')[0] = 0;
if (strchr(path, '/')) {
name = strrchr(path, '/') + 1;
dir = g_strdup(path);
strrchr(dir, '/')[0] = 0;
} else {
name = (gchar*)path;
dir = g_strdup(".");
}
char *suffix = contract_tilde(dir);
g_free(dir);

View File

@@ -883,6 +883,180 @@ void area_dump_geometry(Area *area, int indent)
}
}
void area_compute_text_geometry(Area *area,
const char *line1,
const char *line2,
PangoFontDescription *line1_font_desc,
PangoFontDescription *line2_font_desc,
int *line1_height_ink,
int *line1_height,
int *line1_width,
int *line2_height_ink,
int *line2_height,
int *line2_width)
{
Panel *panel = (Panel *)area->panel;
int available_w, available_h;
if (panel_horizontal) {
available_w = panel->area.width;
available_h = area->height - 2 * area->paddingy - left_right_border_width(area);
} else {
available_w = area->width - 2 * area->paddingxlr - left_right_border_width(area);
available_h = panel->area.height;
}
if (line1 && line1[0])
get_text_size2(line1_font_desc,
line1_height_ink,
line1_height,
line1_width,
available_h,
available_w,
line1,
strlen(line1),
PANGO_WRAP_WORD_CHAR,
PANGO_ELLIPSIZE_NONE,
FALSE);
else
*line1_width = *line1_height_ink = *line1_height = 0;
if (line2 && line2[0])
get_text_size2(line2_font_desc,
line2_height_ink,
line2_height,
line2_width,
available_h,
available_w,
line2,
strlen(line2),
PANGO_WRAP_WORD_CHAR,
PANGO_ELLIPSIZE_NONE,
FALSE);
else
*line2_width = *line2_height_ink = *line2_height = 0;
}
int text_area_compute_desired_size(Area *area,
const char *line1,
const char *line2,
PangoFontDescription *line1_font_desc,
PangoFontDescription *line2_font_desc)
{
int line1_height_ink, line1_height, line1_width, line2_height_ink, line2_height, line2_width;
area_compute_text_geometry(area,
line1,
line2,
line1_font_desc,
line2_font_desc,
&line1_height_ink,
&line1_height,
&line1_width,
&line2_height_ink,
&line2_height,
&line2_width);
if (panel_horizontal) {
int new_size = MAX(line1_width, line2_width) + 2 * area->paddingxlr + left_right_border_width(area);
return new_size;
} else {
int new_size = line1_height + line2_height + 2 * area->paddingxlr + top_bottom_border_width(area);
return new_size;
}
}
gboolean resize_text_area(Area *area,
const char *line1,
const char *line2,
PangoFontDescription *line1_font_desc,
PangoFontDescription *line2_font_desc,
int *line1_posy,
int *line2_posy)
{
gboolean result = FALSE;
schedule_redraw(area);
int line1_height_ink, line1_height, line1_width;
int line2_height_ink, line2_height, line2_width;
area_compute_text_geometry(area,
line1,
line2,
line1_font_desc,
line2_font_desc,
&line1_height_ink,
&line1_height,
&line1_width,
&line2_height_ink,
&line2_height,
&line2_width);
int new_size = text_area_compute_desired_size(area,
line1,
line2,
line1_font_desc,
line2_font_desc);
if (panel_horizontal) {
if (new_size > area->width || new_size < (area->width - 6)) {
// we try to limit the number of resizes
area->width = new_size + 1;
*line1_posy = (area->height - line1_height) / 2;
if (line2) {
*line1_posy -= (line2_height) / 2;
*line2_posy = *line1_posy + line1_height;
}
result = TRUE;
}
} else {
if (new_size != area->height) {
// we try to limit the number of resizes
area->height = new_size;
*line1_posy = (area->height - line1_height) / 2;
if (line2) {
*line1_posy -= (line2_height) / 2;
*line2_posy = *line1_posy + line1_height;
}
result = TRUE;
}
}
return result;
}
void draw_text_area(Area *area,
cairo_t *c,
const char *line1,
const char *line2,
PangoFontDescription *line1_font_desc,
PangoFontDescription *line2_font_desc,
int line1_posy,
int line2_posy,
Color *color)
{
PangoLayout *layout = pango_cairo_create_layout(c);
pango_layout_set_alignment(layout, PANGO_ALIGN_CENTER);
pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR);
pango_layout_set_ellipsize(layout, PANGO_ELLIPSIZE_NONE);
pango_layout_set_width(layout, area->width * PANGO_SCALE);
cairo_set_source_rgba(c, color->rgb[0], color->rgb[1], color->rgb[2], color->alpha);
if (line1 && line1[0]) {
pango_layout_set_font_description(layout, line1_font_desc);
pango_layout_set_text(layout, line1, strlen(line1));
pango_cairo_update_layout(c, layout);
draw_text(layout, c, 0, line1_posy, color, ((Panel *)area->panel)->font_shadow);
}
if (line2 && line2[0]) {
pango_layout_set_font_description(layout, line2_font_desc);
pango_layout_set_indent(layout, 0);
pango_layout_set_text(layout, line2, strlen(line2));
pango_cairo_update_layout(c, layout);
draw_text(layout, c, 0, line2_posy, color, ((Panel *)area->panel)->font_shadow);
}
g_object_unref(layout);
}
Area *compute_element_area(Area *area, Element element)
{
if (element == ELEMENT_SELF)

View File

@@ -263,6 +263,39 @@ int relayout_with_constraint(Area *a, int maximum_size);
int compute_desired_size(Area *a);
int container_compute_desired_size(Area *a);
void area_compute_text_geometry(Area *area,
const char *line1,
const char *line2,
PangoFontDescription *line1_font_desc,
PangoFontDescription *line2_font_desc,
int *line1_height_ink,
int *line1_height,
int *line1_width,
int *line2_height_ink,
int *line2_height,
int *line2_width);
int text_area_compute_desired_size(Area *area,
const char *line1,
const char *line2,
PangoFontDescription *line1_font_desc,
PangoFontDescription *line2_font_desc);
gboolean resize_text_area(Area *area,
const char *line1,
const char *line2,
PangoFontDescription *line1_font_desc,
PangoFontDescription *line2_font_desc,
int *line1_posy,
int *line2_posy);
void draw_text_area(Area *area,
cairo_t *c,
const char *line1,
const char *line2,
PangoFontDescription *line1_font_desc,
PangoFontDescription *line2_font_desc,
int line1_posy,
int line2_posy,
Color *color);
int left_border_width(Area *a);
int right_border_width(Area *a);
int left_right_border_width(Area *a);

View File

@@ -736,35 +736,38 @@ void clear_pixmap(Pixmap p, int x, int y, int w, int h)
XRenderFreePicture(server.display, pict);
}
void get_text_size2(PangoFontDescription *font,
void get_text_size2(const PangoFontDescription *font,
int *height_ink,
int *height,
int *width,
int panel_height,
int panel_width,
char *text,
int len,
int available_height,
int available_width,
const char *text,
int text_len,
PangoWrapMode wrap,
PangoEllipsizeMode ellipsis,
gboolean markup)
{
PangoRectangle rect_ink, rect;
Pixmap pmap = XCreatePixmap(server.display, server.root_win, panel_height, panel_width, server.depth);
available_width = MAX(0, available_width);
available_height = MAX(0, available_height);
Pixmap pmap = XCreatePixmap(server.display, server.root_win, available_height, available_width, server.depth);
cairo_surface_t *cs = cairo_xlib_surface_create(server.display, pmap, server.visual, panel_height, panel_width);
cairo_surface_t *cs = cairo_xlib_surface_create(server.display, pmap, server.visual, available_height, available_width);
cairo_t *c = cairo_create(cs);
PangoLayout *layout = pango_cairo_create_layout(c);
pango_layout_set_width(layout, panel_width * PANGO_SCALE);
pango_layout_set_height(layout, panel_height * PANGO_SCALE);
pango_layout_set_width(layout, available_width * PANGO_SCALE);
pango_layout_set_height(layout, available_height * PANGO_SCALE);
pango_layout_set_wrap(layout, wrap);
pango_layout_set_ellipsize(layout, ellipsis);
pango_layout_set_font_description(layout, font);
text_len = MAX(0, text_len);
if (!markup)
pango_layout_set_text(layout, text, len);
pango_layout_set_text(layout, text, text_len);
else
pango_layout_set_markup(layout, text, len);
pango_layout_set_markup(layout, text, text_len);
pango_layout_get_pixel_extents(layout, &rect_ink, &rect);
*height_ink = rect_ink.height;

View File

@@ -95,14 +95,14 @@ void create_heuristic_mask(DATA32 *data, int w, int h);
// Renders the current Imlib image to a drawable. Wrapper around imlib_render_image_on_drawable.
void render_image(Drawable d, int x, int y);
void get_text_size2(PangoFontDescription *font,
void get_text_size2(const PangoFontDescription *font,
int *height_ink,
int *height,
int *width,
int panel_height,
int panel_with,
char *text,
int len,
int available_height,
int available_with,
const char *text,
int text_len,
PangoWrapMode wrap,
PangoEllipsizeMode ellipsis,
gboolean markup);

View File

@@ -82,6 +82,16 @@ void cleanup_timeout()
}
}
int gettime(struct timespec *tp)
{
// CLOCK_BOOTTIME under Linux is the same as CLOCK_MONOTONIC under *BSD.
#ifdef CLOCK_BOOTTIME
return clock_gettime(CLOCK_BOOTTIME, tp);
#else
return clock_gettime(CLOCK_MONOTONIC, tp);
#endif
}
// Implementation notes for timeouts
//
// The timeouts are kept in a GSList sorted by their expiration time.
@@ -124,7 +134,7 @@ void update_next_timeout()
timeout *t = timeout_list->data;
struct timespec cur_time;
struct timespec next_timeout2 = {.tv_sec = next_timeout.tv_sec, .tv_nsec = next_timeout.tv_usec * 1000};
clock_gettime(CLOCK_MONOTONIC, &cur_time);
gettime(&cur_time);
if (timespec_subtract(&next_timeout2, &t->timeout_expires, &cur_time)) {
next_timeout.tv_sec = 0;
next_timeout.tv_usec = 0;
@@ -141,7 +151,7 @@ void callback_timeout_expired()
struct timespec cur_time;
timeout *t;
while (timeout_list) {
clock_gettime(CLOCK_MONOTONIC, &cur_time);
gettime(&cur_time);
t = timeout_list->data;
if (compare_timespecs(&t->timeout_expires, &cur_time) <= 0) {
// it's time for the callback function
@@ -187,7 +197,7 @@ void add_timeout_intern(int value_msec, int interval_msec, void (*_callback)(),
t->_callback = _callback;
t->arg = arg;
struct timespec cur_time;
clock_gettime(CLOCK_MONOTONIC, &cur_time);
gettime(&cur_time);
t->timeout_expires = add_msec_to_timespec(cur_time, value_msec);
int can_align = 0;
@@ -343,7 +353,7 @@ void update_multi_timeout_values(multi_timeout_handler *mth)
int next_timeout_msec = interval;
struct timespec cur_time;
clock_gettime(CLOCK_MONOTONIC, &cur_time);
gettime(&cur_time);
GSList *it = mth->timeout_list;
struct timespec diff_time;
@@ -368,7 +378,7 @@ void callback_multi_timeout(void *arg)
{
multi_timeout_handler *mth = arg;
struct timespec cur_time;
clock_gettime(CLOCK_MONOTONIC, &cur_time);
gettime(&cur_time);
GSList *it = mth->timeout_list;
while (it) {
timeout *t = it->data;
@@ -407,7 +417,7 @@ void remove_from_multi_timeout(timeout *t)
free(mth);
struct timespec cur_time, diff_time;
clock_gettime(CLOCK_MONOTONIC, &cur_time);
gettime(&cur_time);
timespec_subtract(&diff_time, &t->timeout_expires, &cur_time);
int msec_to_expiration = diff_time.tv_sec * 1000 + diff_time.tv_nsec / 1000000;
add_timeout_intern(msec_to_expiration,
@@ -438,7 +448,7 @@ double profiling_get_time_old_time = 0;
double get_time()
{
struct timespec cur_time;
clock_gettime(CLOCK_MONOTONIC, &cur_time);
gettime(&cur_time);
return cur_time.tv_sec + cur_time.tv_nsec * 1.0e-9;
}

View File

@@ -0,0 +1,246 @@
#---- Generated by tint2conf f935 ----
# See https://gitlab.com/o9000/tint2/wikis/Configure for
# full documentation of the configuration options.
#-------------------------------------
# Gradients
#-------------------------------------
# Backgrounds
# Background 1: Panel
rounded = 0
border_width = 1
border_sides = TLR
background_color = #000000 80
border_color = #555555 80
background_color_hover = #000000 80
border_color_hover = #555555 80
background_color_pressed = #000000 80
border_color_pressed = #555555 80
# Background 2: Default task, Iconified task
rounded = 0
border_width = 0
border_sides = TBLR
background_color = #777777 0
border_color = #777777 0
background_color_hover = #777777 4
border_color_hover = #cccccc 30
background_color_pressed = #989898 21
border_color_pressed = #777777 30
# Background 3: Active task
rounded = 0
border_width = 0
border_sides = TBLR
background_color = #ffffff 21
border_color = #ffffff 60
background_color_hover = #ffffff 21
border_color_hover = #ffffff 60
background_color_pressed = #989898 21
border_color_pressed = #ffffff 60
# Background 4: Urgent task
rounded = 0
border_width = 0
border_sides = TBLR
background_color = #aa4400 100
border_color = #aa7733 100
background_color_hover = #aa4400 100
border_color_hover = #aa7733 100
background_color_pressed = #aa4400 100
border_color_pressed = #aa7733 100
# Background 5: Tooltip
rounded = 2
border_width = 1
border_sides = TBLR
background_color = #ffffaa 100
border_color = #999999 100
background_color_hover = #ffffaa 100
border_color_hover = #999999 100
background_color_pressed = #ffffaa 100
border_color_pressed = #999999 100
# Background 6: Inactive desktop name
rounded = 0
border_width = 0
border_sides = TBLR
background_color = #777777 0
border_color = #777777 30
background_color_hover = #bdbdbd 21
border_color_hover = #cccccc 30
background_color_pressed = #777777 21
border_color_pressed = #777777 30
# Background 7: Active desktop name
rounded = 0
border_width = 0
border_sides = TBLR
background_color = #ffffff 21
border_color = #ffffff 60
background_color_hover = #ffffff 21
border_color_hover = #ffffff 60
background_color_pressed = #a9a9a9 21
border_color_pressed = #ffffff 60
#-------------------------------------
# Panel
panel_items = L:T:SC
panel_size = 100% 32
panel_margin = 0 0
panel_padding = 4 0 4
panel_background_id = 1
wm_menu = 1
panel_dock = 0
panel_position = bottom center horizontal
panel_layer = normal
panel_monitor = all
panel_shrink = 1
autohide = 0
autohide_show_timeout = 0
autohide_hide_timeout = 0.5
autohide_height = 2
strut_policy = follow_size
panel_window_name = tint2
disable_transparency = 0
mouse_effects = 1
font_shadow = 0
mouse_hover_icon_asb = 100 0 10
mouse_pressed_icon_asb = 100 0 0
#-------------------------------------
# Taskbar
taskbar_mode = multi_desktop
taskbar_hide_if_empty = 0
taskbar_padding = 0 0 0
taskbar_background_id = 0
taskbar_active_background_id = 0
taskbar_name = 1
taskbar_hide_inactive_tasks = 0
taskbar_hide_different_monitor = 0
taskbar_hide_different_desktop = 0
taskbar_always_show_all_desktop_tasks = 0
taskbar_name_padding = 4 0
taskbar_name_background_id = 6
taskbar_name_active_background_id = 7
taskbar_name_font = sans bold 9
taskbar_name_font_color = #dddddd 100
taskbar_name_active_font_color = #dddddd 100
taskbar_distribute_size = 1
taskbar_sort_order = none
task_align = left
#-------------------------------------
# Task
task_text = 0
task_icon = 1
task_centered = 1
urgent_nb_of_blink = 100000
task_maximum_size = 35 35
task_padding = 4 3 4
task_font = sans 8
task_tooltip = 1
task_font_color = #eeeeee 100
task_icon_asb = 100 0 0
task_background_id = 2
task_active_background_id = 3
task_urgent_background_id = 4
task_iconified_background_id = 2
mouse_left = toggle_iconify
mouse_middle = none
mouse_right = close
mouse_scroll_up = prev_task
mouse_scroll_down = next_task
#-------------------------------------
# System tray (notification area)
systray_padding = 0 0 2
systray_background_id = 0
systray_sort = ascending
systray_icon_size = 22
systray_icon_asb = 100 0 0
systray_monitor = 1
systray_name_filter =
#-------------------------------------
# Launcher
launcher_padding = 0 0 2
launcher_background_id = 0
launcher_icon_background_id = 0
launcher_icon_size = 22
launcher_icon_asb = 100 0 0
launcher_icon_theme_override = 0
startup_notifications = 1
launcher_tooltip = 1
launcher_item_app = /usr/share/applications/firefox.desktop
launcher_item_app = /usr/share/applications/iceweasel.desktop
launcher_item_app = /usr/share/applications/google-chrome.desktop
launcher_item_app = /usr/local/share/applications/tint2conf.desktop
#-------------------------------------
# Clock
time1_format = %H:%M
time2_format = %A %d %B
time1_font = sans bold 8
time1_timezone =
time2_timezone =
time2_font = sans 7
clock_font_color = #eeeeee 100
clock_padding = 1 0
clock_background_id = 0
clock_tooltip =
clock_tooltip_timezone =
clock_lclick_command = zenity --calendar --text ""
clock_rclick_command = orage
clock_mclick_command =
clock_uwheel_command =
clock_dwheel_command =
#-------------------------------------
# Battery
battery_tooltip = 1
battery_low_status = 10
battery_low_cmd = notify-send "battery low"
battery_full_cmd =
bat1_font = sans 8
bat2_font = sans 6
battery_font_color = #eeeeee 100
bat1_format =
bat2_format =
battery_padding = 1 0
battery_background_id = 0
battery_hide = 101
battery_lclick_command =
battery_rclick_command =
battery_mclick_command =
battery_uwheel_command =
battery_dwheel_command =
ac_connected_cmd =
ac_disconnected_cmd =
#-------------------------------------
# Separator 1
separator = new
separator_background_id = -1
separator_color = #777777 89
separator_style = dots
separator_size = 3
separator_padding = 1 0
#-------------------------------------
# Separator 2
separator = new
separator_background_id = -1
separator_color = #777777 89
separator_style = dots
separator_size = 3
separator_padding = 1 0
#-------------------------------------
# Tooltip
tooltip_show_timeout = 0.5
tooltip_hide_timeout = 0.1
tooltip_padding = 2 2
tooltip_background_id = 5
tooltip_font_color = #222222 100
tooltip_font = sans 9

View File

@@ -0,0 +1,236 @@
#---- Generated by tint2conf 1b26 ----
# See https://gitlab.com/o9000/tint2/wikis/Configure for
# full documentation of the configuration options.
#-------------------------------------
# Gradients
# Gradient 1
gradient = vertical
start_color = #2d2d2d 80
end_color = #000000 80
color_stop = 70.000000 #1c1c1c 80
#-------------------------------------
# Backgrounds
# Background 1: Panel
rounded = 0
border_width = 1
border_sides = T
background_color = #000000 80
border_color = #333333 80
gradient_id = 1
background_color_hover = #000000 80
border_color_hover = #555555 80
background_color_pressed = #000000 80
border_color_pressed = #555555 80
# Background 2: Default task, Iconified task
rounded = 0
border_width = 2
border_sides = B
background_color = #777777 0
border_color = #777777 0
background_color_hover = #777777 21
border_color_hover = #cccccc 30
background_color_pressed = #5a5a5a 21
border_color_pressed = #777777 30
# Background 3: Active task
rounded = 0
border_width = 2
border_sides = B
background_color = #ffffff 0
border_color = #4d75ff 100
background_color_hover = #ffffff 21
border_color_hover = #4c73ff 100
background_color_pressed = #989898 21
border_color_pressed = #4c73ff 100
# Background 4: Urgent task
rounded = 0
border_width = 0
border_sides = TBLR
background_color = #aa4400 100
border_color = #aa7733 100
background_color_hover = #aa4400 100
border_color_hover = #aa7733 100
background_color_pressed = #aa4400 100
border_color_pressed = #aa7733 100
# Background 5: Tooltip
rounded = 2
border_width = 1
border_sides = TBLR
background_color = #ffffaa 100
border_color = #999999 100
background_color_hover = #ffffaa 100
border_color_hover = #999999 100
background_color_pressed = #ffffaa 100
border_color_pressed = #999999 100
# Background 6: Inactive desktop name
rounded = 0
border_width = 2
border_sides = B
background_color = #777777 0
border_color = #777777 0
background_color_hover = #bdbdbd 21
border_color_hover = #cccccc 100
background_color_pressed = #777777 21
border_color_pressed = #777777 100
# Background 7: Active desktop name
rounded = 0
border_width = 2
border_sides = B
background_color = #ffffff 21
border_color = #4c73ff 100
background_color_hover = #ffffff 21
border_color_hover = #4d73ff 100
background_color_pressed = #a9a9a9 21
border_color_pressed = #4d73ff 100
#-------------------------------------
# Panel
panel_items = LTSC
panel_size = 100% 32
panel_margin = 0 0
panel_padding = 4 0 4
panel_background_id = 1
wm_menu = 1
panel_dock = 0
panel_position = bottom center horizontal
panel_layer = normal
panel_monitor = all
panel_shrink = 0
autohide = 0
autohide_show_timeout = 0
autohide_hide_timeout = 0.5
autohide_height = 2
strut_policy = follow_size
panel_window_name = tint2
disable_transparency = 0
mouse_effects = 1
font_shadow = 0
mouse_hover_icon_asb = 100 0 10
mouse_pressed_icon_asb = 100 0 0
#-------------------------------------
# Taskbar
taskbar_mode = multi_desktop
taskbar_hide_if_empty = 0
taskbar_padding = 0 0 0
taskbar_background_id = 0
taskbar_active_background_id = 0
taskbar_name = 1
taskbar_hide_inactive_tasks = 0
taskbar_hide_different_monitor = 0
taskbar_hide_different_desktop = 0
taskbar_always_show_all_desktop_tasks = 0
taskbar_name_padding = 4 0
taskbar_name_background_id = 6
taskbar_name_active_background_id = 7
taskbar_name_font = sans bold 9
taskbar_name_font_color = #dddddd 100
taskbar_name_active_font_color = #dddddd 100
taskbar_distribute_size = 1
taskbar_sort_order = none
task_align = left
#-------------------------------------
# Task
task_text = 1
task_icon = 0
task_centered = 1
urgent_nb_of_blink = 100000
task_maximum_size = 120 35
task_padding = 4 3 4
task_font = Sans 8
task_tooltip = 1
task_font_color = #c6c6c6 100
task_active_font_color = #ffffff 100
task_icon_asb = 100 0 0
task_background_id = 2
task_active_background_id = 3
task_urgent_background_id = 4
task_iconified_background_id = 2
mouse_left = toggle_iconify
mouse_middle = none
mouse_right = close
mouse_scroll_up = prev_task
mouse_scroll_down = next_task
#-------------------------------------
# System tray (notification area)
systray_padding = 0 0 2
systray_background_id = 0
systray_sort = ascending
systray_icon_size = 22
systray_icon_asb = 100 0 0
systray_monitor = 1
systray_name_filter =
#-------------------------------------
# Launcher
launcher_padding = 0 0 2
launcher_background_id = 0
launcher_icon_background_id = 0
launcher_icon_size = 22
launcher_icon_asb = 100 0 0
launcher_icon_theme_override = 0
startup_notifications = 1
launcher_tooltip = 1
launcher_item_app = /usr/share/applications/firefox.desktop
launcher_item_app = /usr/share/applications/iceweasel.desktop
launcher_item_app = /usr/share/applications/google-chrome.desktop
launcher_item_app = /usr/local/share/applications/tint2conf.desktop
#-------------------------------------
# Clock
time1_format = %H:%M
time2_format = %A %d %B
time1_font = sans bold 8
time1_timezone =
time2_timezone =
time2_font = sans 7
clock_font_color = #eeeeee 100
clock_padding = 1 0
clock_background_id = 0
clock_tooltip =
clock_tooltip_timezone =
clock_lclick_command = zenity --calendar --text ""
clock_rclick_command = orage
clock_mclick_command =
clock_uwheel_command =
clock_dwheel_command =
#-------------------------------------
# Battery
battery_tooltip = 1
battery_low_status = 10
battery_low_cmd = notify-send "battery low"
battery_full_cmd =
bat1_font = sans 8
bat2_font = sans 6
battery_font_color = #eeeeee 100
bat1_format =
bat2_format =
battery_padding = 1 0
battery_background_id = 0
battery_hide = 101
battery_lclick_command =
battery_rclick_command =
battery_mclick_command =
battery_uwheel_command =
battery_dwheel_command =
ac_connected_cmd =
ac_disconnected_cmd =
#-------------------------------------
# Tooltip
tooltip_show_timeout = 0.5
tooltip_hide_timeout = 0.1
tooltip_padding = 2 2
tooltip_background_id = 5
tooltip_font_color = #222222 100
tooltip_font = sans 9

View File

@@ -1,119 +0,0 @@
# Tint2 config file
# Generated by tintwizard (http://code.google.com/p/tintwizard/)
# For information on manually configuring tint2 see http://code.google.com/p/tint2/wiki/Configure
# Background definitions
# ID 1
rounded = 7
border_width = 2
background_color = #000000 60
border_color = #FFFFFF 17
# ID 2
rounded = 5
border_width = 0
background_color = #FFFFFF 40
border_color = #FFFFFF 49
# ID 3
rounded = 5
border_width = 0
background_color = #FFFFFF 17
border_color = #FFFFFF 69
# Panel
panel_monitor = all
panel_position = bottom center horizontal
panel_size = 94% 30
panel_margin = 0 0
panel_padding = 7 0 7
panel_dock = 0
wm_menu = 0
panel_layer = top
panel_background_id = 1
# Panel Autohide
autohide = 0
autohide_show_timeout = 0.3
autohide_hide_timeout = 2
autohide_height = 2
strut_policy = follow_size
# Taskbar
taskbar_mode = single_desktop
taskbar_padding = 2 3 2
taskbar_background_id = 0
taskbar_active_background_id = 0
# Tasks
urgent_nb_of_blink = 8
task_icon = 1
task_text = 1
task_centered = 1
task_maximum_size = 140 35
task_padding = 6 2
task_background_id = 3
task_active_background_id = 2
task_urgent_background_id = 2
task_iconified_background_id = 3
task_tooltip = 0
# Task Icons
task_icon_asb = 70 0 0
task_active_icon_asb = 100 0 0
task_urgent_icon_asb = 100 0 0
task_iconified_icon_asb = 70 0 0
# Fonts
task_font = sans 7
task_font_color = #FFFFFF 69
task_active_font_color = #FFFFFF 84
task_urgent_font_color = #FFFFFF 84
task_iconified_font_color = #FFFFFF 69
font_shadow = 0
# System Tray
systray = 1
systray_padding = 0 4 5
systray_sort = ascending
systray_background_id = 0
systray_icon_size = 16
systray_icon_asb = 70 0 0
# Clock
time1_format = %H:%M
time1_font = sans 8
time2_format = %A %d %B
time2_font = sans 6
clock_font_color = #FFFFFF 75
clock_padding = 1 0
clock_background_id = 0
clock_rclick_command = orage
# Tooltips
tooltip_padding = 2 2
tooltip_show_timeout = 0.7
tooltip_hide_timeout = 0.3
tooltip_background_id = 1
tooltip_font = sans 10
tooltip_font_color = #000000 80
# Mouse
mouse_left = toggle_iconify
mouse_middle = none
mouse_right = close
mouse_scroll_up = toggle
mouse_scroll_down = iconify
# Battery
battery = 0
battery_low_status = 10
battery_low_cmd = notify-send "battery low"
battery_hide = 98
bat1_font = sans 8
bat2_font = sans 6
battery_font_color = #FFFFFF 75
battery_padding = 1 0
battery_background_id = 0
# End of config

View File

@@ -1,118 +0,0 @@
# Tint2 config file
# Generated by tintwizard (http://code.google.com/p/tintwizard/)
# For information on manually configuring tint2 see http://code.google.com/p/tint2/wiki/Configure
# Background definitions
# ID 1
rounded = 7
border_width = 1
background_color = #000000 60
border_color = #FFFFFF 17
# ID 2
rounded = 5
border_width = 0
background_color = #FFFFFF 40
border_color = #FFFFFF 49
# ID 3
rounded = 5
border_width = 0
background_color = #FFFFFF 17
border_color = #FFFFFF 69
# Panel
panel_monitor = all
panel_position = bottom center horizontal
panel_size = 98% 28
panel_margin = 0 5
panel_padding = 3 0 3
panel_dock = 0
wm_menu = 0
panel_layer = bottom
panel_background_id = 0
# Panel Autohide
autohide = 0
autohide_show_timeout = 0.7
autohide_hide_timeout = 1.5
autohide_height = 2
strut_policy = follow_size
# Taskbar
taskbar_mode = single_desktop
taskbar_padding = 2 2 2
taskbar_background_id = 1
taskbar_active_background_id = 1
# Tasks
urgent_nb_of_blink = 8
task_icon = 1
task_text = 1
task_centered = 1
task_maximum_size = 140 35
task_padding = 2 3
task_background_id = 3
task_active_background_id = 2
task_urgent_background_id = 2
task_iconified_background_id = 3
task_tooltip = 0
# Task Icons
task_icon_asb = 80 0 0
task_active_icon_asb = 100 0 0
task_urgent_icon_asb = 100 0 0
task_iconified_icon_asb = 80 0 0
# Fonts
task_font = Sawasdee Bold 8
task_font_color = #FFFFFF 89
task_active_font_color = #FFFFFF 100
task_urgent_font_color = #FFFFFF 100
task_iconified_font_color = #FFFFFF 89
font_shadow = 0
# System Tray
systray = 1
systray_padding = 6 0 5
systray_sort = left2right
systray_background_id = 1
systray_icon_size = 18
systray_icon_asb = 100 0 -10
# Clock
time1_format = %H:%M
time1_font = Sawasdee Bold 12
clock_font_color = #FFFFFF 89
clock_tooltip = %A %d %B
clock_padding = 4 0
clock_background_id = 1
clock_rclick_command = gsimplecal
# Tooltips
tooltip_padding = 5 0
tooltip_show_timeout = 0.7
tooltip_hide_timeout = 0.3
tooltip_background_id = 1
tooltip_font = Sans 10
tooltip_font_color = #000000 80
# Mouse
mouse_left = toggle_iconify
mouse_middle = close
mouse_right = none
mouse_scroll_up = toggle
mouse_scroll_down = iconify
# Battery
battery = 0
battery_low_status = 10
battery_low_cmd = notify-send "battery low"
battery_hide = 95
bat1_font = sans 8
bat2_font = sans 6
battery_font_color = #FFFFFF 75
battery_padding = 1 0
battery_background_id = 0
# End of config

View File

@@ -1,124 +0,0 @@
# Tint2 config file
# Generated by tintwizard (http://code.google.com/p/tintwizard/)
# For information on manually configuring tint2 see http://code.google.com/p/tint2/wiki/Configure
# Background definitions
# ID 1
rounded = 0
border_width = 1
background_color = #EAEAEA 100
border_color = #BBBBBB 100
# ID 2
rounded = 2
border_width = 1
background_color = #E0EBE7 100
border_color = #BBBBBB 100
# ID 3
rounded = 2
border_width = 1
background_color = #FCFAFB 100
border_color = #BBBBBB 100
# ID 4
rounded = 2
border_width = 2
background_color = #E0EBE7 100
border_color = #F15A7D 80
# Panel
panel_monitor = all
panel_position = bottom center horizontal
panel_size = 100% 30
panel_margin = 0 0
panel_padding = 7 3 4
panel_dock = 0
wm_menu = 1
panel_layer = top
panel_background_id = 1
# Panel Autohide
autohide = 0
autohide_show_timeout = 0.7
autohide_hide_timeout = 1.5
autohide_height = 2
strut_policy = follow_size
# Taskbar
taskbar_mode = single_desktop
taskbar_padding = 0 0 2
taskbar_background_id = 0
#taskbar_active_background_id = 0
# Tasks
urgent_nb_of_blink = 20
task_icon = 1
task_text = 1
task_centered = 1
task_maximum_size = 140 40
task_padding = 5 3
task_background_id = 2
task_active_background_id = 3
task_urgent_background_id = 4
task_iconified_background_id = 2
task_tooltip = 1
# Task Icons
task_icon_asb = 80 0 0
task_active_icon_asb = 100 0 0
task_urgent_icon_asb = 100 0 0
task_iconified_icon_asb = 80 0 0
# Fonts
task_font = sans 10
task_font_color = #000000 100
task_active_font_color = #000000 100
task_urgent_font_color = #000000 100
task_iconified_font_color = #000000 100
font_shadow = 0
# System Tray
systray = 1
systray_padding = 5 0 5
systray_sort = ascending
systray_background_id = 2
systray_icon_size = 15
systray_icon_asb = 100 0 -10
# Clock
time1_format = %F %l:%M %P
time1_font = sans 10
clock_font_color = #000000 100
clock_tooltip = %A %d %B
clock_padding = 1 1
clock_background_id = 0
clock_rclick_command = gsimplecal
# Tooltips
tooltip_padding = 5 0
tooltip_show_timeout = 1.2
tooltip_hide_timeout = 0.3
tooltip_background_id = 1
tooltip_font = Sans 9
tooltip_font_color = #5E5E5E 100
# Mouse
mouse_left = toggle_iconify
mouse_middle = none
mouse_right = close
mouse_scroll_up = toggle
mouse_scroll_down = iconify
# Battery
battery = 0
battery_low_status = 20
battery_low_cmd = notify-send "battery low"
battery_hide = 95
bat1_font = Sans 9
bat2_font = Sans 8
battery_font_color = #000000 100
battery_padding = 1 1
battery_background_id = 0
# End of config

View File

@@ -1,124 +0,0 @@
# Tint2 config file
# Generated by tintwizard (http://code.google.com/p/tintwizard/)
# For information on manually configuring tint2 see http://code.google.com/p/tint2/wiki/Configure
# Background definitions
# ID 1
rounded = 5
border_width = 0
background_color = #000000 60
border_color = #FFFFFF 20
# ID 2
rounded = 5
border_width = 1
background_color = #FFFFFF 0
border_color = #FFFFFF 20
# ID 3
rounded = 5
border_width = 0
background_color = #000000 29
border_color = #000000 0
# ID 4
rounded = 5
border_width = 1
background_color = #E80000 60
border_color = #FFFFFF 20
# Panel
panel_monitor = all
panel_position = bottom center horizontal
panel_size = 92% 28
panel_margin = 0 0
panel_padding = 7 0 7
panel_dock = 0
wm_menu = 1
panel_layer = top
panel_background_id = 0
# Panel Autohide
autohide = 0
autohide_show_timeout = 0.0
autohide_hide_timeout = 0.0
autohide_height = 0
strut_policy = follow_size
# Taskbar
taskbar_mode = multi_desktop
taskbar_padding = 2 3 2
taskbar_background_id = 3
#taskbar_active_background_id = 0
# Tasks
urgent_nb_of_blink = 18
task_icon = 1
task_text = 1
task_centered = 1
task_maximum_size = 140 30
task_padding = 2 3
task_background_id = 2
task_active_background_id = 1
task_urgent_background_id = 4
task_iconified_background_id = 2
task_tooltip = 0
# Task Icons
task_icon_asb = 100 0 0
task_active_icon_asb = 100 0 0
task_urgent_icon_asb = 100 0 0
task_iconified_icon_asb = 100 0 0
# Fonts
task_font = sans 7
task_font_color = #FFFFFF 69
task_active_font_color = #FFFFFF 84
task_urgent_font_color = #FFFFFF 84
task_iconified_font_color = #FFFFFF 69
font_shadow = 0
# System Tray
systray = 1
systray_padding = 5 2 5
systray_sort = ascending
systray_background_id = 1
systray_icon_size = 16
systray_icon_asb = 100 -10 -5
# Clock
time1_format = %H:%M
time1_font = sans 8
time2_format = %A %d %B
time2_font = sans 6
clock_font_color = #FFFFFF 75
clock_padding = 4 4
clock_background_id = 1
# Tooltips
tooltip_padding = 0 0
tooltip_show_timeout = 0
tooltip_hide_timeout = 0
tooltip_background_id = 0
tooltip_font = Sans 12
tooltip_font_color = #FFFFFF 100
# Mouse
mouse_left = toggle_iconify
mouse_middle = none
mouse_right = close
mouse_scroll_up = toggle
mouse_scroll_down = iconify
# Battery
battery = 0
battery_low_status = 7
battery_low_cmd = notify-send "battery low"
battery_hide = 95
bat1_font = sans 8
bat2_font = sans 6
battery_font_color = #FFFFFF 75
battery_padding = 1 0
battery_background_id = 1
# End of config

View File

@@ -1,138 +0,0 @@
# Tint2 config file
# Generated by tintwizard (http://code.google.com/p/tintwizard/)
# For information on manually configuring tint2 see http://code.google.com/p/tint2/wiki/Configure
# Background definitions
# ID 1
rounded = 5
border_width = 1
background_color = #44475D 41
border_color = #44475D 100
# ID 2
rounded = 5
border_width = 1
background_color = #FFFFFF 20
border_color = #444444 66
# ID 3
rounded = 0
border_width = 1
background_color = #FFFFFF 20
border_color = #444444 20
# ID 4
rounded = 5
border_width = 1
background_color = #DBDBDB 49
border_color = #222222 74
# ID 5
rounded = 3
border_width = 0
background_color = #44475D 20
border_color = #222222 74
# ID 6
rounded = 3
border_width = 0
background_color = #DE1150 34
border_color = #222222 74
# Panel
panel_monitor = all
panel_position = bottom center horizontal
panel_size = 96% 37
panel_margin = 0 0
panel_padding = 9 3 9
panel_dock = 0
wm_menu = 1
panel_layer = top
panel_background_id = 1
# Panel Autohide
autohide = 0
autohide_show_timeout = 0.3
autohide_hide_timeout = 1.7
autohide_height = 2
strut_policy = follow_size
# Taskbar
taskbar_mode = multi_desktop
taskbar_padding = 0 0 0
taskbar_background_id = 2
taskbar_active_background_id = 4
# Tasks
urgent_nb_of_blink = 16
task_icon = 1
task_text = 0
task_centered = 1
task_maximum_size = 40 20
task_padding = 0 2
task_background_id = 0
task_active_background_id = 5
task_urgent_background_id = 6
task_iconified_background_id = 0
task_tooltip = 1
# Task Icons
task_icon_asb = 100 -25 -8
task_active_icon_asb = 100 0 -5
task_urgent_icon_asb = 100 0 -5
task_iconified_icon_asb = 100 -25 -8
# Fonts
task_font = kiloji 10
task_font_color = #333333 80
task_active_font_color = #333333 100
task_urgent_font_color = #333333 100
task_iconified_font_color = #333333 80
font_shadow = 0
# System Tray
systray = 1
systray_padding = 7 0 5
systray_sort = ascending
systray_background_id = 2
systray_icon_size = 18
systray_icon_asb = 100 -20 -5
# Clock
time1_format = %H:%M
time1_font = sans 8 bold
time2_format = %A %d %B
time2_font = sans 7
clock_font_color = #FFFFFF 75
clock_tooltip =
clock_padding = 2 0
clock_background_id = 0
clock_rclick_command = gsimplecal
# Tooltips
tooltip_padding = 5 3
tooltip_show_timeout = 0.8
tooltip_hide_timeout = 0.3
tooltip_background_id = 1
tooltip_font = Sans 8
tooltip_font_color = #FFFFFF 100
# Mouse
mouse_left = toggle_iconify
mouse_middle = none
mouse_right = close
mouse_scroll_up = toggle
mouse_scroll_down = iconify
# Battery
battery = 0
battery_low_status = 20
battery_low_cmd = notify-send "battery low"
battery_hide = 90
bat1_font = sans 8 bold
bat2_font = sans 7
battery_font_color = #FFFFFF 75
battery_padding = 2 0
battery_background_id = 0
# End of config

View File

@@ -1,126 +0,0 @@
# Tint2 config file
# Generated by tintwizard (http://code.google.com/p/tintwizard/)
# For information on manually configuring tint2 see http://code.google.com/p/tint2/wiki/Configure
# Background definitions
# ID 1
rounded = 0
border_width = 0
background_color = #000000 54
border_color = #9B9B9B 34
# ID 2
rounded = 2
border_width = 0
background_color = #000000 69
border_color = #9B9B9B 74
# ID 3
rounded = 1
border_width = 0
background_color = #000000 69
border_color = #FFFFFF 20
# ID 4
rounded = 0
border_width = 0
background_color = #BBBBBB 20
border_color = #BBBBBB 29
# Panel
panel_monitor = all
panel_position = bottom center horizontal
panel_size = 100% 37
panel_margin = 0 0
panel_padding = 5 2 3
panel_dock = 0
wm_menu = 1
panel_layer = top
panel_background_id = 1
# Panel Autohide
autohide = 0
autohide_show_timeout = 0.7
autohide_hide_timeout = 1.5
autohide_height = 2
strut_policy = follow_size
# Taskbar
taskbar_mode = multi_desktop
taskbar_padding = 0 0 0
taskbar_background_id = 0
taskbar_active_background_id = 2
# Tasks
urgent_nb_of_blink = 21
task_icon = 1
task_text = 0
task_centered = 1
task_maximum_size = 50 35
task_padding = 4 2
task_background_id = 0
task_active_background_id = 3
task_urgent_background_id = 3
task_iconified_background_id = 0
task_tooltip = 1
# Task Icons
task_icon_asb = 90 -100 -20
task_active_icon_asb = 100 -70 -10
task_urgent_icon_asb = 100 -70 -10
task_iconified_icon_asb = 90 -100 -20
# Fonts
task_font = kiloji 8
task_font_color = #A0A0A0 100
task_active_font_color = #D4D4D4 100
task_urgent_font_color = #D4D4D4 100
task_iconified_font_color = #A0A0A0 100
font_shadow = 0
# System Tray
systray = 1
systray_padding = 8 1 5
systray_sort = ascending
systray_background_id = 2
systray_icon_size = 16
systray_icon_asb = 100 -90 -15
# Clock
time1_format = %H:%M
time1_font = sans 8 bold
time2_format = %A %d %B
time2_font = sans 7
clock_font_color = #FFFFFF 75
clock_tooltip = %A %d %B
clock_padding = 2 0
clock_background_id = 0
clock_rclick_command = gsimplecal
# Tooltips
tooltip_padding = 2 2
tooltip_show_timeout = 0.9
tooltip_hide_timeout = 0.3
tooltip_background_id = 4
tooltip_font = sans 10
tooltip_font_color = #000000 80
# Mouse
mouse_left = toggle_iconify
mouse_middle = none
mouse_right = close
mouse_scroll_up = toggle
mouse_scroll_down = iconify
# Battery
battery = 1
battery_low_status = 7
battery_low_cmd = notify-send "battery low"
battery_hide = 90
bat1_font = sans 8
bat2_font = sans 6
battery_font_color = #FFFFFF 75
battery_padding = 1 0
battery_background_id = 0
# End of config

View File

@@ -1,115 +0,0 @@
# Tint2 config file
# Generated by tintwizard (http://code.google.com/p/tintwizard/)
# For information on manually configuring tint2 see http://code.google.com/p/tint2/wiki/Configure
# Background definitions
# ID 1
rounded = 1
border_width = 0
background_color = #282828 49
border_color = #000000 0
# ID 2
rounded = 1
border_width = 1
background_color = #FFFFFF 29
border_color = #FFFFFF 60
# ID 3
rounded = 5
border_width = 0
background_color = #FFFFFF 17
border_color = #FFFFFF 69
# ID 4
rounded = 1
border_width = 0
background_color = #FFFFFF 29
border_color = #FFFFFF 60
# Panel
panel_monitor = all
panel_position = bottom left horizontal
panel_size = 100% 38
panel_margin = 0 0
panel_padding = 7 3 7
panel_dock = 0
wm_menu = 0
panel_layer = bottom
panel_background_id = 0
# Panel Autohide
autohide = 0
autohide_show_timeout = 0.3
autohide_hide_timeout = 2
autohide_height = 4
strut_policy = minimum
# Taskbar
taskbar_mode = multi_desktop
taskbar_padding = 0 0 0
taskbar_background_id = 1
taskbar_active_background_id = 1
# Tasks
urgent_nb_of_blink = 15
task_icon = 1
task_text = 0
task_centered = 1
task_maximum_size = 45 35
task_padding = 2 1
task_background_id = 0
task_active_background_id = 2
task_urgent_background_id = 4
task_iconified_background_id = 0
task_tooltip = 0
# Task Icons
task_icon_asb = 70 0 0
task_active_icon_asb = 100 0 0
task_urgent_icon_asb = 70 0 0
task_iconified_icon_asb = 70 0 0
# Fonts
task_font = sans bold 9
task_font_color = #FFFFFF 60
task_active_font_color = #FFFFFF 100
task_urgent_font_color = #FFFFFF 100
task_iconified_font_color = #FFFFFF 60
font_shadow = 0
# System Tray
systray = 1
systray_padding = 0 4 5
systray_sort = left2right
systray_background_id = 0
systray_icon_size = 20
systray_icon_asb = 100 0 0
# Tooltips
tooltip_padding = 2 2
tooltip_show_timeout = 0.7
tooltip_hide_timeout = 0.3
tooltip_background_id = 1
tooltip_font = sans 10
tooltip_font_color = #000000 80
# Mouse
mouse_left = toggle_iconify
mouse_middle = none
mouse_right = none
mouse_scroll_up = toggle
mouse_scroll_down = iconify
# Battery
battery = 0
battery_low_status = 10
battery_low_cmd = notify-send "battery low"
battery_hide = 90
bat1_font = sans 8
bat2_font = sans 6
battery_font_color = #FFFFFF 75
battery_padding = 1 0
battery_background_id = 0
# End of config

View File

@@ -1,115 +0,0 @@
# Tint2 config file
# Generated by tintwizard (http://code.google.com/p/tintwizard/)
# For information on manually configuring tint2 see http://code.google.com/p/tint2/wiki/Configure
# Background definitions
# ID 1
rounded = 0
border_width = 1
background_color = #888888 29
border_color = #000000 29
# ID 2
rounded = 3
border_width = 1
background_color = #888888 69
border_color = #FFFFFF 49
# ID 3
rounded = 3
border_width = 1
background_color = #888888 29
border_color = #FFFFFF 20
# ID 4
rounded = 3
border_width = 1
background_color = #888888 29
border_color = #ED2323 60
# Panel
panel_monitor = all
panel_position = bottom center horizontal
panel_size = 100% 40
panel_margin = 0 0
panel_padding = 0 0 0
panel_dock = 0
wm_menu = 1
panel_layer = top
panel_background_id = 1
# Panel Autohide
autohide = 0
autohide_show_timeout = 0.7
autohide_hide_timeout = 1.5
autohide_height = 2
strut_policy = follow_size
# Taskbar
taskbar_mode = multi_desktop
taskbar_padding = 6 1 6
taskbar_background_id = 0
#taskbar_active_background_id = 0
# Tasks
urgent_nb_of_blink = 20
task_icon = 1
task_text = 0
task_centered = 1
task_maximum_size = 40 40
task_padding = 6 3
task_background_id = 3
task_active_background_id = 2
task_urgent_background_id = 4
task_iconified_background_id = 3
task_tooltip = 1
# Task Icons
task_icon_asb = 90 0 0
task_active_icon_asb = 100 0 0
task_urgent_icon_asb = 100 0 0
task_iconified_icon_asb = 90 0 0
# Fonts
task_font = kroeger 06_55 6
task_font_color = #222222 100
task_active_font_color = #000000 100
task_urgent_font_color = #000000 100
task_iconified_font_color = #222222 100
font_shadow = 0
# System Tray
systray = 1
systray_padding = 4 4 5
systray_sort = ascending
systray_background_id = 0
systray_icon_size = 20
systray_icon_asb = 100 0 -10
# Tooltips
tooltip_padding = 5 0
tooltip_show_timeout = 0.8
tooltip_hide_timeout = 0.3
tooltip_background_id = 1
tooltip_font = Sans 10
tooltip_font_color = #FFFFFF 80
# Mouse
mouse_left = toggle_iconify
mouse_middle = none
mouse_right = close
mouse_scroll_up = toggle
mouse_scroll_down = iconify
# Battery
battery = 0
battery_low_status = 20
battery_low_cmd = notify-send "battery low"
battery_hide = 90
bat1_font = Sans 12
bat2_font = Sans 12
battery_font_color = #FFFFFF 100
battery_padding = 0 0
battery_background_id = 0
# End of config

View File

@@ -1,126 +0,0 @@
# Tint2 config file
# Generated by tintwizard (http://code.google.com/p/tintwizard/)
# For information on manually configuring tint2 see http://code.google.com/p/tint2/wiki/Configure
# Background definitions
# ID 1
rounded = 5
border_width = 0
background_color = #000000 49
border_color = #FFFFFF 40
# ID 2
rounded = 5
border_width = 0
background_color = #FFFFFF 60
border_color = #FFFFFF 49
# ID 3
rounded = 5
border_width = 0
background_color = #FFFFFF 24
border_color = #FFFFFF 69
# ID 4
rounded = 5
border_width = 0
background_color = #BDBDBD 80
border_color = #FFFFFF 69
# Panel
panel_monitor = all
panel_position = top left vertical
panel_size = 75% 50
panel_margin = 0 0
panel_padding = 2 2 2
panel_dock = 0
wm_menu = 0
panel_layer = top
panel_background_id = 0
# Panel Autohide
autohide = 0
autohide_show_timeout = 0.3
autohide_hide_timeout = 2
autohide_height = 4
strut_policy = minimum
# Taskbar
taskbar_mode = single_desktop
taskbar_padding = 2 2 2
taskbar_background_id = 1
taskbar_active_background_id = 1
# Tasks
urgent_nb_of_blink = 20
task_icon = 1
task_text = 0
task_centered = 1
task_maximum_size = 140 35
task_padding = 6 3
task_background_id = 3
task_active_background_id = 2
task_urgent_background_id = 2
task_iconified_background_id = 3
task_tooltip = 1
# Task Icons
task_icon_asb = 100 0 0
task_active_icon_asb = 100 0 0
task_urgent_icon_asb = 100 0 0
task_iconified_icon_asb = 90 0 0
# Fonts
task_font = sans 7
task_font_color = #FFFFFF 69
task_active_font_color = #FFFFFF 84
task_urgent_font_color = #EC9B9B 84
task_iconified_font_color = #FFFFFF 69
font_shadow = 1
# System Tray
systray = 1
systray_padding = 4 4 5
systray_sort = left2right
systray_background_id = 1
systray_icon_size = 16
systray_icon_asb = 100 0 0
# Clock
time1_format = %H:%M
time1_font = sans bold 8
time2_format = %h.%e
time2_font = sans 6
clock_font_color = #FFFFFF 75
clock_tooltip = %A %d %B
clock_padding = 4 2
clock_background_id = 1
clock_rclick_command = zenity --calendar
# Tooltips
tooltip_padding = 3 2
tooltip_show_timeout = 0.9
tooltip_hide_timeout = 0.3
tooltip_background_id = 4
tooltip_font = sans 8
tooltip_font_color = #000000 89
# Mouse
mouse_left = toggle_iconify
mouse_middle = none
mouse_right = close
mouse_scroll_up = toggle
mouse_scroll_down = iconify
# Battery
battery = 0
battery_low_status = 10
battery_low_cmd = notify-send "battery low"
battery_hide = 98
bat1_font = sans bold 8
bat2_font = sans 6
battery_font_color = #FFFFFF 75
battery_padding = 4 2
battery_background_id = 1
# End of config

View File

@@ -1,122 +0,0 @@
# Tint2 config file
# Generated by tintwizard (http://code.google.com/p/tintwizard/)
# For information on manually configuring tint2 see http://code.google.com/p/tint2/wiki/Configure
# Background definitions
# ID 1
rounded = 1
border_width = 0
background_color = #282828 60
border_color = #000000 0
# ID 2
rounded = 1
border_width = 1
background_color = #CCCCCC 0
border_color = #CCCCCC 54
# ID 3
rounded = 1
border_width = 0
background_color = #CCCCCC 20
border_color = #CCCCCC 40
# Panel
panel_monitor = all
panel_position = bottom center horizontal
panel_size = 95% 30
panel_margin = 0 0
panel_padding = 7 3 7
panel_dock = 0
wm_menu = 1
panel_layer = top
panel_background_id = 1
# Panel Autohide
autohide = 0
autohide_show_timeout = 0.7
autohide_hide_timeout = 1.5
autohide_height = 2
strut_policy = follow_size
# Taskbar
taskbar_mode = multi_desktop
taskbar_padding = 0 0 0
taskbar_background_id = 2
taskbar_active_background_id = 2
# Tasks
urgent_nb_of_blink = 7
task_icon = 1
task_text = 0
task_centered = 1
task_maximum_size = 34 34
task_padding = 2 3
task_background_id = 0
task_active_background_id = 3
task_urgent_background_id = 0
task_iconified_background_id = 0
task_tooltip = 1
# Task Icons
task_icon_asb = 100 0 0
task_active_icon_asb = 100 0 0
task_urgent_icon_asb = 100 0 0
task_iconified_icon_asb = 100 0 0
# Fonts
task_font = sans 8
task_font_color = #FFFFFF 60
task_active_font_color = #FFFFFF 100
task_urgent_font_color = #FFFFFF 60
task_iconified_font_color = #FFFFFF 60
font_shadow = 0
# System Tray
systray = 1
systray_padding = 0 0 5
systray_sort = ascending
systray_background_id = 0
systray_icon_size = 16
systray_icon_asb = 100 0 0
# Clock
time1_format = Paris %H:%M - %d/%m
time1_font = sans 7
time2_format = Moscow %H:%M - %d/%m
time2_font = sans 7
clock_font_color = #FFFFFF 100
clock_tooltip =
clock_padding = 1 0
clock_background_id = 0
clock_rclick_command = gsimplecal
time1_timezone = :Europe/Paris
time2_timezone = :Europe/Moscow
# Tooltips
tooltip_padding = 5 4
tooltip_show_timeout = 0.8
tooltip_hide_timeout = 0.3
tooltip_background_id = 1
tooltip_font = Sans 7
tooltip_font_color = #FFFFFF 100
# Mouse
mouse_left = toggle_iconify
mouse_middle = none
mouse_right = close
mouse_scroll_up = toggle
mouse_scroll_down = iconify
# Battery
battery = 1
battery_low_status = 7
battery_low_cmd = notify-send "battery low"
battery_hide = 90
bat1_font = sans 7
bat2_font = sans 7
battery_font_color = #FFFFFF 100
battery_padding = 1 0
battery_background_id = 0
# End of config

View File

@@ -1,132 +0,0 @@
# Tint2 config file
# Generated by tintwizard (http://code.google.com/p/tintwizard/)
# For information on manually configuring tint2 see http://code.google.com/p/tint2/wiki/Configure
# Background definitions
# ID 1
rounded = 0
border_width = 1
background_color = #076073 100
border_color = #076073 100
# ID 2
rounded = 0
border_width = 0
background_color = #000000 100
border_color = #FFFFFF 8
# ID 3
rounded = 0
border_width = 0
background_color = #222222 100
border_color = #222222 8
# ID 4
rounded = 0
border_width = 0
background_color = #222222 100
border_color = #222222 8
# ID 5
rounded = 0
border_width = 0
background_color = #FFFFFF 100
border_color = #FFFFFF 8
# Panel
panel_monitor = LVDS
panel_position = bottom left horizontal
panel_size = 100% 35
panel_margin = 0 0
panel_padding = 0 0 0
panel_dock = 0
wm_menu = 1
panel_layer = bottom
panel_background_id = 0
# Panel Autohide
autohide = 0
autohide_show_timeout = 0.7
autohide_hide_timeout = 1.5
autohide_height = 2
strut_policy = follow_size
# Taskbar
taskbar_mode = multi_desktop
taskbar_padding = 12 9 12
taskbar_background_id = 2
taskbar_active_background_id = 2
# Tasks
urgent_nb_of_blink = 7
task_icon = 0
task_text = 1
task_centered = 1
task_maximum_size = 0 32
task_padding = 5 2
task_background_id = 4
task_active_background_id = 1
task_urgent_background_id = 0
task_iconified_background_id = 4
task_tooltip = 0
# Task Icons
task_icon_asb = 100 -90 -15
task_active_icon_asb = 100 -70 0
task_urgent_icon_asb = 100 -90 -15
task_iconified_icon_asb = 100 -90 -15
# Fonts
task_font = Aller 7.6
task_font_color = #D3CAAA 33
task_active_font_color = #FFFFFF 100
task_urgent_font_color = #FFFFFF 100
task_iconified_font_color = #D3CAAA 33
font_shadow = 0
# System Tray
systray = 1
systray_padding = 5 5 5
systray_sort = ascending
systray_background_id = 4
systray_icon_size = 18
systray_icon_asb = 100 -90 -15
# Clock
time1_format = %H:%M
time1_font = Diavlo 12
time2_format = %b %d
time2_font = Diavlo 6
clock_font_color = #FFFFFF 100
clock_tooltip = %A %d %B
clock_padding = 4 2
clock_background_id = 1
clock_rclick_command = gsimplecal
# Tooltips
tooltip_padding = 5 5
tooltip_show_timeout = 0.7
tooltip_hide_timeout = 0.3
tooltip_background_id = 4
tooltip_font = Aller 8
tooltip_font_color = #D3CAAA 33
# Mouse
mouse_left = toggle_iconify
mouse_middle = none
mouse_right = close
mouse_scroll_up = toggle
mouse_scroll_down = iconify
# Battery
battery = 1
battery_low_status = 7
battery_low_cmd = notify-send "battery low"
battery_hide = 90
bat1_font = Diavlo 10
bat2_font = Aller 0
battery_font_color = #D3CAAA 48
battery_padding = 4 2
battery_background_id = 4
# End of config

View File

@@ -1,132 +0,0 @@
# Tint2 config file
# Generated by tintwizard (http://code.google.com/p/tintwizard/)
# For information on manually configuring tint2 see http://code.google.com/p/tint2/wiki/Configure
# Background definitions
# ID 1
rounded = 0
border_width = 1
background_color = #730A07 100
border_color = #730A07 100
# ID 2
rounded = 0
border_width = 0
background_color = #000000 100
border_color = #FFFFFF 8
# ID 3
rounded = 0
border_width = 0
background_color = #222222 100
border_color = #222222 8
# ID 4
rounded = 0
border_width = 0
background_color = #222222 100
border_color = #222222 8
# ID 5
rounded = 0
border_width = 0
background_color = #FFFFFF 100
border_color = #FFFFFF 8
# Panel
panel_monitor = all
panel_position = bottom left horizontal
panel_size = 100% 42
panel_margin = 0 0
panel_padding = 0 0 0
panel_dock = 0
wm_menu = 1
panel_layer = bottom
panel_background_id = 0
# Panel Autohide
autohide = 0
autohide_show_timeout = 0.7
autohide_hide_timeout = 1.5
autohide_height = 2
strut_policy = follow_size
# Taskbar
taskbar_mode = multi_desktop
taskbar_padding = 12 7 12
taskbar_background_id = 2
#taskbar_active_background_id = 0
# Tasks
urgent_nb_of_blink = 7
task_icon = 0
task_text = 1
task_centered = 1
task_maximum_size = 0 32
task_padding = 5 1
task_background_id = 4
task_active_background_id = 1
task_urgent_background_id = 0
task_iconified_background_id = 4
task_tooltip = 0
# Task Icons
task_icon_asb = 100 -90 -15
task_active_icon_asb = 100 -70 0
task_urgent_icon_asb = 100 -90 -15
task_iconified_icon_asb = 100 -90 -15
# Fonts
task_font = Aller 7.6
task_font_color = #D3CAAA 33
task_active_font_color = #FFFFFF 100
task_urgent_font_color = #FFFFFF 100
task_iconified_font_color = #D3CAAA 33
font_shadow = 0
# System Tray
systray = 1
systray_padding = 5 5 5
systray_sort = ascending
systray_background_id = 4
systray_icon_size = 18
systray_icon_asb = 100 -90 -15
# Clock
time1_format = %H:%M
time1_font = Diavlo 12
time2_format = %b %d
time2_font = Diavlo 6
clock_font_color = #FFFFFF 100
clock_tooltip = %A %d %B
clock_padding = 4 2
clock_background_id = 1
clock_rclick_command = gsimplecal
# Tooltips
tooltip_padding = 5 5
tooltip_show_timeout = 0.7
tooltip_hide_timeout = 0.3
tooltip_background_id = 4
tooltip_font = Aller 8
tooltip_font_color = #D3CAAA 33
# Mouse
mouse_left = toggle_iconify
mouse_middle = none
mouse_right = close
mouse_scroll_up = toggle
mouse_scroll_down = iconify
# Battery
battery = 1
battery_low_status = 7
battery_low_cmd = notify-send "battery low"
battery_hide = 90
bat1_font = Diavlo 10
bat2_font = Aller 0
battery_font_color = #D3CAAA 48
battery_padding = 4 2
battery_background_id = 4
# End of config

View File

@@ -1,110 +0,0 @@
# Tint2 config file
# Generated by tintwizard (http://code.google.com/p/tintwizard/)
# For information on manually configuring tint2 see http://code.google.com/p/tint2/wiki/Configure
# Background definitions
# ID 1
rounded = 1
border_width = 0
background_color = #282828 100
border_color = #000000 0
# ID 2
rounded = 1
border_width = 0
background_color = #F6B655 85
border_color = #CCCCCC 40
# Panel
panel_monitor = all
panel_position = bottom center horizontal
panel_size = 100% 22
panel_margin = 0 0
panel_padding = 3 0 3
panel_dock = 0
wm_menu = 1
panel_layer = bottom
panel_background_id = 1
# Panel Autohide
autohide = 0
autohide_show_timeout = 0.0
autohide_hide_timeout = 0.0
autohide_height = 0
strut_policy = follow_size
# Taskbar
taskbar_mode = single_desktop
taskbar_padding = 0 0 0
taskbar_background_id = 0
#taskbar_active_background_id = 0
# Tasks
urgent_nb_of_blink = 7
task_icon = 0
task_text = 1
task_centered = 1
task_maximum_size = 200 32
task_padding = 5 0
task_background_id = 0
task_active_background_id = 2
task_urgent_background_id = 2
task_iconified_background_id = 0
task_tooltip = 0
# Task Icons
task_icon_asb = 100 0 0
task_active_icon_asb = 100 0 0
task_urgent_icon_asb = 100 0 0
task_iconified_icon_asb = 100 0 0
# Fonts
task_font = sans 7.5
task_font_color = #FFFFFF 60
task_active_font_color = #000000 100
task_urgent_font_color = #000000 100
task_iconified_font_color = #FFFFFF 60
font_shadow = 0
# System Tray
systray = 1
systray_padding = 3 0 3
systray_sort = ascending
systray_background_id = 0
systray_icon_size = 14
systray_icon_asb = 100 -90 -15
# Clock
time1_format = %H:%M
time1_font = sans 13
clock_font_color = #FFFFFF 85
clock_padding = 2 0
clock_background_id = 0
# Tooltips
tooltip_padding = 2 2
tooltip_show_timeout = 0.5
tooltip_hide_timeout = 1.2
tooltip_background_id = 1
tooltip_font = Sans 9
tooltip_font_color = #FFFFFF 100
# Mouse
mouse_left = toggle_iconify
mouse_middle = none
mouse_right = close
mouse_scroll_up = toggle
mouse_scroll_down = iconify
# Battery
battery = 1
battery_low_status = 7
battery_low_cmd = notify-send "battery low"
battery_hide = 90
bat1_font = sans 7
bat2_font = sans 6
battery_font_color = #FFFFFF 100
battery_padding = 2 0
battery_background_id = 0
# End of config

View File

@@ -1,103 +0,0 @@
# Tint2 config file
# Generated by tintwizard (http://code.google.com/p/tintwizard/)
# For information on manually configuring tint2 see http://code.google.com/p/tint2/wiki/Configure
# Background definitions
# ID 1
rounded = 3
border_width = 1
background_color = #000000 40
border_color = #D1D1D1 30
# ID 2
rounded = 3
border_width = 1
background_color = #000000 51
border_color = #D1D1D1 40
# Panel
panel_monitor = all
panel_position = bottom center horizontal
panel_size = 97% 26
panel_margin = 0 0
panel_padding = 0 2 5
panel_dock = 0
wm_menu = 1
panel_layer = bottom
panel_background_id = 0
# Panel Autohide
autohide = 0
autohide_show_timeout = 0.0
autohide_hide_timeout = 0.0
autohide_height = 0
strut_policy = follow_size
# Taskbar
taskbar_mode = single_desktop
taskbar_padding = 0 0 5
taskbar_background_id = 0
#taskbar_active_background_id = 0
# Tasks
urgent_nb_of_blink = 7
task_icon = 0
task_text = 1
task_centered = 1
task_maximum_size = 160 30
task_padding = 3 1
task_background_id = 1
task_active_background_id = 2
task_urgent_background_id = 2
task_iconified_background_id = 1
task_tooltip = 0
# Task Icons
task_icon_asb = 100 0 0
task_active_icon_asb = 100 0 0
task_urgent_icon_asb = 100 0 0
task_iconified_icon_asb = 100 0 0
# Fonts
task_font = sans bold 7.5
task_font_color = #FFFFFF 60
task_active_font_color = #FFFFFF 86
task_urgent_font_color = #FFFFFF 86
task_iconified_font_color = #FFFFFF 60
font_shadow = 0
# System Tray
systray = 1
systray_padding = 6 2 6
systray_sort = ascending
systray_background_id = 1
systray_icon_size = 16
systray_icon_asb = 100 -100 -15
# Tooltips
tooltip_padding = 0 0
tooltip_show_timeout = 0
tooltip_hide_timeout = 0
tooltip_background_id = 0
tooltip_font = Sans 12
tooltip_font_color = #FFFFFF 100
# Mouse
mouse_left = toggle_iconify
mouse_middle = none
mouse_right = close
mouse_scroll_up = toggle
mouse_scroll_down = iconify
# Battery
battery = 0
battery_low_status = 10
battery_low_cmd = notify-send "battery low"
battery_hide = 90
bat1_font = sans 7
bat2_font = sans 7
battery_font_color = #FFFFFF 100
battery_padding = 1 0
battery_background_id = 0
# End of config

View File

@@ -1,116 +0,0 @@
# Tint2 config file
# Generated by tintwizard (http://code.google.com/p/tintwizard/)
# For information on manually configuring tint2 see http://code.google.com/p/tint2/wiki/Configure
# Background definitions
# ID 1
rounded = 0
border_width = 0
background_color = #FFFFFF 0
border_color = #FFFFFF 60
# ID 2
rounded = 0
border_width = 1
background_color = #333333 40
border_color = #FFFFFF 40
# ID 3
rounded = 0
border_width = 0
background_color = #EEEEEC 60
border_color = #FFFFFF 100
# Panel
panel_monitor = all
panel_position = bottom center horizontal
panel_size = 99% 27
panel_margin = 0 0
panel_padding = 3 3 3
panel_dock = 0
wm_menu = 1
panel_layer = bottom
panel_background_id = 3
# Panel Autohide
autohide = 0
autohide_show_timeout = 0.2
autohide_hide_timeout = 1.6
autohide_height = 1
strut_policy = minimum
# Taskbar
taskbar_mode = multi_desktop
taskbar_padding = 0 0 0
taskbar_background_id = 0
taskbar_active_background_id = 0
# Tasks
urgent_nb_of_blink = 7
task_icon = 0
task_text = 1
task_centered = 1
task_maximum_size = 200 30
task_padding = 5 0
task_background_id = 1
task_active_background_id = 2
task_urgent_background_id = 2
task_iconified_background_id = 1
task_tooltip = 1
# Task Icons
task_icon_asb = 50 0 0
task_active_icon_asb = 100 0 0
task_urgent_icon_asb = 100 0 0
task_iconified_icon_asb = 50 0 0
# Fonts
task_font = AvantGardeLTMedium 8
task_font_color = #151515 60
task_active_font_color = #FFFFFF 60
task_urgent_font_color = #7E9659 89
task_iconified_font_color = #FFFFFF 69
font_shadow = 0
# System Tray
systray = 1
systray_padding = 4 2 3
systray_sort = ascending
systray_background_id = 0
systray_icon_size = 15
systray_icon_asb = 100 0 -10
# Clock
time1_format = %H:%M / %a %d %b
time1_font = AvantGardeLTMedium 8
clock_font_color = #151515 60
clock_padding = 4 0
clock_background_id = 0
# Tooltips
tooltip_padding = 3 3
tooltip_show_timeout = 1.5
tooltip_hide_timeout = 0.3
tooltip_background_id = 1
tooltip_font = AvantGardeLTMedium 8
tooltip_font_color = #434141 100
# Mouse
mouse_left = toggle_iconify
mouse_middle = none
mouse_right = close
mouse_scroll_up = toggle
mouse_scroll_down = iconify
# Battery
battery = 0
battery_low_status = 7
battery_low_cmd = notify-send "battery low"
battery_hide = 90
bat1_font = sans 8
bat2_font = sans 6
battery_font_color = #151515 60
battery_padding = 1 0
battery_background_id = 0
# End of config

View File

@@ -1,109 +0,0 @@
# Tint2 config file
# Generated by tintwizard (http://code.google.com/p/tintwizard/)
# For information on manually configuring tint2 see http://code.google.com/p/tint2/wiki/Configure
# Background definitions
# ID 1
rounded = 0
border_width = 0
background_color = #303030 89
border_color = #FFFFFF 17
# ID 2
rounded = 0
border_width = 0
background_color = #303030 89
border_color = #FFFFFF 49
# ID 3
rounded = 0
border_width = 0
background_color = #303030 49
border_color = #FFFFFF 69
# Panel
panel_monitor = all
panel_position = top center horizontal
panel_size = 94% 38
panel_margin = 0 1
panel_padding = 10 6 6
panel_dock = 0
wm_menu = 1
panel_layer = bottom
panel_background_id = 3
# Panel Autohide
autohide = 0
autohide_show_timeout = 0.7
autohide_hide_timeout = 1.5
autohide_height = 2
strut_policy = follow_size
# Taskbar
taskbar_mode = single_desktop
taskbar_padding = 0 0 6
taskbar_background_id = 0
#taskbar_active_background_id = 0
# Tasks
urgent_nb_of_blink = 7
task_icon = 0
task_text = 1
task_centered = 1
task_maximum_size = 120 32
task_padding = 6 2
task_background_id = 2
task_active_background_id = 2
task_urgent_background_id = 2
task_iconified_background_id = 0
task_tooltip = 0
# Task Icons
task_icon_asb = 100 -90 -15
task_active_icon_asb = 100 -70 0
task_urgent_icon_asb = 100 -90 -15
task_iconified_icon_asb = 100 -90 -15
# Fonts
task_font = BasicDots 6
task_font_color = #FFFFFF 69
task_active_font_color = #7E9659 89
task_urgent_font_color = #7E9659 89
task_iconified_font_color = #FFFFFF 69
font_shadow = 0
# System Tray
systray = 1
systray_padding = 6 3 0
systray_sort = ascending
systray_background_id = 1
systray_icon_size = 18
systray_icon_asb = 100 -70 -15
# Tooltips
tooltip_padding = 5 5
tooltip_show_timeout = 0.7
tooltip_hide_timeout = 0.3
tooltip_background_id = -1
tooltip_font = Aller 8
tooltip_font_color = #D3CAAA 33
# Mouse
mouse_left = toggle_iconify
mouse_middle = none
mouse_right = close
mouse_scroll_up = toggle
mouse_scroll_down = iconify
# Battery
battery = 0
battery_low_status = 10
battery_low_cmd = notify-send "battery low"
battery_hide = 90
bat1_font = sans 8
bat2_font = sans 6
battery_font_color = #FFFFFF 75
battery_padding = 1 0
battery_background_id = 0
# End of config