Compare commits
58
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fcbdd00bce | ||
|
|
491a56db10 | ||
|
|
cbe31981b3 | ||
|
|
dafe9824e3 | ||
|
|
b931066573 | ||
|
|
f45e107207 | ||
|
|
ece3bc4d85 | ||
|
|
4b9ee685ac | ||
|
|
cfc43685a4 | ||
|
|
d05d5f594b | ||
|
|
425036adc9 | ||
|
|
cb174592be | ||
|
|
7a350a5e83 | ||
|
|
afadf3ea3f | ||
|
|
c8ccf053ff | ||
|
|
2f74250634 | ||
|
|
ad7faaab81 | ||
|
|
e39a841f6e | ||
|
|
fc7c6afa81 | ||
|
|
51bc9d1569 | ||
|
|
747bbd7c7b | ||
|
|
521ffbfaaf | ||
|
|
cd33e5b274 | ||
|
|
201ea843a0 | ||
|
|
dee210ceec | ||
|
|
ea0e52c5a2 | ||
|
|
b5578ff5bc | ||
|
|
f9ad3cb029 | ||
|
|
30c24c59ed | ||
|
|
6f05c9d327 | ||
|
|
30429b88b3 | ||
|
|
394be61a65 | ||
|
|
d55f6d7baa | ||
|
|
2dfcab170d | ||
|
|
59b2094ad1 | ||
|
|
8046600a55 | ||
|
|
17a655b52a | ||
|
|
75b8587216 | ||
|
|
7c87ab88bc | ||
|
|
b87470a284 | ||
|
|
948bf10bad | ||
|
|
59c3761455 | ||
|
|
b50f5ecf3e | ||
|
|
be9c492406 | ||
|
|
85e1a356fe | ||
|
|
5da4c1653a | ||
|
|
64edd55add | ||
|
|
bd28ee77d9 | ||
|
|
d10a505aa9 | ||
|
|
77f744eba4 | ||
|
|
f8dde00a33 | ||
|
|
380f260027 | ||
|
|
6df4eb4bee | ||
|
|
18fcc4952d | ||
|
|
3878bd6a49 | ||
|
|
067234e9fb | ||
|
|
e32d2342a6 | ||
|
|
82776df9d6 |
@@ -29,6 +29,7 @@ Contributors:
|
|||||||
Oskari Rauta : separator plugin, gradients
|
Oskari Rauta : separator plugin, gradients
|
||||||
Michael Messmore : Support for Path in .desktop files
|
Michael Messmore : Support for Path in .desktop files
|
||||||
Matthew Otnel : config option systray_name_filter
|
Matthew Otnel : config option systray_name_filter
|
||||||
|
Ryan Gray, Jeff Blake (https://gitlab.com/berkley4) : battery format
|
||||||
|
|
||||||
Translations:
|
Translations:
|
||||||
Bosnian:
|
Bosnian:
|
||||||
|
|||||||
+1
-1
@@ -217,7 +217,7 @@ else()
|
|||||||
SET(ASAN_L_FLAGS "")
|
SET(ASAN_L_FLAGS "")
|
||||||
endif()
|
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}
|
link_directories( ${X11_LIBRARY_DIRS}
|
||||||
${PANGOCAIRO_LIBRARY_DIRS}
|
${PANGOCAIRO_LIBRARY_DIRS}
|
||||||
|
|||||||
@@ -1,3 +1,38 @@
|
|||||||
|
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
|
||||||
|
|
||||||
|
2017-04-29 0.14.4
|
||||||
|
- Fixes:
|
||||||
|
- Fix regression in executor (issue #639)
|
||||||
|
- Fix crash when _NET_WM_ICON is set but empty (https://github.com/jmc-88/tint3/issues/21)
|
||||||
|
|
||||||
2017-04-23 0.14.3
|
2017-04-23 0.14.3
|
||||||
- Fixes:
|
- Fixes:
|
||||||
- Make versioning more robust when building as package
|
- Make versioning more robust when building as package
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Latest stable release: 0.14.3
|
# Latest stable release: 0.14.6
|
||||||
Changes: https://gitlab.com/o9000/tint2/blob/0.14.3/ChangeLog
|
Changes: https://gitlab.com/o9000/tint2/blob/0.14.6/ChangeLog
|
||||||
|
|
||||||
Documentation: [doc/tint2.md](doc/tint2.md)
|
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
|
git clone https://gitlab.com/o9000/tint2.git
|
||||||
cd tint2
|
cd tint2
|
||||||
git checkout 0.14.3
|
git checkout 0.14.6
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake ..
|
cmake ..
|
||||||
|
|||||||
+14
-3
@@ -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>
|
<li><code>:</code> adds a separator. You can specify more than one. <em>(since 0.13.0)</em></li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>For example, <code>panel_items = STC</code> will show the systray, the taskbar and the clock (from left to right).</p></li>
|
<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>
|
<ul>
|
||||||
<li>The first monitor is <code>1</code></li>
|
<li>The first monitor is <code>1</code></li>
|
||||||
<li>Use <code>panel_monitor = all</code> to get a separate panel per monitor</li>
|
<li>Use <code>panel_monitor = all</code> to get a separate panel per monitor</li>
|
||||||
</ul></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>
|
</ul>
|
||||||
<p><img src="images/panel_padding.jpg" alt=""></p>
|
<p><img src="images/panel_padding.jpg" alt=""></p>
|
||||||
<ul>
|
<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_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_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_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_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>
|
<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>
|
<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_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_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_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>
|
<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>
|
</ul>
|
||||||
<h3 id="clock">Clock<a name="clock" href="#clock" class="md2man-permalink" title="permalink"></a></h3>
|
<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_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_status = integer</code>: At what battery percentage the low command is executed.</p></li>
|
||||||
<li><p><code>battery_low_cmd = notify-send "battery low"</code> : Command to execute when the battery is low.</p></li>
|
<li><p><code>battery_low_cmd = notify-send "battery low"</code> : Command to execute when the battery is low.</p></li>
|
||||||
|
<li><p><code>battery_full_cmd = notify-send "battery full"</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>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>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>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 "hrs:mins" when charging/discharging, or "Ful\" 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_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_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>
|
<li><p><code>battery_tooltip_enabled = boolean (0 or 1)</code> : Enable/disable battery tooltips. <em>(since 0.12.3)</em></p></li>
|
||||||
|
|||||||
+2
-2
@@ -199,9 +199,9 @@ pre {
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1 id="latest-stable-release-0-14-3"><span class="md2man-title">Latest</span> <span class="md2man-section">stable</span> <span class="md2man-date">release:</span> <span class="md2man-source">0.14.3</span><a name="latest-stable-release-0-14-3" href="#latest-stable-release-0-14-3" class="md2man-permalink" title="permalink"></a></h1><p>Changes: <a href="https://gitlab.com/o9000/tint2/blob/0.14.3/ChangeLog">https://gitlab.com/o9000/tint2/blob/0.14.3/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
|
cd tint2
|
||||||
git checkout 0.14.3
|
git checkout 0.14.6
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake ..
|
cmake ..
|
||||||
|
|||||||
+24
-4
@@ -1,4 +1,4 @@
|
|||||||
.TH TINT2 1 "2017\-04\-23" 0.14.3
|
.TH TINT2 1 "2017\-06\-11" 0.14.6
|
||||||
.SH NAME
|
.SH NAME
|
||||||
.PP
|
.PP
|
||||||
tint2 \- lightweight panel/taskbar
|
tint2 \- lightweight panel/taskbar
|
||||||
@@ -309,7 +309,7 @@ gradient_id_pressed = 2
|
|||||||
.PP
|
.PP
|
||||||
For example, \fB\fCpanel_items = STC\fR will show the systray, the taskbar and the clock (from left to right).
|
For example, \fB\fCpanel_items = STC\fR will show the systray, the taskbar and the clock (from left to right).
|
||||||
.IP \(bu 2
|
.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
|
.RS
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
The first monitor is \fB\fC1\fR
|
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
|
Use \fB\fCpanel_monitor = all\fR to get a separate panel per monitor
|
||||||
.RE
|
.RE
|
||||||
.IP \(bu 2
|
.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
|
.RE
|
||||||
.PP
|
.PP
|
||||||
[](images/panel_padding.jpg)
|
[](images/panel_padding.jpg)
|
||||||
@@ -461,6 +461,8 @@ You can switch between virtual desktops.
|
|||||||
.IP \(bu 2
|
.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
|
\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
|
.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
|
\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
|
.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
|
\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
|
.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.
|
\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
|
.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
|
.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
|
\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
|
.RE
|
||||||
@@ -651,12 +653,30 @@ To hide the clock, comment \fB\fCtime1_format\fR and \fB\fCtime2_format\fR\&.
|
|||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fB\fCbattery_low_cmd = notify\-send "battery low"\fR : Command to execute when the battery is low.
|
\fB\fCbattery_low_cmd = notify\-send "battery low"\fR : Command to execute when the battery is low.
|
||||||
.IP \(bu 2
|
.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
|
\fB\fCbat1_font = [FAMILY\-LIST] [STYLE\-OPTIONS] [SIZE]\fR
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fB\fCbat2_font = [FAMILY\-LIST] [STYLE\-OPTIONS] [SIZE]\fR
|
\fB\fCbat2_font = [FAMILY\-LIST] [STYLE\-OPTIONS] [SIZE]\fR
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fB\fCbattery_font_color = color opacity (0 to 100)\fR
|
\fB\fCbattery_font_color = color opacity (0 to 100)\fR
|
||||||
.IP \(bu 2
|
.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
|
\fB\fCbattery_padding = horizontal_padding vertical_padding\fR
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fB\fCbattery_background_id = integer\fR : Which background to use for the battery.
|
\fB\fCbattery_background_id = integer\fR : Which background to use for the battery.
|
||||||
|
|||||||
+17
-4
@@ -1,4 +1,4 @@
|
|||||||
# TINT2 1 "2017-04-23" 0.14.3
|
# TINT2 1 "2017-06-11" 0.14.6
|
||||||
|
|
||||||
## NAME
|
## NAME
|
||||||
tint2 - lightweight panel/taskbar
|
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).
|
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`
|
* The first monitor is `1`
|
||||||
* Use `panel_monitor = all` to get a separate panel per monitor
|
* 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)*
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@@ -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_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_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)*
|
* `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_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)*
|
* `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_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]`
|
* `bat1_font = [FAMILY-LIST] [STYLE-OPTIONS] [SIZE]`
|
||||||
|
|
||||||
* `bat2_font = [FAMILY-LIST] [STYLE-OPTIONS] [SIZE]`
|
* `bat2_font = [FAMILY-LIST] [STYLE-OPTIONS] [SIZE]`
|
||||||
|
|
||||||
* `battery_font_color = color opacity (0 to 100)`
|
* `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_padding = horizontal_padding vertical_padding`
|
||||||
|
|
||||||
* `battery_background_id = integer` : Which background to use for the battery.
|
* `battery_background_id = integer` : Which background to use for the battery.
|
||||||
|
|||||||
+4
-3
@@ -33,10 +33,11 @@ then
|
|||||||
fi
|
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
|
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
|
else
|
||||||
VERSION=$(head -n 1 ChangeLog || head -n 1 ../ChangeLog | cut -d ' ' -f 2)
|
SCRIPT_DIR=$(dirname "$0")
|
||||||
if [ $VERSION = "master" ]
|
VERSION=$(head -n 1 "${SCRIPT_DIR}/ChangeLog" | cut -d ' ' -f 2)
|
||||||
|
if [ "$VERSION" = "master" ]
|
||||||
then
|
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
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -237,4 +237,4 @@ if __name__ == '__main__':
|
|||||||
run("tar -xzf tint2-%s.tar.gz" % readable_version)
|
run("tar -xzf tint2-%s.tar.gz" % readable_version)
|
||||||
run("cd tint2-%s ; mkdir build ; cd build ; cmake .. ; make" % readable_version)
|
run("cd tint2-%s ; mkdir build ; cd build ; cmake .. ; make" % readable_version)
|
||||||
assert_equal(run("./tint2-%s/build/tint2 -v" % readable_version).strip(), "tint2 version %s" % readable_version)
|
assert_equal(run("./tint2-%s/build/tint2 -v" % readable_version).strip(), "tint2 version %s" % readable_version)
|
||||||
os.system("git log -p -1")
|
os.system("git log -p -1 --word-diff")
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ Homepage: https://gitlab.com/o9000/tint2/
|
|||||||
Package: tint2
|
Package: tint2
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Depends: ${shlibs:Depends},
|
Depends: ${shlibs:Depends},
|
||||||
${misc:Depends}
|
${misc:Depends},
|
||||||
|
procps
|
||||||
Description: lightweight taskbar
|
Description: lightweight taskbar
|
||||||
Tint is a simple panel/taskbar intentionally made for openbox3, but should
|
Tint is a simple panel/taskbar intentionally made for openbox3, but should
|
||||||
also work with other window managers. The taskbar includes transparency and
|
also work with other window managers. The taskbar includes transparency and
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
pkill -SIGUSR2 tint2 || true
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ echo "echo \"#define VERSION_STRING \\\"$VERSION\\\"\" > version.h" > $DIR/get_v
|
|||||||
# Copy the debian files into the source directory
|
# Copy the debian files into the source directory
|
||||||
cp -r debian $DIR/debian
|
cp -r debian $DIR/debian
|
||||||
|
|
||||||
for DISTRO in precise trusty xenial yakkety zesty
|
for DISTRO in precise trusty xenial yakkety zesty artful
|
||||||
do
|
do
|
||||||
# Cleanup from previous builds
|
# Cleanup from previous builds
|
||||||
rm -rf tint2_$VERSION-*
|
rm -rf tint2_$VERSION-*
|
||||||
|
|||||||
+145
-137
@@ -35,20 +35,25 @@ gboolean bat1_has_font;
|
|||||||
PangoFontDescription *bat1_font_desc;
|
PangoFontDescription *bat1_font_desc;
|
||||||
gboolean bat2_has_font;
|
gboolean bat2_has_font;
|
||||||
PangoFontDescription *bat2_font_desc;
|
PangoFontDescription *bat2_font_desc;
|
||||||
|
char *bat1_format;
|
||||||
|
char *bat2_format;
|
||||||
struct BatteryState battery_state;
|
struct BatteryState battery_state;
|
||||||
gboolean battery_enabled;
|
gboolean battery_enabled;
|
||||||
gboolean battery_tooltip_enabled;
|
gboolean battery_tooltip_enabled;
|
||||||
int percentage_hide;
|
int percentage_hide;
|
||||||
static timeout *battery_timeout;
|
static timeout *battery_timeout;
|
||||||
|
|
||||||
static char buf_bat_percentage[10];
|
#define BATTERY_BUF_SIZE 256
|
||||||
static char buf_bat_time[20];
|
static char buf_bat_line1[BATTERY_BUF_SIZE];
|
||||||
|
static char buf_bat_line2[BATTERY_BUF_SIZE];
|
||||||
|
|
||||||
int8_t battery_low_status;
|
int8_t battery_low_status;
|
||||||
gboolean battery_low_cmd_sent;
|
gboolean battery_low_cmd_sent;
|
||||||
|
gboolean battery_full_cmd_sent;
|
||||||
char *ac_connected_cmd;
|
char *ac_connected_cmd;
|
||||||
char *ac_disconnected_cmd;
|
char *ac_disconnected_cmd;
|
||||||
char *battery_low_cmd;
|
char *battery_low_cmd;
|
||||||
|
char *battery_full_cmd;
|
||||||
char *battery_lclick_command;
|
char *battery_lclick_command;
|
||||||
char *battery_mclick_command;
|
char *battery_mclick_command;
|
||||||
char *battery_rclick_command;
|
char *battery_rclick_command;
|
||||||
@@ -70,14 +75,18 @@ void default_battery()
|
|||||||
battery_found = FALSE;
|
battery_found = FALSE;
|
||||||
percentage_hide = 101;
|
percentage_hide = 101;
|
||||||
battery_low_cmd_sent = FALSE;
|
battery_low_cmd_sent = FALSE;
|
||||||
|
battery_full_cmd_sent = FALSE;
|
||||||
battery_timeout = NULL;
|
battery_timeout = NULL;
|
||||||
bat1_has_font = FALSE;
|
bat1_has_font = FALSE;
|
||||||
bat1_font_desc = NULL;
|
bat1_font_desc = NULL;
|
||||||
|
bat1_format = NULL;
|
||||||
bat2_has_font = FALSE;
|
bat2_has_font = FALSE;
|
||||||
bat2_font_desc = NULL;
|
bat2_font_desc = NULL;
|
||||||
|
bat2_format = NULL;
|
||||||
ac_connected_cmd = NULL;
|
ac_connected_cmd = NULL;
|
||||||
ac_disconnected_cmd = NULL;
|
ac_disconnected_cmd = NULL;
|
||||||
battery_low_cmd = NULL;
|
battery_low_cmd = NULL;
|
||||||
|
battery_full_cmd = NULL;
|
||||||
battery_lclick_command = NULL;
|
battery_lclick_command = NULL;
|
||||||
battery_mclick_command = NULL;
|
battery_mclick_command = NULL;
|
||||||
battery_rclick_command = NULL;
|
battery_rclick_command = NULL;
|
||||||
@@ -98,6 +107,12 @@ void cleanup_battery()
|
|||||||
bat2_font_desc = NULL;
|
bat2_font_desc = NULL;
|
||||||
free(battery_low_cmd);
|
free(battery_low_cmd);
|
||||||
battery_low_cmd = NULL;
|
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);
|
free(battery_lclick_command);
|
||||||
battery_lclick_command = NULL;
|
battery_lclick_command = NULL;
|
||||||
free(battery_mclick_command);
|
free(battery_mclick_command);
|
||||||
@@ -119,6 +134,91 @@ void cleanup_battery()
|
|||||||
battery_os_free();
|
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()
|
void init_battery()
|
||||||
{
|
{
|
||||||
if (!battery_enabled)
|
if (!battery_enabled)
|
||||||
@@ -169,6 +269,11 @@ void init_battery_panel(void *p)
|
|||||||
if (battery_tooltip_enabled)
|
if (battery_tooltip_enabled)
|
||||||
battery->area._get_tooltip_text = battery_get_tooltip;
|
battery->area._get_tooltip_text = battery_get_tooltip;
|
||||||
instantiate_area_gradients(&battery->area);
|
instantiate_area_gradients(&battery->area);
|
||||||
|
|
||||||
|
if (!bat1_format && !bat2_format) {
|
||||||
|
bat1_format = strdup("%p");
|
||||||
|
bat2_format = strdup("%t");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void battery_init_fonts()
|
void battery_init_fonts()
|
||||||
@@ -242,6 +347,16 @@ void update_battery_tick(void *arg)
|
|||||||
battery_low_cmd_sent = FALSE;
|
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++) {
|
for (int i = 0; i < num_panels; i++) {
|
||||||
// Show/hide if needed
|
// Show/hide if needed
|
||||||
if (!battery_found) {
|
if (!battery_found) {
|
||||||
@@ -278,158 +393,51 @@ int update_battery()
|
|||||||
battery_state.percentage = 100;
|
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;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
int battery_compute_desired_size(void *obj)
|
int battery_compute_desired_size(void *obj)
|
||||||
{
|
{
|
||||||
Battery *battery = (Battery *)obj;
|
Battery *battery = (Battery *)obj;
|
||||||
Panel *panel = (Panel *)battery->area.panel;
|
return text_area_compute_desired_size(&battery->area, buf_bat_line1, buf_bat_line2, bat1_font_desc, bat2_font_desc);
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean resize_battery(void *obj)
|
gboolean resize_battery(void *obj)
|
||||||
{
|
{
|
||||||
Battery *battery = (Battery *)obj;
|
Battery *battery = (Battery *)obj;
|
||||||
Panel *panel = (Panel *)battery->area.panel;
|
return resize_text_area(&battery->area,
|
||||||
int bat_percentage_height, bat_percentage_width, bat_percentage_height_ink;
|
buf_bat_line1,
|
||||||
int bat_time_height, bat_time_width, bat_time_height_ink;
|
buf_bat_line2,
|
||||||
int ret = 0;
|
bat1_font_desc,
|
||||||
|
bat2_font_desc,
|
||||||
snprintf(buf_bat_percentage, sizeof(buf_bat_percentage), "%d%%", battery_state.percentage);
|
&battery->bat1_posy,
|
||||||
if (battery_state.state == BATTERY_FULL) {
|
&battery->bat2_posy);
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void draw_battery(void *obj, cairo_t *c)
|
void draw_battery(void *obj, cairo_t *c)
|
||||||
{
|
{
|
||||||
Battery *battery = obj;
|
Battery *battery = (Battery *)obj;
|
||||||
|
draw_text_area(&battery->area,
|
||||||
PangoLayout *layout = pango_cairo_create_layout(c);
|
c,
|
||||||
pango_layout_set_font_description(layout, bat1_font_desc);
|
buf_bat_line1,
|
||||||
pango_layout_set_width(layout, battery->area.width * PANGO_SCALE);
|
buf_bat_line2,
|
||||||
pango_layout_set_alignment(layout, PANGO_ALIGN_CENTER);
|
bat1_font_desc,
|
||||||
pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR);
|
bat2_font_desc,
|
||||||
pango_layout_set_ellipsize(layout, PANGO_ELLIPSIZE_NONE);
|
battery->bat1_posy,
|
||||||
pango_layout_set_text(layout, buf_bat_percentage, strlen(buf_bat_percentage));
|
battery->bat2_posy,
|
||||||
|
&battery->font_color);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void battery_dump_geometry(void *obj, int indent)
|
void battery_dump_geometry(void *obj, int indent)
|
||||||
{
|
{
|
||||||
Battery *battery = obj;
|
Battery *battery = (Battery *)obj;
|
||||||
fprintf(stderr, "%*sText 1: y = %d, text = %s\n", indent, "", battery->bat1_posy, buf_bat_percentage);
|
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_time);
|
fprintf(stderr, "%*sText 2: y = %d, text = %s\n", indent, "", battery->bat2_posy, buf_bat_line2);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *battery_get_tooltip(void *obj)
|
char *battery_get_tooltip(void *obj)
|
||||||
@@ -437,7 +445,7 @@ char *battery_get_tooltip(void *obj)
|
|||||||
return battery_os_tooltip();
|
return battery_os_tooltip();
|
||||||
}
|
}
|
||||||
|
|
||||||
void battery_action(int button, Time time)
|
void battery_action(void *obj, int button, int x, int y, Time time)
|
||||||
{
|
{
|
||||||
char *command = NULL;
|
char *command = NULL;
|
||||||
switch (button) {
|
switch (button) {
|
||||||
@@ -457,5 +465,5 @@ void battery_action(int button, Time time)
|
|||||||
command = battery_dwheel_command;
|
command = battery_dwheel_command;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
tint_exec(command, NULL, NULL, time);
|
tint_exec(command, NULL, NULL, time, obj, x, y);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,12 +48,15 @@ extern gboolean bat1_has_font;
|
|||||||
extern PangoFontDescription *bat1_font_desc;
|
extern PangoFontDescription *bat1_font_desc;
|
||||||
extern gboolean bat2_has_font;
|
extern gboolean bat2_has_font;
|
||||||
extern PangoFontDescription *bat2_font_desc;
|
extern PangoFontDescription *bat2_font_desc;
|
||||||
|
extern char *bat1_format;
|
||||||
|
extern char *bat2_format;
|
||||||
extern gboolean battery_enabled;
|
extern gboolean battery_enabled;
|
||||||
extern gboolean battery_tooltip_enabled;
|
extern gboolean battery_tooltip_enabled;
|
||||||
extern int percentage_hide;
|
extern int percentage_hide;
|
||||||
|
|
||||||
extern int8_t battery_low_status;
|
extern int8_t battery_low_status;
|
||||||
extern char *battery_low_cmd;
|
extern char *battery_low_cmd;
|
||||||
|
extern char *battery_full_cmd;
|
||||||
|
|
||||||
extern char *ac_connected_cmd;
|
extern char *ac_connected_cmd;
|
||||||
extern char *ac_disconnected_cmd;
|
extern char *ac_disconnected_cmd;
|
||||||
@@ -108,7 +111,7 @@ void battery_default_font_changed();
|
|||||||
|
|
||||||
gboolean resize_battery(void *obj);
|
gboolean resize_battery(void *obj);
|
||||||
|
|
||||||
void battery_action(int button, Time time);
|
void battery_action(void *obj, int button, int x, int y, Time time);
|
||||||
|
|
||||||
/* operating system specific functions */
|
/* operating system specific functions */
|
||||||
gboolean battery_os_init();
|
gboolean battery_os_init();
|
||||||
|
|||||||
@@ -446,6 +446,17 @@ int battery_os_update(BatteryState *state)
|
|||||||
/* AC state */
|
/* AC state */
|
||||||
state->ac_connected = ac_connected;
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+14
-112
@@ -337,6 +337,7 @@ gboolean resize_button(void *obj)
|
|||||||
{
|
{
|
||||||
Button *button = (Button *)obj;
|
Button *button = (Button *)obj;
|
||||||
Panel *panel = (Panel *)button->area.panel;
|
Panel *panel = (Panel *)button->area.panel;
|
||||||
|
Area *area = &button->area;
|
||||||
int horiz_padding = (panel_horizontal ? button->area.paddingxlr : button->area.paddingy);
|
int horiz_padding = (panel_horizontal ? button->area.paddingxlr : button->area.paddingy);
|
||||||
int vert_padding = (panel_horizontal ? button->area.paddingy : button->area.paddingxlr);
|
int vert_padding = (panel_horizontal ? button->area.paddingy : button->area.paddingxlr);
|
||||||
int interior_padding = button->area.paddingx;
|
int interior_padding = button->area.paddingx;
|
||||||
@@ -360,34 +361,29 @@ gboolean resize_button(void *obj)
|
|||||||
if (button->frontend->icon_load_size != button->frontend->iconw)
|
if (button->frontend->icon_load_size != button->frontend->iconw)
|
||||||
button_reload_icon(button);
|
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;
|
int txt_height_ink, txt_height, txt_width;
|
||||||
if (button->backend->text) {
|
if (button->backend->text) {
|
||||||
if (panel_horizontal) {
|
|
||||||
get_text_size2(button->backend->font_desc,
|
get_text_size2(button->backend->font_desc,
|
||||||
&txt_height_ink,
|
&txt_height_ink,
|
||||||
&txt_height,
|
&txt_height,
|
||||||
&txt_width,
|
&txt_width,
|
||||||
panel->area.height,
|
available_h,
|
||||||
panel->area.width,
|
available_w,
|
||||||
button->backend->text,
|
button->backend->text,
|
||||||
strlen(button->backend->text),
|
strlen(button->backend->text),
|
||||||
PANGO_WRAP_WORD_CHAR,
|
PANGO_WRAP_WORD_CHAR,
|
||||||
PANGO_ELLIPSIZE_NONE,
|
PANGO_ELLIPSIZE_NONE,
|
||||||
FALSE);
|
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);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
txt_height_ink = txt_height = txt_width = 0;
|
txt_height_ink = txt_height = txt_width = 0;
|
||||||
}
|
}
|
||||||
@@ -516,7 +512,6 @@ void button_dump_geometry(void *obj, int indent)
|
|||||||
void button_action(void *obj, int mouse_button, int x, int y, Time time)
|
void button_action(void *obj, int mouse_button, int x, int y, Time time)
|
||||||
{
|
{
|
||||||
Button *button = (Button *)obj;
|
Button *button = (Button *)obj;
|
||||||
Panel *panel = (Panel *)button->area.panel;
|
|
||||||
char *command = NULL;
|
char *command = NULL;
|
||||||
switch (mouse_button) {
|
switch (mouse_button) {
|
||||||
case 1:
|
case 1:
|
||||||
@@ -535,100 +530,7 @@ void button_action(void *obj, int mouse_button, int x, int y, Time time)
|
|||||||
command = button->backend->dwheel_command;
|
command = button->backend->dwheel_command;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (command) {
|
tint_exec(command, NULL, NULL, time, obj, x, y);
|
||||||
int aligned_x, aligned_y, aligned_x1, aligned_y1, aligned_x2, aligned_y2;
|
|
||||||
int panel_x1, panel_x2, panel_y1, panel_y2;
|
|
||||||
if (panel_horizontal) {
|
|
||||||
if (area_is_first(button))
|
|
||||||
aligned_x1 = panel->posx;
|
|
||||||
else
|
|
||||||
aligned_x1 = panel->posx + button->area.posx;
|
|
||||||
|
|
||||||
if (area_is_last(button))
|
|
||||||
aligned_x2 = panel->posx + panel->area.width;
|
|
||||||
else
|
|
||||||
aligned_x2 = panel->posx + button->area.posx + button->area.width;
|
|
||||||
|
|
||||||
if (area_is_first(button))
|
|
||||||
aligned_x = aligned_x1;
|
|
||||||
else if (area_is_last(button))
|
|
||||||
aligned_x = aligned_x2;
|
|
||||||
else
|
|
||||||
aligned_x = aligned_x1;
|
|
||||||
|
|
||||||
if (panel_position & BOTTOM)
|
|
||||||
aligned_y = panel->posy;
|
|
||||||
else
|
|
||||||
aligned_y = panel->posy + panel->area.height;
|
|
||||||
|
|
||||||
aligned_y1 = aligned_y2 = aligned_y;
|
|
||||||
|
|
||||||
panel_x1 = panel->posx;
|
|
||||||
panel_x2 = panel->posx + panel->area.width;
|
|
||||||
panel_y1 = panel_y2 = aligned_y;
|
|
||||||
} else {
|
|
||||||
if (area_is_first(button))
|
|
||||||
aligned_y1 = panel->posy;
|
|
||||||
else
|
|
||||||
aligned_y1 = panel->posy + button->area.posy;
|
|
||||||
|
|
||||||
if (area_is_last(button))
|
|
||||||
aligned_y2 = panel->posy + panel->area.height;
|
|
||||||
else
|
|
||||||
aligned_y2 = panel->posy + button->area.posy + button->area.height;
|
|
||||||
|
|
||||||
if (area_is_first(button))
|
|
||||||
aligned_y = aligned_y1;
|
|
||||||
else if (area_is_last(button))
|
|
||||||
aligned_y = aligned_y2;
|
|
||||||
else
|
|
||||||
aligned_y = aligned_y1;
|
|
||||||
|
|
||||||
if (panel_position & RIGHT)
|
|
||||||
aligned_x = panel->posx;
|
|
||||||
else
|
|
||||||
aligned_x = panel->posx + panel->area.width;
|
|
||||||
|
|
||||||
aligned_x1 = aligned_x2 = aligned_x;
|
|
||||||
|
|
||||||
panel_x1 = panel_x2 = aligned_x;
|
|
||||||
panel_y1 = panel->posy;
|
|
||||||
panel_y2 = panel->posy + panel->area.height;
|
|
||||||
}
|
|
||||||
|
|
||||||
char *full_cmd = g_strdup_printf("export TINT2_BUTTON_X=%d;"
|
|
||||||
"export TINT2_BUTTON_Y=%d;"
|
|
||||||
"export TINT2_BUTTON_W=%d;"
|
|
||||||
"export TINT2_BUTTON_H=%d;"
|
|
||||||
"export TINT2_BUTTON_ALIGNED_X=%d;"
|
|
||||||
"export TINT2_BUTTON_ALIGNED_Y=%d;"
|
|
||||||
"export TINT2_BUTTON_ALIGNED_X1=%d;"
|
|
||||||
"export TINT2_BUTTON_ALIGNED_Y1=%d;"
|
|
||||||
"export TINT2_BUTTON_ALIGNED_X2=%d;"
|
|
||||||
"export TINT2_BUTTON_ALIGNED_Y2=%d;"
|
|
||||||
"export TINT2_BUTTON_PANEL_X1=%d;"
|
|
||||||
"export TINT2_BUTTON_PANEL_Y1=%d;"
|
|
||||||
"export TINT2_BUTTON_PANEL_X2=%d;"
|
|
||||||
"export TINT2_BUTTON_PANEL_Y2=%d;"
|
|
||||||
"%s",
|
|
||||||
x,
|
|
||||||
y,
|
|
||||||
button->area.width,
|
|
||||||
button->area.height,
|
|
||||||
aligned_x,
|
|
||||||
aligned_y,
|
|
||||||
aligned_x1,
|
|
||||||
aligned_y1,
|
|
||||||
aligned_x2,
|
|
||||||
aligned_y2,
|
|
||||||
panel_x1,
|
|
||||||
panel_y1,
|
|
||||||
panel_x2,
|
|
||||||
panel_y2,
|
|
||||||
command);
|
|
||||||
tint_exec(full_cmd, NULL, NULL, time);
|
|
||||||
g_free(full_cmd);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
char *button_get_tooltip(void *obj)
|
char *button_get_tooltip(void *obj)
|
||||||
|
|||||||
+82
-142
@@ -77,6 +77,9 @@ void default_clock()
|
|||||||
time1_font_desc = NULL;
|
time1_font_desc = NULL;
|
||||||
time2_has_font = FALSE;
|
time2_has_font = FALSE;
|
||||||
time2_font_desc = NULL;
|
time2_font_desc = NULL;
|
||||||
|
buf_time[0] = 0;
|
||||||
|
buf_date[0] = 0;
|
||||||
|
buf_tooltip[0] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cleanup_clock()
|
void cleanup_clock()
|
||||||
@@ -111,31 +114,6 @@ void cleanup_clock()
|
|||||||
clock_timeout = NULL;
|
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)
|
struct tm *clock_gettime_for_tz(const char *timezone)
|
||||||
{
|
{
|
||||||
if (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)
|
gboolean time_format_needs_sec_ticks(char *time_format)
|
||||||
{
|
{
|
||||||
if (!time_format)
|
if (!time_format)
|
||||||
@@ -170,14 +188,6 @@ void init_clock_panel(void *p)
|
|||||||
Panel *panel = (Panel *)p;
|
Panel *panel = (Panel *)p;
|
||||||
Clock *clock = &panel->clock;
|
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)
|
if (!clock->area.bg)
|
||||||
clock->area.bg = &g_array_index(backgrounds, Background, 0);
|
clock->area.bg = &g_array_index(backgrounds, Background, 0);
|
||||||
clock_init_fonts();
|
clock_init_fonts();
|
||||||
@@ -205,6 +215,14 @@ void init_clock_panel(void *p)
|
|||||||
clock->area._get_tooltip_text = clock_get_tooltip;
|
clock->area._get_tooltip_text = clock_get_tooltip;
|
||||||
strftime(buf_tooltip, sizeof(buf_tooltip), time_tooltip_format, clock_gettime_for_tz(time_tooltip_timezone));
|
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()
|
void clock_init_fonts()
|
||||||
@@ -243,7 +261,7 @@ void clock_default_font_changed()
|
|||||||
schedule_panel_redraw();
|
schedule_panel_redraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
void clock_compute_text_geometry(Panel *panel,
|
void clock_compute_text_geometry(Clock *clock,
|
||||||
int *time_height_ink,
|
int *time_height_ink,
|
||||||
int *time_height,
|
int *time_height,
|
||||||
int *time_width,
|
int *time_width,
|
||||||
@@ -251,131 +269,53 @@ void clock_compute_text_geometry(Panel *panel,
|
|||||||
int *date_height,
|
int *date_height,
|
||||||
int *date_width)
|
int *date_width)
|
||||||
{
|
{
|
||||||
*date_height = *date_width = 0;
|
area_compute_text_geometry(&clock->area,
|
||||||
strftime(buf_time, sizeof(buf_time), time1_format, clock_gettime_for_tz(time1_timezone));
|
buf_time,
|
||||||
get_text_size2(time1_font_desc,
|
time2_format ? buf_date : NULL,
|
||||||
|
time1_font_desc,
|
||||||
|
time2_font_desc,
|
||||||
time_height_ink,
|
time_height_ink,
|
||||||
time_height,
|
time_height,
|
||||||
time_width,
|
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_ink,
|
||||||
date_height,
|
date_height,
|
||||||
date_width,
|
date_width);
|
||||||
panel->area.height,
|
|
||||||
panel->area.width,
|
|
||||||
buf_date,
|
|
||||||
strlen(buf_date),
|
|
||||||
PANGO_WRAP_WORD_CHAR,
|
|
||||||
PANGO_ELLIPSIZE_NONE,
|
|
||||||
FALSE);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int clock_compute_desired_size(void *obj)
|
int clock_compute_desired_size(void *obj)
|
||||||
{
|
{
|
||||||
Clock *clock = (Clock *)obj;
|
Clock *clock = (Clock *)obj;
|
||||||
Panel *panel = (Panel *)clock->area.panel;
|
return text_area_compute_desired_size(&clock->area,
|
||||||
int time_height_ink, time_height, time_width, date_height_ink, date_height, date_width;
|
buf_time,
|
||||||
clock_compute_text_geometry(panel,
|
time2_format ? buf_date : NULL,
|
||||||
&time_height_ink,
|
time1_font_desc,
|
||||||
&time_height,
|
time2_font_desc);
|
||||||
&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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean resize_clock(void *obj)
|
gboolean resize_clock(void *obj)
|
||||||
{
|
{
|
||||||
Clock *clock = (Clock *)obj;
|
Clock *clock = (Clock *)obj;
|
||||||
Panel *panel = (Panel *)clock->area.panel;
|
return resize_text_area(&clock->area,
|
||||||
gboolean result = FALSE;
|
buf_time,
|
||||||
|
time2_format ? buf_date : NULL,
|
||||||
schedule_redraw(&clock->area);
|
time1_font_desc,
|
||||||
|
time2_font_desc,
|
||||||
int time_height_ink, time_height, time_width, date_height_ink, date_height, date_width;
|
&clock->time1_posy,
|
||||||
clock_compute_text_geometry(panel,
|
&clock->time2_posy);
|
||||||
&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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void draw_clock(void *obj, cairo_t *c)
|
void draw_clock(void *obj, cairo_t *c)
|
||||||
{
|
{
|
||||||
Clock *clock = obj;
|
Clock *clock = (Clock *)obj;
|
||||||
PangoLayout *layout = pango_cairo_create_layout(c);
|
draw_text_area(&clock->area,
|
||||||
|
c,
|
||||||
pango_layout_set_font_description(layout, time1_font_desc);
|
buf_time,
|
||||||
pango_layout_set_width(layout, clock->area.width * PANGO_SCALE);
|
time2_format ? buf_date : NULL,
|
||||||
pango_layout_set_alignment(layout, PANGO_ALIGN_CENTER);
|
time1_font_desc,
|
||||||
pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR);
|
time2_font_desc,
|
||||||
pango_layout_set_ellipsize(layout, PANGO_ELLIPSIZE_NONE);
|
clock->time1_posy,
|
||||||
pango_layout_set_text(layout, buf_time, strlen(buf_time));
|
clock->time2_posy,
|
||||||
|
&clock->font);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void clock_dump_geometry(void *obj, int indent)
|
void clock_dump_geometry(void *obj, int indent)
|
||||||
@@ -393,7 +333,7 @@ char *clock_get_tooltip(void *obj)
|
|||||||
return strdup(buf_tooltip);
|
return strdup(buf_tooltip);
|
||||||
}
|
}
|
||||||
|
|
||||||
void clock_action(int button, Time time)
|
void clock_action(void *obj, int button, int x, int y, Time time)
|
||||||
{
|
{
|
||||||
char *command = NULL;
|
char *command = NULL;
|
||||||
switch (button) {
|
switch (button) {
|
||||||
@@ -413,5 +353,5 @@ void clock_action(int button, Time time)
|
|||||||
command = clock_dwheel_command;
|
command = clock_dwheel_command;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
tint_exec(command, NULL, NULL, time);
|
tint_exec(command, NULL, NULL, time, obj, x, y);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -54,6 +54,6 @@ void draw_clock(void *obj, cairo_t *c);
|
|||||||
|
|
||||||
gboolean resize_clock(void *obj);
|
gboolean resize_clock(void *obj);
|
||||||
|
|
||||||
void clock_action(int button, Time time);
|
void clock_action(void *obj, int button, int x, int y, Time time);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+38
-8
@@ -135,7 +135,16 @@ int get_task_status(char *status)
|
|||||||
|
|
||||||
int config_get_monitor(char *monitor)
|
int config_get_monitor(char *monitor)
|
||||||
{
|
{
|
||||||
if (strcmp(monitor, "all") != 0) {
|
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;
|
char *endptr;
|
||||||
int ret_int = strtol(monitor, &endptr, 10);
|
int ret_int = strtol(monitor, &endptr, 10);
|
||||||
if (*endptr == 0)
|
if (*endptr == 0)
|
||||||
@@ -154,8 +163,8 @@ int config_get_monitor(char *monitor)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// monitor == "all" or monitor not found or xrandr can't identify monitors
|
// monitor not found or xrandr can't identify monitors => all
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -381,8 +390,6 @@ void add_entry(char *key, char *value)
|
|||||||
/* Panel */
|
/* Panel */
|
||||||
else if (strcmp(key, "panel_monitor") == 0) {
|
else if (strcmp(key, "panel_monitor") == 0) {
|
||||||
panel_config.monitor = config_get_monitor(value);
|
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) {
|
} else if (strcmp(key, "panel_shrink") == 0) {
|
||||||
panel_shrink = atoi(value);
|
panel_shrink = atoi(value);
|
||||||
} else if (strcmp(key, "panel_size") == 0) {
|
} else if (strcmp(key, "panel_size") == 0) {
|
||||||
@@ -544,6 +551,11 @@ void add_entry(char *key, char *value)
|
|||||||
#ifdef ENABLE_BATTERY
|
#ifdef ENABLE_BATTERY
|
||||||
if (strlen(value) > 0)
|
if (strlen(value) > 0)
|
||||||
battery_low_cmd = strdup(value);
|
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
|
#endif
|
||||||
} else if (strcmp(key, "ac_connected_cmd") == 0) {
|
} else if (strcmp(key, "ac_connected_cmd") == 0) {
|
||||||
#ifdef ENABLE_BATTERY
|
#ifdef ENABLE_BATTERY
|
||||||
@@ -564,6 +576,21 @@ void add_entry(char *key, char *value)
|
|||||||
#ifdef ENABLE_BATTERY
|
#ifdef ENABLE_BATTERY
|
||||||
bat2_font_desc = pango_font_description_from_string(value);
|
bat2_font_desc = pango_font_description_from_string(value);
|
||||||
bat2_has_font = TRUE;
|
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
|
#endif
|
||||||
} else if (strcmp(key, "battery_font_color") == 0) {
|
} else if (strcmp(key, "battery_font_color") == 0) {
|
||||||
#ifdef ENABLE_BATTERY
|
#ifdef ENABLE_BATTERY
|
||||||
@@ -652,8 +679,8 @@ void add_entry(char *key, char *value)
|
|||||||
Execp *execp = get_or_create_last_execp();
|
Execp *execp = get_or_create_last_execp();
|
||||||
execp->backend->interval = 0;
|
execp->backend->interval = 0;
|
||||||
int v = atoi(value);
|
int v = atoi(value);
|
||||||
if (v < 1) {
|
if (v < 0) {
|
||||||
fprintf(stderr, "execp_interval must be an integer >= 1\n");
|
fprintf(stderr, "execp_interval must be an integer >= 0\n");
|
||||||
} else {
|
} else {
|
||||||
execp->backend->interval = v;
|
execp->backend->interval = v;
|
||||||
}
|
}
|
||||||
@@ -673,6 +700,7 @@ void add_entry(char *key, char *value)
|
|||||||
Execp *execp = get_or_create_last_execp();
|
Execp *execp = get_or_create_last_execp();
|
||||||
free_and_null(execp->backend->tooltip);
|
free_and_null(execp->backend->tooltip);
|
||||||
execp->backend->tooltip = strdup(value);
|
execp->backend->tooltip = strdup(value);
|
||||||
|
execp->backend->has_user_tooltip = TRUE;
|
||||||
} else if (strcmp(key, "execp_font") == 0) {
|
} else if (strcmp(key, "execp_font") == 0) {
|
||||||
Execp *execp = get_or_create_last_execp();
|
Execp *execp = get_or_create_last_execp();
|
||||||
pango_font_description_free(execp->backend->font_desc);
|
pango_font_description_free(execp->backend->font_desc);
|
||||||
@@ -960,6 +988,8 @@ void add_entry(char *key, char *value)
|
|||||||
hide_inactive_tasks = atoi(value);
|
hide_inactive_tasks = atoi(value);
|
||||||
} else if (strcmp(key, "taskbar_hide_different_monitor") == 0) {
|
} else if (strcmp(key, "taskbar_hide_different_monitor") == 0) {
|
||||||
hide_task_diff_monitor = atoi(value);
|
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) {
|
} else if (strcmp(key, "taskbar_hide_if_empty") == 0) {
|
||||||
hide_taskbar_if_empty = atoi(value);
|
hide_taskbar_if_empty = atoi(value);
|
||||||
} else if (strcmp(key, "taskbar_always_show_all_desktop_tasks") == 0) {
|
} 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.saturation = atoi(value2);
|
||||||
systray.brightness = atoi(value3);
|
systray.brightness = atoi(value3);
|
||||||
} else if (strcmp(key, "systray_monitor") == 0) {
|
} 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) {
|
} else if (strcmp(key, "systray_name_filter") == 0) {
|
||||||
if (systray_hide_name_filter)
|
if (systray_hide_name_filter)
|
||||||
free(systray_hide_name_filter);
|
free(systray_hide_name_filter);
|
||||||
|
|||||||
+337
-210
@@ -18,6 +18,8 @@
|
|||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
|
#define MAX_TOOLTIP_LEN 4096
|
||||||
|
|
||||||
void execp_timer_callback(void *arg);
|
void execp_timer_callback(void *arg);
|
||||||
char *execp_get_tooltip(void *obj);
|
char *execp_get_tooltip(void *obj);
|
||||||
void execp_init_fonts();
|
void execp_init_fonts();
|
||||||
@@ -30,9 +32,10 @@ void default_execp()
|
|||||||
|
|
||||||
Execp *create_execp()
|
Execp *create_execp()
|
||||||
{
|
{
|
||||||
Execp *execp = calloc(1, sizeof(Execp));
|
Execp *execp = (Execp *)calloc(1, sizeof(Execp));
|
||||||
execp->backend = calloc(1, sizeof(ExecpBackend));
|
execp->backend = (ExecpBackend *)calloc(1, sizeof(ExecpBackend));
|
||||||
execp->backend->child_pipe = -1;
|
execp->backend->child_pipe_stdout = -1;
|
||||||
|
execp->backend->child_pipe_stderr = -1;
|
||||||
execp->backend->cmd_pids = g_tree_new(cmp_ptr);
|
execp->backend->cmd_pids = g_tree_new(cmp_ptr);
|
||||||
execp->backend->interval = 30;
|
execp->backend->interval = 30;
|
||||||
execp->backend->cache_icon = TRUE;
|
execp->backend->cache_icon = TRUE;
|
||||||
@@ -45,10 +48,10 @@ gpointer create_execp_frontend(gconstpointer arg, gpointer data)
|
|||||||
{
|
{
|
||||||
Execp *execp_backend = (Execp *)arg;
|
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_frontend->backend = execp_backend->backend;
|
||||||
execp_backend->backend->instances = g_list_append(execp_backend->backend->instances, execp_frontend);
|
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;
|
return execp_frontend;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -72,16 +75,20 @@ void destroy_execp(void *obj)
|
|||||||
imlib_free_image();
|
imlib_free_image();
|
||||||
execp->backend->icon = NULL;
|
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->text);
|
||||||
free_and_null(execp->backend->icon_path);
|
free_and_null(execp->backend->icon_path);
|
||||||
if (execp->backend->child) {
|
if (execp->backend->child) {
|
||||||
kill(-execp->backend->child, SIGHUP);
|
kill(-execp->backend->child, SIGHUP);
|
||||||
execp->backend->child = 0;
|
execp->backend->child = 0;
|
||||||
}
|
}
|
||||||
if (execp->backend->child_pipe >= 0) {
|
if (execp->backend->child_pipe_stdout >= 0) {
|
||||||
close(execp->backend->child_pipe);
|
close(execp->backend->child_pipe_stdout);
|
||||||
execp->backend->child_pipe = -1;
|
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) {
|
if (execp->backend->cmd_pids) {
|
||||||
g_tree_destroy(execp->backend->cmd_pids);
|
g_tree_destroy(execp->backend->cmd_pids);
|
||||||
@@ -138,8 +145,10 @@ void init_execp()
|
|||||||
// Set missing config options
|
// Set missing config options
|
||||||
if (!execp->backend->bg)
|
if (!execp->backend->bg)
|
||||||
execp->backend->bg = &g_array_index(backgrounds, Background, 0);
|
execp->backend->bg = &g_array_index(backgrounds, Background, 0);
|
||||||
execp->backend->buf_capacity = 1024;
|
execp->backend->buf_stdout_capacity = 1024;
|
||||||
execp->backend->buf_output = calloc(execp->backend->buf_capacity, 1);
|
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->text = strdup("");
|
||||||
execp->backend->icon_path = NULL;
|
execp->backend->icon_path = NULL;
|
||||||
}
|
}
|
||||||
@@ -188,6 +197,8 @@ void init_execp_panel(void *p)
|
|||||||
|
|
||||||
if (!execp->backend->timer)
|
if (!execp->backend->timer)
|
||||||
execp->backend->timer = add_timeout(10, 0, execp_timer_callback, execp, &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;
|
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;
|
Panel *panel = (Panel *)execp->area.panel;
|
||||||
int horiz_padding = (panel_horizontal ? execp->area.paddingxlr : execp->area.paddingy);
|
Area *area = &execp->area;
|
||||||
int vert_padding = (panel_horizontal ? execp->area.paddingy : execp->area.paddingxlr);
|
*horiz_padding = (panel_horizontal ? area->paddingxlr : area->paddingy);
|
||||||
int interior_padding = execp->area.paddingx;
|
*vert_padding = (panel_horizontal ? area->paddingy : area->paddingxlr);
|
||||||
|
*interior_padding = area->paddingx;
|
||||||
|
|
||||||
int icon_w, icon_h;
|
|
||||||
if (reload_icon(execp)) {
|
if (reload_icon(execp)) {
|
||||||
if (execp->backend->icon) {
|
if (execp->backend->icon) {
|
||||||
imlib_context_set_image(execp->backend->icon);
|
imlib_context_set_image(execp->backend->icon);
|
||||||
icon_w = imlib_image_get_width();
|
*icon_w = imlib_image_get_width();
|
||||||
icon_h = imlib_image_get_height();
|
*icon_h = imlib_image_get_height();
|
||||||
} else {
|
} else {
|
||||||
icon_w = icon_h = 0;
|
*icon_w = *icon_h = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} 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;
|
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
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;
|
int new_size;
|
||||||
if (!text_next_line) {
|
gboolean resized;
|
||||||
new_size = txt_height + 2 * vert_padding + top_bottom_border_width(&execp->area);
|
execp_compute_icon_text_geometry(execp,
|
||||||
new_size = MAX(new_size, icon_h + 2 * vert_padding + top_bottom_border_width(&execp->area));
|
&horiz_padding,
|
||||||
} else {
|
&vert_padding,
|
||||||
new_size =
|
&interior_padding,
|
||||||
icon_h + interior_padding + txt_height + 2 * vert_padding + top_bottom_border_width(&execp->area);
|
&icon_w,
|
||||||
}
|
&icon_h,
|
||||||
|
&text_next_line,
|
||||||
|
&txt_height_ink,
|
||||||
|
&txt_height,
|
||||||
|
&txt_width,
|
||||||
|
&new_size,
|
||||||
|
&resized);
|
||||||
|
|
||||||
return new_size;
|
return new_size;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
gboolean resize_execp(void *obj)
|
gboolean resize_execp(void *obj)
|
||||||
{
|
{
|
||||||
Execp *execp = (Execp *)obj;
|
Execp *execp = (Execp *)obj;
|
||||||
Panel *panel = (Panel *)execp->area.panel;
|
int horiz_padding, vert_padding, interior_padding;
|
||||||
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 icon_w, icon_h;
|
int icon_w, icon_h;
|
||||||
if (reload_icon(execp)) {
|
gboolean text_next_line;
|
||||||
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;
|
|
||||||
|
|
||||||
int txt_height_ink, txt_height, txt_width;
|
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
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;
|
int new_size;
|
||||||
if (!text_next_line) {
|
gboolean resized;
|
||||||
new_size = txt_height + 2 * vert_padding + top_bottom_border_width(&execp->area);
|
execp_compute_icon_text_geometry(execp,
|
||||||
new_size = MAX(new_size, icon_h + 2 * vert_padding + top_bottom_border_width(&execp->area));
|
&horiz_padding,
|
||||||
} else {
|
&vert_padding,
|
||||||
new_size =
|
&interior_padding,
|
||||||
icon_h + interior_padding + txt_height + 2 * vert_padding + top_bottom_border_width(&execp->area);
|
&icon_w,
|
||||||
}
|
&icon_h,
|
||||||
if (new_size != execp->area.height) {
|
&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;
|
execp->area.height = new_size;
|
||||||
result = TRUE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
execp->frontend->textw = txt_width;
|
execp->frontend->textw = txt_width;
|
||||||
execp->frontend->texth = txt_height;
|
execp->frontend->texth = txt_height;
|
||||||
if (execp->backend->centered) {
|
if (execp->backend->centered) {
|
||||||
@@ -479,13 +472,12 @@ gboolean resize_execp(void *obj)
|
|||||||
}
|
}
|
||||||
|
|
||||||
schedule_redraw(&execp->area);
|
schedule_redraw(&execp->area);
|
||||||
|
return resized;
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void draw_execp(void *obj, cairo_t *c)
|
void draw_execp(void *obj, cairo_t *c)
|
||||||
{
|
{
|
||||||
Execp *execp = obj;
|
Execp *execp = (Execp *)obj;
|
||||||
PangoLayout *layout = pango_cairo_create_layout(c);
|
PangoLayout *layout = pango_cairo_create_layout(c);
|
||||||
|
|
||||||
if (execp->backend->has_icon && execp->backend->icon) {
|
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)
|
void execp_dump_geometry(void *obj, int indent)
|
||||||
{
|
{
|
||||||
Execp *execp = obj;
|
Execp *execp = (Execp *)obj;
|
||||||
|
|
||||||
if (execp->backend->has_icon && execp->backend->icon) {
|
if (execp->backend->has_icon && execp->backend->icon) {
|
||||||
Imlib_Image tmp = imlib_context_get_image();
|
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)
|
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
|
// Command currently running, nothing to do
|
||||||
} else {
|
} else {
|
||||||
if (execp->backend->timer)
|
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)
|
void execp_action(void *obj, int button, int x, int y, Time time)
|
||||||
{
|
{
|
||||||
Execp *execp = obj;
|
Execp *execp = (Execp *)obj;
|
||||||
char *command = NULL;
|
char *command = NULL;
|
||||||
switch (button) {
|
switch (button) {
|
||||||
case 1:
|
case 1:
|
||||||
@@ -579,17 +571,17 @@ void execp_action(void *obj, int button, int x, int y, Time time)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (command) {
|
if (command) {
|
||||||
char *full_cmd = g_strdup_printf("export EXECP_X=%d;"
|
setenvd("EXECP_X", x);
|
||||||
"export EXECP_Y=%d;"
|
setenvd("EXECP_Y", y);
|
||||||
"export EXECP_W=%d;"
|
setenvd("EXECP_W", execp->area.width);
|
||||||
"export EXECP_H=%d; %s",
|
setenvd("EXECP_H", execp->area.height);
|
||||||
x,
|
pid_t pid = tint_exec(command, NULL, NULL, time, obj, x, y);
|
||||||
y,
|
unsetenv("EXECP_X");
|
||||||
execp->area.width,
|
unsetenv("EXECP_Y");
|
||||||
execp->area.height,
|
unsetenv("EXECP_W");
|
||||||
command);
|
unsetenv("EXECP_H");
|
||||||
tint_exec(full_cmd, NULL, NULL, time);
|
if (pid > 0)
|
||||||
g_free(full_cmd);
|
g_tree_insert(execp->backend->cmd_pids, GINT_TO_POINTER(pid), GINT_TO_POINTER(1));
|
||||||
} else {
|
} else {
|
||||||
execp_force_update(execp);
|
execp_force_update(execp);
|
||||||
}
|
}
|
||||||
@@ -603,38 +595,54 @@ void execp_cmd_completed(Execp *execp, pid_t pid)
|
|||||||
|
|
||||||
void execp_timer_callback(void *arg)
|
void execp_timer_callback(void *arg)
|
||||||
{
|
{
|
||||||
Execp *execp = arg;
|
Execp *execp = (Execp *)arg;
|
||||||
|
|
||||||
if (!execp->backend->command)
|
if (!execp->backend->command)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Still running!
|
// Still running!
|
||||||
if (execp->backend->child_pipe > 0)
|
if (execp->backend->child_pipe_stdout > 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int pipe_fd[2];
|
int pipe_fd_stdout[2];
|
||||||
if (pipe(pipe_fd)) {
|
if (pipe(pipe_fd_stdout)) {
|
||||||
// TODO maybe write this in tooltip, but if this happens we're screwed anyways
|
// TODO maybe write this in tooltip, but if this happens we're screwed anyways
|
||||||
fprintf(stderr, "Execp: Creating pipe failed!\n");
|
fprintf(stderr, "Execp: Creating pipe failed!\n");
|
||||||
return;
|
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
|
// Fork and run command, capturing stdout in pipe
|
||||||
pid_t child = fork();
|
pid_t child = fork();
|
||||||
if (child == -1) {
|
if (child == -1) {
|
||||||
// TODO maybe write this in tooltip, but if this happens we're screwed anyways
|
// TODO maybe write this in tooltip, but if this happens we're screwed anyways
|
||||||
fprintf(stderr, "Fork failed.\n");
|
fprintf(stderr, "Fork failed.\n");
|
||||||
close(pipe_fd[1]);
|
close(pipe_fd_stdout[1]);
|
||||||
close(pipe_fd[0]);
|
close(pipe_fd_stdout[0]);
|
||||||
|
close(pipe_fd_stderr[1]);
|
||||||
|
close(pipe_fd_stderr[0]);
|
||||||
return;
|
return;
|
||||||
} else if (child == 0) {
|
} else if (child == 0) {
|
||||||
fprintf(stderr, "Executing: %s\n", execp->backend->command);
|
fprintf(stderr, "Executing: %s\n", execp->backend->command);
|
||||||
// We are in the child
|
// We are in the child
|
||||||
close(pipe_fd[0]);
|
close(pipe_fd_stdout[0]);
|
||||||
dup2(pipe_fd[1], 1); // 1 is stdout
|
dup2(pipe_fd_stdout[1], 1); // 1 is stdout
|
||||||
close(pipe_fd[1]);
|
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);
|
setpgid(0, 0);
|
||||||
execl("/bin/sh", "/bin/sh", "-c", execp->backend->command, NULL);
|
execl("/bin/sh", "/bin/sh", "-c", execp->backend->command, NULL);
|
||||||
// This should never happen!
|
// This should never happen!
|
||||||
@@ -642,39 +650,38 @@ void execp_timer_callback(void *arg)
|
|||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
close(pipe_fd[1]);
|
close(pipe_fd_stdout[1]);
|
||||||
|
close(pipe_fd_stderr[1]);
|
||||||
execp->backend->child = child;
|
execp->backend->child = child;
|
||||||
execp->backend->child_pipe = pipe_fd[0];
|
execp->backend->child_pipe_stdout = pipe_fd_stdout[0];
|
||||||
execp->backend->buf_length = 0;
|
execp->backend->child_pipe_stderr = pipe_fd_stderr[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';
|
||||||
|
execp->backend->buf_stderr_length = 0;
|
||||||
|
execp->backend->buf_stderr[execp->backend->buf_stderr_length] = '\0';
|
||||||
execp->backend->last_update_start_time = time(NULL);
|
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;
|
*eof = FALSE;
|
||||||
|
|
||||||
if (execp->backend->child_pipe < 0)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
gboolean command_finished = FALSE;
|
|
||||||
while (1) {
|
while (1) {
|
||||||
// Make sure there is free space in the buffer
|
// Make sure there is free space in the buffer
|
||||||
if (execp->backend->buf_capacity - execp->backend->buf_length < 1024) {
|
if (*buffer_capacity - *buffer_length < 1024) {
|
||||||
execp->backend->buf_capacity *= 2;
|
*buffer_capacity *= 2;
|
||||||
execp->backend->buf_output = realloc(execp->backend->buf_output, execp->backend->buf_capacity);
|
*buffer = (char *)realloc(*buffer, *buffer_capacity);
|
||||||
}
|
}
|
||||||
ssize_t count = read(execp->backend->child_pipe,
|
ssize_t count = read(fd,
|
||||||
execp->backend->buf_output + execp->backend->buf_length,
|
*buffer + *buffer_length,
|
||||||
execp->backend->buf_capacity - execp->backend->buf_length - 1);
|
*buffer_capacity - *buffer_length - 1);
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
// Successful read
|
// Successful read
|
||||||
execp->backend->buf_length += count;
|
*buffer_length += count;
|
||||||
execp->backend->buf_output[execp->backend->buf_length] = '\0';
|
(*buffer)[*buffer_length] = '\0';
|
||||||
continue;
|
continue;
|
||||||
} else if (count == 0) {
|
} else if (count == 0) {
|
||||||
// End of file
|
// End of file
|
||||||
command_finished = TRUE;
|
*eof = TRUE;
|
||||||
break;
|
break;
|
||||||
} else if (errno == EAGAIN || errno == EWOULDBLOCK) {
|
} else if (errno == EAGAIN || errno == EWOULDBLOCK) {
|
||||||
// No more data available at the moment
|
// No more data available at the moment
|
||||||
@@ -684,28 +691,87 @@ gboolean read_execp(void *obj)
|
|||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
// Error
|
// Error
|
||||||
command_finished = TRUE;
|
*eof = TRUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
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) {
|
if (command_finished) {
|
||||||
execp->backend->child = 0;
|
execp->backend->child = 0;
|
||||||
close(execp->backend->child_pipe);
|
close(execp->backend->child_pipe_stdout);
|
||||||
execp->backend->child_pipe = -1;
|
execp->backend->child_pipe_stdout = -1;
|
||||||
|
close(execp->backend->child_pipe_stderr);
|
||||||
|
execp->backend->child_pipe_stderr = -1;
|
||||||
if (execp->backend->interval)
|
if (execp->backend->interval)
|
||||||
execp->backend->timer =
|
execp->backend->timer =
|
||||||
add_timeout(execp->backend->interval * 1000, 0, execp_timer_callback, execp, &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) {
|
if (!execp->backend->continuous && command_finished) {
|
||||||
|
// Handle stdout
|
||||||
free_and_null(execp->backend->text);
|
free_and_null(execp->backend->text);
|
||||||
free_and_null(execp->backend->icon_path);
|
free_and_null(execp->backend->icon_path);
|
||||||
if (!execp->backend->has_icon) {
|
if (!execp->backend->has_icon) {
|
||||||
execp->backend->text = strdup(execp->backend->buf_output);
|
execp->backend->text = strdup(execp->backend->buf_stdout);
|
||||||
} else {
|
} else {
|
||||||
char *text = strchr(execp->backend->buf_output, '\n');
|
char *text = strchr(execp->backend->buf_stdout, '\n');
|
||||||
if (text) {
|
if (text) {
|
||||||
*text = '\0';
|
*text = '\0';
|
||||||
text++;
|
text++;
|
||||||
@@ -713,41 +779,75 @@ gboolean read_execp(void *obj)
|
|||||||
} else {
|
} else {
|
||||||
execp->backend->text = strdup("");
|
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);
|
int len = strlen(execp->backend->text);
|
||||||
if (len > 0 && execp->backend->text[len - 1] == '\n')
|
if (len > 0 && execp->backend->text[len - 1] == '\n')
|
||||||
execp->backend->text[len - 1] = '\0';
|
execp->backend->text[len - 1] = '\0';
|
||||||
execp->backend->buf_length = 0;
|
execp->backend->buf_stdout_length = 0;
|
||||||
execp->backend->buf_output[execp->backend->buf_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_finish_time = time(NULL);
|
||||||
execp->backend->last_update_duration =
|
execp->backend->last_update_duration =
|
||||||
execp->backend->last_update_finish_time - execp->backend->last_update_start_time;
|
execp->backend->last_update_finish_time - execp->backend->last_update_start_time;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
} else if (execp->backend->continuous > 0) {
|
} 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
|
// Count lines in buffer
|
||||||
int num_lines = 0;
|
int num_lines = 0;
|
||||||
char *last = execp->backend->buf_output;
|
|
||||||
char *end = NULL;
|
char *end = NULL;
|
||||||
for (char *c = execp->backend->buf_output; *c; c++) {
|
for (char *c = execp->backend->buf_stdout; *c; c++) {
|
||||||
if (*c == '\n') {
|
if (*c == '\n') {
|
||||||
num_lines++;
|
num_lines++;
|
||||||
if (num_lines == execp->backend->continuous)
|
if (num_lines == execp->backend->continuous)
|
||||||
end = c;
|
end = c;
|
||||||
}
|
}
|
||||||
last = c;
|
|
||||||
}
|
}
|
||||||
if (*last && *last != '\n')
|
|
||||||
num_lines++;
|
|
||||||
if (num_lines >= execp->backend->continuous) {
|
if (num_lines >= execp->backend->continuous) {
|
||||||
if (end)
|
if (end)
|
||||||
*end = '\0';
|
*end = '\0';
|
||||||
free_and_null(execp->backend->text);
|
free_and_null(execp->backend->text);
|
||||||
free_and_null(execp->backend->icon_path);
|
free_and_null(execp->backend->icon_path);
|
||||||
if (!execp->backend->has_icon) {
|
if (!execp->backend->has_icon) {
|
||||||
execp->backend->text = strdup(execp->backend->buf_output);
|
execp->backend->text = strdup(execp->backend->buf_stdout);
|
||||||
} else {
|
} else {
|
||||||
char *text = strchr(execp->backend->buf_output, '\n');
|
char *text = strchr(execp->backend->buf_stdout, '\n');
|
||||||
if (text) {
|
if (text) {
|
||||||
*text = '\0';
|
*text = '\0';
|
||||||
text++;
|
text++;
|
||||||
@@ -755,23 +855,23 @@ gboolean read_execp(void *obj)
|
|||||||
} else {
|
} else {
|
||||||
execp->backend->text = strdup("");
|
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')
|
if (len > 0 && execp->backend->text[len - 1] == '\n')
|
||||||
execp->backend->text[len - 1] = '\0';
|
execp->backend->text[len - 1] = '\0';
|
||||||
|
|
||||||
if (end) {
|
if (end) {
|
||||||
char *next = end + 1;
|
char *next = end + 1;
|
||||||
int copied = next - execp->backend->buf_output;
|
ssize_t copied = next - execp->backend->buf_stdout;
|
||||||
int remaining = execp->backend->buf_length - copied;
|
ssize_t remaining = execp->backend->buf_stdout_length - copied;
|
||||||
if (remaining > 0) {
|
if (remaining > 0) {
|
||||||
memmove(execp->backend->buf_output, next, remaining);
|
memmove(execp->backend->buf_stdout, next, (size_t)remaining);
|
||||||
execp->backend->buf_length = remaining;
|
execp->backend->buf_stdout_length = remaining;
|
||||||
execp->backend->buf_output[execp->backend->buf_length] = '\0';
|
execp->backend->buf_stdout[execp->backend->buf_stdout_length] = '\0';
|
||||||
} else {
|
} else {
|
||||||
execp->backend->buf_length = 0;
|
execp->backend->buf_stdout_length = 0;
|
||||||
execp->backend->buf_output[execp->backend->buf_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)
|
char *execp_get_tooltip(void *obj)
|
||||||
{
|
{
|
||||||
Execp *execp = obj;
|
Execp *execp = (Execp *)obj;
|
||||||
|
|
||||||
if (execp->backend->tooltip) {
|
if (execp->backend->tooltip) {
|
||||||
if (strlen(execp->backend->tooltip) > 0)
|
if (strlen(execp->backend->tooltip) > 0)
|
||||||
@@ -820,7 +920,7 @@ char *execp_get_tooltip(void *obj)
|
|||||||
char tmp_buf1[256];
|
char tmp_buf1[256];
|
||||||
char tmp_buf2[256];
|
char tmp_buf2[256];
|
||||||
char tmp_buf3[256];
|
char tmp_buf3[256];
|
||||||
if (execp->backend->child_pipe < 0) {
|
if (execp->backend->child_pipe_stdout < 0) {
|
||||||
// Not executing command
|
// Not executing command
|
||||||
if (execp->backend->last_update_finish_time) {
|
if (execp->backend->last_update_finish_time) {
|
||||||
// We updated at least once
|
// We updated at least once
|
||||||
@@ -858,3 +958,30 @@ char *execp_get_tooltip(void *obj)
|
|||||||
}
|
}
|
||||||
return strdup(execp->backend->tooltip_text);
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ typedef struct ExecpBackend {
|
|||||||
gboolean cache_icon;
|
gboolean cache_icon;
|
||||||
int icon_w;
|
int icon_w;
|
||||||
int icon_h;
|
int icon_h;
|
||||||
|
gboolean has_user_tooltip;
|
||||||
char *tooltip;
|
char *tooltip;
|
||||||
gboolean centered;
|
gboolean centered;
|
||||||
gboolean has_font;
|
gboolean has_font;
|
||||||
@@ -46,20 +47,24 @@ typedef struct ExecpBackend {
|
|||||||
|
|
||||||
// Backend state:
|
// Backend state:
|
||||||
timeout *timer;
|
timeout *timer;
|
||||||
int child_pipe;
|
int child_pipe_stdout;
|
||||||
|
int child_pipe_stderr;
|
||||||
pid_t child;
|
pid_t child;
|
||||||
|
|
||||||
// Command output buffer
|
// Command output buffer
|
||||||
char *buf_output;
|
char *buf_stdout;
|
||||||
int buf_length;
|
ssize_t buf_stdout_length;
|
||||||
int buf_capacity;
|
ssize_t buf_stdout_capacity;
|
||||||
|
char *buf_stderr;
|
||||||
|
ssize_t buf_stderr_length;
|
||||||
|
ssize_t buf_stderr_capacity;
|
||||||
|
|
||||||
// Text extracted from the output buffer
|
// Text extracted from the output buffer
|
||||||
char *text;
|
char *text;
|
||||||
// Icon path extracted from the output buffer
|
// Icon path extracted from the output buffer
|
||||||
char *icon_path;
|
char *icon_path;
|
||||||
Imlib_Image icon;
|
Imlib_Image icon;
|
||||||
char tooltip_text[512];
|
gchar tooltip_text[512];
|
||||||
|
|
||||||
// The time the last command was started
|
// The time the last command was started
|
||||||
time_t last_update_start_time;
|
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.
|
// Returns 1 if the output has been updated and a redraw is needed.
|
||||||
gboolean read_execp(void *obj);
|
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();
|
void execp_default_font_changed();
|
||||||
|
|
||||||
#endif // EXECPLUGIN_H
|
#endif // EXECPLUGIN_H
|
||||||
|
|||||||
@@ -415,13 +415,13 @@ void free_icon(Imlib_Image icon)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void launcher_action(LauncherIcon *icon, XEvent *evt)
|
void launcher_action(LauncherIcon *icon, XEvent *evt, int x, int y)
|
||||||
{
|
{
|
||||||
launcher_reload_icon((Launcher *)icon->area.parent, icon);
|
launcher_reload_icon((Launcher *)icon->area.parent, icon);
|
||||||
launcher_reload_hidden_icons((Launcher *)icon->area.parent);
|
launcher_reload_hidden_icons((Launcher *)icon->area.parent);
|
||||||
|
|
||||||
if (evt->type == ButtonPress || evt->type == ButtonRelease)
|
if (evt->type == ButtonPress || evt->type == ButtonRelease)
|
||||||
tint_exec(icon->cmd, icon->cwd, icon->icon_tooltip, evt->xbutton.time);
|
tint_exec(icon->cmd, icon->cwd, icon->icon_tooltip, evt->xbutton.time, &icon->area, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Populates the list_icons list from the list_apps list
|
// Populates the list_icons list from the list_apps list
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ void launcher_default_icon_theme_changed();
|
|||||||
|
|
||||||
// Populates the list_icons list
|
// Populates the list_icons list
|
||||||
void launcher_load_icons(Launcher *launcher);
|
void launcher_load_icons(Launcher *launcher);
|
||||||
void launcher_action(LauncherIcon *icon, XEvent *e);
|
void launcher_action(LauncherIcon *icon, XEvent *e, int x, int y);
|
||||||
|
|
||||||
void test_launcher_read_desktop_file();
|
void test_launcher_read_desktop_file();
|
||||||
void test_launcher_read_theme_file();
|
void test_launcher_read_theme_file();
|
||||||
|
|||||||
@@ -31,8 +31,6 @@
|
|||||||
|
|
||||||
Server server;
|
Server server;
|
||||||
|
|
||||||
gboolean primary_monitor_first = FALSE;
|
|
||||||
|
|
||||||
void server_catch_error(Display *d, XErrorEvent *ev)
|
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 *m1 = (const Monitor *)monitor1;
|
||||||
const Monitor *m2 = (const Monitor *)monitor2;
|
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) {
|
if (m1->x < m2->x) {
|
||||||
return -1;
|
return -1;
|
||||||
} else if (m1->x > m2->x) {
|
} else if (m1->x > m2->x) {
|
||||||
|
|||||||
+37
-30
@@ -158,6 +158,29 @@ Task *add_task(Window win)
|
|||||||
return (Task *)g_ptr_array_index(task_buttons, 0);
|
return (Task *)g_ptr_array_index(task_buttons, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void task_remove_icon(Task *task)
|
||||||
|
{
|
||||||
|
if (!task)
|
||||||
|
return;
|
||||||
|
for (int k = 0; k < TASK_STATE_COUNT; ++k) {
|
||||||
|
if (task->icon[k]) {
|
||||||
|
imlib_context_set_image(task->icon[k]);
|
||||||
|
imlib_free_image();
|
||||||
|
task->icon[k] = 0;
|
||||||
|
}
|
||||||
|
if (task->icon_hover[k]) {
|
||||||
|
imlib_context_set_image(task->icon_hover[k]);
|
||||||
|
imlib_free_image();
|
||||||
|
task->icon_hover[k] = 0;
|
||||||
|
}
|
||||||
|
if (task->icon_press[k]) {
|
||||||
|
imlib_context_set_image(task->icon_press[k]);
|
||||||
|
imlib_free_image();
|
||||||
|
task->icon_press[k] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void remove_task(Task *task)
|
void remove_task(Task *task)
|
||||||
{
|
{
|
||||||
if (!task)
|
if (!task)
|
||||||
@@ -178,23 +201,7 @@ void remove_task(Task *task)
|
|||||||
// printf("remove_task %s %d\n", task->title, task->desktop);
|
// printf("remove_task %s %d\n", task->title, task->desktop);
|
||||||
if (task->title)
|
if (task->title)
|
||||||
free(task->title);
|
free(task->title);
|
||||||
for (int k = 0; k < TASK_STATE_COUNT; ++k) {
|
task_remove_icon(task);
|
||||||
if (task->icon[k]) {
|
|
||||||
imlib_context_set_image(task->icon[k]);
|
|
||||||
imlib_free_image();
|
|
||||||
task->icon[k] = 0;
|
|
||||||
}
|
|
||||||
if (task->icon_hover[k]) {
|
|
||||||
imlib_context_set_image(task->icon_hover[k]);
|
|
||||||
imlib_free_image();
|
|
||||||
task->icon_hover[k] = 0;
|
|
||||||
}
|
|
||||||
if (task->icon_press[k]) {
|
|
||||||
imlib_context_set_image(task->icon_press[k]);
|
|
||||||
imlib_free_image();
|
|
||||||
task->icon_press[k] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
GPtrArray *task_buttons = g_hash_table_lookup(win_to_task, &win);
|
GPtrArray *task_buttons = g_hash_table_lookup(win_to_task, &win);
|
||||||
for (int i = 0; i < task_buttons->len; ++i) {
|
for (int i = 0; i < task_buttons->len; ++i) {
|
||||||
@@ -265,25 +272,19 @@ void task_update_icon(Task *task)
|
|||||||
if (!panel->g_task.has_icon)
|
if (!panel->g_task.has_icon)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (int k = 0; k < TASK_STATE_COUNT; ++k) {
|
task_remove_icon(task);
|
||||||
if (task->icon[k]) {
|
|
||||||
imlib_context_set_image(task->icon[k]);
|
|
||||||
imlib_free_image();
|
|
||||||
task->icon[k] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Imlib_Image img = NULL;
|
Imlib_Image img = NULL;
|
||||||
|
|
||||||
if (!img) {
|
if (!img) {
|
||||||
int i;
|
int len;
|
||||||
gulong *data = server_get_property(task->win, server.atom._NET_WM_ICON, XA_CARDINAL, &i);
|
gulong *data = server_get_property(task->win, server.atom._NET_WM_ICON, XA_CARDINAL, &len);
|
||||||
if (data) {
|
if (data) {
|
||||||
|
if (len > 0) {
|
||||||
// get ARGB icon
|
// get ARGB icon
|
||||||
int w, h;
|
int w, h;
|
||||||
gulong *tmp_data;
|
gulong *tmp_data = get_best_icon(data, get_icon_count(data, len), len, &w, &h, panel->g_task.icon_size1);
|
||||||
|
if (tmp_data) {
|
||||||
tmp_data = get_best_icon(data, get_icon_count(data, i), i, &w, &h, panel->g_task.icon_size1);
|
|
||||||
DATA32 icon_data[w * h];
|
DATA32 icon_data[w * h];
|
||||||
for (int j = 0; j < w * h; ++j)
|
for (int j = 0; j < w * h; ++j)
|
||||||
icon_data[j] = tmp_data[j];
|
icon_data[j] = tmp_data[j];
|
||||||
@@ -295,6 +296,8 @@ void task_update_icon(Task *task)
|
|||||||
w,
|
w,
|
||||||
h,
|
h,
|
||||||
task->title ? task->title : "task");
|
task->title ? task->title : "task");
|
||||||
|
}
|
||||||
|
}
|
||||||
XFree(data);
|
XFree(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -621,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);
|
GPtrArray *task_buttons = get_task_buttons(task->win);
|
||||||
if (task_buttons) {
|
if (task_buttons) {
|
||||||
for (int i = 0; i < task_buttons->len; ++i) {
|
for (int i = 0; i < task_buttons->len; ++i) {
|
||||||
@@ -645,6 +648,10 @@ void set_task_state(Task *task, TaskState state)
|
|||||||
hide = TRUE;
|
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 &&
|
if (get_window_monitor(task->win) != ((Panel *)task->area.panel)->monitor &&
|
||||||
(hide_task_diff_monitor || num_panels > 1)) {
|
(hide_task_diff_monitor || num_panels > 1)) {
|
||||||
hide = TRUE;
|
hide = TRUE;
|
||||||
|
|||||||
+15
-3
@@ -39,6 +39,7 @@ Task *active_task;
|
|||||||
Task *task_drag;
|
Task *task_drag;
|
||||||
gboolean taskbar_enabled;
|
gboolean taskbar_enabled;
|
||||||
gboolean taskbar_distribute_size;
|
gboolean taskbar_distribute_size;
|
||||||
|
gboolean hide_task_diff_desktop;
|
||||||
gboolean hide_inactive_tasks;
|
gboolean hide_inactive_tasks;
|
||||||
gboolean hide_task_diff_monitor;
|
gboolean hide_task_diff_monitor;
|
||||||
gboolean hide_taskbar_if_empty;
|
gboolean hide_taskbar_if_empty;
|
||||||
@@ -74,6 +75,7 @@ void default_taskbar()
|
|||||||
urgent_list = NULL;
|
urgent_list = NULL;
|
||||||
taskbar_enabled = FALSE;
|
taskbar_enabled = FALSE;
|
||||||
taskbar_distribute_size = FALSE;
|
taskbar_distribute_size = FALSE;
|
||||||
|
hide_task_diff_desktop = FALSE;
|
||||||
hide_inactive_tasks = FALSE;
|
hide_inactive_tasks = FALSE;
|
||||||
hide_task_diff_monitor = FALSE;
|
hide_task_diff_monitor = FALSE;
|
||||||
hide_taskbar_if_empty = 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)
|
if ((panel->g_task.config_background_mask & (1 << TASK_URGENT)) == 0)
|
||||||
panel->g_task.background[TASK_URGENT] = panel->g_task.background[TASK_ACTIVE];
|
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;
|
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;
|
panel->g_task.maximum_height = server.monitors[panel->monitor].height;
|
||||||
|
|
||||||
if (panel_horizontal) {
|
if (panel_horizontal) {
|
||||||
@@ -288,7 +290,8 @@ void init_taskbar_panel(void *p)
|
|||||||
FALSE);
|
FALSE);
|
||||||
|
|
||||||
panel->g_task.text_posx = left_bg_border_width(panel->g_task.background[0]) + panel->g_task.area.paddingxlr;
|
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) {
|
if (panel->g_task.has_icon) {
|
||||||
panel->g_task.icon_size1 = MIN(MIN(panel->g_task.maximum_width, panel->g_task.maximum_height),
|
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)) -
|
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)
|
for (; l; l = l->next)
|
||||||
schedule_redraw((Area *)l->data);
|
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();
|
schedule_panel_redraw();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ typedef struct GlobalTaskbar {
|
|||||||
|
|
||||||
extern gboolean taskbar_enabled;
|
extern gboolean taskbar_enabled;
|
||||||
extern gboolean taskbar_distribute_size;
|
extern gboolean taskbar_distribute_size;
|
||||||
|
extern gboolean hide_task_diff_desktop;
|
||||||
extern gboolean hide_inactive_tasks;
|
extern gboolean hide_inactive_tasks;
|
||||||
extern gboolean hide_task_diff_monitor;
|
extern gboolean hide_task_diff_monitor;
|
||||||
extern gboolean hide_taskbar_if_empty;
|
extern gboolean hide_taskbar_if_empty;
|
||||||
|
|||||||
+26
-13
@@ -463,6 +463,7 @@ void init(int argc, char *argv[])
|
|||||||
|
|
||||||
struct sigaction sa = {.sa_handler = signal_handler, .sa_flags = SA_RESTART};
|
struct sigaction sa = {.sa_handler = signal_handler, .sa_flags = SA_RESTART};
|
||||||
sigaction(SIGUSR1, &sa, 0);
|
sigaction(SIGUSR1, &sa, 0);
|
||||||
|
sigaction(SIGUSR2, &sa, 0);
|
||||||
sigaction(SIGINT, &sa, 0);
|
sigaction(SIGINT, &sa, 0);
|
||||||
sigaction(SIGTERM, &sa, 0);
|
sigaction(SIGTERM, &sa, 0);
|
||||||
sigaction(SIGHUP, &sa, 0);
|
sigaction(SIGHUP, &sa, 0);
|
||||||
@@ -575,9 +576,6 @@ void init_X11_pre_config()
|
|||||||
|
|
||||||
void init_X11_post_config()
|
void init_X11_post_config()
|
||||||
{
|
{
|
||||||
if (primary_monitor_first)
|
|
||||||
sort_monitors();
|
|
||||||
|
|
||||||
server_init_visual();
|
server_init_visual();
|
||||||
|
|
||||||
gboolean need_sigchld = FALSE;
|
gboolean need_sigchld = FALSE;
|
||||||
@@ -652,6 +650,7 @@ void cleanup()
|
|||||||
|
|
||||||
cleanup_server();
|
cleanup_server();
|
||||||
cleanup_timeout();
|
cleanup_timeout();
|
||||||
|
|
||||||
if (server.display)
|
if (server.display)
|
||||||
XCloseDisplay(server.display);
|
XCloseDisplay(server.display);
|
||||||
server.display = NULL;
|
server.display = NULL;
|
||||||
@@ -915,6 +914,8 @@ void event_button_motion_notify(XEvent *e)
|
|||||||
task_drag->desktop = event_taskbar->desktop;
|
task_drag->desktop = event_taskbar->desktop;
|
||||||
|
|
||||||
change_window_desktop(task_drag->win, 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) {
|
if (taskbar_sort_method != TASKBAR_NOSORT) {
|
||||||
sort_tasks(event_taskbar);
|
sort_tasks(event_taskbar);
|
||||||
@@ -967,8 +968,9 @@ void event_button_release(XEvent *e)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (click_clock(panel, e->xbutton.x, e->xbutton.y)) {
|
Clock *clock = click_clock(panel, e->xbutton.x, e->xbutton.y);
|
||||||
clock_action(e->xbutton.button, e->xbutton.time);
|
if (clock) {
|
||||||
|
clock_action(clock, e->xbutton.button, e->xbutton.x - clock->area.posx, e->xbutton.y - clock->area.posy, e->xbutton.time);
|
||||||
if (panel_layer == BOTTOM_LAYER)
|
if (panel_layer == BOTTOM_LAYER)
|
||||||
XLowerWindow(server.display, panel->main_win);
|
XLowerWindow(server.display, panel->main_win);
|
||||||
task_drag = 0;
|
task_drag = 0;
|
||||||
@@ -976,8 +978,9 @@ void event_button_release(XEvent *e)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_BATTERY
|
#ifdef ENABLE_BATTERY
|
||||||
if (click_battery(panel, e->xbutton.x, e->xbutton.y)) {
|
Battery *battery = click_battery(panel, e->xbutton.x, e->xbutton.y);
|
||||||
battery_action(e->xbutton.button, e->xbutton.time);
|
if (battery) {
|
||||||
|
battery_action(battery, e->xbutton.button, e->xbutton.x - battery->area.posx, e->xbutton.y - battery->area.posy, e->xbutton.time);
|
||||||
if (panel_layer == BOTTOM_LAYER)
|
if (panel_layer == BOTTOM_LAYER)
|
||||||
XLowerWindow(server.display, panel->main_win);
|
XLowerWindow(server.display, panel->main_win);
|
||||||
task_drag = 0;
|
task_drag = 0;
|
||||||
@@ -1006,7 +1009,7 @@ void event_button_release(XEvent *e)
|
|||||||
if (e->xbutton.button == 1 && click_launcher(panel, e->xbutton.x, e->xbutton.y)) {
|
if (e->xbutton.button == 1 && click_launcher(panel, e->xbutton.x, e->xbutton.y)) {
|
||||||
LauncherIcon *icon = click_launcher_icon(panel, e->xbutton.x, e->xbutton.y);
|
LauncherIcon *icon = click_launcher_icon(panel, e->xbutton.x, e->xbutton.y);
|
||||||
if (icon) {
|
if (icon) {
|
||||||
launcher_action(icon, e);
|
launcher_action(icon, e, e->xbutton.x - icon->area.posx, e->xbutton.y - icon->area.posy);
|
||||||
}
|
}
|
||||||
task_drag = 0;
|
task_drag = 0;
|
||||||
return;
|
return;
|
||||||
@@ -1829,7 +1832,12 @@ start:
|
|||||||
}
|
}
|
||||||
for (GList *l = panel_config.execp_list; l; l = l->next) {
|
for (GList *l = panel_config.execp_list; l; l = l->next) {
|
||||||
Execp *execp = (Execp *)l->data;
|
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) {
|
if (fd > 0) {
|
||||||
FD_SET(fd, &fdset);
|
FD_SET(fd, &fdset);
|
||||||
maxfd = maxfd < fd ? fd : maxfd;
|
maxfd = maxfd < fd ? fd : maxfd;
|
||||||
@@ -1858,9 +1866,8 @@ start:
|
|||||||
if (read_execp(execp)) {
|
if (read_execp(execp)) {
|
||||||
GList *l_instance;
|
GList *l_instance;
|
||||||
for (l_instance = execp->backend->instances; l_instance; l_instance = l_instance->next) {
|
for (l_instance = execp->backend->instances; l_instance; l_instance = l_instance->next) {
|
||||||
Execp *instance = l_instance->data;
|
Execp *instance = (Execp *)l_instance->data;
|
||||||
instance->area.resize_needed = TRUE;
|
execp_update_post_read(instance);
|
||||||
schedule_panel_redraw();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2131,7 +2138,7 @@ start:
|
|||||||
strcat(cmd, "\"");
|
strcat(cmd, "\"");
|
||||||
strcat(cmd, "&)");
|
strcat(cmd, "&)");
|
||||||
fprintf(stderr, "DnD %s:%d: Running command: %s\n", __FILE__, __LINE__, cmd);
|
fprintf(stderr, "DnD %s:%d: Running command: %s\n", __FILE__, __LINE__, cmd);
|
||||||
tint_exec(cmd, NULL, NULL, e.xselection.time);
|
tint_exec(cmd, NULL, NULL, e.xselection.time, NULL, 0, 0);
|
||||||
free(cmd);
|
free(cmd);
|
||||||
|
|
||||||
// Reply OK.
|
// Reply OK.
|
||||||
@@ -2174,6 +2181,12 @@ start:
|
|||||||
// restart tint2
|
// restart tint2
|
||||||
// SIGUSR1 used when : user's signal, composite manager stop/start or xrandr
|
// SIGUSR1 used when : user's signal, composite manager stop/start or xrandr
|
||||||
goto start;
|
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 {
|
} else {
|
||||||
// SIGINT, SIGTERM, SIGHUP
|
// SIGINT, SIGTERM, SIGHUP
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|||||||
+472
-467
File diff suppressed because it is too large
Load Diff
+480
-470
File diff suppressed because it is too large
Load Diff
+472
-467
File diff suppressed because it is too large
Load Diff
+472
-467
File diff suppressed because it is too large
Load Diff
+480
-468
File diff suppressed because it is too large
Load Diff
+472
-467
File diff suppressed because it is too large
Load Diff
+471
-469
File diff suppressed because it is too large
Load Diff
Executable
+17
@@ -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
|
||||||
+72
-22
@@ -31,7 +31,7 @@ GtkWidget *panel_window_name, *disable_transparency;
|
|||||||
GtkWidget *panel_mouse_effects;
|
GtkWidget *panel_mouse_effects;
|
||||||
GtkWidget *mouse_hover_icon_opacity, *mouse_hover_icon_saturation, *mouse_hover_icon_brightness;
|
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 *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;
|
GtkListStore *panel_items, *all_items;
|
||||||
GtkWidget *panel_items_view, *all_items_view;
|
GtkWidget *panel_items_view, *all_items_view;
|
||||||
@@ -44,7 +44,7 @@ GtkWidget *notebook;
|
|||||||
|
|
||||||
// taskbar
|
// taskbar
|
||||||
GtkWidget *taskbar_show_desktop, *taskbar_show_name, *taskbar_padding_x, *taskbar_padding_y, *taskbar_spacing;
|
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_padding_x, *taskbar_name_padding_y, *taskbar_name_inactive_color, *taskbar_name_active_color;
|
||||||
GtkWidget *taskbar_name_font, *taskbar_name_font_set;
|
GtkWidget *taskbar_name_font, *taskbar_name_font_set;
|
||||||
GtkWidget *taskbar_active_background, *taskbar_inactive_background;
|
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;
|
GtkWidget *clock_background;
|
||||||
|
|
||||||
// battery
|
// 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_padding_x, *battery_padding_y;
|
||||||
GtkWidget *battery_font_line1, *battery_font_line1_set, *battery_font_line2, *battery_font_line2_set,
|
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_background;
|
||||||
GtkWidget *battery_tooltip;
|
GtkWidget *battery_tooltip;
|
||||||
GtkWidget *battery_left_command, *battery_mclick_command, *battery_right_command, *battery_uwheel_command,
|
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);
|
gtk_table_attach(GTK_TABLE(table), panel_combo_monitor, col, col + 1, row, row + 1, GTK_FILL, 0, 0, 0);
|
||||||
col++;
|
col++;
|
||||||
gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_monitor), _("All"));
|
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), _("1"));
|
||||||
gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_monitor), _("2"));
|
gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_monitor), _("2"));
|
||||||
gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_monitor), _("3"));
|
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_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);
|
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++;
|
row++;
|
||||||
col = 2;
|
col = 2;
|
||||||
label = gtk_label_new(_("Length"));
|
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'."),
|
"This behavior is enabled automatically if the panel monitor is set to 'All'."),
|
||||||
NULL);
|
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;
|
col = 2;
|
||||||
row++;
|
row++;
|
||||||
label = gtk_label_new(_("Always show all desktop tasks"));
|
label = gtk_label_new(_("Always show all desktop tasks"));
|
||||||
@@ -5156,6 +5152,7 @@ void create_systemtray(GtkWidget *parent)
|
|||||||
gtk_widget_show(systray_monitor);
|
gtk_widget_show(systray_monitor);
|
||||||
gtk_table_attach(GTK_TABLE(table), systray_monitor, col, col + 1, row, row + 1, GTK_FILL, 0, 0, 0);
|
gtk_table_attach(GTK_TABLE(table), systray_monitor, col, col + 1, row, row + 1, GTK_FILL, 0, 0, 0);
|
||||||
col++;
|
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), _("1"));
|
||||||
gtk_combo_box_append_text(GTK_COMBO_BOX(systray_monitor), _("2"));
|
gtk_combo_box_append_text(GTK_COMBO_BOX(systray_monitor), _("2"));
|
||||||
gtk_combo_box_append_text(GTK_COMBO_BOX(systray_monitor), _("3"));
|
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."),
|
_("Command to be executed when the alert threshold is reached."),
|
||||||
NULL);
|
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);
|
change_paragraph(parent);
|
||||||
|
|
||||||
label = gtk_label_new(_("<b>AC connection events</b>"));
|
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."),
|
_("Specifies the font clor used to display the battery text."),
|
||||||
NULL);
|
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);
|
change_paragraph(parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ extern GtkWidget *panel_window_name, *disable_transparency;
|
|||||||
extern GtkWidget *panel_mouse_effects;
|
extern GtkWidget *panel_mouse_effects;
|
||||||
extern GtkWidget *mouse_hover_icon_opacity, *mouse_hover_icon_saturation, *mouse_hover_icon_brightness;
|
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 *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 };
|
enum { itemsColName = 0, itemsColValue, itemsNumCols };
|
||||||
extern GtkListStore *panel_items, *all_items;
|
extern GtkListStore *panel_items, *all_items;
|
||||||
@@ -49,7 +49,7 @@ extern GtkWidget *panel_background;
|
|||||||
|
|
||||||
// taskbar
|
// taskbar
|
||||||
extern GtkWidget *taskbar_show_desktop, *taskbar_show_name, *taskbar_padding_x, *taskbar_padding_y, *taskbar_spacing;
|
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,
|
extern GtkWidget *taskbar_name_padding_x, *taskbar_name_padding_y, *taskbar_name_inactive_color,
|
||||||
*taskbar_name_active_color;
|
*taskbar_name_active_color;
|
||||||
extern GtkWidget *taskbar_name_font, *taskbar_name_font_set;
|
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;
|
extern GtkWidget *clock_background;
|
||||||
|
|
||||||
// battery
|
// 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_padding_x, *battery_padding_y;
|
||||||
extern GtkWidget *battery_font_line1, *battery_font_line1_set, *battery_font_line2, *battery_font_line2_set,
|
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_background;
|
||||||
extern GtkWidget *battery_tooltip;
|
extern GtkWidget *battery_tooltip;
|
||||||
extern GtkWidget *battery_left_command, *battery_mclick_command, *battery_right_command, *battery_uwheel_command,
|
extern GtkWidget *battery_left_command, *battery_mclick_command, *battery_right_command, *battery_uwheel_command,
|
||||||
|
|||||||
@@ -326,17 +326,15 @@ void config_write_panel(FILE *fp)
|
|||||||
fprintf(fp, "\n");
|
fprintf(fp, "\n");
|
||||||
|
|
||||||
fprintf(fp, "panel_monitor = ");
|
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");
|
fprintf(fp, "all");
|
||||||
|
} else if (gtk_combo_box_get_active(GTK_COMBO_BOX(panel_combo_monitor)) == 1) {
|
||||||
|
fprintf(fp, "primary");
|
||||||
} else {
|
} 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, "\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, "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);
|
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,
|
fprintf(fp,
|
||||||
"taskbar_hide_different_monitor = %d\n",
|
"taskbar_hide_different_monitor = %d\n",
|
||||||
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(taskbar_hide_diff_monitor)) ? 1 : 0);
|
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,
|
fprintf(fp,
|
||||||
"taskbar_always_show_all_desktop_tasks = %d\n",
|
"taskbar_always_show_all_desktop_tasks = %d\n",
|
||||||
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(taskbar_always_show_all_desktop_tasks)) ? 1 : 0);
|
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)));
|
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(systray_icon_brightness)));
|
||||||
|
|
||||||
fprintf(fp, "systray_monitor = ");
|
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, "\n");
|
||||||
|
|
||||||
fprintf(fp, "systray_name_filter = %s\n", gtk_entry_get_text(GTK_ENTRY(systray_name_filter)));
|
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_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_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_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)))
|
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)));
|
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)))
|
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",
|
"battery_font_color",
|
||||||
color,
|
color,
|
||||||
gtk_color_button_get_alpha(GTK_COLOR_BUTTON(battery_font_color)) * 100 / 0xffff);
|
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,
|
fprintf(fp,
|
||||||
"battery_padding = %d %d\n",
|
"battery_padding = %d %d\n",
|
||||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(battery_padding_x)),
|
(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) {
|
} else if (strcmp(key, "panel_monitor") == 0) {
|
||||||
if (strcmp(value, "all") == 0)
|
if (strcmp(value, "all") == 0)
|
||||||
gtk_combo_box_set_active(GTK_COMBO_BOX(panel_combo_monitor), 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);
|
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);
|
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);
|
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);
|
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);
|
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);
|
gtk_combo_box_set_active(GTK_COMBO_BOX(panel_combo_monitor), 6);
|
||||||
} else if (strcmp(key, "primary_monitor_first") == 0) {
|
else if (strcmp(value, "6") == 0)
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(panel_primary_monitor_first), atoi(value));
|
gtk_combo_box_set_active(GTK_COMBO_BOX(panel_combo_monitor), 7);
|
||||||
} else if (strcmp(key, "panel_shrink") == 0) {
|
} else if (strcmp(key, "panel_shrink") == 0) {
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(panel_shrink), atoi(value));
|
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));
|
gtk_spin_button_set_value(GTK_SPIN_BUTTON(battery_alert_if_lower), atof(value));
|
||||||
} else if (strcmp(key, "battery_low_cmd") == 0) {
|
} else if (strcmp(key, "battery_low_cmd") == 0) {
|
||||||
gtk_entry_set_text(GTK_ENTRY(battery_alert_cmd), value);
|
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) {
|
} else if (strcmp(key, "bat1_font") == 0) {
|
||||||
gtk_font_button_set_font_name(GTK_FONT_BUTTON(battery_font_line1), value);
|
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);
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(battery_font_line1_set), TRUE);
|
||||||
} else if (strcmp(key, "bat2_font") == 0) {
|
} else if (strcmp(key, "bat2_font") == 0) {
|
||||||
gtk_font_button_set_font_name(GTK_FONT_BUTTON(battery_font_line2), value);
|
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);
|
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) {
|
} else if (strcmp(key, "battery_font_color") == 0) {
|
||||||
extract_values(value, &value1, &value2, &value3);
|
extract_values(value, &value1, &value2, &value3);
|
||||||
GdkColor col;
|
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));
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(taskbar_hide_inactive_tasks), atoi(value));
|
||||||
} else if (strcmp(key, "taskbar_hide_different_monitor") == 0) {
|
} else if (strcmp(key, "taskbar_hide_different_monitor") == 0) {
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(taskbar_hide_diff_monitor), atoi(value));
|
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) {
|
} 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));
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(taskbar_always_show_all_desktop_tasks), atoi(value));
|
||||||
} else if (strcmp(key, "taskbar_name_padding") == 0) {
|
} 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) {
|
} else if (strcmp(key, "systray_icon_size") == 0) {
|
||||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(systray_icon_size), atoi(value));
|
gtk_spin_button_set_value(GTK_SPIN_BUTTON(systray_icon_size), atoi(value));
|
||||||
} else if (strcmp(key, "systray_monitor") == 0) {
|
} 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);
|
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);
|
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);
|
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);
|
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);
|
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);
|
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) {
|
} else if (strcmp(key, "systray_icon_asb") == 0) {
|
||||||
extract_values(value, &value1, &value2, &value3);
|
extract_values(value, &value1, &value2, &value3);
|
||||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(systray_icon_opacity), atoi(value1));
|
gtk_spin_button_set_value(GTK_SPIN_BUTTON(systray_icon_opacity), atoi(value1));
|
||||||
|
|||||||
@@ -145,10 +145,16 @@ void theme_list_append(const gchar *path)
|
|||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
gtk_list_store_append(theme_list_store, &iter);
|
gtk_list_store_append(theme_list_store, &iter);
|
||||||
|
|
||||||
gchar *name = strrchr(path, '/') + 1;
|
gchar *name, *dir;
|
||||||
|
|
||||||
gchar *dir = g_strdup(path);
|
if (strchr(path, '/')) {
|
||||||
|
name = strrchr(path, '/') + 1;
|
||||||
|
dir = g_strdup(path);
|
||||||
strrchr(dir, '/')[0] = 0;
|
strrchr(dir, '/')[0] = 0;
|
||||||
|
} else {
|
||||||
|
name = (gchar*)path;
|
||||||
|
dir = g_strdup(".");
|
||||||
|
}
|
||||||
char *suffix = contract_tilde(dir);
|
char *suffix = contract_tilde(dir);
|
||||||
g_free(dir);
|
g_free(dir);
|
||||||
|
|
||||||
|
|||||||
+174
@@ -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)
|
Area *compute_element_area(Area *area, Element element)
|
||||||
{
|
{
|
||||||
if (element == ELEMENT_SELF)
|
if (element == ELEMENT_SELF)
|
||||||
|
|||||||
@@ -263,6 +263,39 @@ int relayout_with_constraint(Area *a, int maximum_size);
|
|||||||
int compute_desired_size(Area *a);
|
int compute_desired_size(Area *a);
|
||||||
int container_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 left_border_width(Area *a);
|
||||||
int right_border_width(Area *a);
|
int right_border_width(Area *a);
|
||||||
int left_right_border_width(Area *a);
|
int left_right_border_width(Area *a);
|
||||||
|
|||||||
+131
-23
@@ -103,22 +103,108 @@ gboolean parse_line(const char *line, char **key, char **value)
|
|||||||
|
|
||||||
extern char *config_path;
|
extern char *config_path;
|
||||||
|
|
||||||
void tint_exec(const char *command, const char *dir, const char *tooltip, Time time)
|
int setenvd(const char *name, const int value)
|
||||||
|
{
|
||||||
|
char buf[256];
|
||||||
|
sprintf(buf, "%d", value);
|
||||||
|
return setenv(name, buf, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifndef TINT2CONF
|
||||||
|
pid_t tint_exec(const char *command, const char *dir, const char *tooltip, Time time, Area *area, int x, int y)
|
||||||
{
|
{
|
||||||
if (!command || strlen(command) == 0)
|
if (!command || strlen(command) == 0)
|
||||||
return;
|
return -1;
|
||||||
|
|
||||||
|
if (area) {
|
||||||
|
Panel *panel = (Panel *)area->panel;
|
||||||
|
|
||||||
|
int aligned_x, aligned_y, aligned_x1, aligned_y1, aligned_x2, aligned_y2;
|
||||||
|
int panel_x1, panel_x2, panel_y1, panel_y2;
|
||||||
|
if (panel_horizontal) {
|
||||||
|
if (area_is_first(area))
|
||||||
|
aligned_x1 = panel->posx;
|
||||||
|
else
|
||||||
|
aligned_x1 = panel->posx + area->posx;
|
||||||
|
|
||||||
|
if (area_is_last(area))
|
||||||
|
aligned_x2 = panel->posx + panel->area.width;
|
||||||
|
else
|
||||||
|
aligned_x2 = panel->posx + area->posx + area->width;
|
||||||
|
|
||||||
|
if (area_is_first(area))
|
||||||
|
aligned_x = aligned_x1;
|
||||||
|
else if (area_is_last(area))
|
||||||
|
aligned_x = aligned_x2;
|
||||||
|
else
|
||||||
|
aligned_x = aligned_x1;
|
||||||
|
|
||||||
|
if (panel_position & BOTTOM)
|
||||||
|
aligned_y = panel->posy;
|
||||||
|
else
|
||||||
|
aligned_y = panel->posy + panel->area.height;
|
||||||
|
|
||||||
|
aligned_y1 = aligned_y2 = aligned_y;
|
||||||
|
|
||||||
|
panel_x1 = panel->posx;
|
||||||
|
panel_x2 = panel->posx + panel->area.width;
|
||||||
|
panel_y1 = panel_y2 = aligned_y;
|
||||||
|
} else {
|
||||||
|
if (area_is_first(area))
|
||||||
|
aligned_y1 = panel->posy;
|
||||||
|
else
|
||||||
|
aligned_y1 = panel->posy + area->posy;
|
||||||
|
|
||||||
|
if (area_is_last(area))
|
||||||
|
aligned_y2 = panel->posy + panel->area.height;
|
||||||
|
else
|
||||||
|
aligned_y2 = panel->posy + area->posy + area->height;
|
||||||
|
|
||||||
|
if (area_is_first(area))
|
||||||
|
aligned_y = aligned_y1;
|
||||||
|
else if (area_is_last(area))
|
||||||
|
aligned_y = aligned_y2;
|
||||||
|
else
|
||||||
|
aligned_y = aligned_y1;
|
||||||
|
|
||||||
|
if (panel_position & RIGHT)
|
||||||
|
aligned_x = panel->posx;
|
||||||
|
else
|
||||||
|
aligned_x = panel->posx + panel->area.width;
|
||||||
|
|
||||||
|
aligned_x1 = aligned_x2 = aligned_x;
|
||||||
|
|
||||||
|
panel_x1 = panel_x2 = aligned_x;
|
||||||
|
panel_y1 = panel->posy;
|
||||||
|
panel_y2 = panel->posy + panel->area.height;
|
||||||
|
}
|
||||||
|
|
||||||
|
setenv("TINT2_CONFIG", config_path, 1);
|
||||||
|
setenvd("TINT2_BUTTON_X", x);
|
||||||
|
setenvd("TINT2_BUTTON_Y", y);
|
||||||
|
setenvd("TINT2_BUTTON_W", area->width);
|
||||||
|
setenvd("TINT2_BUTTON_H", area->height);
|
||||||
|
setenvd("TINT2_BUTTON_ALIGNED_X", aligned_x);
|
||||||
|
setenvd("TINT2_BUTTON_ALIGNED_Y", aligned_y);
|
||||||
|
setenvd("TINT2_BUTTON_ALIGNED_X1", aligned_x1);
|
||||||
|
setenvd("TINT2_BUTTON_ALIGNED_Y1", aligned_y1);
|
||||||
|
setenvd("TINT2_BUTTON_ALIGNED_X2", aligned_x2);
|
||||||
|
setenvd("TINT2_BUTTON_ALIGNED_Y2", aligned_y2);
|
||||||
|
setenvd("TINT2_BUTTON_PANEL_X1", panel_x1);
|
||||||
|
setenvd("TINT2_BUTTON_PANEL_Y1", panel_y1);
|
||||||
|
setenvd("TINT2_BUTTON_PANEL_X2", panel_x2);
|
||||||
|
setenvd("TINT2_BUTTON_PANEL_Y2", panel_y2);
|
||||||
|
} else {
|
||||||
|
setenv("TINT2_CONFIG", config_path, 1);
|
||||||
|
}
|
||||||
|
|
||||||
command = g_strdup_printf("export TINT2_CONFIG=%s;"
|
|
||||||
"%s",
|
|
||||||
config_path,
|
|
||||||
command);
|
|
||||||
if (!command)
|
if (!command)
|
||||||
return;
|
return -1;
|
||||||
|
|
||||||
if (!tooltip)
|
if (!tooltip)
|
||||||
tooltip = command;
|
tooltip = command;
|
||||||
|
|
||||||
#if HAVE_SN && !defined TINT2CONF
|
#if HAVE_SN
|
||||||
SnLauncherContext *ctx = 0;
|
SnLauncherContext *ctx = 0;
|
||||||
if (startup_notifications && time) {
|
if (startup_notifications && time) {
|
||||||
ctx = sn_launcher_context_new(server.sn_display, server.screen);
|
ctx = sn_launcher_context_new(server.sn_display, server.screen);
|
||||||
@@ -134,7 +220,7 @@ void tint_exec(const char *command, const char *dir, const char *tooltip, Time t
|
|||||||
fprintf(stderr, "Could not fork\n");
|
fprintf(stderr, "Could not fork\n");
|
||||||
} else if (pid == 0) {
|
} else if (pid == 0) {
|
||||||
// Child process
|
// Child process
|
||||||
#if HAVE_SN && !defined TINT2CONF
|
#if HAVE_SN
|
||||||
if (startup_notifications && time) {
|
if (startup_notifications && time) {
|
||||||
sn_launcher_context_setup_child_process(ctx);
|
sn_launcher_context_setup_child_process(ctx);
|
||||||
}
|
}
|
||||||
@@ -146,7 +232,7 @@ void tint_exec(const char *command, const char *dir, const char *tooltip, Time t
|
|||||||
chdir(dir);
|
chdir(dir);
|
||||||
execl("/bin/sh", "/bin/sh", "-c", command, NULL);
|
execl("/bin/sh", "/bin/sh", "-c", command, NULL);
|
||||||
fprintf(stderr, "Failed to execlp %s\n", command);
|
fprintf(stderr, "Failed to execlp %s\n", command);
|
||||||
#if HAVE_SN && !defined TINT2CONF
|
#if HAVE_SN
|
||||||
if (startup_notifications && time) {
|
if (startup_notifications && time) {
|
||||||
sn_launcher_context_unref(ctx);
|
sn_launcher_context_unref(ctx);
|
||||||
}
|
}
|
||||||
@@ -154,18 +240,37 @@ void tint_exec(const char *command, const char *dir, const char *tooltip, Time t
|
|||||||
_exit(1);
|
_exit(1);
|
||||||
} else {
|
} else {
|
||||||
// Parent process
|
// Parent process
|
||||||
#if HAVE_SN && !defined TINT2CONF
|
#if HAVE_SN
|
||||||
if (startup_notifications && time) {
|
if (startup_notifications && time) {
|
||||||
g_tree_insert(server.pids, GINT_TO_POINTER(pid), ctx);
|
g_tree_insert(server.pids, GINT_TO_POINTER(pid), ctx);
|
||||||
}
|
}
|
||||||
#endif // HAVE_SN
|
#endif // HAVE_SN
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsetenv("TINT2_CONFIG");
|
||||||
|
unsetenv("TINT2_BUTTON_X");
|
||||||
|
unsetenv("TINT2_BUTTON_Y");
|
||||||
|
unsetenv("TINT2_BUTTON_W");
|
||||||
|
unsetenv("TINT2_BUTTON_H");
|
||||||
|
unsetenv("TINT2_BUTTON_ALIGNED_X");
|
||||||
|
unsetenv("TINT2_BUTTON_ALIGNED_Y");
|
||||||
|
unsetenv("TINT2_BUTTON_ALIGNED_X1");
|
||||||
|
unsetenv("TINT2_BUTTON_ALIGNED_Y1");
|
||||||
|
unsetenv("TINT2_BUTTON_ALIGNED_X2");
|
||||||
|
unsetenv("TINT2_BUTTON_ALIGNED_Y2");
|
||||||
|
unsetenv("TINT2_BUTTON_PANEL_X1");
|
||||||
|
unsetenv("TINT2_BUTTON_PANEL_Y1");
|
||||||
|
unsetenv("TINT2_BUTTON_PANEL_X2");
|
||||||
|
unsetenv("TINT2_BUTTON_PANEL_Y2");
|
||||||
|
|
||||||
|
return pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
void tint_exec_no_sn(const char *command)
|
void tint_exec_no_sn(const char *command)
|
||||||
{
|
{
|
||||||
tint_exec(command, NULL, NULL, 0);
|
tint_exec(command, NULL, NULL, 0, NULL, 0, 0);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
char *expand_tilde(const char *s)
|
char *expand_tilde(const char *s)
|
||||||
{
|
{
|
||||||
@@ -631,35 +736,38 @@ void clear_pixmap(Pixmap p, int x, int y, int w, int h)
|
|||||||
XRenderFreePicture(server.display, pict);
|
XRenderFreePicture(server.display, pict);
|
||||||
}
|
}
|
||||||
|
|
||||||
void get_text_size2(PangoFontDescription *font,
|
void get_text_size2(const PangoFontDescription *font,
|
||||||
int *height_ink,
|
int *height_ink,
|
||||||
int *height,
|
int *height,
|
||||||
int *width,
|
int *width,
|
||||||
int panel_height,
|
int available_height,
|
||||||
int panel_width,
|
int available_width,
|
||||||
char *text,
|
const char *text,
|
||||||
int len,
|
int text_len,
|
||||||
PangoWrapMode wrap,
|
PangoWrapMode wrap,
|
||||||
PangoEllipsizeMode ellipsis,
|
PangoEllipsizeMode ellipsis,
|
||||||
gboolean markup)
|
gboolean markup)
|
||||||
{
|
{
|
||||||
PangoRectangle rect_ink, rect;
|
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);
|
cairo_t *c = cairo_create(cs);
|
||||||
|
|
||||||
PangoLayout *layout = pango_cairo_create_layout(c);
|
PangoLayout *layout = pango_cairo_create_layout(c);
|
||||||
pango_layout_set_width(layout, panel_width * PANGO_SCALE);
|
pango_layout_set_width(layout, available_width * PANGO_SCALE);
|
||||||
pango_layout_set_height(layout, panel_height * PANGO_SCALE);
|
pango_layout_set_height(layout, available_height * PANGO_SCALE);
|
||||||
pango_layout_set_wrap(layout, wrap);
|
pango_layout_set_wrap(layout, wrap);
|
||||||
pango_layout_set_ellipsize(layout, ellipsis);
|
pango_layout_set_ellipsize(layout, ellipsis);
|
||||||
pango_layout_set_font_description(layout, font);
|
pango_layout_set_font_description(layout, font);
|
||||||
|
text_len = MAX(0, text_len);
|
||||||
if (!markup)
|
if (!markup)
|
||||||
pango_layout_set_text(layout, text, len);
|
pango_layout_set_text(layout, text, text_len);
|
||||||
else
|
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);
|
pango_layout_get_pixel_extents(layout, &rect_ink, &rect);
|
||||||
*height_ink = rect_ink.height;
|
*height_ink = rect_ink.height;
|
||||||
|
|||||||
+7
-6
@@ -54,8 +54,9 @@ void extract_values(const char *value, char **value1, char **value2, char **valu
|
|||||||
void extract_values_4(const char *value, char **value1, char **value2, char **value3, char **value4);
|
void extract_values_4(const char *value, char **value1, char **value2, char **value3, char **value4);
|
||||||
|
|
||||||
// Executes a command in a shell.
|
// Executes a command in a shell.
|
||||||
void tint_exec(const char *command, const char *dir, const char *tooltip, Time time);
|
pid_t tint_exec(const char *command, const char *dir, const char *tooltip, Time time, Area *area, int x, int y);
|
||||||
void tint_exec_no_sn(const char *command);
|
void tint_exec_no_sn(const char *command);
|
||||||
|
int setenvd(const char *name, const int value);
|
||||||
|
|
||||||
// Returns a copy of s in which "~" is expanded to the path to the user's home directory.
|
// Returns a copy of s in which "~" is expanded to the path to the user's home directory.
|
||||||
// The caller takes ownership of the string.
|
// The caller takes ownership of the string.
|
||||||
@@ -94,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.
|
// 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 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_ink,
|
||||||
int *height,
|
int *height,
|
||||||
int *width,
|
int *width,
|
||||||
int panel_height,
|
int available_height,
|
||||||
int panel_with,
|
int available_with,
|
||||||
char *text,
|
const char *text,
|
||||||
int len,
|
int text_len,
|
||||||
PangoWrapMode wrap,
|
PangoWrapMode wrap,
|
||||||
PangoEllipsizeMode ellipsis,
|
PangoEllipsizeMode ellipsis,
|
||||||
gboolean markup);
|
gboolean markup);
|
||||||
|
|||||||
+17
-7
@@ -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
|
// Implementation notes for timeouts
|
||||||
//
|
//
|
||||||
// The timeouts are kept in a GSList sorted by their expiration time.
|
// 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;
|
timeout *t = timeout_list->data;
|
||||||
struct timespec cur_time;
|
struct timespec cur_time;
|
||||||
struct timespec next_timeout2 = {.tv_sec = next_timeout.tv_sec, .tv_nsec = next_timeout.tv_usec * 1000};
|
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)) {
|
if (timespec_subtract(&next_timeout2, &t->timeout_expires, &cur_time)) {
|
||||||
next_timeout.tv_sec = 0;
|
next_timeout.tv_sec = 0;
|
||||||
next_timeout.tv_usec = 0;
|
next_timeout.tv_usec = 0;
|
||||||
@@ -141,7 +151,7 @@ void callback_timeout_expired()
|
|||||||
struct timespec cur_time;
|
struct timespec cur_time;
|
||||||
timeout *t;
|
timeout *t;
|
||||||
while (timeout_list) {
|
while (timeout_list) {
|
||||||
clock_gettime(CLOCK_MONOTONIC, &cur_time);
|
gettime(&cur_time);
|
||||||
t = timeout_list->data;
|
t = timeout_list->data;
|
||||||
if (compare_timespecs(&t->timeout_expires, &cur_time) <= 0) {
|
if (compare_timespecs(&t->timeout_expires, &cur_time) <= 0) {
|
||||||
// it's time for the callback function
|
// 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->_callback = _callback;
|
||||||
t->arg = arg;
|
t->arg = arg;
|
||||||
struct timespec cur_time;
|
struct timespec cur_time;
|
||||||
clock_gettime(CLOCK_MONOTONIC, &cur_time);
|
gettime(&cur_time);
|
||||||
t->timeout_expires = add_msec_to_timespec(cur_time, value_msec);
|
t->timeout_expires = add_msec_to_timespec(cur_time, value_msec);
|
||||||
|
|
||||||
int can_align = 0;
|
int can_align = 0;
|
||||||
@@ -343,7 +353,7 @@ void update_multi_timeout_values(multi_timeout_handler *mth)
|
|||||||
int next_timeout_msec = interval;
|
int next_timeout_msec = interval;
|
||||||
|
|
||||||
struct timespec cur_time;
|
struct timespec cur_time;
|
||||||
clock_gettime(CLOCK_MONOTONIC, &cur_time);
|
gettime(&cur_time);
|
||||||
|
|
||||||
GSList *it = mth->timeout_list;
|
GSList *it = mth->timeout_list;
|
||||||
struct timespec diff_time;
|
struct timespec diff_time;
|
||||||
@@ -368,7 +378,7 @@ void callback_multi_timeout(void *arg)
|
|||||||
{
|
{
|
||||||
multi_timeout_handler *mth = arg;
|
multi_timeout_handler *mth = arg;
|
||||||
struct timespec cur_time;
|
struct timespec cur_time;
|
||||||
clock_gettime(CLOCK_MONOTONIC, &cur_time);
|
gettime(&cur_time);
|
||||||
GSList *it = mth->timeout_list;
|
GSList *it = mth->timeout_list;
|
||||||
while (it) {
|
while (it) {
|
||||||
timeout *t = it->data;
|
timeout *t = it->data;
|
||||||
@@ -407,7 +417,7 @@ void remove_from_multi_timeout(timeout *t)
|
|||||||
free(mth);
|
free(mth);
|
||||||
|
|
||||||
struct timespec cur_time, diff_time;
|
struct timespec cur_time, diff_time;
|
||||||
clock_gettime(CLOCK_MONOTONIC, &cur_time);
|
gettime(&cur_time);
|
||||||
timespec_subtract(&diff_time, &t->timeout_expires, &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;
|
int msec_to_expiration = diff_time.tv_sec * 1000 + diff_time.tv_nsec / 1000000;
|
||||||
add_timeout_intern(msec_to_expiration,
|
add_timeout_intern(msec_to_expiration,
|
||||||
@@ -438,7 +448,7 @@ double profiling_get_time_old_time = 0;
|
|||||||
double get_time()
|
double get_time()
|
||||||
{
|
{
|
||||||
struct timespec cur_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;
|
return cur_time.tv_sec + cur_time.tv_nsec * 1.0e-9;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -277,6 +277,9 @@ int get_icon_count(gulong *data, int num)
|
|||||||
|
|
||||||
gulong *get_best_icon(gulong *data, int icon_count, int num, int *iw, int *ih, int best_icon_size)
|
gulong *get_best_icon(gulong *data, int icon_count, int num, int *iw, int *ih, int best_icon_size)
|
||||||
{
|
{
|
||||||
|
if (icon_count < 1 || num < 1)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
int width[icon_count], height[icon_count], pos, i, w, h;
|
int width[icon_count], height[icon_count], pos, i, w, h;
|
||||||
gulong *icon_data[icon_count];
|
gulong *icon_data[icon_count];
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
@@ -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
|
||||||
|
|
||||||
@@ -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
|
|
||||||
@@ -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
|
|
||||||
@@ -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
|
|
||||||
@@ -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
|
|
||||||
@@ -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
|
|
||||||
@@ -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
|
|
||||||
@@ -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
|
|
||||||
@@ -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
|
|
||||||
@@ -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
|
|
||||||
@@ -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
|
|
||||||
@@ -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
|
|
||||||
@@ -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
|
|
||||||
@@ -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
|
|
||||||
@@ -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
|
|
||||||
@@ -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
|
|
||||||
@@ -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
|
|
||||||
Reference in New Issue
Block a user