Compare commits
55 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6cde7bef1e | ||
|
|
b9ab0ae58e | ||
|
|
2c90c5640e | ||
|
|
cb43e76660 | ||
|
|
0fc22b5cd6 | ||
|
|
a2c5553f4f | ||
|
|
63dd4a3e6c | ||
|
|
a7fc86cfbb | ||
|
|
d72aa2edfb | ||
|
|
54d361cf42 | ||
|
|
153de1aa45 | ||
|
|
fc883a5dd8 | ||
|
|
dfd735956c | ||
|
|
a77b728110 | ||
|
|
5cfffd7c8e | ||
|
|
a73c6928c3 | ||
|
|
d5dfda296f | ||
|
|
89d57f893c | ||
|
|
46371fe816 | ||
|
|
bfe4873204 | ||
|
|
acd1ed5768 | ||
|
|
b6a4fe03df | ||
|
|
b25ad07c30 | ||
|
|
ffcd53e989 | ||
|
|
4e22e0f4e7 | ||
|
|
d6a40c7523 | ||
|
|
4ee2f4e7de | ||
|
|
1567e56a09 | ||
|
|
639ccbf16c | ||
|
|
4d12abdb42 | ||
|
|
23109b8beb | ||
|
|
9882603188 | ||
|
|
aee90e5b99 | ||
|
|
5aa907feeb | ||
|
|
98c5dac781 | ||
|
|
5fab41887a | ||
|
|
c5f6e64a83 | ||
|
|
d758fd167c | ||
|
|
0f96cb66f1 | ||
|
|
3baa3d38a3 | ||
|
|
cc74af00ba | ||
|
|
4a5f0a7d83 | ||
|
|
468bc16b0f | ||
|
|
e6a472e6b7 | ||
|
|
be710ff488 | ||
|
|
aa40473481 | ||
|
|
4170b5d878 | ||
|
|
3c9642c5fc | ||
|
|
e833b27533 | ||
|
|
d17b2d8015 | ||
|
|
93c9830c23 | ||
|
|
51211fa626 | ||
|
|
1fc417e24e | ||
|
|
5e9791079d | ||
|
|
4c103423ba |
1
AUTHORS
1
AUTHORS
@@ -28,6 +28,7 @@ Contributors:
|
|||||||
Justin Jacobs : tint2conf fixes
|
Justin Jacobs : tint2conf fixes
|
||||||
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
|
||||||
|
|
||||||
Translations:
|
Translations:
|
||||||
Bosnian:
|
Bosnian:
|
||||||
|
|||||||
@@ -82,7 +82,13 @@ if( NOT IMLIB_BUILD_WITH_X )
|
|||||||
message( FATAL_ERROR "Imlib is not built with X support" )
|
message( FATAL_ERROR "Imlib is not built with X support" )
|
||||||
endif( NOT IMLIB_BUILD_WITH_X )
|
endif( NOT IMLIB_BUILD_WITH_X )
|
||||||
|
|
||||||
add_definitions( -D_GNU_SOURCE )
|
|
||||||
|
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
|
add_definitions( -D_POSIX_C_SOURCE=200809L -D_BSD_SOURCE -D_DEFAULT_SOURCE )
|
||||||
|
else(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
|
add_definitions( -D_WITH_GETLINE )
|
||||||
|
endif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
|
|
||||||
|
|
||||||
include_directories( ${PROJECT_BINARY_DIR}
|
include_directories( ${PROJECT_BINARY_DIR}
|
||||||
src
|
src
|
||||||
@@ -94,6 +100,7 @@ include_directories( ${PROJECT_BINARY_DIR}
|
|||||||
src/tooltip
|
src/tooltip
|
||||||
src/util
|
src/util
|
||||||
src/execplugin
|
src/execplugin
|
||||||
|
src/button
|
||||||
src/freespace
|
src/freespace
|
||||||
src/separator
|
src/separator
|
||||||
${X11_INCLUDE_DIRS}
|
${X11_INCLUDE_DIRS}
|
||||||
@@ -122,8 +129,10 @@ set( SOURCES src/config.c
|
|||||||
src/taskbar/taskbarname.c
|
src/taskbar/taskbarname.c
|
||||||
src/tooltip/tooltip.c
|
src/tooltip/tooltip.c
|
||||||
src/execplugin/execplugin.c
|
src/execplugin/execplugin.c
|
||||||
|
src/button/button.c
|
||||||
src/freespace/freespace.c
|
src/freespace/freespace.c
|
||||||
src/separator/separator.c
|
src/separator/separator.c
|
||||||
|
src/tint2rc.c
|
||||||
src/util/area.c
|
src/util/area.c
|
||||||
src/util/common.c
|
src/util/common.c
|
||||||
src/util/strnatcmp.c
|
src/util/strnatcmp.c
|
||||||
@@ -242,7 +251,7 @@ endif( RT_LIBRARY )
|
|||||||
target_link_libraries( tint2 m )
|
target_link_libraries( tint2 m )
|
||||||
|
|
||||||
add_dependencies( tint2 version )
|
add_dependencies( tint2 version )
|
||||||
set_target_properties( tint2 PROPERTIES COMPILE_FLAGS "-Wall -Wpointer-arith -fno-strict-aliasing -pthread -std=c99 ${ASAN_C_FLAGS}" )
|
set_target_properties( tint2 PROPERTIES COMPILE_FLAGS "-Wall -Wpointer-arith -fno-strict-aliasing -pthread -std=c11 ${ASAN_C_FLAGS}" )
|
||||||
set_target_properties( tint2 PROPERTIES LINK_FLAGS "-pthread -fno-strict-aliasing ${ASAN_L_FLAGS} ${BACKTRACE_L_FLAGS}" )
|
set_target_properties( tint2 PROPERTIES LINK_FLAGS "-pthread -fno-strict-aliasing ${ASAN_L_FLAGS} ${BACKTRACE_L_FLAGS}" )
|
||||||
|
|
||||||
install( TARGETS tint2 DESTINATION bin )
|
install( TARGETS tint2 DESTINATION bin )
|
||||||
|
|||||||
26
ChangeLog
26
ChangeLog
@@ -1,3 +1,29 @@
|
|||||||
|
2017-03-26 0.14.1
|
||||||
|
- Fixes:
|
||||||
|
- Fixed tint2conf problem under FreeBSD (or generally any system using clang).
|
||||||
|
|
||||||
|
2017-03-26 0.14
|
||||||
|
- Enhancements:
|
||||||
|
- New plugin: button.
|
||||||
|
|
||||||
|
2017-03-25 0.13.3
|
||||||
|
- Fixes:
|
||||||
|
- Fixed autohide for non-bottom panels (issue #632)
|
||||||
|
- Translations updated (contributed by Vladimir)
|
||||||
|
|
||||||
|
2017-03-19 0.13.2
|
||||||
|
- Fixes:
|
||||||
|
- Fixed compilation under FreeBSD
|
||||||
|
|
||||||
|
2017-03-12 0.13.1
|
||||||
|
- Fixes:
|
||||||
|
- Fixed compilation with new glibc (issue #625)
|
||||||
|
- Fixed regression in distributing size between taskbars (issue #628)
|
||||||
|
- Create ~/.config dir if it does not exist (issue #629)
|
||||||
|
- Enhancements:
|
||||||
|
- New config option systray_name_filter to hide hide specific apps from the system tray (contributed by Matthew Otnel)
|
||||||
|
- Tint2conf: minor improvements
|
||||||
|
|
||||||
2017-03-04 0.13
|
2017-03-04 0.13
|
||||||
- Fixes:
|
- Fixes:
|
||||||
- Ignore monitors with size 0, fixing crash (issue #618)
|
- Ignore monitors with size 0, fixing crash (issue #618)
|
||||||
|
|||||||
13
README.md
13
README.md
@@ -1,5 +1,5 @@
|
|||||||
# Latest stable release: 0.13
|
# Latest stable release: 0.14.1
|
||||||
Changes: https://gitlab.com/o9000/tint2/blob/0.13/ChangeLog
|
Changes: https://gitlab.com/o9000/tint2/blob/0.14.1/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.13
|
git checkout 0.14.1
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake ..
|
cmake ..
|
||||||
@@ -84,3 +84,10 @@ tint2 is a simple panel/taskbar made for modern X window managers. It was specif
|
|||||||
## Various configs:
|
## Various configs:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
## Demos
|
||||||
|
|
||||||
|
* [Compact panel, separator, color gradients](https://gitlab.com/o9000/tint2/wikis/whats-new-0.13.0.gif)
|
||||||
|
* [Executor](https://gitlab.com/o9000/tint2/wikis/whats-new-0.12.4.gif)
|
||||||
|
* [Mouse over effects](https://gitlab.com/o9000/tint2/wikis/whats-new-0.12.3.gif)
|
||||||
|
* [Distribute size between taskbars, freespace](https://gitlab.com/o9000/tint2/wikis/whats-new-0.12.gif)
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
DEPENDENCIES:
|
|
||||||
cairo (with X support), pango, glib2, libX11, libXinerama, libXrandr, libXrender, libXcomposite, libXdamage, imlib2 (with X support)
|
|
||||||
you might need -dev packages on Debian
|
|
||||||
170
doc/manual.html
170
doc/manual.html
@@ -229,6 +229,7 @@ It was specifically made for Openbox but it should also work with other window m
|
|||||||
<li><p><a href="#tooltip">Tooltip</a></p></li>
|
<li><p><a href="#tooltip">Tooltip</a></p></li>
|
||||||
<li><p><a href="#battery">Battery</a></p></li>
|
<li><p><a href="#battery">Battery</a></p></li>
|
||||||
<li><p><a href="#executor">Executor</a></p></li>
|
<li><p><a href="#executor">Executor</a></p></li>
|
||||||
|
<li><p><a href="#button">Button</a></p></li>
|
||||||
<li><p><a href="#separator">Separator</a></p></li>
|
<li><p><a href="#separator">Separator</a></p></li>
|
||||||
<li><p><a href="#example-configuration">Example configuration</a></p></li>
|
<li><p><a href="#example-configuration">Example configuration</a></p></li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -359,6 +360,7 @@ gradient_id_pressed = 2
|
|||||||
<li><code>C</code> shows the Clock</li>
|
<li><code>C</code> shows the Clock</li>
|
||||||
<li><code>F</code> adds an extensible spacer (freespace). You can specify more than one. Has no effect if <code>T</code> is also present. <em>(since 0.12)</em></li>
|
<li><code>F</code> adds an extensible spacer (freespace). You can specify more than one. Has no effect if <code>T</code> is also present. <em>(since 0.12)</em></li>
|
||||||
<li><code>E</code> adds an executor plugin. You can specify more than one. <em>(since 0.12.4)</em></li>
|
<li><code>E</code> adds an executor plugin. You can specify more than one. <em>(since 0.12.4)</em></li>
|
||||||
|
<li><code>P</code> adds a push button. You can specify more than one. <em>(since 0.14)</em></li>
|
||||||
<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>
|
||||||
@@ -474,7 +476,7 @@ panel_size = 94% 30
|
|||||||
</ul>
|
</ul>
|
||||||
<h1 id="taskbar-buttons">Taskbar buttons<a name="taskbar-buttons" href="#taskbar-buttons" class="md2man-permalink" title="permalink"></a></h1><p>The following options configure the task buttons in the taskbar:</p>
|
<h1 id="taskbar-buttons">Taskbar buttons<a name="taskbar-buttons" href="#taskbar-buttons" class="md2man-permalink" title="permalink"></a></h1><p>The following options configure the task buttons in the taskbar:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><p><code>task_icon = boolean (0 or 1)</code> : Whether to display the task icon.</p></li>
|
<li><p><code>task_icon = boolean (0 or 1)</code> : Whether to display the task icon. There is no explicit option to control the task icon size; it depends on the vertical padding set with <code>task_padding</code>.</p></li>
|
||||||
<li><p><code>task_text = boolean (0 or 1)</code> : Whether to display the task text.</p></li>
|
<li><p><code>task_text = boolean (0 or 1)</code> : Whether to display the task text.</p></li>
|
||||||
<li><p><code>task_centered = boolean (0 or 1)</code> : Whether the task text is centered.</p></li>
|
<li><p><code>task_centered = boolean (0 or 1)</code> : Whether the task text is centered.</p></li>
|
||||||
<li><p><code>task_tooltip = boolean (0 or 1)</code> : Whether to show tooltips for tasks.</p></li>
|
<li><p><code>task_tooltip = boolean (0 or 1)</code> : Whether to show tooltips for tasks.</p></li>
|
||||||
@@ -522,6 +524,7 @@ panel_size = 94% 30
|
|||||||
<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, ...)</code> : On which monitor to draw the systray. The first monitor is <code>1</code>. <em>(since 0.12)</em></p></li>
|
||||||
|
<li><p><code>systray_name_filter = string</code> : Regular expression to identify icon names to be hidden. For example, <code>^audacious$</code> will hide icons with the exact name <code>audacious</code>, while <code>aud</code> will hide any icons having <code>aud</code> in the name. <em>(since 0.13.1)</em></p></li>
|
||||||
</ul>
|
</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>
|
||||||
<ul>
|
<ul>
|
||||||
@@ -633,15 +636,15 @@ execp_cache_icon = 1
|
|||||||
execp_continuous = 2
|
execp_continuous = 2
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<h5 id="round-trip-time-to-the-gateway-refreshed-every-second">Round-trip time to the gateway, refreshed every second<a name="round-trip-time-to-the-gateway-refreshed-every-second" href="#round-trip-time-to-the-gateway-refreshed-every-second" class="md2man-permalink" title="permalink"></a></h5><pre class="highlight plaintext"><code>execp = new
|
<h5 id="round-trip-time-to-the-gateway-refreshed-every-second">Round-trip time to the gateway, refreshed every second<a name="round-trip-time-to-the-gateway-refreshed-every-second" href="#round-trip-time-to-the-gateway-refreshed-every-second" class="md2man-permalink" title="permalink"></a></h5><pre class="highlight plaintext"><code>execp = new
|
||||||
execp_command = ping -i 1 -W 1 -O -D -n $(ip route | grep default | grep via | grep -o '[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*') | awk '/no/ { print "<span foreground=\"#faa\">timeout</span>"; fflush(); }; /time=/ { gsub(/time=/, "", $8); printf "<span foreground=\"#7af\">%3.0f %s</span>\n", $8, $9; fflush(); } '
|
execp_command = ping -i 1 -c 1 -W 1 -O -D -n $(ip route | grep default | grep via | grep -o '[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*') | awk '/no/ { print "<span foreground=\"#faa\">timeout</span>"; fflush(); }; /time=/ { gsub(/time=/, "", $8); printf "<span foreground=\"#7af\">%3.0f %s</span>\n", $8, $9; fflush(); } '
|
||||||
execp_continuous = 1
|
execp_continuous = 0
|
||||||
execp_interval = 1
|
execp_interval = 1
|
||||||
execp_markup = 1
|
execp_markup = 1
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<h5 id="memory-usage">Memory usage<a name="memory-usage" href="#memory-usage" class="md2man-permalink" title="permalink"></a></h5><pre class="highlight plaintext"><code>execp = new
|
<h5 id="memory-usage">Memory usage<a name="memory-usage" href="#memory-usage" class="md2man-permalink" title="permalink"></a></h5><pre class="highlight plaintext"><code>execp = new
|
||||||
execp_command = free -s 2 | awk '/^-/ { printf "Mem: '$(free -h | awk '/^Mem:/ { print $2 }')' %.0f%\n", 100*$3/($3+$4); fflush(stdout) }'
|
execp_command = free | awk '/^-/ { printf "Mem: '$(free -h | awk '/^Mem:/ { print $2 }')' %.0f%%\n", 100*$3/($3+$4); fflush(stdout) }'
|
||||||
execp_interval = 1
|
execp_interval = 5
|
||||||
execp_continuous = 1
|
execp_continuous = 0
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<h5 id="network-load">Network load<a name="network-load" href="#network-load" class="md2man-permalink" title="permalink"></a></h5><pre class="highlight plaintext"><code># Note the use of "stdbuf -oL" to force the program to flush the output line by line.
|
<h5 id="network-load">Network load<a name="network-load" href="#network-load" class="md2man-permalink" title="permalink"></a></h5><pre class="highlight plaintext"><code># Note the use of "stdbuf -oL" to force the program to flush the output line by line.
|
||||||
execp = new
|
execp = new
|
||||||
@@ -649,6 +652,24 @@ execp_command = stdbuf -oL bwm-ng -o csv -t 1000 | awk -F ';' '/total/ { printf
|
|||||||
execp_continuous = 1
|
execp_continuous = 1
|
||||||
execp_interval = 1
|
execp_interval = 1
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
<h3 id="button">Button<a name="button" href="#button" class="md2man-permalink" title="permalink"></a></h3>
|
||||||
|
<ul>
|
||||||
|
<li><p><code>button = new</code> : Begins the configuration of a new button. Multiple such plugins are supported; just use multiple <code>P</code>s in <code>panel_items</code>. <em>(since 0.14)</em></p></li>
|
||||||
|
<li><p><code>button_icon = text</code> : Name or path of icon (or empty). <em>(since 0.14)</em></p></li>
|
||||||
|
<li><p><code>button_text = text</code> : Text to display (or empty). <em>(since 0.14)</em></p></li>
|
||||||
|
<li><p><code>button_tooltip = text</code> : The tooltip (or empty). <em>(since 0.14)</em></p></li>
|
||||||
|
<li><p><code>button_font = [FAMILY-LIST] [STYLE-OPTIONS] [SIZE]</code> : The font used to draw the text. <em>(since 0.14)</em></p></li>
|
||||||
|
<li><p><code>button_font_color = color opacity</code> : The font color. <em>(since 0.14)</em></p></li>
|
||||||
|
<li><p><code>button_background_id = integer</code> : Which background to use. <em>(since 0.14)</em></p></li>
|
||||||
|
<li><p><code>button_centered = boolean (0 or 1)</code> : Whether to center the text. <em>(since 0.14)</em></p></li>
|
||||||
|
<li><p><code>button_padding = horizontal_padding vertical_padding spacing_between_icon_and_text</code> <em>(since 0.14)</em></p></li>
|
||||||
|
<li><p><code>button_max_icon_size = integer</code> : Sets a limit to the icon size. Otherwise, the icon will expand to the edges. <em>(since 0.14)</em></p></li>
|
||||||
|
<li><p><code>button_lclick_command = text</code> : Command to execute on left click. If not defined, <code>execp_command</code> is executed immediately, unless it is currently running. <em>(since 0.14)</em></p></li>
|
||||||
|
<li><p><code>button_mclick_command = text</code> : Command to execute on right click. If not defined, <code>execp_command</code> is executed immediately, unless it is currently running. <em>(since 0.14)</em></p></li>
|
||||||
|
<li><p><code>button_rclick_command = text</code> : Command to execute on middle click. If not defined, <code>execp_command</code> is executed immediately, unless it is currently running. <em>(since 0.14)</em></p></li>
|
||||||
|
<li><p><code>button_uwheel_command = text</code> : Command to execute on wheel scroll up. If not defined, <code>execp_command</code> is executed immediately, unless it is currently running. <em>(since 0.14)</em></p></li>
|
||||||
|
<li><p><code>button_dwheel_command = text</code> : Command to execute on wheel scroll down. If not defined, <code>execp_command</code> is executed immediately, unless it is currently running. <em>(since 0.14)</em></p></li>
|
||||||
|
</ul>
|
||||||
<h3 id="separator">Separator<a name="separator" href="#separator" class="md2man-permalink" title="permalink"></a></h3>
|
<h3 id="separator">Separator<a name="separator" href="#separator" class="md2man-permalink" title="permalink"></a></h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><p><code>separator = new</code> : Begins the configuration of a new separator. Multiple such plugins are supported; just use multiple <code>:</code>s in <code>panel_items</code>. <em>(since 0.13.0)</em></p></li>
|
<li><p><code>separator = new</code> : Begins the configuration of a new separator. Multiple such plugins are supported; just use multiple <code>:</code>s in <code>panel_items</code>. <em>(since 0.13.0)</em></p></li>
|
||||||
@@ -658,142 +679,7 @@ execp_interval = 1
|
|||||||
<li><p><code>separator_size = integer</code> : The thickness of the separator. Does not include the border and padding. For example, if the style is <code>line</code>, this is the line thickness; if the style is <code>dots</code>, this is the dot's diameter. <em>(since 0.13.0)</em></p></li>
|
<li><p><code>separator_size = integer</code> : The thickness of the separator. Does not include the border and padding. For example, if the style is <code>line</code>, this is the line thickness; if the style is <code>dots</code>, this is the dot's diameter. <em>(since 0.13.0)</em></p></li>
|
||||||
<li><p><code>separator_padding = side_padding cap_padding</code> : The padding to add to the sides of the separator, in pixels. <em>(since 0.13.0)</em></p></li>
|
<li><p><code>separator_padding = side_padding cap_padding</code> : The padding to add to the sides of the separator, in pixels. <em>(since 0.13.0)</em></p></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="example-configuration">Example configuration<a name="example-configuration" href="#example-configuration" class="md2man-permalink" title="permalink"></a></h3><pre class="highlight plaintext"><code>#---------------------------------------------
|
<h3 id="example-configuration">Example configuration<a name="example-configuration" href="#example-configuration" class="md2man-permalink" title="permalink"></a></h3><p>See /etc/xdg/tint2/tint2rc.</p><h2 id="author">AUTHOR<a name="author" href="#author" class="md2man-permalink" title="permalink"></a></h2><p>tint2 was written by Thierry Lorthiois <a href="mailto:lorthiois@bbsoft.fr">lorthiois@bbsoft.fr</a>.
|
||||||
## TINT2 CONFIG FILE
|
|
||||||
#---------------------------------------------
|
|
||||||
|
|
||||||
#---------------------------------------------
|
|
||||||
## BACKGROUND AND BORDER
|
|
||||||
#---------------------------------------------
|
|
||||||
rounded = 7
|
|
||||||
border_width = 2
|
|
||||||
background_color = #000000 60
|
|
||||||
border_color = #ffffff 18
|
|
||||||
|
|
||||||
rounded = 5
|
|
||||||
border_width = 0
|
|
||||||
background_color = #ffffff 40
|
|
||||||
border_color = #ffffff 50
|
|
||||||
|
|
||||||
rounded = 5
|
|
||||||
border_width = 0
|
|
||||||
background_color = #ffffff 18
|
|
||||||
border_color = #ffffff 70
|
|
||||||
|
|
||||||
#---------------------------------------------
|
|
||||||
## PANEL
|
|
||||||
#---------------------------------------------
|
|
||||||
panel_monitor = all
|
|
||||||
panel_position = bottom center
|
|
||||||
panel_size = 94% 30
|
|
||||||
panel_margin = 0 0
|
|
||||||
panel_padding = 7 0
|
|
||||||
font_shadow = 0
|
|
||||||
panel_background_id = 1
|
|
||||||
wm_menu = 0
|
|
||||||
panel_dock = 0
|
|
||||||
panel_layer = bottom
|
|
||||||
|
|
||||||
#---------------------------------------------
|
|
||||||
## TASKBAR
|
|
||||||
#---------------------------------------------
|
|
||||||
#taskbar_mode = multi_desktop
|
|
||||||
taskbar_mode = single_desktop
|
|
||||||
taskbar_padding = 2 3 2
|
|
||||||
taskbar_background_id = 0
|
|
||||||
#taskbar_active_background_id = 0
|
|
||||||
|
|
||||||
#---------------------------------------------
|
|
||||||
## TASKS
|
|
||||||
#---------------------------------------------
|
|
||||||
task_icon = 1
|
|
||||||
task_text = 1
|
|
||||||
task_maximum_size = 140 35
|
|
||||||
task_centered = 1
|
|
||||||
task_padding = 6 3
|
|
||||||
task_font = sans 7
|
|
||||||
task_font_color = #ffffff 70
|
|
||||||
task_background_id = 3
|
|
||||||
task_icon_asb = 100 0 0
|
|
||||||
## replace STATUS by 'urgent', 'active' or 'iconfied'
|
|
||||||
#task_STATUS_background_id = 2
|
|
||||||
#task_STATUS_font_color = #ffffff 85
|
|
||||||
#task_STATUS_icon_asb = 100 0 0
|
|
||||||
## example:
|
|
||||||
task_active_background_id = 2
|
|
||||||
task_active_font_color = #ffffff 85
|
|
||||||
task_active_icon_asb = 100 0 0
|
|
||||||
urgent_nb_of_blink = 8
|
|
||||||
|
|
||||||
#---------------------------------------------
|
|
||||||
## SYSTRAYBAR
|
|
||||||
#---------------------------------------------
|
|
||||||
systray = 1
|
|
||||||
systray_padding = 0 4 5
|
|
||||||
systray_background_id = 0
|
|
||||||
systray_sort = left2right
|
|
||||||
systray_icon_size = 0
|
|
||||||
systray_icon_asb = 100 0 0
|
|
||||||
|
|
||||||
#---------------------------------------------
|
|
||||||
## CLOCK
|
|
||||||
#---------------------------------------------
|
|
||||||
time1_format = %H:%M
|
|
||||||
time1_font = sans 8
|
|
||||||
time2_format = %A %d %B
|
|
||||||
time2_font = sans 6
|
|
||||||
clock_font_color = #ffffff 76
|
|
||||||
clock_padding = 1 0
|
|
||||||
clock_background_id = 0
|
|
||||||
#clock_lclick_command = xclock
|
|
||||||
clock_rclick_command = orage
|
|
||||||
#clock_tooltip = %A %d %B
|
|
||||||
#time1_timezone = :US/Hawaii
|
|
||||||
#time2_timezone = :Europe/Berlin
|
|
||||||
#clock_tooltip_timezone = :/usr/share/zoneinfo/Europe/Paris
|
|
||||||
|
|
||||||
#---------------------------------------------
|
|
||||||
## BATTERY
|
|
||||||
#---------------------------------------------
|
|
||||||
battery = 0
|
|
||||||
battery_hide = 98
|
|
||||||
battery_low_status = 10
|
|
||||||
battery_low_cmd = notify-send "battery low"
|
|
||||||
bat1_font = sans 8
|
|
||||||
bat2_font = sans 6
|
|
||||||
battery_font_color = #ffffff 76
|
|
||||||
battery_padding = 1 0
|
|
||||||
battery_background_id = 0
|
|
||||||
|
|
||||||
#---------------------------------------------
|
|
||||||
## TOOLTIP
|
|
||||||
#---------------------------------------------
|
|
||||||
tooltip = 0
|
|
||||||
tooltip_padding = 2 2
|
|
||||||
tooltip_show_timeout = 0.7
|
|
||||||
tooltip_hide_timeout = 0.3
|
|
||||||
tooltip_background_id = 1
|
|
||||||
tooltip_font_color = #OOOOOO 80
|
|
||||||
tooltip_font = sans 10
|
|
||||||
|
|
||||||
#---------------------------------------------
|
|
||||||
## MOUSE ACTION ON TASK
|
|
||||||
#---------------------------------------------
|
|
||||||
mouse_middle = none
|
|
||||||
mouse_right = close
|
|
||||||
mouse_scroll_up = toggle
|
|
||||||
mouse_scroll_down = iconify
|
|
||||||
|
|
||||||
#---------------------------------------------
|
|
||||||
## AUTOHIDE OPTIONS
|
|
||||||
#---------------------------------------------
|
|
||||||
autohide = 0
|
|
||||||
autohide_show_timeout = 0.3
|
|
||||||
autohide_hide_timeout = 2
|
|
||||||
autohide_height = 4
|
|
||||||
strut_policy = minimum
|
|
||||||
</code></pre>
|
|
||||||
<h2 id="author">AUTHOR<a name="author" href="#author" class="md2man-permalink" title="permalink"></a></h2><p>tint2 was written by Thierry Lorthiois <a href="mailto:lorthiois@bbsoft.fr">lorthiois@bbsoft.fr</a>.
|
|
||||||
It is based on ttm, originally written by Pål Staurland <a href="mailto:staura@gmail.com">staura@gmail.com</a>.</p><p>This manual page was originally written by Daniel Moerner <a href="mailto:dmoerner@gmail.com">dmoerner@gmail.com</a>, for the Debian project (but may be used by others).
|
It is based on ttm, originally written by Pål Staurland <a href="mailto:staura@gmail.com">staura@gmail.com</a>.</p><p>This manual page was originally written by Daniel Moerner <a href="mailto:dmoerner@gmail.com">dmoerner@gmail.com</a>, for the Debian project (but may be used by others).
|
||||||
It was adopted from the tint2 docs.</p><h2 id="see-also">SEE ALSO<a name="see-also" href="#see-also" class="md2man-permalink" title="permalink"></a></h2><p>The main website <a href="https://gitlab.com/o9000/tint2">https://gitlab.com/o9000/tint2</a>
|
It was adopted from the tint2 docs.</p><h2 id="see-also">SEE ALSO<a name="see-also" href="#see-also" class="md2man-permalink" title="permalink"></a></h2><p>The main website <a href="https://gitlab.com/o9000/tint2">https://gitlab.com/o9000/tint2</a>
|
||||||
and the wiki page at <a href="https://gitlab.com/o9000/tint2/wikis/home">https://gitlab.com/o9000/tint2/wikis/home</a>.</p><p>This documentation is also provided in HTML and Markdown format in the system's default location
|
and the wiki page at <a href="https://gitlab.com/o9000/tint2/wikis/home">https://gitlab.com/o9000/tint2/wikis/home</a>.</p><p>This documentation is also provided in HTML and Markdown format in the system's default location
|
||||||
|
|||||||
@@ -199,9 +199,9 @@ pre {
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1 id="latest-stable-release-0-13"><span class="md2man-title">Latest</span> <span class="md2man-section">stable</span> <span class="md2man-date">release:</span> <span class="md2man-source">0.13</span><a name="latest-stable-release-0-13" href="#latest-stable-release-0-13" class="md2man-permalink" title="permalink"></a></h1><p>Changes: <a href="https://gitlab.com/o9000/tint2/blob/0.13/ChangeLog">https://gitlab.com/o9000/tint2/blob/0.13/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-1"><span class="md2man-title">Latest</span> <span class="md2man-section">stable</span> <span class="md2man-date">release:</span> <span class="md2man-source">0.14.1</span><a name="latest-stable-release-0-14-1" href="#latest-stable-release-0-14-1" class="md2man-permalink" title="permalink"></a></h1><p>Changes: <a href="https://gitlab.com/o9000/tint2/blob/0.14.1/ChangeLog">https://gitlab.com/o9000/tint2/blob/0.14.1/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.13
|
git checkout 0.14.1
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake ..
|
cmake ..
|
||||||
@@ -254,6 +254,12 @@ make -j4
|
|||||||
<li>Downloads: <a href="https://gitlab.com/o9000/tint2-archive/tree/master">https://gitlab.com/o9000/tint2-archive/tree/master</a> or <a href="https://code.google.com/p/tint2/downloads/list">https://code.google.com/p/tint2/downloads/list</a></li>
|
<li>Downloads: <a href="https://gitlab.com/o9000/tint2-archive/tree/master">https://gitlab.com/o9000/tint2-archive/tree/master</a> or <a href="https://code.google.com/p/tint2/downloads/list">https://code.google.com/p/tint2/downloads/list</a></li>
|
||||||
<li>Old project location (inactive): <a href="https://code.google.com/p/tint2">https://code.google.com/p/tint2</a></li>
|
<li>Old project location (inactive): <a href="https://code.google.com/p/tint2">https://code.google.com/p/tint2</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h1 id="screenshots">Screenshots<a name="screenshots" href="#screenshots" class="md2man-permalink" title="permalink"></a></h1><h2 id="default-config">Default config:<a name="default-config" href="#default-config" class="md2man-permalink" title="permalink"></a></h2><p><img src="https://gitlab.com/o9000/tint2/uploads/948fa74eca60864352a033580350b4c3/Screenshot_2016-01-23_14-42-57.png" alt="Screenshot_2016-01-23_14-42-57"></p><h2 id="various-configs">Various configs:<a name="various-configs" href="#various-configs" class="md2man-permalink" title="permalink"></a></h2><p><img src="https://gitlab.com/o9000/tint2/wikis/screenshot.png" alt="screenshot"></p>
|
<h1 id="screenshots">Screenshots<a name="screenshots" href="#screenshots" class="md2man-permalink" title="permalink"></a></h1><h2 id="default-config">Default config:<a name="default-config" href="#default-config" class="md2man-permalink" title="permalink"></a></h2><p><img src="https://gitlab.com/o9000/tint2/uploads/948fa74eca60864352a033580350b4c3/Screenshot_2016-01-23_14-42-57.png" alt="Screenshot_2016-01-23_14-42-57"></p><h2 id="various-configs">Various configs:<a name="various-configs" href="#various-configs" class="md2man-permalink" title="permalink"></a></h2><p><img src="https://gitlab.com/o9000/tint2/wikis/screenshot.png" alt="screenshot"></p><h2 id="demos">Demos<a name="demos" href="#demos" class="md2man-permalink" title="permalink"></a></h2>
|
||||||
|
<ul>
|
||||||
|
<li><a href="https://gitlab.com/o9000/tint2/wikis/whats-new-0.13.0.gif">Compact panel, separator, color gradients</a></li>
|
||||||
|
<li><a href="https://gitlab.com/o9000/tint2/wikis/whats-new-0.12.4.gif">Executor</a></li>
|
||||||
|
<li><a href="https://gitlab.com/o9000/tint2/wikis/whats-new-0.12.3.gif">Mouse over effects</a></li>
|
||||||
|
<li><a href="https://gitlab.com/o9000/tint2/wikis/whats-new-0.12.gif">Distribute size between taskbars, freespace</a></li>
|
||||||
|
</ul>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
192
doc/tint2.1
192
doc/tint2.1
@@ -1,4 +1,4 @@
|
|||||||
.TH TINT2 1 "2017\-03\-04"
|
.TH TINT2 1 "2017\-03\-26" 0.14.1
|
||||||
.SH NAME
|
.SH NAME
|
||||||
.PP
|
.PP
|
||||||
tint2 \- lightweight panel/taskbar
|
tint2 \- lightweight panel/taskbar
|
||||||
@@ -67,6 +67,8 @@ Battery \[la]#battery\[ra]
|
|||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
Executor \[la]#executor\[ra]
|
Executor \[la]#executor\[ra]
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
|
Button \[la]#button\[ra]
|
||||||
|
.IP \(bu 2
|
||||||
Separator \[la]#separator\[ra]
|
Separator \[la]#separator\[ra]
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
Example configuration \[la]#example-configuration\[ra]
|
Example configuration \[la]#example-configuration\[ra]
|
||||||
@@ -294,6 +296,8 @@ gradient_id_pressed = 2
|
|||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fB\fCE\fR adds an executor plugin. You can specify more than one. \fI(since 0.12.4)\fP
|
\fB\fCE\fR adds an executor plugin. You can specify more than one. \fI(since 0.12.4)\fP
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
|
\fB\fCP\fR adds a push button. You can specify more than one. \fI(since 0.14)\fP
|
||||||
|
.IP \(bu 2
|
||||||
\fB\fC:\fR adds a separator. You can specify more than one. \fI(since 0.13.0)\fP
|
\fB\fC:\fR adds a separator. You can specify more than one. \fI(since 0.13.0)\fP
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
@@ -488,7 +492,7 @@ You can switch between virtual desktops.
|
|||||||
The following options configure the task buttons in the taskbar:
|
The following options configure the task buttons in the taskbar:
|
||||||
.RS
|
.RS
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fB\fCtask_icon = boolean (0 or 1)\fR : Whether to display the task icon.
|
\fB\fCtask_icon = boolean (0 or 1)\fR : Whether to display the task icon. There is no explicit option to control the task icon size; it depends on the vertical padding set with \fB\fCtask_padding\fR\&.
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fB\fCtask_text = boolean (0 or 1)\fR : Whether to display the task text.
|
\fB\fCtask_text = boolean (0 or 1)\fR : Whether to display the task text.
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
@@ -569,6 +573,8 @@ The action semantics:
|
|||||||
\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, ...)\fR : On which monitor to draw the systray. The first monitor is \fB\fC1\fR\&. \fI(since 0.12)\fP
|
||||||
|
.IP \(bu 2
|
||||||
|
\fB\fCsystray_name_filter = string\fR : Regular expression to identify icon names to be hidden. For example, \fB\fC^audacious$\fR will hide icons with the exact name \fB\fCaudacious\fR, while \fB\fCaud\fR will hide any icons having \fB\fCaud\fR in the name. \fI(since 0.13.1)\fP
|
||||||
.RE
|
.RE
|
||||||
.SS Clock
|
.SS Clock
|
||||||
.RS
|
.RS
|
||||||
@@ -771,8 +777,8 @@ execp_continuous = 2
|
|||||||
.RS
|
.RS
|
||||||
.nf
|
.nf
|
||||||
execp = new
|
execp = new
|
||||||
execp_command = ping \-i 1 \-W 1 \-O \-D \-n $(ip route | grep default | grep via | grep \-o '[0\-9]*\\.[0\-9]*\\.[0\-9]*\\.[0\-9]*') | awk '/no/ { print "<span foreground=\\"#faa\\">timeout</span>"; fflush(); }; /time=/ { gsub(/time=/, "", $8); printf "<span foreground=\\"#7af\\">%3.0f %s</span>\\n", $8, $9; fflush(); } '
|
execp_command = ping \-i 1 \-c 1 \-W 1 \-O \-D \-n $(ip route | grep default | grep via | grep \-o '[0\-9]*\\.[0\-9]*\\.[0\-9]*\\.[0\-9]*') | awk '/no/ { print "<span foreground=\\"#faa\\">timeout</span>"; fflush(); }; /time=/ { gsub(/time=/, "", $8); printf "<span foreground=\\"#7af\\">%3.0f %s</span>\\n", $8, $9; fflush(); } '
|
||||||
execp_continuous = 1
|
execp_continuous = 0
|
||||||
execp_interval = 1
|
execp_interval = 1
|
||||||
execp_markup = 1
|
execp_markup = 1
|
||||||
.fi
|
.fi
|
||||||
@@ -782,9 +788,9 @@ execp_markup = 1
|
|||||||
.RS
|
.RS
|
||||||
.nf
|
.nf
|
||||||
execp = new
|
execp = new
|
||||||
execp_command = free \-s 2 | awk '/^\-/ { printf "Mem: '$(free \-h | awk '/^Mem:/ { print $2 }')' %.0f%\\n", 100*$3/($3+$4); fflush(stdout) }'
|
execp_command = free | awk '/^\-/ { printf "Mem: '$(free \-h | awk '/^Mem:/ { print $2 }')' %.0f%%\\n", 100*$3/($3+$4); fflush(stdout) }'
|
||||||
execp_interval = 1
|
execp_interval = 5
|
||||||
execp_continuous = 1
|
execp_continuous = 0
|
||||||
.fi
|
.fi
|
||||||
.RE
|
.RE
|
||||||
.SS Network load
|
.SS Network load
|
||||||
@@ -798,6 +804,39 @@ execp_continuous = 1
|
|||||||
execp_interval = 1
|
execp_interval = 1
|
||||||
.fi
|
.fi
|
||||||
.RE
|
.RE
|
||||||
|
.SS Button
|
||||||
|
.RS
|
||||||
|
.IP \(bu 2
|
||||||
|
\fB\fCbutton = new\fR : Begins the configuration of a new button. Multiple such plugins are supported; just use multiple \fB\fCP\fRs in \fB\fCpanel_items\fR\&. \fI(since 0.14)\fP
|
||||||
|
.IP \(bu 2
|
||||||
|
\fB\fCbutton_icon = text\fR : Name or path of icon (or empty). \fI(since 0.14)\fP
|
||||||
|
.IP \(bu 2
|
||||||
|
\fB\fCbutton_text = text\fR : Text to display (or empty). \fI(since 0.14)\fP
|
||||||
|
.IP \(bu 2
|
||||||
|
\fB\fCbutton_tooltip = text\fR : The tooltip (or empty). \fI(since 0.14)\fP
|
||||||
|
.IP \(bu 2
|
||||||
|
\fB\fCbutton_font = [FAMILY\-LIST] [STYLE\-OPTIONS] [SIZE]\fR : The font used to draw the text. \fI(since 0.14)\fP
|
||||||
|
.IP \(bu 2
|
||||||
|
\fB\fCbutton_font_color = color opacity\fR : The font color. \fI(since 0.14)\fP
|
||||||
|
.IP \(bu 2
|
||||||
|
\fB\fCbutton_background_id = integer\fR : Which background to use. \fI(since 0.14)\fP
|
||||||
|
.IP \(bu 2
|
||||||
|
\fB\fCbutton_centered = boolean (0 or 1)\fR : Whether to center the text. \fI(since 0.14)\fP
|
||||||
|
.IP \(bu 2
|
||||||
|
\fB\fCbutton_padding = horizontal_padding vertical_padding spacing_between_icon_and_text\fR \fI(since 0.14)\fP
|
||||||
|
.IP \(bu 2
|
||||||
|
\fB\fCbutton_max_icon_size = integer\fR : Sets a limit to the icon size. Otherwise, the icon will expand to the edges. \fI(since 0.14)\fP
|
||||||
|
.IP \(bu 2
|
||||||
|
\fB\fCbutton_lclick_command = text\fR : Command to execute on left click. If not defined, \fB\fCexecp_command\fR is executed immediately, unless it is currently running. \fI(since 0.14)\fP
|
||||||
|
.IP \(bu 2
|
||||||
|
\fB\fCbutton_mclick_command = text\fR : Command to execute on right click. If not defined, \fB\fCexecp_command\fR is executed immediately, unless it is currently running. \fI(since 0.14)\fP
|
||||||
|
.IP \(bu 2
|
||||||
|
\fB\fCbutton_rclick_command = text\fR : Command to execute on middle click. If not defined, \fB\fCexecp_command\fR is executed immediately, unless it is currently running. \fI(since 0.14)\fP
|
||||||
|
.IP \(bu 2
|
||||||
|
\fB\fCbutton_uwheel_command = text\fR : Command to execute on wheel scroll up. If not defined, \fB\fCexecp_command\fR is executed immediately, unless it is currently running. \fI(since 0.14)\fP
|
||||||
|
.IP \(bu 2
|
||||||
|
\fB\fCbutton_dwheel_command = text\fR : Command to execute on wheel scroll down. If not defined, \fB\fCexecp_command\fR is executed immediately, unless it is currently running. \fI(since 0.14)\fP
|
||||||
|
.RE
|
||||||
.SS Separator
|
.SS Separator
|
||||||
.RS
|
.RS
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
@@ -815,144 +854,7 @@ execp_interval = 1
|
|||||||
.RE
|
.RE
|
||||||
.SS Example configuration
|
.SS Example configuration
|
||||||
.PP
|
.PP
|
||||||
.RS
|
See /etc/xdg/tint2/tint2rc.
|
||||||
.nf
|
|
||||||
#\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
|
|
||||||
## TINT2 CONFIG FILE
|
|
||||||
#\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
|
|
||||||
|
|
||||||
#\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
|
|
||||||
## BACKGROUND AND BORDER
|
|
||||||
#\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
|
|
||||||
rounded = 7
|
|
||||||
border_width = 2
|
|
||||||
background_color = #000000 60
|
|
||||||
border_color = #ffffff 18
|
|
||||||
|
|
||||||
rounded = 5
|
|
||||||
border_width = 0
|
|
||||||
background_color = #ffffff 40
|
|
||||||
border_color = #ffffff 50
|
|
||||||
|
|
||||||
rounded = 5
|
|
||||||
border_width = 0
|
|
||||||
background_color = #ffffff 18
|
|
||||||
border_color = #ffffff 70
|
|
||||||
|
|
||||||
#\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
|
|
||||||
## PANEL
|
|
||||||
#\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
|
|
||||||
panel_monitor = all
|
|
||||||
panel_position = bottom center
|
|
||||||
panel_size = 94% 30
|
|
||||||
panel_margin = 0 0
|
|
||||||
panel_padding = 7 0
|
|
||||||
font_shadow = 0
|
|
||||||
panel_background_id = 1
|
|
||||||
wm_menu = 0
|
|
||||||
panel_dock = 0
|
|
||||||
panel_layer = bottom
|
|
||||||
|
|
||||||
#\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
|
|
||||||
## TASKBAR
|
|
||||||
#\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
|
|
||||||
#taskbar_mode = multi_desktop
|
|
||||||
taskbar_mode = single_desktop
|
|
||||||
taskbar_padding = 2 3 2
|
|
||||||
taskbar_background_id = 0
|
|
||||||
#taskbar_active_background_id = 0
|
|
||||||
|
|
||||||
#\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
|
|
||||||
## TASKS
|
|
||||||
#\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
|
|
||||||
task_icon = 1
|
|
||||||
task_text = 1
|
|
||||||
task_maximum_size = 140 35
|
|
||||||
task_centered = 1
|
|
||||||
task_padding = 6 3
|
|
||||||
task_font = sans 7
|
|
||||||
task_font_color = #ffffff 70
|
|
||||||
task_background_id = 3
|
|
||||||
task_icon_asb = 100 0 0
|
|
||||||
## replace STATUS by 'urgent', 'active' or 'iconfied'
|
|
||||||
#task_STATUS_background_id = 2
|
|
||||||
#task_STATUS_font_color = #ffffff 85
|
|
||||||
#task_STATUS_icon_asb = 100 0 0
|
|
||||||
## example:
|
|
||||||
task_active_background_id = 2
|
|
||||||
task_active_font_color = #ffffff 85
|
|
||||||
task_active_icon_asb = 100 0 0
|
|
||||||
urgent_nb_of_blink = 8
|
|
||||||
|
|
||||||
#\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
|
|
||||||
## SYSTRAYBAR
|
|
||||||
#\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
|
|
||||||
systray = 1
|
|
||||||
systray_padding = 0 4 5
|
|
||||||
systray_background_id = 0
|
|
||||||
systray_sort = left2right
|
|
||||||
systray_icon_size = 0
|
|
||||||
systray_icon_asb = 100 0 0
|
|
||||||
|
|
||||||
#\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
|
|
||||||
## CLOCK
|
|
||||||
#\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
|
|
||||||
time1_format = %H:%M
|
|
||||||
time1_font = sans 8
|
|
||||||
time2_format = %A %d %B
|
|
||||||
time2_font = sans 6
|
|
||||||
clock_font_color = #ffffff 76
|
|
||||||
clock_padding = 1 0
|
|
||||||
clock_background_id = 0
|
|
||||||
#clock_lclick_command = xclock
|
|
||||||
clock_rclick_command = orage
|
|
||||||
#clock_tooltip = %A %d %B
|
|
||||||
#time1_timezone = :US/Hawaii
|
|
||||||
#time2_timezone = :Europe/Berlin
|
|
||||||
#clock_tooltip_timezone = :/usr/share/zoneinfo/Europe/Paris
|
|
||||||
|
|
||||||
#\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
|
|
||||||
## BATTERY
|
|
||||||
#\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
|
|
||||||
battery = 0
|
|
||||||
battery_hide = 98
|
|
||||||
battery_low_status = 10
|
|
||||||
battery_low_cmd = notify\-send "battery low"
|
|
||||||
bat1_font = sans 8
|
|
||||||
bat2_font = sans 6
|
|
||||||
battery_font_color = #ffffff 76
|
|
||||||
battery_padding = 1 0
|
|
||||||
battery_background_id = 0
|
|
||||||
|
|
||||||
#\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
|
|
||||||
## TOOLTIP
|
|
||||||
#\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
|
|
||||||
tooltip = 0
|
|
||||||
tooltip_padding = 2 2
|
|
||||||
tooltip_show_timeout = 0.7
|
|
||||||
tooltip_hide_timeout = 0.3
|
|
||||||
tooltip_background_id = 1
|
|
||||||
tooltip_font_color = #OOOOOO 80
|
|
||||||
tooltip_font = sans 10
|
|
||||||
|
|
||||||
#\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
|
|
||||||
## MOUSE ACTION ON TASK
|
|
||||||
#\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
|
|
||||||
mouse_middle = none
|
|
||||||
mouse_right = close
|
|
||||||
mouse_scroll_up = toggle
|
|
||||||
mouse_scroll_down = iconify
|
|
||||||
|
|
||||||
#\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
|
|
||||||
## AUTOHIDE OPTIONS
|
|
||||||
#\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
|
|
||||||
autohide = 0
|
|
||||||
autohide_show_timeout = 0.3
|
|
||||||
autohide_hide_timeout = 2
|
|
||||||
autohide_height = 4
|
|
||||||
strut_policy = minimum
|
|
||||||
.fi
|
|
||||||
.RE
|
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
.PP
|
.PP
|
||||||
tint2 was written by Thierry Lorthiois \[la]lorthiois@bbsoft.fr\[ra]\&.
|
tint2 was written by Thierry Lorthiois \[la]lorthiois@bbsoft.fr\[ra]\&.
|
||||||
|
|||||||
183
doc/tint2.md
183
doc/tint2.md
@@ -1,4 +1,4 @@
|
|||||||
# TINT2 1 "2017-03-04"
|
# TINT2 1 "2017-03-26" 0.14.1
|
||||||
|
|
||||||
## NAME
|
## NAME
|
||||||
tint2 - lightweight panel/taskbar
|
tint2 - lightweight panel/taskbar
|
||||||
@@ -58,6 +58,8 @@ Goals:
|
|||||||
|
|
||||||
* [Executor](#executor)
|
* [Executor](#executor)
|
||||||
|
|
||||||
|
* [Button](#button)
|
||||||
|
|
||||||
* [Separator](#separator)
|
* [Separator](#separator)
|
||||||
|
|
||||||
* [Example configuration](#example-configuration)
|
* [Example configuration](#example-configuration)
|
||||||
@@ -244,6 +246,7 @@ gradient_id_pressed = 2
|
|||||||
* `C` shows the Clock
|
* `C` shows the Clock
|
||||||
* `F` adds an extensible spacer (freespace). You can specify more than one. Has no effect if `T` is also present. *(since 0.12)*
|
* `F` adds an extensible spacer (freespace). You can specify more than one. Has no effect if `T` is also present. *(since 0.12)*
|
||||||
* `E` adds an executor plugin. You can specify more than one. *(since 0.12.4)*
|
* `E` adds an executor plugin. You can specify more than one. *(since 0.12.4)*
|
||||||
|
* `P` adds a push button. You can specify more than one. *(since 0.14)*
|
||||||
* `:` adds a separator. You can specify more than one. *(since 0.13.0)*
|
* `:` adds a separator. You can specify more than one. *(since 0.13.0)*
|
||||||
|
|
||||||
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).
|
||||||
@@ -389,7 +392,7 @@ panel_size = 94% 30
|
|||||||
|
|
||||||
The following options configure the task buttons in the taskbar:
|
The following options configure the task buttons in the taskbar:
|
||||||
|
|
||||||
* `task_icon = boolean (0 or 1)` : Whether to display the task icon.
|
* `task_icon = boolean (0 or 1)` : Whether to display the task icon. There is no explicit option to control the task icon size; it depends on the vertical padding set with `task_padding`.
|
||||||
|
|
||||||
* `task_text = boolean (0 or 1)` : Whether to display the task text.
|
* `task_text = boolean (0 or 1)` : Whether to display the task text.
|
||||||
|
|
||||||
@@ -463,6 +466,8 @@ The action semantics:
|
|||||||
|
|
||||||
* `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, ...)` : 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)*
|
||||||
|
|
||||||
### Clock
|
### Clock
|
||||||
|
|
||||||
* `time1_format = %H:%M` : The format used by the first line of the clock.
|
* `time1_format = %H:%M` : The format used by the first line of the clock.
|
||||||
@@ -644,8 +649,8 @@ execp_continuous = 2
|
|||||||
|
|
||||||
```
|
```
|
||||||
execp = new
|
execp = new
|
||||||
execp_command = ping -i 1 -W 1 -O -D -n $(ip route | grep default | grep via | grep -o '[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*') | awk '/no/ { print "<span foreground=\"#faa\">timeout</span>"; fflush(); }; /time=/ { gsub(/time=/, "", $8); printf "<span foreground=\"#7af\">%3.0f %s</span>\n", $8, $9; fflush(); } '
|
execp_command = ping -i 1 -c 1 -W 1 -O -D -n $(ip route | grep default | grep via | grep -o '[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*') | awk '/no/ { print "<span foreground=\"#faa\">timeout</span>"; fflush(); }; /time=/ { gsub(/time=/, "", $8); printf "<span foreground=\"#7af\">%3.0f %s</span>\n", $8, $9; fflush(); } '
|
||||||
execp_continuous = 1
|
execp_continuous = 0
|
||||||
execp_interval = 1
|
execp_interval = 1
|
||||||
execp_markup = 1
|
execp_markup = 1
|
||||||
```
|
```
|
||||||
@@ -654,9 +659,9 @@ execp_markup = 1
|
|||||||
|
|
||||||
```
|
```
|
||||||
execp = new
|
execp = new
|
||||||
execp_command = free -s 2 | awk '/^-/ { printf "Mem: '$(free -h | awk '/^Mem:/ { print $2 }')' %.0f%\n", 100*$3/($3+$4); fflush(stdout) }'
|
execp_command = free | awk '/^-/ { printf "Mem: '$(free -h | awk '/^Mem:/ { print $2 }')' %.0f%%\n", 100*$3/($3+$4); fflush(stdout) }'
|
||||||
execp_interval = 1
|
execp_interval = 5
|
||||||
execp_continuous = 1
|
execp_continuous = 0
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Network load
|
##### Network load
|
||||||
@@ -669,6 +674,33 @@ execp_continuous = 1
|
|||||||
execp_interval = 1
|
execp_interval = 1
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Button
|
||||||
|
|
||||||
|
* `button = new` : Begins the configuration of a new button. Multiple such plugins are supported; just use multiple `P`s in `panel_items`. *(since 0.14)*
|
||||||
|
|
||||||
|
* `button_icon = text` : Name or path of icon (or empty). *(since 0.14)*
|
||||||
|
|
||||||
|
* `button_text = text` : Text to display (or empty). *(since 0.14)*
|
||||||
|
|
||||||
|
* `button_tooltip = text` : The tooltip (or empty). *(since 0.14)*
|
||||||
|
|
||||||
|
* `button_font = [FAMILY-LIST] [STYLE-OPTIONS] [SIZE]` : The font used to draw the text. *(since 0.14)*
|
||||||
|
|
||||||
|
* `button_font_color = color opacity` : The font color. *(since 0.14)*
|
||||||
|
|
||||||
|
* `button_background_id = integer` : Which background to use. *(since 0.14)*
|
||||||
|
|
||||||
|
* `button_centered = boolean (0 or 1)` : Whether to center the text. *(since 0.14)*
|
||||||
|
|
||||||
|
* `button_padding = horizontal_padding vertical_padding spacing_between_icon_and_text` *(since 0.14)*
|
||||||
|
* `button_max_icon_size = integer` : Sets a limit to the icon size. Otherwise, the icon will expand to the edges. *(since 0.14)*
|
||||||
|
|
||||||
|
* `button_lclick_command = text` : Command to execute on left click. If not defined, `execp_command` is executed immediately, unless it is currently running. *(since 0.14)*
|
||||||
|
* `button_mclick_command = text` : Command to execute on right click. If not defined, `execp_command` is executed immediately, unless it is currently running. *(since 0.14)*
|
||||||
|
* `button_rclick_command = text` : Command to execute on middle click. If not defined, `execp_command` is executed immediately, unless it is currently running. *(since 0.14)*
|
||||||
|
* `button_uwheel_command = text` : Command to execute on wheel scroll up. If not defined, `execp_command` is executed immediately, unless it is currently running. *(since 0.14)*
|
||||||
|
* `button_dwheel_command = text` : Command to execute on wheel scroll down. If not defined, `execp_command` is executed immediately, unless it is currently running. *(since 0.14)*
|
||||||
|
|
||||||
### Separator
|
### Separator
|
||||||
|
|
||||||
* `separator = new` : Begins the configuration of a new separator. Multiple such plugins are supported; just use multiple `:`s in `panel_items`. *(since 0.13.0)*
|
* `separator = new` : Begins the configuration of a new separator. Multiple such plugins are supported; just use multiple `:`s in `panel_items`. *(since 0.13.0)*
|
||||||
@@ -685,142 +717,7 @@ execp_interval = 1
|
|||||||
|
|
||||||
### Example configuration
|
### Example configuration
|
||||||
|
|
||||||
```
|
See /etc/xdg/tint2/tint2rc.
|
||||||
#---------------------------------------------
|
|
||||||
## TINT2 CONFIG FILE
|
|
||||||
#---------------------------------------------
|
|
||||||
|
|
||||||
#---------------------------------------------
|
|
||||||
## BACKGROUND AND BORDER
|
|
||||||
#---------------------------------------------
|
|
||||||
rounded = 7
|
|
||||||
border_width = 2
|
|
||||||
background_color = #000000 60
|
|
||||||
border_color = #ffffff 18
|
|
||||||
|
|
||||||
rounded = 5
|
|
||||||
border_width = 0
|
|
||||||
background_color = #ffffff 40
|
|
||||||
border_color = #ffffff 50
|
|
||||||
|
|
||||||
rounded = 5
|
|
||||||
border_width = 0
|
|
||||||
background_color = #ffffff 18
|
|
||||||
border_color = #ffffff 70
|
|
||||||
|
|
||||||
#---------------------------------------------
|
|
||||||
## PANEL
|
|
||||||
#---------------------------------------------
|
|
||||||
panel_monitor = all
|
|
||||||
panel_position = bottom center
|
|
||||||
panel_size = 94% 30
|
|
||||||
panel_margin = 0 0
|
|
||||||
panel_padding = 7 0
|
|
||||||
font_shadow = 0
|
|
||||||
panel_background_id = 1
|
|
||||||
wm_menu = 0
|
|
||||||
panel_dock = 0
|
|
||||||
panel_layer = bottom
|
|
||||||
|
|
||||||
#---------------------------------------------
|
|
||||||
## TASKBAR
|
|
||||||
#---------------------------------------------
|
|
||||||
#taskbar_mode = multi_desktop
|
|
||||||
taskbar_mode = single_desktop
|
|
||||||
taskbar_padding = 2 3 2
|
|
||||||
taskbar_background_id = 0
|
|
||||||
#taskbar_active_background_id = 0
|
|
||||||
|
|
||||||
#---------------------------------------------
|
|
||||||
## TASKS
|
|
||||||
#---------------------------------------------
|
|
||||||
task_icon = 1
|
|
||||||
task_text = 1
|
|
||||||
task_maximum_size = 140 35
|
|
||||||
task_centered = 1
|
|
||||||
task_padding = 6 3
|
|
||||||
task_font = sans 7
|
|
||||||
task_font_color = #ffffff 70
|
|
||||||
task_background_id = 3
|
|
||||||
task_icon_asb = 100 0 0
|
|
||||||
## replace STATUS by 'urgent', 'active' or 'iconfied'
|
|
||||||
#task_STATUS_background_id = 2
|
|
||||||
#task_STATUS_font_color = #ffffff 85
|
|
||||||
#task_STATUS_icon_asb = 100 0 0
|
|
||||||
## example:
|
|
||||||
task_active_background_id = 2
|
|
||||||
task_active_font_color = #ffffff 85
|
|
||||||
task_active_icon_asb = 100 0 0
|
|
||||||
urgent_nb_of_blink = 8
|
|
||||||
|
|
||||||
#---------------------------------------------
|
|
||||||
## SYSTRAYBAR
|
|
||||||
#---------------------------------------------
|
|
||||||
systray = 1
|
|
||||||
systray_padding = 0 4 5
|
|
||||||
systray_background_id = 0
|
|
||||||
systray_sort = left2right
|
|
||||||
systray_icon_size = 0
|
|
||||||
systray_icon_asb = 100 0 0
|
|
||||||
|
|
||||||
#---------------------------------------------
|
|
||||||
## CLOCK
|
|
||||||
#---------------------------------------------
|
|
||||||
time1_format = %H:%M
|
|
||||||
time1_font = sans 8
|
|
||||||
time2_format = %A %d %B
|
|
||||||
time2_font = sans 6
|
|
||||||
clock_font_color = #ffffff 76
|
|
||||||
clock_padding = 1 0
|
|
||||||
clock_background_id = 0
|
|
||||||
#clock_lclick_command = xclock
|
|
||||||
clock_rclick_command = orage
|
|
||||||
#clock_tooltip = %A %d %B
|
|
||||||
#time1_timezone = :US/Hawaii
|
|
||||||
#time2_timezone = :Europe/Berlin
|
|
||||||
#clock_tooltip_timezone = :/usr/share/zoneinfo/Europe/Paris
|
|
||||||
|
|
||||||
#---------------------------------------------
|
|
||||||
## BATTERY
|
|
||||||
#---------------------------------------------
|
|
||||||
battery = 0
|
|
||||||
battery_hide = 98
|
|
||||||
battery_low_status = 10
|
|
||||||
battery_low_cmd = notify-send "battery low"
|
|
||||||
bat1_font = sans 8
|
|
||||||
bat2_font = sans 6
|
|
||||||
battery_font_color = #ffffff 76
|
|
||||||
battery_padding = 1 0
|
|
||||||
battery_background_id = 0
|
|
||||||
|
|
||||||
#---------------------------------------------
|
|
||||||
## TOOLTIP
|
|
||||||
#---------------------------------------------
|
|
||||||
tooltip = 0
|
|
||||||
tooltip_padding = 2 2
|
|
||||||
tooltip_show_timeout = 0.7
|
|
||||||
tooltip_hide_timeout = 0.3
|
|
||||||
tooltip_background_id = 1
|
|
||||||
tooltip_font_color = #OOOOOO 80
|
|
||||||
tooltip_font = sans 10
|
|
||||||
|
|
||||||
#---------------------------------------------
|
|
||||||
## MOUSE ACTION ON TASK
|
|
||||||
#---------------------------------------------
|
|
||||||
mouse_middle = none
|
|
||||||
mouse_right = close
|
|
||||||
mouse_scroll_up = toggle
|
|
||||||
mouse_scroll_down = iconify
|
|
||||||
|
|
||||||
#---------------------------------------------
|
|
||||||
## AUTOHIDE OPTIONS
|
|
||||||
#---------------------------------------------
|
|
||||||
autohide = 0
|
|
||||||
autohide_show_timeout = 0.3
|
|
||||||
autohide_hide_timeout = 2
|
|
||||||
autohide_height = 4
|
|
||||||
strut_policy = minimum
|
|
||||||
```
|
|
||||||
|
|
||||||
## AUTHOR
|
## AUTHOR
|
||||||
tint2 was written by Thierry Lorthiois <lorthiois@bbsoft.fr>.
|
tint2 was written by Thierry Lorthiois <lorthiois@bbsoft.fr>.
|
||||||
|
|||||||
@@ -1,46 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
MAJOR=0.13
|
MAJOR=0.14
|
||||||
DIRTY=""
|
DIRTY=""
|
||||||
|
|
||||||
if git status 1>/dev/null 2>/dev/null
|
VERSION=0.14
|
||||||
then
|
|
||||||
git update-index -q --ignore-submodules --refresh
|
|
||||||
# Disallow unstaged changes in the working tree
|
|
||||||
if ! git diff-files --quiet --ignore-submodules --
|
|
||||||
then
|
|
||||||
if [ "$1" = "--strict" ]
|
|
||||||
then
|
|
||||||
echo >&2 "Error: there are unstaged changes."
|
|
||||||
git diff-files --name-status -r --ignore-submodules -- >&2
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
DIRTY="-dirty"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Disallow uncommitted changes in the index
|
|
||||||
if ! git diff-index --cached --quiet HEAD --ignore-submodules --
|
|
||||||
then
|
|
||||||
if [ "$1" = "--strict" ]
|
|
||||||
then
|
|
||||||
echo >&2 "Error: there are uncommitted changes."
|
|
||||||
git diff-index --cached --name-status -r --ignore-submodules HEAD -- >&2
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
DIRTY="-dirty"
|
|
||||||
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
|
|
||||||
else
|
|
||||||
VERSION=$(head -n 1 ChangeLog | cut -d ' ' -f 2)
|
|
||||||
if [ $VERSION = "master" ]
|
|
||||||
then
|
|
||||||
VERSION=$VERSION-$(head -n 1 ChangeLog | cut -d ' ' -f 1)
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
VERSION=$(echo "$VERSION" | sed 's/^v//')
|
|
||||||
|
|
||||||
echo '#define VERSION_STRING "'$VERSION'"' > version.h
|
echo '#define VERSION_STRING "'$VERSION'"' > version.h
|
||||||
echo $VERSION
|
echo $VERSION
|
||||||
|
|||||||
@@ -2,24 +2,6 @@
|
|||||||
|
|
||||||
# Usage: ./make_release.sh
|
# Usage: ./make_release.sh
|
||||||
# Creates a tar.gz archive of the current tree.
|
# Creates a tar.gz archive of the current tree.
|
||||||
#
|
|
||||||
# To bump the version number for the current commit (make sure you are in HEAD!), run manually:
|
|
||||||
#
|
|
||||||
# git tag -a v0.12 -m 'Version 0.12'
|
|
||||||
#
|
|
||||||
# To generate a release for an older tagged commit, first list the tags with:
|
|
||||||
#
|
|
||||||
# git tag
|
|
||||||
#
|
|
||||||
# then checkout the tagged commit with:
|
|
||||||
#
|
|
||||||
# git checkout tags/v0.1
|
|
||||||
#
|
|
||||||
# Finally, to revert to HEAD:
|
|
||||||
#
|
|
||||||
# git checkout master
|
|
||||||
#
|
|
||||||
# See more at https://gitlab.com/o9000/tint2/wikis/Development
|
|
||||||
|
|
||||||
VERSION=$(./get_version.sh --strict)
|
VERSION=$(./get_version.sh --strict)
|
||||||
if [ ! $? -eq 0 ]
|
if [ ! $? -eq 0 ]
|
||||||
@@ -28,21 +10,10 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DIR=tint2-$VERSION
|
ARCHIVE=tint2-$VERSION.tar.gz
|
||||||
ARCHIVE=$DIR.tar.gz
|
|
||||||
echo "Making release $DIR"
|
|
||||||
rm -rf $DIR $ARCHIVE
|
|
||||||
|
|
||||||
git checkout-index --prefix=$DIR/ -a
|
echo "Making release tint2-$VERSION"
|
||||||
|
git archive --format=tar.gz --prefix=tint2-$VERSION/ v$VERSION >$ARCHIVE
|
||||||
# Delete unneeded files
|
|
||||||
rm -f $DIR/make_release.sh
|
|
||||||
|
|
||||||
echo "echo \"#define VERSION_STRING \\\"$VERSION\\\"\" > version.h" > $DIR/get_version.sh
|
|
||||||
|
|
||||||
# Create tarball and remove the exported directory
|
|
||||||
tar -czf $ARCHIVE $DIR
|
|
||||||
rm -rf $DIR
|
|
||||||
|
|
||||||
sha1sum -b $ARCHIVE
|
sha1sum -b $ARCHIVE
|
||||||
sha256sum -b $ARCHIVE
|
sha256sum -b $ARCHIVE
|
||||||
|
|||||||
568
src/button/button.c
Normal file
568
src/button/button.c
Normal file
@@ -0,0 +1,568 @@
|
|||||||
|
#include "button.h"
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <cairo.h>
|
||||||
|
#include <cairo-xlib.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include <pango/pangocairo.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <time.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
#include "window.h"
|
||||||
|
#include "server.h"
|
||||||
|
#include "panel.h"
|
||||||
|
#include "timer.h"
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
|
char *button_get_tooltip(void *obj);
|
||||||
|
void button_init_fonts();
|
||||||
|
int button_compute_desired_size(void *obj);
|
||||||
|
void button_dump_geometry(void *obj, int indent);
|
||||||
|
|
||||||
|
void default_button()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
Button *create_button()
|
||||||
|
{
|
||||||
|
Button *button = calloc(1, sizeof(Button));
|
||||||
|
button->backend = calloc(1, sizeof(ButtonBackend));
|
||||||
|
button->backend->centered = TRUE;
|
||||||
|
button->backend->font_color.alpha = 0.5;
|
||||||
|
return button;
|
||||||
|
}
|
||||||
|
|
||||||
|
gpointer create_button_frontend(gconstpointer arg, gpointer data)
|
||||||
|
{
|
||||||
|
Button *button_backend = (Button *)arg;
|
||||||
|
|
||||||
|
Button *button_frontend = calloc(1, sizeof(Button));
|
||||||
|
button_frontend->backend = button_backend->backend;
|
||||||
|
button_backend->backend->instances = g_list_append(button_backend->backend->instances, button_frontend);
|
||||||
|
button_frontend->frontend = calloc(1, sizeof(ButtonFrontend));
|
||||||
|
return button_frontend;
|
||||||
|
}
|
||||||
|
|
||||||
|
void destroy_button(void *obj)
|
||||||
|
{
|
||||||
|
Button *button = (Button *)obj;
|
||||||
|
if (button->frontend) {
|
||||||
|
// This is a frontend element
|
||||||
|
if (button->frontend->icon) {
|
||||||
|
imlib_context_set_image(button->frontend->icon);
|
||||||
|
imlib_free_image();
|
||||||
|
button->frontend->icon = NULL;
|
||||||
|
}
|
||||||
|
button->backend->instances = g_list_remove_all(button->backend->instances, button);
|
||||||
|
free_and_null(button->frontend);
|
||||||
|
remove_area(&button->area);
|
||||||
|
free_area(&button->area);
|
||||||
|
free_and_null(button);
|
||||||
|
} else {
|
||||||
|
// This is a backend element
|
||||||
|
free_and_null(button->backend->text);
|
||||||
|
free_and_null(button->backend->icon_name);
|
||||||
|
free_and_null(button->backend->tooltip);
|
||||||
|
|
||||||
|
button->backend->bg = NULL;
|
||||||
|
pango_font_description_free(button->backend->font_desc);
|
||||||
|
button->backend->font_desc = NULL;
|
||||||
|
free_and_null(button->backend->lclick_command);
|
||||||
|
free_and_null(button->backend->mclick_command);
|
||||||
|
free_and_null(button->backend->rclick_command);
|
||||||
|
free_and_null(button->backend->dwheel_command);
|
||||||
|
free_and_null(button->backend->uwheel_command);
|
||||||
|
|
||||||
|
if (button->backend->instances) {
|
||||||
|
fprintf(stderr, "Error: Attempt to destroy backend while there are still frontend instances!\n");
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
free(button->backend);
|
||||||
|
free(button);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void init_button()
|
||||||
|
{
|
||||||
|
GList *to_remove = panel_config.button_list;
|
||||||
|
for (int k = 0; k < strlen(panel_items_order) && to_remove; k++) {
|
||||||
|
if (panel_items_order[k] == 'P') {
|
||||||
|
to_remove = to_remove->next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (to_remove) {
|
||||||
|
if (to_remove == panel_config.button_list) {
|
||||||
|
g_list_free_full(to_remove, destroy_button);
|
||||||
|
panel_config.button_list = NULL;
|
||||||
|
} else {
|
||||||
|
// Cut panel_config.button_list
|
||||||
|
if (to_remove->prev)
|
||||||
|
to_remove->prev->next = NULL;
|
||||||
|
to_remove->prev = NULL;
|
||||||
|
// Remove all elements of to_remove and to_remove itself
|
||||||
|
g_list_free_full(to_remove, destroy_button);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
button_init_fonts();
|
||||||
|
for (GList *l = panel_config.button_list; l; l = l->next) {
|
||||||
|
Button *button = l->data;
|
||||||
|
|
||||||
|
// Set missing config options
|
||||||
|
if (!button->backend->bg)
|
||||||
|
button->backend->bg = &g_array_index(backgrounds, Background, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void init_button_panel(void *p)
|
||||||
|
{
|
||||||
|
Panel *panel = (Panel *)p;
|
||||||
|
|
||||||
|
// Make sure this is only done once if there are multiple items
|
||||||
|
if (panel->button_list && ((Button *)panel->button_list->data)->frontend)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// panel->button_list is now a copy of the pointer panel_config.button_list
|
||||||
|
// We make it a deep copy
|
||||||
|
panel->button_list = g_list_copy_deep(panel_config.button_list, create_button_frontend, NULL);
|
||||||
|
|
||||||
|
load_icon_themes();
|
||||||
|
|
||||||
|
for (GList *l = panel->button_list; l; l = l->next) {
|
||||||
|
Button *button = l->data;
|
||||||
|
button->area.bg = button->backend->bg;
|
||||||
|
button->area.paddingx = button->backend->paddingx;
|
||||||
|
button->area.paddingy = button->backend->paddingy;
|
||||||
|
button->area.paddingxlr = button->backend->paddingxlr;
|
||||||
|
button->area.parent = panel;
|
||||||
|
button->area.panel = panel;
|
||||||
|
button->area._dump_geometry = button_dump_geometry;
|
||||||
|
button->area._compute_desired_size = button_compute_desired_size;
|
||||||
|
snprintf(button->area.name, sizeof(button->area.name), "Button");
|
||||||
|
button->area._draw_foreground = draw_button;
|
||||||
|
button->area.size_mode = LAYOUT_FIXED;
|
||||||
|
button->area._resize = resize_button;
|
||||||
|
button->area._get_tooltip_text = button_get_tooltip;
|
||||||
|
button->area._is_under_mouse = full_width_area_is_under_mouse;
|
||||||
|
button->area.has_mouse_press_effect =
|
||||||
|
panel_config.mouse_effects &&
|
||||||
|
(button->area.has_mouse_over_effect = button->backend->lclick_command || button->backend->mclick_command ||
|
||||||
|
button->backend->rclick_command || button->backend->uwheel_command ||
|
||||||
|
button->backend->dwheel_command);
|
||||||
|
|
||||||
|
button->area.resize_needed = TRUE;
|
||||||
|
button->area.on_screen = TRUE;
|
||||||
|
instantiate_area_gradients(&button->area);
|
||||||
|
|
||||||
|
button_reload_icon(button);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void button_init_fonts()
|
||||||
|
{
|
||||||
|
for (GList *l = panel_config.button_list; l; l = l->next) {
|
||||||
|
Button *button = l->data;
|
||||||
|
if (!button->backend->font_desc)
|
||||||
|
button->backend->font_desc = pango_font_description_from_string(get_default_font());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void button_default_font_changed()
|
||||||
|
{
|
||||||
|
gboolean needs_update = FALSE;
|
||||||
|
for (GList *l = panel_config.button_list; l; l = l->next) {
|
||||||
|
Button *button = l->data;
|
||||||
|
|
||||||
|
if (!button->backend->has_font) {
|
||||||
|
pango_font_description_free(button->backend->font_desc);
|
||||||
|
button->backend->font_desc = NULL;
|
||||||
|
needs_update = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!needs_update)
|
||||||
|
return;
|
||||||
|
|
||||||
|
button_init_fonts();
|
||||||
|
for (int i = 0; i < num_panels; i++) {
|
||||||
|
for (GList *l = panels[i].button_list; l; l = l->next) {
|
||||||
|
Button *button = l->data;
|
||||||
|
|
||||||
|
if (!button->backend->has_font) {
|
||||||
|
button->area.resize_needed = TRUE;
|
||||||
|
schedule_redraw(&button->area);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
schedule_panel_redraw();
|
||||||
|
}
|
||||||
|
|
||||||
|
void button_reload_icon(Button *button)
|
||||||
|
{
|
||||||
|
free_icon(button->frontend->icon);
|
||||||
|
free_icon(button->frontend->icon_hover);
|
||||||
|
free_icon(button->frontend->icon_pressed);
|
||||||
|
button->frontend->icon = NULL;
|
||||||
|
button->frontend->icon_hover = NULL;
|
||||||
|
button->frontend->icon_pressed = NULL;
|
||||||
|
|
||||||
|
button->frontend->icon_load_size = button->frontend->iconw;
|
||||||
|
|
||||||
|
if (!button->backend->icon_name)
|
||||||
|
return;
|
||||||
|
|
||||||
|
char *new_icon_path = get_icon_path(icon_theme_wrapper, button->backend->icon_name, button->frontend->iconw, TRUE);
|
||||||
|
if (new_icon_path)
|
||||||
|
button->frontend->icon = load_image(new_icon_path, TRUE);
|
||||||
|
free(new_icon_path);
|
||||||
|
// On loading error, fallback to default
|
||||||
|
if (!button->frontend->icon) {
|
||||||
|
new_icon_path = get_icon_path(icon_theme_wrapper, DEFAULT_ICON, button->frontend->iconw, TRUE);
|
||||||
|
if (new_icon_path)
|
||||||
|
button->frontend->icon = load_image(new_icon_path, TRUE);
|
||||||
|
free(new_icon_path);
|
||||||
|
}
|
||||||
|
Imlib_Image original = button->frontend->icon;
|
||||||
|
button->frontend->icon = scale_icon(button->frontend->icon, button->frontend->iconw);
|
||||||
|
free_icon(original);
|
||||||
|
|
||||||
|
if (panel_config.mouse_effects) {
|
||||||
|
button->frontend->icon_hover = adjust_icon(button->frontend->icon,
|
||||||
|
panel_config.mouse_over_alpha,
|
||||||
|
panel_config.mouse_over_saturation,
|
||||||
|
panel_config.mouse_over_brightness);
|
||||||
|
button->frontend->icon_pressed = adjust_icon(button->frontend->icon,
|
||||||
|
panel_config.mouse_pressed_alpha,
|
||||||
|
panel_config.mouse_pressed_saturation,
|
||||||
|
panel_config.mouse_pressed_brightness);
|
||||||
|
}
|
||||||
|
schedule_redraw(&button->area);
|
||||||
|
}
|
||||||
|
|
||||||
|
void button_default_icon_theme_changed()
|
||||||
|
{
|
||||||
|
for (int i = 0; i < num_panels; i++) {
|
||||||
|
for (GList *l = panels[i].button_list; l; l = l->next) {
|
||||||
|
Button *button = l->data;
|
||||||
|
button_reload_icon(button);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
schedule_panel_redraw();
|
||||||
|
}
|
||||||
|
|
||||||
|
void cleanup_button()
|
||||||
|
{
|
||||||
|
// Cleanup frontends
|
||||||
|
for (int i = 0; i < num_panels; i++) {
|
||||||
|
g_list_free_full(panels[i].button_list, destroy_button);
|
||||||
|
panels[i].button_list = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Cleanup backends
|
||||||
|
g_list_free_full(panel_config.button_list, destroy_button);
|
||||||
|
panel_config.button_list = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
int button_compute_desired_size(void *obj)
|
||||||
|
{
|
||||||
|
Button *button = (Button *)obj;
|
||||||
|
Panel *panel = (Panel *)button->area.panel;
|
||||||
|
int horiz_padding = (panel_horizontal ? button->area.paddingxlr : button->area.paddingy);
|
||||||
|
int vert_padding = (panel_horizontal ? button->area.paddingy : button->area.paddingxlr);
|
||||||
|
int interior_padding = button->area.paddingx;
|
||||||
|
|
||||||
|
int icon_w, icon_h;
|
||||||
|
if (button->backend->icon_name) {
|
||||||
|
if (panel_horizontal)
|
||||||
|
icon_h = icon_w = button->area.height - top_bottom_border_width(&button->area) - 2 * vert_padding;
|
||||||
|
else
|
||||||
|
icon_h = icon_w = button->area.width - left_right_border_width(&button->area) - 2 * horiz_padding;
|
||||||
|
if (button->backend->max_icon_size) {
|
||||||
|
icon_w = MIN(icon_w, button->backend->max_icon_size);
|
||||||
|
icon_h = MIN(icon_h, button->backend->max_icon_size);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
icon_h = icon_w = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int txt_height_ink, txt_height, txt_width;
|
||||||
|
if (button->backend->text) {
|
||||||
|
if (panel_horizontal) {
|
||||||
|
get_text_size2(button->backend->font_desc,
|
||||||
|
&txt_height_ink,
|
||||||
|
&txt_height,
|
||||||
|
&txt_width,
|
||||||
|
panel->area.height,
|
||||||
|
panel->area.width,
|
||||||
|
button->backend->text,
|
||||||
|
strlen(button->backend->text),
|
||||||
|
PANGO_WRAP_WORD_CHAR,
|
||||||
|
PANGO_ELLIPSIZE_NONE,
|
||||||
|
FALSE);
|
||||||
|
} else {
|
||||||
|
get_text_size2(button->backend->font_desc,
|
||||||
|
&txt_height_ink,
|
||||||
|
&txt_height,
|
||||||
|
&txt_width,
|
||||||
|
panel->area.height,
|
||||||
|
button->area.width - icon_w - (icon_w ? interior_padding : 0) -
|
||||||
|
2 * horiz_padding - left_right_border_width(&button->area),
|
||||||
|
button->backend->text,
|
||||||
|
strlen(button->backend->text),
|
||||||
|
PANGO_WRAP_WORD_CHAR,
|
||||||
|
PANGO_ELLIPSIZE_NONE,
|
||||||
|
FALSE);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
txt_height_ink = txt_height = txt_width = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (panel_horizontal) {
|
||||||
|
int new_size = txt_width + icon_w + (txt_width && icon_w ? interior_padding : 0);
|
||||||
|
new_size += 2 * horiz_padding + left_right_border_width(&button->area);
|
||||||
|
return new_size;
|
||||||
|
} else {
|
||||||
|
int new_size;
|
||||||
|
new_size = txt_height + 2 * vert_padding + top_bottom_border_width(&button->area);
|
||||||
|
new_size = MAX(new_size, icon_h + 2 * vert_padding + top_bottom_border_width(&button->area));
|
||||||
|
return new_size;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean resize_button(void *obj)
|
||||||
|
{
|
||||||
|
Button *button = (Button *)obj;
|
||||||
|
Panel *panel = (Panel *)button->area.panel;
|
||||||
|
int horiz_padding = (panel_horizontal ? button->area.paddingxlr : button->area.paddingy);
|
||||||
|
int vert_padding = (panel_horizontal ? button->area.paddingy : button->area.paddingxlr);
|
||||||
|
int interior_padding = button->area.paddingx;
|
||||||
|
|
||||||
|
int icon_w, icon_h;
|
||||||
|
if (button->backend->icon_name) {
|
||||||
|
if (panel_horizontal)
|
||||||
|
icon_h = icon_w = button->area.height - top_bottom_border_width(&button->area) - 2 * vert_padding;
|
||||||
|
else
|
||||||
|
icon_h = icon_w = button->area.width - left_right_border_width(&button->area) - 2 * horiz_padding;
|
||||||
|
if (button->backend->max_icon_size) {
|
||||||
|
icon_w = MIN(icon_w, button->backend->max_icon_size);
|
||||||
|
icon_h = MIN(icon_h, button->backend->max_icon_size);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
icon_h = icon_w = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
button->frontend->iconw = icon_w;
|
||||||
|
button->frontend->iconh = icon_h;
|
||||||
|
if (button->frontend->icon_load_size != button->frontend->iconw)
|
||||||
|
button_reload_icon(button);
|
||||||
|
|
||||||
|
int txt_height_ink, txt_height, txt_width;
|
||||||
|
if (button->backend->text) {
|
||||||
|
if (panel_horizontal) {
|
||||||
|
get_text_size2(button->backend->font_desc,
|
||||||
|
&txt_height_ink,
|
||||||
|
&txt_height,
|
||||||
|
&txt_width,
|
||||||
|
panel->area.height,
|
||||||
|
panel->area.width,
|
||||||
|
button->backend->text,
|
||||||
|
strlen(button->backend->text),
|
||||||
|
PANGO_WRAP_WORD_CHAR,
|
||||||
|
PANGO_ELLIPSIZE_NONE,
|
||||||
|
FALSE);
|
||||||
|
} else {
|
||||||
|
get_text_size2(button->backend->font_desc,
|
||||||
|
&txt_height_ink,
|
||||||
|
&txt_height,
|
||||||
|
&txt_width,
|
||||||
|
panel->area.height,
|
||||||
|
button->area.width - icon_w - (icon_w ? interior_padding : 0) -
|
||||||
|
2 * horiz_padding - left_right_border_width(&button->area),
|
||||||
|
button->backend->text,
|
||||||
|
strlen(button->backend->text),
|
||||||
|
PANGO_WRAP_WORD_CHAR,
|
||||||
|
PANGO_ELLIPSIZE_NONE,
|
||||||
|
FALSE);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
txt_height_ink = txt_height = txt_width = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean result = FALSE;
|
||||||
|
if (panel_horizontal) {
|
||||||
|
int new_size = txt_width + icon_w + (txt_width && icon_w ? interior_padding : 0);
|
||||||
|
new_size += 2 * horiz_padding + left_right_border_width(&button->area);
|
||||||
|
if (new_size != button->area.width) {
|
||||||
|
button->area.width = new_size;
|
||||||
|
result = TRUE;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
int new_size;
|
||||||
|
new_size = txt_height + 2 * vert_padding + top_bottom_border_width(&button->area);
|
||||||
|
new_size = MAX(new_size, icon_h + 2 * vert_padding + top_bottom_border_width(&button->area));
|
||||||
|
if (new_size != button->area.height) {
|
||||||
|
button->area.height = new_size;
|
||||||
|
result = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
button->frontend->textw = txt_width;
|
||||||
|
button->frontend->texth = txt_height;
|
||||||
|
if (button->backend->centered) {
|
||||||
|
if (icon_w) {
|
||||||
|
button->frontend->icony = (button->area.height - icon_h) / 2;
|
||||||
|
button->frontend->iconx = (button->area.width - txt_width - (txt_width ? interior_padding : 0) - icon_w) / 2;
|
||||||
|
button->frontend->texty = (button->area.height - txt_height) / 2;
|
||||||
|
button->frontend->textx = button->frontend->iconx + icon_w + interior_padding;
|
||||||
|
} else {
|
||||||
|
button->frontend->texty = (button->area.height - txt_height) / 2;
|
||||||
|
button->frontend->textx = (button->area.width - txt_width) / 2;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (icon_w) {
|
||||||
|
button->frontend->icony = (button->area.height - icon_h) / 2;
|
||||||
|
button->frontend->iconx = left_border_width(&button->area) + horiz_padding;
|
||||||
|
button->frontend->texty = (button->area.height - txt_height) / 2;
|
||||||
|
button->frontend->textx = button->frontend->iconx + icon_w + interior_padding;
|
||||||
|
} else {
|
||||||
|
button->frontend->texty = (button->area.height - txt_height) / 2;
|
||||||
|
button->frontend->textx = left_border_width(&button->area) + horiz_padding;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
schedule_redraw(&button->area);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
void draw_button(void *obj, cairo_t *c)
|
||||||
|
{
|
||||||
|
Button *button = obj;
|
||||||
|
|
||||||
|
if (button->frontend->icon) {
|
||||||
|
// Render icon
|
||||||
|
Imlib_Image image;
|
||||||
|
if (panel_config.mouse_effects) {
|
||||||
|
if (button->area.mouse_state == MOUSE_OVER)
|
||||||
|
image = button->frontend->icon_hover ? button->frontend->icon_hover : button->frontend->icon;
|
||||||
|
else if (button->area.mouse_state == MOUSE_DOWN)
|
||||||
|
image = button->frontend->icon_pressed ? button->frontend->icon_pressed : button->frontend->icon;
|
||||||
|
else
|
||||||
|
image = button->frontend->icon;
|
||||||
|
} else {
|
||||||
|
image = button->frontend->icon;
|
||||||
|
}
|
||||||
|
|
||||||
|
imlib_context_set_image(image);
|
||||||
|
render_image(button->area.pix, button->frontend->iconx, button->frontend->icony);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Render text
|
||||||
|
if (button->backend->text) {
|
||||||
|
PangoLayout *layout = pango_cairo_create_layout(c);
|
||||||
|
|
||||||
|
pango_layout_set_font_description(layout, button->backend->font_desc);
|
||||||
|
pango_layout_set_width(layout, button->frontend->textw * PANGO_SCALE);
|
||||||
|
pango_layout_set_alignment(layout, button->backend->centered ? PANGO_ALIGN_CENTER : PANGO_ALIGN_LEFT);
|
||||||
|
pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR);
|
||||||
|
pango_layout_set_ellipsize(layout, PANGO_ELLIPSIZE_NONE);
|
||||||
|
pango_layout_set_text(layout, button->backend->text, strlen(button->backend->text));
|
||||||
|
|
||||||
|
pango_cairo_update_layout(c, layout);
|
||||||
|
draw_text(layout,
|
||||||
|
c,
|
||||||
|
button->frontend->textx,
|
||||||
|
button->frontend->texty,
|
||||||
|
&button->backend->font_color,
|
||||||
|
panel_config.font_shadow);
|
||||||
|
|
||||||
|
g_object_unref(layout);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void button_dump_geometry(void *obj, int indent)
|
||||||
|
{
|
||||||
|
Button *button = obj;
|
||||||
|
|
||||||
|
if (button->frontend->icon) {
|
||||||
|
Imlib_Image tmp = imlib_context_get_image();
|
||||||
|
imlib_context_set_image(button->frontend->icon);
|
||||||
|
fprintf(stderr,
|
||||||
|
"%*sIcon: x = %d, y = %d, w = %d, h = %d\n",
|
||||||
|
indent,
|
||||||
|
"",
|
||||||
|
button->frontend->iconx,
|
||||||
|
button->frontend->icony,
|
||||||
|
imlib_image_get_width(),
|
||||||
|
imlib_image_get_height());
|
||||||
|
if (tmp)
|
||||||
|
imlib_context_set_image(tmp);
|
||||||
|
}
|
||||||
|
fprintf(stderr,
|
||||||
|
"%*sText: x = %d, y = %d, w = %d, align = %s, text = %s\n",
|
||||||
|
indent,
|
||||||
|
"",
|
||||||
|
button->frontend->textx,
|
||||||
|
button->frontend->texty,
|
||||||
|
button->frontend->textw,
|
||||||
|
button->backend->centered ? "center" : "left",
|
||||||
|
button->backend->text);
|
||||||
|
}
|
||||||
|
|
||||||
|
void button_action(void *obj, int mouse_button, int x, int y)
|
||||||
|
{
|
||||||
|
Button *button = obj;
|
||||||
|
char *command = NULL;
|
||||||
|
switch (mouse_button) {
|
||||||
|
case 1:
|
||||||
|
command = button->backend->lclick_command;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
command = button->backend->mclick_command;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
command = button->backend->rclick_command;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
command = button->backend->uwheel_command;
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
command = button->backend->dwheel_command;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (command) {
|
||||||
|
char *full_cmd = g_strdup_printf("export BUTTON_X=%d;"
|
||||||
|
"export BUTTON_Y=%d;"
|
||||||
|
"export BUTTON_W=%d;"
|
||||||
|
"export BUTTON_H=%d; %s",
|
||||||
|
x,
|
||||||
|
y,
|
||||||
|
button->area.width,
|
||||||
|
button->area.height,
|
||||||
|
command);
|
||||||
|
pid_t pid = fork();
|
||||||
|
if (pid < 0) {
|
||||||
|
fprintf(stderr, "Could not fork\n");
|
||||||
|
} else if (pid == 0) {
|
||||||
|
// Child process
|
||||||
|
// Allow children to exist after parent destruction
|
||||||
|
setsid();
|
||||||
|
// Run the command
|
||||||
|
execl("/bin/sh", "/bin/sh", "-c", full_cmd, NULL);
|
||||||
|
fprintf(stderr, "Failed to execlp %s\n", full_cmd);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
char *button_get_tooltip(void *obj)
|
||||||
|
{
|
||||||
|
Button *button = obj;
|
||||||
|
|
||||||
|
if (button->backend->tooltip && strlen(button->backend->tooltip) > 0)
|
||||||
|
return strdup(button->backend->tooltip);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
112
src/button/button.h
Normal file
112
src/button/button.h
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
#ifndef BUTTON_H
|
||||||
|
#define BUTTON_H
|
||||||
|
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <pango/pangocairo.h>
|
||||||
|
|
||||||
|
#include "area.h"
|
||||||
|
#include "common.h"
|
||||||
|
#include "timer.h"
|
||||||
|
|
||||||
|
// Architecture:
|
||||||
|
// Panel panel_config contains an array of Button, each storing all config options and all the state variables.
|
||||||
|
// Only these run commands.
|
||||||
|
//
|
||||||
|
// Tint2 maintains an array of Panels, one for each monitor. Each stores an array of Button which was initially copied
|
||||||
|
// from panel_config. Each works as a frontend to the corresponding Button in panel_config as backend, using the
|
||||||
|
// backend's config and state variables.
|
||||||
|
|
||||||
|
typedef struct ButtonBackend {
|
||||||
|
// Config:
|
||||||
|
char *icon_name;
|
||||||
|
char *text;
|
||||||
|
char *tooltip;
|
||||||
|
gboolean centered;
|
||||||
|
int max_icon_size;
|
||||||
|
gboolean has_font;
|
||||||
|
PangoFontDescription *font_desc;
|
||||||
|
Color font_color;
|
||||||
|
char *lclick_command;
|
||||||
|
char *mclick_command;
|
||||||
|
char *rclick_command;
|
||||||
|
char *uwheel_command;
|
||||||
|
char *dwheel_command;
|
||||||
|
// paddingxlr = horizontal padding left/right
|
||||||
|
// paddingx = horizontal padding between childs
|
||||||
|
int paddingxlr, paddingx, paddingy;
|
||||||
|
Background *bg;
|
||||||
|
|
||||||
|
// List of Button which are frontends for this backend, one for each panel
|
||||||
|
GList *instances;
|
||||||
|
} ButtonBackend;
|
||||||
|
|
||||||
|
typedef struct ButtonFrontend {
|
||||||
|
// Frontend state:
|
||||||
|
Imlib_Image icon;
|
||||||
|
Imlib_Image icon_hover;
|
||||||
|
Imlib_Image icon_pressed;
|
||||||
|
int icon_load_size;
|
||||||
|
int iconx;
|
||||||
|
int icony;
|
||||||
|
int iconw;
|
||||||
|
int iconh;
|
||||||
|
int textx;
|
||||||
|
int texty;
|
||||||
|
int textw;
|
||||||
|
int texth;
|
||||||
|
} ButtonFrontend;
|
||||||
|
|
||||||
|
typedef struct Button {
|
||||||
|
Area area;
|
||||||
|
// All elements have the backend pointer set. However only backend elements have ownership.
|
||||||
|
ButtonBackend *backend;
|
||||||
|
// Set only for frontend Button items.
|
||||||
|
ButtonFrontend *frontend;
|
||||||
|
} Button;
|
||||||
|
|
||||||
|
// Called before the config is read and panel_config/panels are created.
|
||||||
|
// Afterwards, the config parsing code creates the array of Button in panel_config and populates the configuration fields
|
||||||
|
// in the backend.
|
||||||
|
// Probably does nothing.
|
||||||
|
void default_button();
|
||||||
|
|
||||||
|
// Creates a new Button item with only the backend field set. The state is NOT initialized. The config is initialized to
|
||||||
|
// the default values.
|
||||||
|
// This will be used by the config code to populate its backedn config fields.
|
||||||
|
Button *create_button();
|
||||||
|
|
||||||
|
void destroy_button(void *obj);
|
||||||
|
|
||||||
|
// Called after the config is read and panel_config is populated, but before panels are created.
|
||||||
|
// Initializes the state of the backend items.
|
||||||
|
// panel_config.panel_items is used to determine which backend items are enabled. The others should be destroyed and
|
||||||
|
// removed from panel_config.button_list.
|
||||||
|
void init_button();
|
||||||
|
|
||||||
|
// Called after each on-screen panel is created, with a pointer to the panel.
|
||||||
|
// Initializes the state of the frontend items. Also adds a pointer to it in backend->instances.
|
||||||
|
// At this point the Area has not been added yet to the GUI tree, but it will be added right away.
|
||||||
|
void init_button_panel(void *panel);
|
||||||
|
|
||||||
|
// Called just before the panels are destroyed. Afterwards, tint2 exits or restarts and reads the config again.
|
||||||
|
// Releases all frontends and then all the backends.
|
||||||
|
// The frontend items are not freed by this function, only their members. The items are Areas which are freed in the
|
||||||
|
// GUI element tree cleanup function (remove_area).
|
||||||
|
void cleanup_button();
|
||||||
|
|
||||||
|
// Called on draw, obj = pointer to the front-end Button item.
|
||||||
|
void draw_button(void *obj, cairo_t *c);
|
||||||
|
|
||||||
|
// Called on resize, obj = pointer to the front-end Button item.
|
||||||
|
// Returns 1 if the new size is different than the previous size.
|
||||||
|
gboolean resize_button(void *obj);
|
||||||
|
|
||||||
|
// Called on mouse click event.
|
||||||
|
void button_action(void *obj, int button, int x, int y);
|
||||||
|
|
||||||
|
void button_default_font_changed();
|
||||||
|
void button_default_icon_theme_changed();
|
||||||
|
|
||||||
|
void button_reload_icon(Button *button);
|
||||||
|
|
||||||
|
#endif // BUTTON_H
|
||||||
119
src/config.c
119
src/config.c
@@ -38,6 +38,7 @@
|
|||||||
|
|
||||||
#ifndef TINT2CONF
|
#ifndef TINT2CONF
|
||||||
|
|
||||||
|
#include "tint2rc.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "server.h"
|
#include "server.h"
|
||||||
#include "strnatcmp.h"
|
#include "strnatcmp.h"
|
||||||
@@ -220,6 +221,15 @@ Execp *get_or_create_last_execp()
|
|||||||
return (Execp *)g_list_last(panel_config.execp_list)->data;
|
return (Execp *)g_list_last(panel_config.execp_list)->data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Button *get_or_create_last_button()
|
||||||
|
{
|
||||||
|
if (!panel_config.button_list) {
|
||||||
|
fprintf(stderr, "Warning: button items should start with 'button = new'\n");
|
||||||
|
panel_config.button_list = g_list_append(panel_config.button_list, create_button());
|
||||||
|
}
|
||||||
|
return (Button *)g_list_last(panel_config.button_list)->data;
|
||||||
|
}
|
||||||
|
|
||||||
void add_entry(char *key, char *value)
|
void add_entry(char *key, char *value)
|
||||||
{
|
{
|
||||||
char *value1 = 0, *value2 = 0, *value3 = 0;
|
char *value1 = 0, *value2 = 0, *value3 = 0;
|
||||||
@@ -737,6 +747,82 @@ void add_entry(char *key, char *value)
|
|||||||
execp->backend->dwheel_command = strdup(value);
|
execp->backend->dwheel_command = strdup(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Button */
|
||||||
|
else if (strcmp(key, "button") == 0) {
|
||||||
|
panel_config.button_list = g_list_append(panel_config.button_list, create_button());
|
||||||
|
} else if (strcmp(key, "button_icon") == 0 && strlen(value)) {
|
||||||
|
Button *button = get_or_create_last_button();
|
||||||
|
button->backend->icon_name = strdup(value);
|
||||||
|
} else if (strcmp(key, "button_text") == 0 && strlen(value)) {
|
||||||
|
Button *button = get_or_create_last_button();
|
||||||
|
free_and_null(button->backend->text);
|
||||||
|
button->backend->text = strdup(value);
|
||||||
|
} else if (strcmp(key, "button_tooltip") == 0 && strlen(value)) {
|
||||||
|
Button *button = get_or_create_last_button();
|
||||||
|
free_and_null(button->backend->tooltip);
|
||||||
|
button->backend->tooltip = strdup(value);
|
||||||
|
} else if (strcmp(key, "button_font") == 0) {
|
||||||
|
Button *button = get_or_create_last_button();
|
||||||
|
pango_font_description_free(button->backend->font_desc);
|
||||||
|
button->backend->font_desc = pango_font_description_from_string(value);
|
||||||
|
button->backend->has_font = TRUE;
|
||||||
|
} else if (strcmp(key, "button_font_color") == 0) {
|
||||||
|
Button *button = get_or_create_last_button();
|
||||||
|
extract_values(value, &value1, &value2, &value3);
|
||||||
|
get_color(value1, button->backend->font_color.rgb);
|
||||||
|
if (value2)
|
||||||
|
button->backend->font_color.alpha = atoi(value2) / 100.0;
|
||||||
|
else
|
||||||
|
button->backend->font_color.alpha = 0.5;
|
||||||
|
} else if (strcmp(key, "button_padding") == 0) {
|
||||||
|
Button *button = get_or_create_last_button();
|
||||||
|
extract_values(value, &value1, &value2, &value3);
|
||||||
|
button->backend->paddingxlr = button->backend->paddingx = atoi(value1);
|
||||||
|
if (value2)
|
||||||
|
button->backend->paddingy = atoi(value2);
|
||||||
|
else
|
||||||
|
button->backend->paddingy = 0;
|
||||||
|
if (value3)
|
||||||
|
button->backend->paddingx = atoi(value3);
|
||||||
|
} else if (strcmp(key, "button_max_icon_size") == 0) {
|
||||||
|
Button *button = get_or_create_last_button();
|
||||||
|
extract_values(value, &value1, &value2, &value3);
|
||||||
|
button->backend->max_icon_size = MAX(0, atoi(value));
|
||||||
|
} else if (strcmp(key, "button_background_id") == 0) {
|
||||||
|
Button *button = get_or_create_last_button();
|
||||||
|
int id = atoi(value);
|
||||||
|
id = (id < backgrounds->len && id >= 0) ? id : 0;
|
||||||
|
button->backend->bg = &g_array_index(backgrounds, Background, id);
|
||||||
|
} else if (strcmp(key, "button_centered") == 0) {
|
||||||
|
Button *button = get_or_create_last_button();
|
||||||
|
button->backend->centered = atoi(value);
|
||||||
|
} else if (strcmp(key, "button_lclick_command") == 0) {
|
||||||
|
Button *button = get_or_create_last_button();
|
||||||
|
free_and_null(button->backend->lclick_command);
|
||||||
|
if (strlen(value) > 0)
|
||||||
|
button->backend->lclick_command = strdup(value);
|
||||||
|
} else if (strcmp(key, "button_mclick_command") == 0) {
|
||||||
|
Button *button = get_or_create_last_button();
|
||||||
|
free_and_null(button->backend->mclick_command);
|
||||||
|
if (strlen(value) > 0)
|
||||||
|
button->backend->mclick_command = strdup(value);
|
||||||
|
} else if (strcmp(key, "button_rclick_command") == 0) {
|
||||||
|
Button *button = get_or_create_last_button();
|
||||||
|
free_and_null(button->backend->rclick_command);
|
||||||
|
if (strlen(value) > 0)
|
||||||
|
button->backend->rclick_command = strdup(value);
|
||||||
|
} else if (strcmp(key, "button_uwheel_command") == 0) {
|
||||||
|
Button *button = get_or_create_last_button();
|
||||||
|
free_and_null(button->backend->uwheel_command);
|
||||||
|
if (strlen(value) > 0)
|
||||||
|
button->backend->uwheel_command = strdup(value);
|
||||||
|
} else if (strcmp(key, "button_dwheel_command") == 0) {
|
||||||
|
Button *button = get_or_create_last_button();
|
||||||
|
free_and_null(button->backend->dwheel_command);
|
||||||
|
if (strlen(value) > 0)
|
||||||
|
button->backend->dwheel_command = strdup(value);
|
||||||
|
}
|
||||||
|
|
||||||
/* Clock */
|
/* Clock */
|
||||||
else if (strcmp(key, "time1_format") == 0) {
|
else if (strcmp(key, "time1_format") == 0) {
|
||||||
if (!new_config_file) {
|
if (!new_config_file) {
|
||||||
@@ -1009,6 +1095,10 @@ void add_entry(char *key, char *value)
|
|||||||
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 = atoi(value) - 1;
|
||||||
|
} else if (strcmp(key, "systray_name_filter") == 0) {
|
||||||
|
if (systray_hide_name_filter)
|
||||||
|
free(systray_hide_name_filter);
|
||||||
|
systray_hide_name_filter = strdup(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Launcher */
|
/* Launcher */
|
||||||
@@ -1173,20 +1263,21 @@ void add_entry(char *key, char *value)
|
|||||||
|
|
||||||
gboolean config_read_file(const char *path)
|
gboolean config_read_file(const char *path)
|
||||||
{
|
{
|
||||||
FILE *fp;
|
FILE *fp = fopen(path, "r");
|
||||||
char line[512];
|
if (!fp)
|
||||||
char *key, *value;
|
|
||||||
|
|
||||||
if ((fp = fopen(path, "r")) == NULL)
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
while (fgets(line, sizeof(line), fp) != NULL) {
|
char* line = NULL;
|
||||||
|
size_t line_size = 0;
|
||||||
|
while (getline(&line, &line_size, fp) >= 0) {
|
||||||
|
char *key, *value;
|
||||||
if (parse_line(line, &key, &value)) {
|
if (parse_line(line, &key, &value)) {
|
||||||
add_entry(key, value);
|
add_entry(key, value);
|
||||||
free(key);
|
free(key);
|
||||||
free(value);
|
free(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
free(line);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
|
||||||
if (!read_panel_position) {
|
if (!read_panel_position) {
|
||||||
@@ -1239,6 +1330,13 @@ gboolean config_read_default_path()
|
|||||||
g_free(path1);
|
g_free(path1);
|
||||||
|
|
||||||
// copy tint2rc from system directory to user directory
|
// copy tint2rc from system directory to user directory
|
||||||
|
|
||||||
|
fprintf(stderr, "tint2 warning: could not find a config file! Creating a default one.\n");
|
||||||
|
// According to the XDG Base Directory Specification (https://specifications.freedesktop.org/basedir-spec/basedir-spec-0.6.html)
|
||||||
|
// if the user's config directory does not exist, we should create it with permissions set to 0700.
|
||||||
|
if (!g_file_test(g_get_user_config_dir(), G_FILE_TEST_IS_DIR))
|
||||||
|
g_mkdir(g_get_user_config_dir(), 0700);
|
||||||
|
|
||||||
gchar *path2 = 0;
|
gchar *path2 = 0;
|
||||||
system_dirs = g_get_system_config_dirs();
|
system_dirs = g_get_system_config_dirs();
|
||||||
for (int i = 0; system_dirs[i]; i++) {
|
for (int i = 0; system_dirs[i]; i++) {
|
||||||
@@ -1267,15 +1365,18 @@ gboolean config_read_default_path()
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// generate empty config file
|
// generate config file
|
||||||
fprintf(stderr, "tint2 warning: could not find a config file!\n");
|
|
||||||
gchar *dir = g_build_filename(g_get_user_config_dir(), "tint2", NULL);
|
gchar *dir = g_build_filename(g_get_user_config_dir(), "tint2", NULL);
|
||||||
if (!g_file_test(dir, G_FILE_TEST_IS_DIR))
|
if (!g_file_test(dir, G_FILE_TEST_IS_DIR))
|
||||||
g_mkdir(dir, 0700);
|
g_mkdir(dir, 0700);
|
||||||
g_free(dir);
|
g_free(dir);
|
||||||
|
|
||||||
path1 = g_build_filename(g_get_user_config_dir(), "tint2", "tint2rc", NULL);
|
path1 = g_build_filename(g_get_user_config_dir(), "tint2", "tint2rc", NULL);
|
||||||
copy_file("/dev/null", path1);
|
FILE *f = fopen(path1, "w");
|
||||||
|
if (f) {
|
||||||
|
fwrite(themes_tint2rc, 1, themes_tint2rc_len, f);
|
||||||
|
fclose(f);
|
||||||
|
}
|
||||||
|
|
||||||
gboolean result = config_read_file(path1);
|
gboolean result = config_read_file(path1);
|
||||||
config_path = strdup(path1);
|
config_path = strdup(path1);
|
||||||
|
|||||||
@@ -643,6 +643,7 @@ void execp_timer_callback(void *arg)
|
|||||||
close(pipe_fd[0]);
|
close(pipe_fd[0]);
|
||||||
return;
|
return;
|
||||||
} else if (child == 0) {
|
} else if (child == 0) {
|
||||||
|
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[0]);
|
||||||
dup2(pipe_fd[1], 1); // 1 is stdout
|
dup2(pipe_fd[1], 1); // 1 is stdout
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
|
|
||||||
static gint compare_strings(gconstpointer a, gconstpointer b)
|
static gint compare_strings(gconstpointer a, gconstpointer b)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -740,7 +740,7 @@ void add_icon_path_to_cache(IconThemeWrapper *wrapper, const char *icon_name, in
|
|||||||
g_free(key);
|
g_free(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *get_icon_path(IconThemeWrapper *wrapper, const char *icon_name, int size)
|
char *get_icon_path(IconThemeWrapper *wrapper, const char *icon_name, int size, gboolean use_fallbacks)
|
||||||
{
|
{
|
||||||
if (!wrapper)
|
if (!wrapper)
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -761,6 +761,8 @@ char *get_icon_path(IconThemeWrapper *wrapper, const char *icon_name, int size)
|
|||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!use_fallbacks)
|
||||||
|
goto notfound;
|
||||||
fprintf(stderr, YELLOW "Icon not found in default theme: %s" RESET "\n", icon_name);
|
fprintf(stderr, YELLOW "Icon not found in default theme: %s" RESET "\n", icon_name);
|
||||||
load_fallbacks(wrapper);
|
load_fallbacks(wrapper);
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ void free_icon_theme(IconTheme *theme);
|
|||||||
|
|
||||||
// Returns the full path to an icon file (or NULL) given the list of icon themes to search and the icon name
|
// Returns the full path to an icon file (or NULL) given the list of icon themes to search and the icon name
|
||||||
// Note: needs to be released with free().
|
// Note: needs to be released with free().
|
||||||
char *get_icon_path(IconThemeWrapper *wrapper, const char *icon_name, int size);
|
char *get_icon_path(IconThemeWrapper *wrapper, const char *icon_name, int size, gboolean use_fallbacks);
|
||||||
|
|
||||||
// Returns a list of the directories used to store icons.
|
// Returns a list of the directories used to store icons.
|
||||||
// Do not free the result, it is cached.
|
// Do not free the result, it is cached.
|
||||||
|
|||||||
@@ -54,6 +54,8 @@ int startup_notifications;
|
|||||||
Background *launcher_icon_bg;
|
Background *launcher_icon_bg;
|
||||||
GList *launcher_icon_gradients;
|
GList *launcher_icon_gradients;
|
||||||
|
|
||||||
|
IconThemeWrapper *icon_theme_wrapper;
|
||||||
|
|
||||||
Imlib_Image scale_icon(Imlib_Image original, int icon_size);
|
Imlib_Image scale_icon(Imlib_Image original, int icon_size);
|
||||||
void free_icon(Imlib_Image icon);
|
void free_icon(Imlib_Image icon);
|
||||||
void launcher_icon_dump_geometry(void *obj, int indent);
|
void launcher_icon_dump_geometry(void *obj, int indent);
|
||||||
@@ -114,10 +116,16 @@ void init_launcher_panel(void *p)
|
|||||||
schedule_panel_redraw();
|
schedule_panel_redraw();
|
||||||
instantiate_area_gradients(&launcher->area);
|
instantiate_area_gradients(&launcher->area);
|
||||||
|
|
||||||
launcher_load_themes(launcher);
|
load_icon_themes();
|
||||||
launcher_load_icons(launcher);
|
launcher_load_icons(launcher);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void free_icon_themes()
|
||||||
|
{
|
||||||
|
free_themes(icon_theme_wrapper);
|
||||||
|
icon_theme_wrapper = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
void cleanup_launcher()
|
void cleanup_launcher()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < num_panels; i++) {
|
for (int i = 0; i < num_panels; i++) {
|
||||||
@@ -160,9 +168,6 @@ void cleanup_launcher_theme(Launcher *launcher)
|
|||||||
}
|
}
|
||||||
g_slist_free(launcher->list_icons);
|
g_slist_free(launcher->list_icons);
|
||||||
launcher->list_icons = NULL;
|
launcher->list_icons = NULL;
|
||||||
|
|
||||||
free_themes(launcher->icon_theme_wrapper);
|
|
||||||
launcher->icon_theme_wrapper = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int launcher_compute_icon_size(Launcher *launcher)
|
int launcher_compute_icon_size(Launcher *launcher)
|
||||||
@@ -246,7 +251,7 @@ gboolean resize_launcher(void *obj)
|
|||||||
launcher_reload_icon_image(launcher, launcherIcon);
|
launcher_reload_icon_image(launcher, launcherIcon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
save_icon_cache(launcher->icon_theme_wrapper);
|
save_icon_cache(icon_theme_wrapper);
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
gboolean needs_repositioning = FALSE;
|
gboolean needs_repositioning = FALSE;
|
||||||
@@ -565,15 +570,15 @@ void launcher_reload_icon_image(Launcher *launcher, LauncherIcon *launcherIcon)
|
|||||||
free_icon(launcherIcon->image_pressed);
|
free_icon(launcherIcon->image_pressed);
|
||||||
launcherIcon->image = NULL;
|
launcherIcon->image = NULL;
|
||||||
|
|
||||||
char *new_icon_path = get_icon_path(launcher->icon_theme_wrapper, launcherIcon->icon_name, launcherIcon->icon_size);
|
char *new_icon_path = get_icon_path(icon_theme_wrapper, launcherIcon->icon_name, launcherIcon->icon_size, TRUE);
|
||||||
if (new_icon_path)
|
if (new_icon_path)
|
||||||
launcherIcon->image = load_image(new_icon_path, 1);
|
launcherIcon->image = load_image(new_icon_path, TRUE);
|
||||||
// On loading error, fallback to default
|
// On loading error, fallback to default
|
||||||
if (!launcherIcon->image) {
|
if (!launcherIcon->image) {
|
||||||
free(new_icon_path);
|
free(new_icon_path);
|
||||||
new_icon_path = get_icon_path(launcher->icon_theme_wrapper, DEFAULT_ICON, launcherIcon->icon_size);
|
new_icon_path = get_icon_path(icon_theme_wrapper, DEFAULT_ICON, launcherIcon->icon_size, TRUE);
|
||||||
if (new_icon_path)
|
if (new_icon_path)
|
||||||
launcherIcon->image = imlib_load_image_immediately(new_icon_path);
|
launcherIcon->image = load_image(new_icon_path, TRUE);
|
||||||
}
|
}
|
||||||
Imlib_Image original = launcherIcon->image;
|
Imlib_Image original = launcherIcon->image;
|
||||||
launcherIcon->image = scale_icon(launcherIcon->image, launcherIcon->icon_size);
|
launcherIcon->image = scale_icon(launcherIcon->image, launcherIcon->icon_size);
|
||||||
@@ -595,10 +600,11 @@ void launcher_reload_icon_image(Launcher *launcher, LauncherIcon *launcherIcon)
|
|||||||
schedule_redraw(&launcherIcon->area);
|
schedule_redraw(&launcherIcon->area);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Populates the icon_theme_wrapper list
|
void load_icon_themes()
|
||||||
void launcher_load_themes(Launcher *launcher)
|
|
||||||
{
|
{
|
||||||
launcher->icon_theme_wrapper =
|
if (icon_theme_wrapper)
|
||||||
|
return;
|
||||||
|
icon_theme_wrapper =
|
||||||
load_themes(launcher_icon_theme_override
|
load_themes(launcher_icon_theme_override
|
||||||
? (icon_theme_name_config ? icon_theme_name_config
|
? (icon_theme_name_config ? icon_theme_name_config
|
||||||
: icon_theme_name_xsettings ? icon_theme_name_xsettings : "hicolor")
|
: icon_theme_name_xsettings ? icon_theme_name_xsettings : "hicolor")
|
||||||
@@ -608,14 +614,9 @@ void launcher_load_themes(Launcher *launcher)
|
|||||||
|
|
||||||
void launcher_default_icon_theme_changed()
|
void launcher_default_icon_theme_changed()
|
||||||
{
|
{
|
||||||
if (!launcher_enabled)
|
|
||||||
return;
|
|
||||||
if (launcher_icon_theme_override && icon_theme_name_config)
|
|
||||||
return;
|
|
||||||
for (int i = 0; i < num_panels; i++) {
|
for (int i = 0; i < num_panels; i++) {
|
||||||
Launcher *launcher = &panels[i].launcher;
|
Launcher *launcher = &panels[i].launcher;
|
||||||
cleanup_launcher_theme(launcher);
|
cleanup_launcher_theme(launcher);
|
||||||
launcher_load_themes(launcher);
|
|
||||||
launcher_load_icons(launcher);
|
launcher_load_icons(launcher);
|
||||||
launcher->area.resize_needed = 1;
|
launcher->area.resize_needed = 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,12 +12,15 @@
|
|||||||
#include "xsettings-client.h"
|
#include "xsettings-client.h"
|
||||||
#include "icon-theme-common.h"
|
#include "icon-theme-common.h"
|
||||||
|
|
||||||
|
extern IconThemeWrapper *icon_theme_wrapper;
|
||||||
|
void load_icon_themes();
|
||||||
|
void free_icon_themes();
|
||||||
|
|
||||||
typedef struct Launcher {
|
typedef struct Launcher {
|
||||||
// always start with area
|
// always start with area
|
||||||
Area area;
|
Area area;
|
||||||
GSList *list_apps; // List of char*, each is a path to a app.desktop file
|
GSList *list_apps; // List of char*, each is a path to a app.desktop file
|
||||||
GSList *list_icons; // List of LauncherIcon*
|
GSList *list_icons; // List of LauncherIcon*
|
||||||
IconThemeWrapper *icon_theme_wrapper;
|
|
||||||
int icon_size;
|
int icon_size;
|
||||||
} Launcher;
|
} Launcher;
|
||||||
|
|
||||||
@@ -65,8 +68,6 @@ 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);
|
||||||
// Populates the list_themes list
|
|
||||||
void launcher_load_themes(Launcher *launcher);
|
|
||||||
void launcher_action(LauncherIcon *icon, XEvent *e);
|
void launcher_action(LauncherIcon *icon, XEvent *e);
|
||||||
|
|
||||||
void test_launcher_read_desktop_file();
|
void test_launcher_read_desktop_file();
|
||||||
|
|||||||
115
src/panel.c
115
src/panel.c
@@ -180,6 +180,8 @@ void init_panel()
|
|||||||
|
|
||||||
fprintf(stderr, "panel items: %s\n", panel_items_order);
|
fprintf(stderr, "panel items: %s\n", panel_items_order);
|
||||||
|
|
||||||
|
icon_theme_wrapper = NULL;
|
||||||
|
|
||||||
init_tooltip();
|
init_tooltip();
|
||||||
init_systray();
|
init_systray();
|
||||||
init_launcher();
|
init_launcher();
|
||||||
@@ -190,6 +192,7 @@ void init_panel()
|
|||||||
init_taskbar();
|
init_taskbar();
|
||||||
init_separator();
|
init_separator();
|
||||||
init_execp();
|
init_execp();
|
||||||
|
init_button();
|
||||||
|
|
||||||
// number of panels (one monitor or 'all' monitors)
|
// number of panels (one monitor or 'all' monitors)
|
||||||
if (panel_config.monitor >= 0)
|
if (panel_config.monitor >= 0)
|
||||||
@@ -247,6 +250,8 @@ void init_panel()
|
|||||||
init_separator_panel(p);
|
init_separator_panel(p);
|
||||||
if (panel_items_order[k] == 'E')
|
if (panel_items_order[k] == 'E')
|
||||||
init_execp_panel(p);
|
init_execp_panel(p);
|
||||||
|
if (panel_items_order[k] == 'P')
|
||||||
|
init_button_panel(p);
|
||||||
}
|
}
|
||||||
set_panel_items_order(p);
|
set_panel_items_order(p);
|
||||||
|
|
||||||
@@ -440,8 +445,6 @@ gboolean resize_panel(void *obj)
|
|||||||
Taskbar *taskbar = &panel->taskbar[i];
|
Taskbar *taskbar = &panel->taskbar[i];
|
||||||
if (!taskbar->area.on_screen)
|
if (!taskbar->area.on_screen)
|
||||||
continue;
|
continue;
|
||||||
if (!taskbar->area.children)
|
|
||||||
continue;
|
|
||||||
if (panel_horizontal)
|
if (panel_horizontal)
|
||||||
taskbar->area.width = 2 * taskbar->area.paddingxlr;
|
taskbar->area.width = 2 * taskbar->area.paddingxlr;
|
||||||
else
|
else
|
||||||
@@ -516,6 +519,7 @@ gboolean resize_panel(void *obj)
|
|||||||
taskbar->area.width += total_size;
|
taskbar->area.width += total_size;
|
||||||
else
|
else
|
||||||
taskbar->area.height += total_size;
|
taskbar->area.height += total_size;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int i = 0; i < panel->num_desktops; i++) {
|
for (int i = 0; i < panel->num_desktops; i++) {
|
||||||
@@ -604,6 +608,7 @@ void set_panel_items_order(Panel *p)
|
|||||||
int i_execp = 0;
|
int i_execp = 0;
|
||||||
int i_separator = 0;
|
int i_separator = 0;
|
||||||
int i_freespace = 0;
|
int i_freespace = 0;
|
||||||
|
int i_button = 0;
|
||||||
for (int k = 0; k < strlen(panel_items_order); k++) {
|
for (int k = 0; k < strlen(panel_items_order); k++) {
|
||||||
if (panel_items_order[k] == 'L') {
|
if (panel_items_order[k] == 'L') {
|
||||||
p->area.children = g_list_append(p->area.children, &p->launcher);
|
p->area.children = g_list_append(p->area.children, &p->launcher);
|
||||||
@@ -641,6 +646,12 @@ void set_panel_items_order(Panel *p)
|
|||||||
if (item)
|
if (item)
|
||||||
p->area.children = g_list_append(p->area.children, (Area *)item->data);
|
p->area.children = g_list_append(p->area.children, (Area *)item->data);
|
||||||
}
|
}
|
||||||
|
if (panel_items_order[k] == 'P') {
|
||||||
|
GList *item = g_list_nth(p->button_list, i_button);
|
||||||
|
i_button++;
|
||||||
|
if (item)
|
||||||
|
p->area.children = g_list_append(p->area.children, (Area *)item->data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
initialize_positions(&p->area, 0);
|
initialize_positions(&p->area, 0);
|
||||||
}
|
}
|
||||||
@@ -709,36 +720,68 @@ void set_panel_window_geometry(Panel *panel)
|
|||||||
|
|
||||||
if (!panel->is_hidden) {
|
if (!panel->is_hidden) {
|
||||||
if (panel_horizontal) {
|
if (panel_horizontal) {
|
||||||
XMoveResizeWindow(server.display,
|
if (panel_position & TOP)
|
||||||
panel->main_win,
|
XMoveResizeWindow(server.display,
|
||||||
panel->posx,
|
panel->main_win,
|
||||||
panel->posy,
|
panel->posx,
|
||||||
panel->area.width,
|
panel->posy,
|
||||||
panel->area.height);
|
panel->area.width,
|
||||||
|
panel->area.height);
|
||||||
|
else
|
||||||
|
XMoveResizeWindow(server.display,
|
||||||
|
panel->main_win,
|
||||||
|
panel->posx,
|
||||||
|
panel->posy,
|
||||||
|
panel->area.width,
|
||||||
|
panel->area.height);
|
||||||
} else {
|
} else {
|
||||||
XMoveResizeWindow(server.display,
|
if (panel_position & LEFT)
|
||||||
panel->main_win,
|
XMoveResizeWindow(server.display,
|
||||||
panel->posx,
|
panel->main_win,
|
||||||
panel->posy,
|
panel->posx,
|
||||||
panel->area.width,
|
panel->posy,
|
||||||
panel->area.height);
|
panel->area.width,
|
||||||
|
panel->area.height);
|
||||||
|
else
|
||||||
|
XMoveResizeWindow(server.display,
|
||||||
|
panel->main_win,
|
||||||
|
panel->posx,
|
||||||
|
panel->posy,
|
||||||
|
panel->area.width,
|
||||||
|
panel->area.height);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
int diff = (panel_horizontal ? panel->area.height : panel->area.width) - panel_autohide_height;
|
int diff = (panel_horizontal ? panel->area.height : panel->area.width) - panel_autohide_height;
|
||||||
if (panel_horizontal) {
|
if (panel_horizontal) {
|
||||||
XMoveResizeWindow(server.display,
|
if (panel_position & TOP)
|
||||||
panel->main_win,
|
XMoveResizeWindow(server.display,
|
||||||
panel->posx,
|
panel->main_win,
|
||||||
panel->posy + diff,
|
panel->posx,
|
||||||
panel->hidden_width,
|
panel->posy,
|
||||||
panel->hidden_height);
|
panel->hidden_width,
|
||||||
|
panel->hidden_height);
|
||||||
|
else
|
||||||
|
XMoveResizeWindow(server.display,
|
||||||
|
panel->main_win,
|
||||||
|
panel->posx,
|
||||||
|
panel->posy + diff,
|
||||||
|
panel->hidden_width,
|
||||||
|
panel->hidden_height);
|
||||||
} else {
|
} else {
|
||||||
XMoveResizeWindow(server.display,
|
if (panel_position & LEFT)
|
||||||
panel->main_win,
|
XMoveResizeWindow(server.display,
|
||||||
panel->posx + diff,
|
panel->main_win,
|
||||||
panel->posy,
|
panel->posx,
|
||||||
panel->hidden_width,
|
panel->posy,
|
||||||
panel->hidden_height);
|
panel->hidden_width,
|
||||||
|
panel->hidden_height);
|
||||||
|
else
|
||||||
|
XMoveResizeWindow(server.display,
|
||||||
|
panel->main_win,
|
||||||
|
panel->posx + diff,
|
||||||
|
panel->posy,
|
||||||
|
panel->hidden_width,
|
||||||
|
panel->hidden_height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -955,6 +998,16 @@ Execp *click_execp(Panel *panel, int x, int y)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Button *click_button(Panel *panel, int x, int y)
|
||||||
|
{
|
||||||
|
for (GList *l = panel->button_list; l; l = l->next) {
|
||||||
|
Button *button = (Button *)l->data;
|
||||||
|
if (area_is_under_mouse(button, x, y))
|
||||||
|
return button;
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
void stop_autohide_timeout(Panel *p)
|
void stop_autohide_timeout(Panel *p)
|
||||||
{
|
{
|
||||||
stop_timeout(p->autohide_timeout);
|
stop_timeout(p->autohide_timeout);
|
||||||
@@ -1051,7 +1104,16 @@ const char *get_default_font()
|
|||||||
|
|
||||||
void default_icon_theme_changed()
|
void default_icon_theme_changed()
|
||||||
{
|
{
|
||||||
|
if (!launcher_enabled && !panel_config.button_list)
|
||||||
|
return;
|
||||||
|
if (launcher_icon_theme_override && icon_theme_name_config)
|
||||||
|
return;
|
||||||
|
|
||||||
|
free_icon_themes();
|
||||||
|
load_icon_themes();
|
||||||
|
|
||||||
launcher_default_icon_theme_changed();
|
launcher_default_icon_theme_changed();
|
||||||
|
button_default_icon_theme_changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
void default_font_changed()
|
void default_font_changed()
|
||||||
@@ -1061,6 +1123,7 @@ void default_font_changed()
|
|||||||
#endif
|
#endif
|
||||||
clock_default_font_changed();
|
clock_default_font_changed();
|
||||||
execp_default_font_changed();
|
execp_default_font_changed();
|
||||||
|
button_default_font_changed();
|
||||||
taskbar_default_font_changed();
|
taskbar_default_font_changed();
|
||||||
taskbarname_default_font_changed();
|
taskbarname_default_font_changed();
|
||||||
tooltip_default_font_changed();
|
tooltip_default_font_changed();
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
#include "freespace.h"
|
#include "freespace.h"
|
||||||
#include "execplugin.h"
|
#include "execplugin.h"
|
||||||
#include "separator.h"
|
#include "separator.h"
|
||||||
|
#include "button.h"
|
||||||
|
|
||||||
#ifdef ENABLE_BATTERY
|
#ifdef ENABLE_BATTERY
|
||||||
#include "battery.h"
|
#include "battery.h"
|
||||||
@@ -135,6 +136,7 @@ typedef struct Panel {
|
|||||||
GList *freespace_list;
|
GList *freespace_list;
|
||||||
GList *separator_list;
|
GList *separator_list;
|
||||||
GList *execp_list;
|
GList *execp_list;
|
||||||
|
GList *button_list;
|
||||||
|
|
||||||
// Autohide
|
// Autohide
|
||||||
gboolean is_hidden;
|
gboolean is_hidden;
|
||||||
@@ -189,6 +191,7 @@ Battery *click_battery(Panel *panel, int x, int y);
|
|||||||
|
|
||||||
Area *click_area(Panel *panel, int x, int y);
|
Area *click_area(Panel *panel, int x, int y);
|
||||||
Execp *click_execp(Panel *panel, int x, int y);
|
Execp *click_execp(Panel *panel, int x, int y);
|
||||||
|
Button *click_button(Panel *panel, int x, int y);
|
||||||
|
|
||||||
void autohide_show(void *p);
|
void autohide_show(void *p);
|
||||||
void autohide_hide(void *p);
|
void autohide_hide(void *p);
|
||||||
@@ -200,4 +203,7 @@ const char *get_default_font();
|
|||||||
void default_icon_theme_changed();
|
void default_icon_theme_changed();
|
||||||
void default_font_changed();
|
void default_font_changed();
|
||||||
|
|
||||||
|
void free_icon(Imlib_Image icon);
|
||||||
|
Imlib_Image scale_icon(Imlib_Image original, int icon_size);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -188,6 +188,7 @@ void draw_separator_line(void *obj, cairo_t *c)
|
|||||||
|
|
||||||
void draw_separator_dots(void *obj, cairo_t *c)
|
void draw_separator_dots(void *obj, cairo_t *c)
|
||||||
{
|
{
|
||||||
|
const double PI = 3.14159265359;
|
||||||
Separator *separator = (Separator *)obj;
|
Separator *separator = (Separator *)obj;
|
||||||
if (separator->thickness <= 0)
|
if (separator->thickness <= 0)
|
||||||
return;
|
return;
|
||||||
@@ -214,14 +215,14 @@ void draw_separator_dots(void *obj, cairo_t *c)
|
|||||||
offset + separator->thickness / 2.0,
|
offset + separator->thickness / 2.0,
|
||||||
separator->thickness / 2.0,
|
separator->thickness / 2.0,
|
||||||
0,
|
0,
|
||||||
2 * M_PI);
|
2 * PI);
|
||||||
} else {
|
} else {
|
||||||
cairo_arc(c,
|
cairo_arc(c,
|
||||||
offset + separator->thickness / 2.0,
|
offset + separator->thickness / 2.0,
|
||||||
separator->area.height / 2.0,
|
separator->area.height / 2.0,
|
||||||
separator->thickness / 2.0,
|
separator->thickness / 2.0,
|
||||||
0,
|
0,
|
||||||
2 * M_PI);
|
2 * PI);
|
||||||
}
|
}
|
||||||
cairo_stroke_preserve(c);
|
cairo_stroke_preserve(c);
|
||||||
cairo_fill(c);
|
cairo_fill(c);
|
||||||
|
|||||||
@@ -256,7 +256,7 @@ void get_root_pixmap()
|
|||||||
gcv.ts_x_origin = 0;
|
gcv.ts_x_origin = 0;
|
||||||
gcv.ts_y_origin = 0;
|
gcv.ts_y_origin = 0;
|
||||||
gcv.fill_style = FillTiled;
|
gcv.fill_style = FillTiled;
|
||||||
uint mask = GCTileStipXOrigin | GCTileStipYOrigin | GCFillStyle | GCTile;
|
unsigned mask = GCTileStipXOrigin | GCTileStipYOrigin | GCFillStyle | GCTile;
|
||||||
|
|
||||||
gcv.tile = server.root_pmap;
|
gcv.tile = server.root_pmap;
|
||||||
XChangeGC(server.display, server.gc, mask, &gcv);
|
XChangeGC(server.display, server.gc, mask, &gcv);
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
|
#include <regex.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -54,6 +55,8 @@ int systray_monitor;
|
|||||||
int chrono;
|
int chrono;
|
||||||
int systray_composited;
|
int systray_composited;
|
||||||
int systray_profile;
|
int systray_profile;
|
||||||
|
char *systray_hide_name_filter;
|
||||||
|
regex_t *systray_hide_name_regex;
|
||||||
// background pixmap if we render ourselves the icons
|
// background pixmap if we render ourselves the icons
|
||||||
static Pixmap render_background;
|
static Pixmap render_background;
|
||||||
|
|
||||||
@@ -81,6 +84,8 @@ void default_systray()
|
|||||||
systray.area.size_mode = LAYOUT_FIXED;
|
systray.area.size_mode = LAYOUT_FIXED;
|
||||||
systray.area._resize = resize_systray;
|
systray.area._resize = resize_systray;
|
||||||
systray_profile = getenv("SYSTRAY_PROFILING") != NULL;
|
systray_profile = getenv("SYSTRAY_PROFILING") != NULL;
|
||||||
|
systray_hide_name_filter = NULL;
|
||||||
|
systray_hide_name_regex = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cleanup_systray()
|
void cleanup_systray()
|
||||||
@@ -95,6 +100,12 @@ void cleanup_systray()
|
|||||||
XFreePixmap(server.display, render_background);
|
XFreePixmap(server.display, render_background);
|
||||||
render_background = 0;
|
render_background = 0;
|
||||||
}
|
}
|
||||||
|
if (systray_hide_name_regex) {
|
||||||
|
regfree(systray_hide_name_regex);
|
||||||
|
free_and_null(systray_hide_name_regex);
|
||||||
|
}
|
||||||
|
if (systray_hide_name_filter)
|
||||||
|
free_and_null(systray_hide_name_filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
void init_systray()
|
void init_systray()
|
||||||
@@ -573,6 +584,26 @@ void print_icons()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gboolean reject_icon(Window win)
|
||||||
|
{
|
||||||
|
if (systray_hide_name_filter && strlen(systray_hide_name_filter)) {
|
||||||
|
if (!systray_hide_name_regex) {
|
||||||
|
systray_hide_name_regex = (regex_t *) calloc(1, sizeof(*systray_hide_name_regex));
|
||||||
|
if (regcomp(systray_hide_name_regex, systray_hide_name_filter, 0) != 0) {
|
||||||
|
fprintf(stderr, RED "Could not compile regex %s" RESET "\n", systray_hide_name_filter);
|
||||||
|
free_and_null(systray_hide_name_regex);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
char *name = get_window_name(win);
|
||||||
|
if (regexec(systray_hide_name_regex, name, 0, NULL, 0) == 0) {
|
||||||
|
fprintf(stderr, GREEN "Filtering out systray icon '%s'" RESET "\n", name);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
gboolean add_icon(Window win)
|
gboolean add_icon(Window win)
|
||||||
{
|
{
|
||||||
// Avoid duplicates
|
// Avoid duplicates
|
||||||
@@ -583,6 +614,10 @@ gboolean add_icon(Window win)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Filter out systray_hide_by_icon_name
|
||||||
|
if (reject_icon(win))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
// Dangerous actions begin
|
// Dangerous actions begin
|
||||||
XSync(server.display, False);
|
XSync(server.display, False);
|
||||||
error = FALSE;
|
error = FALSE;
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ extern gboolean systray_enabled;
|
|||||||
extern int systray_max_icon_size;
|
extern int systray_max_icon_size;
|
||||||
extern int systray_monitor;
|
extern int systray_monitor;
|
||||||
extern gboolean systray_profile;
|
extern gboolean systray_profile;
|
||||||
|
extern char *systray_hide_name_filter;
|
||||||
|
|
||||||
// default global data
|
// default global data
|
||||||
void default_systray();
|
void default_systray();
|
||||||
|
|||||||
@@ -301,8 +301,8 @@ void task_update_icon(Task *task)
|
|||||||
// get width, height and depth for the pixmap
|
// get width, height and depth for the pixmap
|
||||||
Window root;
|
Window root;
|
||||||
int icon_x, icon_y;
|
int icon_x, icon_y;
|
||||||
uint border_width, bpp;
|
unsigned border_width, bpp;
|
||||||
uint w, h;
|
unsigned w, h;
|
||||||
|
|
||||||
XGetGeometry(server.display, hints->icon_pixmap, &root, &icon_x, &icon_y, &w, &h, &border_width, &bpp);
|
XGetGeometry(server.display, hints->icon_pixmap, &root, &icon_x, &icon_y, &w, &h, &border_width, &bpp);
|
||||||
imlib_context_set_drawable(hints->icon_pixmap);
|
imlib_context_set_drawable(hints->icon_pixmap);
|
||||||
|
|||||||
19
src/tint.c
19
src/tint.c
@@ -269,10 +269,6 @@ const char *signal_name(int sig)
|
|||||||
return "SIGVTALRM: Virtual alarm clock (4.2 BSD).";
|
return "SIGVTALRM: Virtual alarm clock (4.2 BSD).";
|
||||||
case SIGPROF:
|
case SIGPROF:
|
||||||
return "SIGPROF: Profiling alarm clock (4.2 BSD).";
|
return "SIGPROF: Profiling alarm clock (4.2 BSD).";
|
||||||
case SIGWINCH:
|
|
||||||
return "SIGWINCH: Window size change (4.3 BSD, Sun).";
|
|
||||||
case SIGIO:
|
|
||||||
return "SIGIO: Pollable event occurred (System V) / I/O now possible (4.2 BSD).";
|
|
||||||
// case SIGPWR: return "SIGPWR: Power failure restart (System V).";
|
// case SIGPWR: return "SIGPWR: Power failure restart (System V).";
|
||||||
case SIGSYS:
|
case SIGSYS:
|
||||||
return "SIGSYS: Bad system call.";
|
return "SIGSYS: Bad system call.";
|
||||||
@@ -397,6 +393,7 @@ void init(int argc, char *argv[])
|
|||||||
default_taskbar();
|
default_taskbar();
|
||||||
default_tooltip();
|
default_tooltip();
|
||||||
default_execp();
|
default_execp();
|
||||||
|
default_button();
|
||||||
default_panel();
|
default_panel();
|
||||||
|
|
||||||
// Read command line arguments
|
// Read command line arguments
|
||||||
@@ -604,7 +601,7 @@ void init_X11_post_config()
|
|||||||
for (int i = 0; data_dirs[i] != NULL; i++) {
|
for (int i = 0; data_dirs[i] != NULL; i++) {
|
||||||
gchar *path = g_build_filename(data_dirs[i], "tint2", "default_icon.png", NULL);
|
gchar *path = g_build_filename(data_dirs[i], "tint2", "default_icon.png", NULL);
|
||||||
if (g_file_test(path, G_FILE_TEST_EXISTS))
|
if (g_file_test(path, G_FILE_TEST_EXISTS))
|
||||||
default_icon = imlib_load_image(path);
|
default_icon = load_image(path, TRUE);
|
||||||
g_free(path);
|
g_free(path);
|
||||||
}
|
}
|
||||||
if (!default_icon) {
|
if (!default_icon) {
|
||||||
@@ -616,6 +613,7 @@ void init_X11_post_config()
|
|||||||
|
|
||||||
void cleanup()
|
void cleanup()
|
||||||
{
|
{
|
||||||
|
cleanup_button();
|
||||||
cleanup_execp();
|
cleanup_execp();
|
||||||
cleanup_systray();
|
cleanup_systray();
|
||||||
cleanup_tooltip();
|
cleanup_tooltip();
|
||||||
@@ -816,6 +814,8 @@ int tint2_handles_click(Panel *panel, XButtonEvent *e)
|
|||||||
#endif
|
#endif
|
||||||
if (click_execp(panel, e->x, e->y))
|
if (click_execp(panel, e->x, e->y))
|
||||||
return 1;
|
return 1;
|
||||||
|
if (click_button(panel, e->x, e->y))
|
||||||
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -979,6 +979,15 @@ void event_button_release(XEvent *e)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Button *button = click_button(panel, e->xbutton.x, e->xbutton.y);
|
||||||
|
if (button) {
|
||||||
|
button_action(button, e->xbutton.button, e->xbutton.x - button->area.posx, e->xbutton.y - button->area.posy);
|
||||||
|
if (panel_layer == BOTTOM_LAYER)
|
||||||
|
XLowerWindow(server.display, panel->main_win);
|
||||||
|
task_drag = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
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) {
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ target_link_libraries( tint2conf ${X11_T2C_LIBRARIES}
|
|||||||
add_definitions( -DINSTALL_PREFIX=\"${CMAKE_INSTALL_PREFIX}\" )
|
add_definitions( -DINSTALL_PREFIX=\"${CMAKE_INSTALL_PREFIX}\" )
|
||||||
add_definitions( -DLOCALEDIR=\"${CMAKE_INSTALL_FULL_LOCALEDIR}\" )
|
add_definitions( -DLOCALEDIR=\"${CMAKE_INSTALL_FULL_LOCALEDIR}\" )
|
||||||
add_definitions( -DGETTEXT_PACKAGE=\"tint2conf\" )
|
add_definitions( -DGETTEXT_PACKAGE=\"tint2conf\" )
|
||||||
set_target_properties( tint2conf PROPERTIES COMPILE_FLAGS "-Wall -pthread -std=c99" )
|
set_target_properties( tint2conf PROPERTIES COMPILE_FLAGS "-Wall -pthread -std=c11" )
|
||||||
set_target_properties( tint2conf PROPERTIES LINK_FLAGS "-pthread" )
|
set_target_properties( tint2conf PROPERTIES LINK_FLAGS "-pthread" )
|
||||||
|
|
||||||
add_subdirectory(po)
|
add_subdirectory(po)
|
||||||
|
|||||||
@@ -846,6 +846,23 @@ void current_background_changed(GtkWidget *widget, gpointer data)
|
|||||||
if (index < 0)
|
if (index < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
gtk_widget_set_sensitive(gradient_combo_type, index > 0);
|
||||||
|
gtk_widget_set_sensitive(background_fill_color, index > 0);
|
||||||
|
gtk_widget_set_sensitive(background_border_color, index > 0);
|
||||||
|
gtk_widget_set_sensitive(background_gradient, index > 0);
|
||||||
|
gtk_widget_set_sensitive(background_fill_color_over, index > 0);
|
||||||
|
gtk_widget_set_sensitive(background_border_color_over, index > 0);
|
||||||
|
gtk_widget_set_sensitive(background_gradient_over, index > 0);
|
||||||
|
gtk_widget_set_sensitive(background_fill_color_press, index > 0);
|
||||||
|
gtk_widget_set_sensitive(background_border_color_press, index > 0);
|
||||||
|
gtk_widget_set_sensitive(background_gradient_press, index > 0);
|
||||||
|
gtk_widget_set_sensitive(background_border_width, index > 0);
|
||||||
|
gtk_widget_set_sensitive(background_border_sides_top, index > 0);
|
||||||
|
gtk_widget_set_sensitive(background_border_sides_bottom, index > 0);
|
||||||
|
gtk_widget_set_sensitive(background_border_sides_left, index > 0);
|
||||||
|
gtk_widget_set_sensitive(background_border_sides_right, index > 0);
|
||||||
|
gtk_widget_set_sensitive(background_corner_radius, index > 0);
|
||||||
|
|
||||||
background_updates_disabled = TRUE;
|
background_updates_disabled = TRUE;
|
||||||
|
|
||||||
GtkTreePath *path;
|
GtkTreePath *path;
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ void gradient_create_new(GradientConfigType t)
|
|||||||
gtk_list_store_set(gradient_ids, &iter,
|
gtk_list_store_set(gradient_ids, &iter,
|
||||||
grColPixbuf, NULL,
|
grColPixbuf, NULL,
|
||||||
grColId, &index,
|
grColId, &index,
|
||||||
grColText, "",
|
grColText, index == 0 ? _("None") : "",
|
||||||
-1);
|
-1);
|
||||||
|
|
||||||
gradient_update_image(index);
|
gradient_update_image(index);
|
||||||
@@ -239,6 +239,8 @@ void gradient_duplicate(GtkWidget *widget, gpointer data)
|
|||||||
|
|
||||||
GradientConfig *g = (GradientConfig *)calloc(1, sizeof(GradientConfig));
|
GradientConfig *g = (GradientConfig *)calloc(1, sizeof(GradientConfig));
|
||||||
g->type = g_old->type;
|
g->type = g_old->type;
|
||||||
|
g->start_color = g_old->start_color;
|
||||||
|
g->end_color = g_old->end_color;
|
||||||
g->extra_color_stops = g_list_copy_deep(g->extra_color_stops, copy_GradientConfigColorStop, NULL);
|
g->extra_color_stops = g_list_copy_deep(g->extra_color_stops, copy_GradientConfigColorStop, NULL);
|
||||||
gradients = g_list_append(gradients, g);
|
gradients = g_list_append(gradients, g);
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
@@ -352,7 +354,7 @@ void gradient_update(GtkWidget *widget, gpointer data)
|
|||||||
if (gradient_updates_disabled)
|
if (gradient_updates_disabled)
|
||||||
return;
|
return;
|
||||||
int index = gtk_combo_box_get_active(GTK_COMBO_BOX(current_gradient));
|
int index = gtk_combo_box_get_active(GTK_COMBO_BOX(current_gradient));
|
||||||
if (index < 0)
|
if (index <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
GtkTreePath *path;
|
GtkTreePath *path;
|
||||||
@@ -394,6 +396,13 @@ void current_gradient_changed(GtkWidget *widget, gpointer data)
|
|||||||
if (index < 0)
|
if (index < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
gtk_widget_set_sensitive(gradient_combo_type, index > 0);
|
||||||
|
gtk_widget_set_sensitive(gradient_start_color, index > 0);
|
||||||
|
gtk_widget_set_sensitive(gradient_end_color, index > 0);
|
||||||
|
gtk_widget_set_sensitive(current_gradient_stop, index > 0);
|
||||||
|
gtk_widget_set_sensitive(gradient_stop_color, index > 0);
|
||||||
|
gtk_widget_set_sensitive(gradient_stop_offset, index > 0);
|
||||||
|
|
||||||
gradient_updates_disabled = TRUE;
|
gradient_updates_disabled = TRUE;
|
||||||
|
|
||||||
GradientConfig *g = (GradientConfig *)g_list_nth(gradients, (guint)index)->data;
|
GradientConfig *g = (GradientConfig *)g_list_nth(gradients, (guint)index)->data;
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ void refresh_theme(const char *given_path);
|
|||||||
void remove_theme(const char *given_path);
|
void remove_theme(const char *given_path);
|
||||||
static void theme_selection_changed(GtkWidget *treeview, gpointer userdata);
|
static void theme_selection_changed(GtkWidget *treeview, gpointer userdata);
|
||||||
static gchar *find_theme_in_system_dirs(const gchar *given_name);
|
static gchar *find_theme_in_system_dirs(const gchar *given_name);
|
||||||
|
static void load_specific_themes(char **paths, int count);
|
||||||
|
|
||||||
// ====== Utilities ======
|
// ====== Utilities ======
|
||||||
|
|
||||||
@@ -118,7 +119,7 @@ gchar *import_no_overwrite(const char *filepath)
|
|||||||
if (!g_file_test(newpath, G_FILE_TEST_EXISTS)) {
|
if (!g_file_test(newpath, G_FILE_TEST_EXISTS)) {
|
||||||
copy_file(filepath, newpath);
|
copy_file(filepath, newpath);
|
||||||
theme_list_append(newpath);
|
theme_list_append(newpath);
|
||||||
g_timeout_add(SNAPSHOT_TICK, (GSourceFunc)update_snapshot, NULL);
|
g_timeout_add(SNAPSHOT_TICK, update_snapshot, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
return newpath;
|
return newpath;
|
||||||
@@ -137,7 +138,7 @@ void import_with_overwrite(const char *filepath, const char *newpath)
|
|||||||
if (theme_is_editable(newpath)) {
|
if (theme_is_editable(newpath)) {
|
||||||
if (!theme_existed) {
|
if (!theme_existed) {
|
||||||
theme_list_append(newpath);
|
theme_list_append(newpath);
|
||||||
g_timeout_add(SNAPSHOT_TICK, (GSourceFunc)update_snapshot, NULL);
|
g_timeout_add(SNAPSHOT_TICK, update_snapshot, NULL);
|
||||||
} else {
|
} else {
|
||||||
int unused = system("killall -SIGUSR1 tint2 || pkill -SIGUSR1 -x tint2");
|
int unused = system("killall -SIGUSR1 tint2 || pkill -SIGUSR1 -x tint2");
|
||||||
(void)unused;
|
(void)unused;
|
||||||
@@ -157,7 +158,7 @@ static void menuImportFile();
|
|||||||
static void menuSaveAs();
|
static void menuSaveAs();
|
||||||
static void menuDelete();
|
static void menuDelete();
|
||||||
static void menuReset();
|
static void menuReset();
|
||||||
static void edit_theme();
|
static gboolean edit_theme(gpointer ignored);
|
||||||
static void make_selected_theme_default();
|
static void make_selected_theme_default();
|
||||||
static void menuAbout();
|
static void menuAbout();
|
||||||
static gboolean view_onPopupMenu(GtkWidget *treeview, gpointer userdata);
|
static gboolean view_onPopupMenu(GtkWidget *treeview, gpointer userdata);
|
||||||
@@ -166,6 +167,7 @@ static void viewRowActivated(GtkTreeView *tree_view, GtkTreePath *path, GtkTreeV
|
|||||||
|
|
||||||
static void select_first_theme();
|
static void select_first_theme();
|
||||||
static void load_all_themes();
|
static void load_all_themes();
|
||||||
|
static void reload_all_themes();
|
||||||
|
|
||||||
// ====== Globals ======
|
// ====== Globals ======
|
||||||
|
|
||||||
@@ -255,7 +257,7 @@ int main(int argc, char **argv)
|
|||||||
{"ThemeEdit", GTK_STOCK_PROPERTIES, _("_Edit theme..."), NULL, _("Edit the selected theme"), G_CALLBACK(edit_theme)},
|
{"ThemeEdit", GTK_STOCK_PROPERTIES, _("_Edit theme..."), NULL, _("Edit the selected theme"), G_CALLBACK(edit_theme)},
|
||||||
{"ThemeMakeDefault", GTK_STOCK_APPLY, _("_Make default"), NULL, _("Replace the default theme with the selected one"), G_CALLBACK(make_selected_theme_default)},
|
{"ThemeMakeDefault", GTK_STOCK_APPLY, _("_Make default"), NULL, _("Replace the default theme with the selected one"), G_CALLBACK(make_selected_theme_default)},
|
||||||
{"ThemeRefresh", GTK_STOCK_REFRESH, _("Refresh"), NULL, _("Redraw the selected theme"), G_CALLBACK(refresh_current_theme)},
|
{"ThemeRefresh", GTK_STOCK_REFRESH, _("Refresh"), NULL, _("Redraw the selected theme"), G_CALLBACK(refresh_current_theme)},
|
||||||
{"RefreshAll", GTK_STOCK_REFRESH, _("Refresh all"), NULL, _("Redraw all themes"), G_CALLBACK(load_all_themes)},
|
{"RefreshAll", GTK_STOCK_REFRESH, _("Refresh all"), NULL, _("Redraw all themes"), G_CALLBACK(reload_all_themes)},
|
||||||
{"Quit", GTK_STOCK_QUIT, _("_Quit"), "<control>Q", _("Quit"), G_CALLBACK(gtk_main_quit)},
|
{"Quit", GTK_STOCK_QUIT, _("_Quit"), "<control>Q", _("Quit"), G_CALLBACK(gtk_main_quit)},
|
||||||
{"HelpMenu", NULL, _("_Help"), NULL, NULL, NULL},
|
{"HelpMenu", NULL, _("_Help"), NULL, NULL, NULL},
|
||||||
{"HelpAbout", GTK_STOCK_ABOUT, _("_About"), "<Control>A", _("About"), G_CALLBACK(menuAbout)}};
|
{"HelpAbout", GTK_STOCK_ABOUT, _("_About"), "<Control>A", _("About"), G_CALLBACK(menuAbout)}};
|
||||||
@@ -304,9 +306,15 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
// load themes
|
// load themes
|
||||||
load_all_themes();
|
load_all_themes();
|
||||||
|
argc--, argv++;
|
||||||
|
if (argc > 0) {
|
||||||
|
load_specific_themes(argv, argc);
|
||||||
|
g_timeout_add(SNAPSHOT_TICK, edit_theme, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
gtk_widget_show_all(g_window);
|
gtk_widget_show_all(g_window);
|
||||||
gtk_main();
|
gtk_main();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -635,11 +643,11 @@ void select_theme(const char *given_path)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Edits the selected theme. If it is read-only, it copies first to ~.
|
// Edits the selected theme. If it is read-only, it copies first to ~.
|
||||||
static void edit_theme()
|
static gboolean edit_theme(gpointer ignored)
|
||||||
{
|
{
|
||||||
gchar *filepath = get_selected_theme_or_warn();
|
gchar *filepath = get_selected_theme_or_warn();
|
||||||
if (!filepath)
|
if (!filepath)
|
||||||
return;
|
return FALSE;
|
||||||
|
|
||||||
gboolean editable = theme_is_editable(filepath);
|
gboolean editable = theme_is_editable(filepath);
|
||||||
if (!editable) {
|
if (!editable) {
|
||||||
@@ -657,6 +665,8 @@ static void edit_theme()
|
|||||||
g_free(filepath);
|
g_free(filepath);
|
||||||
|
|
||||||
destroy_please_wait();
|
destroy_please_wait();
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void make_selected_theme_default()
|
static void make_selected_theme_default()
|
||||||
@@ -694,7 +704,7 @@ static void make_selected_theme_default()
|
|||||||
|
|
||||||
static void viewRowActivated(GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data)
|
static void viewRowActivated(GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data)
|
||||||
{
|
{
|
||||||
edit_theme();
|
edit_theme(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ====== Theme load/reload ======
|
// ====== Theme load/reload ======
|
||||||
@@ -826,7 +836,72 @@ static void load_all_themes()
|
|||||||
have_iter = gtk_tree_model_iter_next(model, &iter);
|
have_iter = gtk_tree_model_iter_next(model, &iter);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_timeout_add(SNAPSHOT_TICK, (GSourceFunc)update_snapshot, NULL);
|
g_timeout_add(SNAPSHOT_TICK, update_snapshot, NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void reload_all_themes()
|
||||||
|
{
|
||||||
|
ensure_default_theme_exists();
|
||||||
|
|
||||||
|
gtk_list_store_clear(GTK_LIST_STORE(theme_list_store));
|
||||||
|
theme_selection_changed(NULL, NULL);
|
||||||
|
|
||||||
|
gboolean found_themes = FALSE;
|
||||||
|
if (load_user_themes())
|
||||||
|
found_themes = TRUE;
|
||||||
|
if (load_system_themes())
|
||||||
|
found_themes = TRUE;
|
||||||
|
|
||||||
|
if (found_themes) {
|
||||||
|
select_first_theme();
|
||||||
|
|
||||||
|
GtkTreeIter iter;
|
||||||
|
GtkTreeModel *model;
|
||||||
|
gboolean have_iter;
|
||||||
|
|
||||||
|
model = gtk_tree_view_get_model(GTK_TREE_VIEW(g_theme_view));
|
||||||
|
have_iter = gtk_tree_model_get_iter_first(model, &iter);
|
||||||
|
while (have_iter) {
|
||||||
|
gtk_list_store_set(theme_list_store, &iter, COL_SNAPSHOT, NULL, COL_FORCE_REFRESH, TRUE, -1);
|
||||||
|
have_iter = gtk_tree_model_iter_next(model, &iter);
|
||||||
|
}
|
||||||
|
|
||||||
|
g_timeout_add(SNAPSHOT_TICK, update_snapshot, NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void load_specific_themes(char **paths, int count)
|
||||||
|
{
|
||||||
|
ensure_default_theme_exists();
|
||||||
|
|
||||||
|
gboolean found_themes = FALSE;
|
||||||
|
while (count > 0) {
|
||||||
|
// Load configs
|
||||||
|
const char *file_name = paths[0];
|
||||||
|
paths++, count--;
|
||||||
|
if (g_file_test(file_name, G_FILE_TEST_IS_REGULAR) || g_file_test(file_name, G_FILE_TEST_IS_SYMLINK) ) {
|
||||||
|
theme_list_append(file_name);
|
||||||
|
if (!found_themes) {
|
||||||
|
select_theme(file_name);
|
||||||
|
found_themes = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (found_themes) {
|
||||||
|
GtkTreeIter iter;
|
||||||
|
GtkTreeModel *model;
|
||||||
|
gboolean have_iter;
|
||||||
|
|
||||||
|
model = gtk_tree_view_get_model(GTK_TREE_VIEW(g_theme_view));
|
||||||
|
have_iter = gtk_tree_model_get_iter_first(model, &iter);
|
||||||
|
while (have_iter) {
|
||||||
|
gtk_list_store_set(theme_list_store, &iter, COL_SNAPSHOT, NULL, -1);
|
||||||
|
have_iter = gtk_tree_model_iter_next(model, &iter);
|
||||||
|
}
|
||||||
|
|
||||||
|
g_timeout_add(SNAPSHOT_TICK, update_snapshot, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -837,7 +912,7 @@ void refresh_current_theme()
|
|||||||
GtkTreeModel *model;
|
GtkTreeModel *model;
|
||||||
if (gtk_tree_selection_get_selected(GTK_TREE_SELECTION(sel), &model, &iter)) {
|
if (gtk_tree_selection_get_selected(GTK_TREE_SELECTION(sel), &model, &iter)) {
|
||||||
gtk_list_store_set(theme_list_store, &iter, COL_SNAPSHOT, NULL, -1);
|
gtk_list_store_set(theme_list_store, &iter, COL_SNAPSHOT, NULL, -1);
|
||||||
g_timeout_add(SNAPSHOT_TICK, (GSourceFunc)update_snapshot, NULL);
|
g_timeout_add(SNAPSHOT_TICK, update_snapshot, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -852,7 +927,7 @@ void refresh_theme(const char *given_path)
|
|||||||
gtk_tree_model_get(model, &iter, COL_THEME_FILE, &filepath, -1);
|
gtk_tree_model_get(model, &iter, COL_THEME_FILE, &filepath, -1);
|
||||||
if (g_str_equal(filepath, given_path)) {
|
if (g_str_equal(filepath, given_path)) {
|
||||||
gtk_list_store_set(theme_list_store, &iter, COL_SNAPSHOT, NULL, -1);
|
gtk_list_store_set(theme_list_store, &iter, COL_SNAPSHOT, NULL, -1);
|
||||||
g_timeout_add(SNAPSHOT_TICK, (GSourceFunc)update_snapshot, NULL);
|
g_timeout_add(SNAPSHOT_TICK, update_snapshot, NULL);
|
||||||
g_free(filepath);
|
g_free(filepath);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SNAPSHOT_TICK 190
|
#define SNAPSHOT_TICK 190
|
||||||
gboolean update_snapshot();
|
gboolean update_snapshot(gpointer ignored);
|
||||||
void menuApply();
|
void menuApply();
|
||||||
void refresh_current_theme();
|
void refresh_current_theme();
|
||||||
extern GtkWidget *g_window;
|
extern GtkWidget *g_window;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -101,7 +101,7 @@ GtkWidget *ac_connected_cmd, *ac_disconnected_cmd;
|
|||||||
// systray
|
// systray
|
||||||
GtkWidget *systray_icon_order, *systray_padding_x, *systray_padding_y, *systray_spacing;
|
GtkWidget *systray_icon_order, *systray_padding_x, *systray_padding_y, *systray_spacing;
|
||||||
GtkWidget *systray_icon_size, *systray_icon_opacity, *systray_icon_saturation, *systray_icon_brightness;
|
GtkWidget *systray_icon_size, *systray_icon_opacity, *systray_icon_saturation, *systray_icon_brightness;
|
||||||
GtkWidget *systray_background, *systray_monitor;
|
GtkWidget *systray_background, *systray_monitor, *systray_name_filter;
|
||||||
|
|
||||||
// tooltip
|
// tooltip
|
||||||
GtkWidget *tooltip_padding_x, *tooltip_padding_y, *tooltip_font, *tooltip_font_set, *tooltip_font_color;
|
GtkWidget *tooltip_padding_x, *tooltip_padding_y, *tooltip_font, *tooltip_font_set, *tooltip_font_color;
|
||||||
@@ -115,6 +115,9 @@ GArray *separators;
|
|||||||
// Executors
|
// Executors
|
||||||
GArray *executors;
|
GArray *executors;
|
||||||
|
|
||||||
|
// Buttons
|
||||||
|
GArray *buttons;
|
||||||
|
|
||||||
// launcher
|
// launcher
|
||||||
|
|
||||||
GtkListStore *launcher_apps, *all_apps;
|
GtkListStore *launcher_apps, *all_apps;
|
||||||
@@ -155,6 +158,7 @@ void create_task_status(GtkWidget *notebook,
|
|||||||
GtkWidget **task_status_background_set);
|
GtkWidget **task_status_background_set);
|
||||||
void create_separator(GtkWidget *parent, int i);
|
void create_separator(GtkWidget *parent, int i);
|
||||||
void create_execp(GtkWidget *parent, int i);
|
void create_execp(GtkWidget *parent, int i);
|
||||||
|
void create_button(GtkWidget *parent, int i);
|
||||||
void create_clock(GtkWidget *parent);
|
void create_clock(GtkWidget *parent);
|
||||||
void create_systemtray(GtkWidget *parent);
|
void create_systemtray(GtkWidget *parent);
|
||||||
void create_battery(GtkWidget *parent);
|
void create_battery(GtkWidget *parent);
|
||||||
@@ -227,6 +231,7 @@ GtkWidget *create_properties()
|
|||||||
|
|
||||||
separators = g_array_new(FALSE, TRUE, sizeof(Separator));
|
separators = g_array_new(FALSE, TRUE, sizeof(Separator));
|
||||||
executors = g_array_new(FALSE, TRUE, sizeof(Executor));
|
executors = g_array_new(FALSE, TRUE, sizeof(Executor));
|
||||||
|
buttons = g_array_new(FALSE, TRUE, sizeof(Button));
|
||||||
|
|
||||||
// global layer
|
// global layer
|
||||||
view = gtk_dialog_new();
|
view = gtk_dialog_new();
|
||||||
@@ -1048,6 +1053,11 @@ void create_panel_items(GtkWidget *parent)
|
|||||||
itemsColName, _("Executor"),
|
itemsColName, _("Executor"),
|
||||||
itemsColValue, "E",
|
itemsColValue, "E",
|
||||||
-1);
|
-1);
|
||||||
|
gtk_list_store_append(all_items, &iter);
|
||||||
|
gtk_list_store_set(all_items, &iter,
|
||||||
|
itemsColName, _("Button"),
|
||||||
|
itemsColValue, "P",
|
||||||
|
-1);
|
||||||
|
|
||||||
panel_items_view = gtk_tree_view_new();
|
panel_items_view = gtk_tree_view_new();
|
||||||
gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(panel_items_view),
|
gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(panel_items_view),
|
||||||
@@ -1208,6 +1218,7 @@ void set_panel_items(const char *items)
|
|||||||
|
|
||||||
int separator_index = -1;
|
int separator_index = -1;
|
||||||
int execp_index = -1;
|
int execp_index = -1;
|
||||||
|
int button_index = -1;
|
||||||
|
|
||||||
for (; items && *items; items++) {
|
for (; items && *items; items++) {
|
||||||
const char *value = NULL;
|
const char *value = NULL;
|
||||||
@@ -1245,6 +1256,12 @@ void set_panel_items(const char *items)
|
|||||||
sprintf(buffer, "%s %d", _("Executor"), execp_index + 1);
|
sprintf(buffer, "%s %d", _("Executor"), execp_index + 1);
|
||||||
name = buffer;
|
name = buffer;
|
||||||
value = "E";
|
value = "E";
|
||||||
|
} else if (v == 'P') {
|
||||||
|
button_index++;
|
||||||
|
buffer[0] = 0;
|
||||||
|
sprintf(buffer, "%s %d", _("Button"), button_index + 1);
|
||||||
|
name = buffer;
|
||||||
|
value = "P";
|
||||||
} else {
|
} else {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -1272,7 +1289,7 @@ void panel_add_item(GtkWidget *widget, gpointer data)
|
|||||||
itemsColValue, &value,
|
itemsColValue, &value,
|
||||||
-1);
|
-1);
|
||||||
|
|
||||||
if (!panel_contains(value) || g_str_equal(value, ":") || g_str_equal(value, "E") || g_str_equal(value, "F")) {
|
if (!panel_contains(value) || g_str_equal(value, ":") || g_str_equal(value, "E") || g_str_equal(value, "F") || g_str_equal(value, "P")) {
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
gtk_list_store_append(panel_items, &iter);
|
gtk_list_store_append(panel_items, &iter);
|
||||||
gtk_list_store_set(panel_items, &iter,
|
gtk_list_store_set(panel_items, &iter,
|
||||||
@@ -1283,11 +1300,14 @@ void panel_add_item(GtkWidget *widget, gpointer data)
|
|||||||
separator_create_new();
|
separator_create_new();
|
||||||
} else if (g_str_equal(value, "E")) {
|
} else if (g_str_equal(value, "E")) {
|
||||||
execp_create_new();
|
execp_create_new();
|
||||||
|
} else if (g_str_equal(value, "P")) {
|
||||||
|
button_create_new();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
separator_update_indices();
|
separator_update_indices();
|
||||||
execp_update_indices();
|
execp_update_indices();
|
||||||
|
button_update_indices();
|
||||||
}
|
}
|
||||||
|
|
||||||
void panel_remove_item(GtkWidget *widget, gpointer data)
|
void panel_remove_item(GtkWidget *widget, gpointer data)
|
||||||
@@ -1320,6 +1340,14 @@ void panel_remove_item(GtkWidget *widget, gpointer data)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (g_str_equal(value, "P")) {
|
||||||
|
for (int i = 0; i < buttons->len; i++) {
|
||||||
|
Button *button = &g_array_index(buttons, Button, i);
|
||||||
|
if (g_str_equal(name, button->name)) {
|
||||||
|
button_remove(i);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_list_store_remove(panel_items, &iter);
|
gtk_list_store_remove(panel_items, &iter);
|
||||||
@@ -1327,6 +1355,7 @@ void panel_remove_item(GtkWidget *widget, gpointer data)
|
|||||||
|
|
||||||
separator_update_indices();
|
separator_update_indices();
|
||||||
execp_update_indices();
|
execp_update_indices();
|
||||||
|
button_update_indices();
|
||||||
}
|
}
|
||||||
|
|
||||||
void panel_move_item_down(GtkWidget *widget, gpointer data)
|
void panel_move_item_down(GtkWidget *widget, gpointer data)
|
||||||
@@ -1380,6 +1409,21 @@ void panel_move_item_down(GtkWidget *widget, gpointer data)
|
|||||||
Executor tmp = *executor1;
|
Executor tmp = *executor1;
|
||||||
*executor1 = *executor2;
|
*executor1 = *executor2;
|
||||||
*executor2 = tmp;
|
*executor2 = tmp;
|
||||||
|
} else if (g_str_equal(value1, "P") && g_str_equal(value2, "P")) {
|
||||||
|
Button *button1 = NULL;
|
||||||
|
Button *button2 = NULL;
|
||||||
|
for (int i = 0; i < buttons->len; i++) {
|
||||||
|
Button *button = &g_array_index(buttons, Button, i);
|
||||||
|
if (g_str_equal(name1, button->name)) {
|
||||||
|
button1 = button;
|
||||||
|
}
|
||||||
|
if (g_str_equal(name2, button->name)) {
|
||||||
|
button2 = button;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Button tmp = *button1;
|
||||||
|
*button1 = *button2;
|
||||||
|
*button2 = tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_list_store_swap(panel_items, &iter, &next);
|
gtk_list_store_swap(panel_items, &iter, &next);
|
||||||
@@ -1387,6 +1431,7 @@ void panel_move_item_down(GtkWidget *widget, gpointer data)
|
|||||||
}
|
}
|
||||||
separator_update_indices();
|
separator_update_indices();
|
||||||
execp_update_indices();
|
execp_update_indices();
|
||||||
|
button_update_indices();
|
||||||
}
|
}
|
||||||
|
|
||||||
void panel_move_item_up(GtkWidget *widget, gpointer data)
|
void panel_move_item_up(GtkWidget *widget, gpointer data)
|
||||||
@@ -1441,6 +1486,21 @@ void panel_move_item_up(GtkWidget *widget, gpointer data)
|
|||||||
Executor tmp = *executor1;
|
Executor tmp = *executor1;
|
||||||
*executor1 = *executor2;
|
*executor1 = *executor2;
|
||||||
*executor2 = tmp;
|
*executor2 = tmp;
|
||||||
|
} else if (g_str_equal(value1, "P") && g_str_equal(value2, "P")) {
|
||||||
|
Button *button1 = NULL;
|
||||||
|
Button *button2 = NULL;
|
||||||
|
for (int i = 0; i < buttons->len; i++) {
|
||||||
|
Button *button = &g_array_index(buttons, Button, i);
|
||||||
|
if (g_str_equal(name1, button->name)) {
|
||||||
|
button1 = button;
|
||||||
|
}
|
||||||
|
if (g_str_equal(name2, button->name)) {
|
||||||
|
button2 = button;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Button tmp = *button1;
|
||||||
|
*button1 = *button2;
|
||||||
|
*button2 = tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_list_store_swap(panel_items, &iter, &prev);
|
gtk_list_store_swap(panel_items, &iter, &prev);
|
||||||
@@ -1449,6 +1509,7 @@ void panel_move_item_up(GtkWidget *widget, gpointer data)
|
|||||||
}
|
}
|
||||||
separator_update_indices();
|
separator_update_indices();
|
||||||
execp_update_indices();
|
execp_update_indices();
|
||||||
|
button_update_indices();
|
||||||
}
|
}
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
@@ -1640,7 +1701,7 @@ GdkPixbuf *load_icon(const gchar *name)
|
|||||||
process_events();
|
process_events();
|
||||||
|
|
||||||
int size = 22;
|
int size = 22;
|
||||||
char *path = get_icon_path(icon_theme, name, size);
|
char *path = get_icon_path(icon_theme, name, size, FALSE);
|
||||||
GdkPixbuf *pixbuf = path ? gdk_pixbuf_new_from_file_at_size(path, size, size, NULL) : NULL;
|
GdkPixbuf *pixbuf = path ? gdk_pixbuf_new_from_file_at_size(path, size, size, NULL) : NULL;
|
||||||
free(path);
|
free(path);
|
||||||
return pixbuf;
|
return pixbuf;
|
||||||
@@ -4160,6 +4221,290 @@ void create_execp(GtkWidget *notebook, int i)
|
|||||||
change_paragraph(parent);
|
change_paragraph(parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void create_button(GtkWidget *notebook, int i)
|
||||||
|
{
|
||||||
|
GtkWidget *label;
|
||||||
|
GtkWidget *table;
|
||||||
|
int row, col;
|
||||||
|
GtkTooltips *tooltips = gtk_tooltips_new();
|
||||||
|
|
||||||
|
Button *button = &g_array_index(buttons, Button, i);
|
||||||
|
|
||||||
|
button->name[0] = 0;
|
||||||
|
sprintf(button->name, "%s %d", _("Button"), i + 1);
|
||||||
|
button->page_label = gtk_label_new(button->name);
|
||||||
|
gtk_widget_show(button->page_label);
|
||||||
|
button->page_button = gtk_vbox_new(FALSE, DEFAULT_HOR_SPACING);
|
||||||
|
button->container = addScrollBarToWidget(button->page_button);
|
||||||
|
gtk_container_set_border_width(GTK_CONTAINER(button->page_button), 10);
|
||||||
|
gtk_widget_show(button->page_button);
|
||||||
|
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), button->container, button->page_label);
|
||||||
|
|
||||||
|
GtkWidget *parent = button->page_button;
|
||||||
|
|
||||||
|
table = gtk_table_new(1, 2, FALSE);
|
||||||
|
gtk_widget_show(table);
|
||||||
|
gtk_box_pack_start(GTK_BOX(parent), table, FALSE, FALSE, 0);
|
||||||
|
gtk_table_set_row_spacings(GTK_TABLE(table), ROW_SPACING);
|
||||||
|
gtk_table_set_col_spacings(GTK_TABLE(table), COL_SPACING);
|
||||||
|
row = 0, col = 2;
|
||||||
|
|
||||||
|
label = gtk_label_new(_("<b>Format</b>"));
|
||||||
|
gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
|
||||||
|
gtk_label_set_use_markup(GTK_LABEL(label), TRUE); gtk_widget_show(label);
|
||||||
|
gtk_box_pack_start(GTK_BOX(parent), label, FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
table = gtk_table_new(3, 10, FALSE);
|
||||||
|
gtk_widget_show(table);
|
||||||
|
gtk_box_pack_start(GTK_BOX(parent), table, FALSE, FALSE, 0);
|
||||||
|
gtk_table_set_row_spacings(GTK_TABLE(table), ROW_SPACING);
|
||||||
|
gtk_table_set_col_spacings(GTK_TABLE(table), COL_SPACING);
|
||||||
|
row = 0, col = 2;
|
||||||
|
|
||||||
|
label = gtk_label_new(_("Icon"));
|
||||||
|
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++;
|
||||||
|
|
||||||
|
button->button_icon = gtk_entry_new();
|
||||||
|
gtk_widget_show(button->button_icon);
|
||||||
|
gtk_entry_set_width_chars(GTK_ENTRY(button->button_icon), 50);
|
||||||
|
gtk_table_attach(GTK_TABLE(table), button->button_icon, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
|
||||||
|
col++;
|
||||||
|
|
||||||
|
row++, col = 2;
|
||||||
|
label = gtk_label_new(_("Text"));
|
||||||
|
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++;
|
||||||
|
|
||||||
|
button->button_text = gtk_entry_new();
|
||||||
|
gtk_widget_show(button->button_text);
|
||||||
|
gtk_entry_set_width_chars(GTK_ENTRY(button->button_text), 50);
|
||||||
|
gtk_table_attach(GTK_TABLE(table), button->button_text, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
|
||||||
|
col++;
|
||||||
|
|
||||||
|
row++, col = 2;
|
||||||
|
label = gtk_label_new(_("Tooltip"));
|
||||||
|
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++;
|
||||||
|
|
||||||
|
button->button_tooltip = gtk_entry_new();
|
||||||
|
gtk_widget_show(button->button_tooltip);
|
||||||
|
gtk_entry_set_width_chars(GTK_ENTRY(button->button_tooltip), 50);
|
||||||
|
gtk_table_attach(GTK_TABLE(table), button->button_tooltip, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
|
||||||
|
col++;
|
||||||
|
|
||||||
|
change_paragraph(parent);
|
||||||
|
|
||||||
|
label = gtk_label_new(_("<b>Mouse events</b>"));
|
||||||
|
gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
|
||||||
|
gtk_label_set_use_markup(GTK_LABEL(label), TRUE);
|
||||||
|
gtk_widget_show(label);
|
||||||
|
gtk_box_pack_start(GTK_BOX(parent), label, FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
table = gtk_table_new(5, 10, FALSE);
|
||||||
|
gtk_widget_show(table);
|
||||||
|
gtk_box_pack_start(GTK_BOX(parent), table, FALSE, FALSE, 0);
|
||||||
|
gtk_table_set_row_spacings(GTK_TABLE(table), ROW_SPACING);
|
||||||
|
gtk_table_set_col_spacings(GTK_TABLE(table), COL_SPACING);
|
||||||
|
row = 0, col = 2;
|
||||||
|
|
||||||
|
label = gtk_label_new(_("Left click 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++;
|
||||||
|
|
||||||
|
button->button_left_command = gtk_entry_new();
|
||||||
|
gtk_widget_show(button->button_left_command);
|
||||||
|
gtk_entry_set_width_chars(GTK_ENTRY(button->button_left_command), 50);
|
||||||
|
gtk_table_attach(GTK_TABLE(table), button->button_left_command, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
|
||||||
|
col++;
|
||||||
|
gtk_tooltips_set_tip(tooltips, button->button_left_command,
|
||||||
|
_("Specifies a command that will be executed when the button receives a left click."), NULL);
|
||||||
|
|
||||||
|
row++, col = 2;
|
||||||
|
label = gtk_label_new(_("Right click 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++;
|
||||||
|
|
||||||
|
button->button_right_command = gtk_entry_new();
|
||||||
|
gtk_widget_show(button->button_right_command);
|
||||||
|
gtk_entry_set_width_chars(GTK_ENTRY(button->button_right_command), 50);
|
||||||
|
gtk_table_attach(GTK_TABLE(table), button->button_right_command, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
|
||||||
|
col++;
|
||||||
|
gtk_tooltips_set_tip(tooltips, button->button_right_command,
|
||||||
|
_("Specifies a command that will be executed when the button receives a right click."), NULL);
|
||||||
|
|
||||||
|
row++, col = 2;
|
||||||
|
label = gtk_label_new(_("Middle click 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++;
|
||||||
|
|
||||||
|
button->button_mclick_command = gtk_entry_new();
|
||||||
|
gtk_widget_show(button->button_mclick_command);
|
||||||
|
gtk_entry_set_width_chars(GTK_ENTRY(button->button_mclick_command), 50);
|
||||||
|
gtk_table_attach(GTK_TABLE(table), button->button_mclick_command, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
|
||||||
|
col++;
|
||||||
|
gtk_tooltips_set_tip(tooltips, button->button_mclick_command,
|
||||||
|
_("Specifies a command that will be executed when the button receives a middle click."), NULL);
|
||||||
|
|
||||||
|
row++, col = 2;
|
||||||
|
label = gtk_label_new(_("Wheel scroll up 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++;
|
||||||
|
|
||||||
|
button->button_uwheel_command = gtk_entry_new();
|
||||||
|
gtk_widget_show(button->button_uwheel_command);
|
||||||
|
gtk_entry_set_width_chars(GTK_ENTRY(button->button_uwheel_command), 50);
|
||||||
|
gtk_table_attach(GTK_TABLE(table), button->button_uwheel_command, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
|
||||||
|
col++;
|
||||||
|
gtk_tooltips_set_tip(tooltips, button->button_uwheel_command,
|
||||||
|
_("Specifies a command that will be executed when the button receives a mouse scroll up."), NULL);
|
||||||
|
|
||||||
|
row++, col = 2;
|
||||||
|
label = gtk_label_new(_("Wheel scroll down 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++;
|
||||||
|
|
||||||
|
button->button_dwheel_command = gtk_entry_new();
|
||||||
|
gtk_widget_show(button->button_dwheel_command);
|
||||||
|
gtk_entry_set_width_chars(GTK_ENTRY(button->button_dwheel_command), 50);
|
||||||
|
gtk_table_attach(GTK_TABLE(table), button->button_dwheel_command, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
|
||||||
|
col++;
|
||||||
|
gtk_tooltips_set_tip(tooltips, button->button_dwheel_command,
|
||||||
|
_("Specifies a command that will be executed when the button receives a mouse scroll down."), NULL);
|
||||||
|
|
||||||
|
change_paragraph(parent);
|
||||||
|
|
||||||
|
label = gtk_label_new(_("<b>Appearance</b>"));
|
||||||
|
gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
|
||||||
|
gtk_label_set_use_markup(GTK_LABEL(label), TRUE);
|
||||||
|
gtk_widget_show(label);
|
||||||
|
gtk_box_pack_start(GTK_BOX(parent), label, FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
table = gtk_table_new(3, 22, FALSE);
|
||||||
|
gtk_widget_show(table);
|
||||||
|
gtk_box_pack_start(GTK_BOX(parent), table, FALSE, FALSE, 0);
|
||||||
|
gtk_table_set_row_spacings(GTK_TABLE(table), ROW_SPACING);
|
||||||
|
gtk_table_set_col_spacings(GTK_TABLE(table), COL_SPACING);
|
||||||
|
row = 0, col = 2;
|
||||||
|
|
||||||
|
label = gtk_label_new(_("Background"));
|
||||||
|
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++;
|
||||||
|
|
||||||
|
button->button_background = create_background_combo(_("Button"));
|
||||||
|
gtk_widget_show(button->button_background);
|
||||||
|
gtk_table_attach(GTK_TABLE(table), button->button_background, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
|
||||||
|
col++;
|
||||||
|
gtk_tooltips_set_tip(tooltips, button->button_background, _("Selects the background used to display the button. "
|
||||||
|
"Backgrounds can be edited in the Backgrounds tab."), NULL);
|
||||||
|
|
||||||
|
row++, col = 2;
|
||||||
|
label = gtk_label_new(_("Horizontal padding"));
|
||||||
|
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++;
|
||||||
|
|
||||||
|
button->button_padding_x = gtk_spin_button_new_with_range(0, 500, 1);
|
||||||
|
gtk_widget_show(button->button_padding_x);
|
||||||
|
gtk_table_attach(GTK_TABLE(table), button->button_padding_x, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
|
||||||
|
col++;
|
||||||
|
gtk_tooltips_set_tip(tooltips, button->button_padding_x, _("Specifies the horizontal padding of the button. "
|
||||||
|
"This is the space between the border and the content inside."), NULL);
|
||||||
|
|
||||||
|
row++, col = 2;
|
||||||
|
label = gtk_label_new(_("Vertical padding"));
|
||||||
|
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++;
|
||||||
|
|
||||||
|
button->button_padding_y = gtk_spin_button_new_with_range(0, 500, 1);
|
||||||
|
gtk_widget_show(button->button_padding_y);
|
||||||
|
gtk_table_attach(GTK_TABLE(table), button->button_padding_y, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
|
||||||
|
col++;
|
||||||
|
gtk_tooltips_set_tip(tooltips, button->button_padding_y, _("Specifies the vertical padding of the button. "
|
||||||
|
"This is the space between the border and the content inside."), NULL);
|
||||||
|
|
||||||
|
row++, col = 1;
|
||||||
|
button->button_font_set = gtk_check_button_new();
|
||||||
|
gtk_widget_show(button->button_font_set);
|
||||||
|
gtk_table_attach(GTK_TABLE(table), button->button_font_set, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
|
||||||
|
gtk_tooltips_set_tip(tooltips, button->button_font_set, _("If not checked, the desktop theme font is used. If checked, the custom font specified here is used."), NULL);
|
||||||
|
col++;
|
||||||
|
|
||||||
|
label = gtk_label_new(_("Font"));
|
||||||
|
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++;
|
||||||
|
|
||||||
|
button->button_font = gtk_font_button_new_with_font(get_default_font());
|
||||||
|
gtk_widget_show(button->button_font);
|
||||||
|
gtk_table_attach(GTK_TABLE(table), button->button_font, col, col+3, row, row+1, GTK_FILL, 0, 0, 0);
|
||||||
|
col++;
|
||||||
|
gtk_font_button_set_show_style(GTK_FONT_BUTTON(button->button_font), TRUE);
|
||||||
|
gtk_signal_connect(GTK_OBJECT(button->button_font_set), "toggled", GTK_SIGNAL_FUNC(font_set_callback), button->button_font);
|
||||||
|
font_set_callback(button->button_font_set, button->button_font);
|
||||||
|
|
||||||
|
row++, col = 2;
|
||||||
|
label = gtk_label_new(_("Font color"));
|
||||||
|
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++;
|
||||||
|
|
||||||
|
button->button_font_color = gtk_color_button_new();
|
||||||
|
gtk_color_button_set_use_alpha(GTK_COLOR_BUTTON(button->button_font_color), TRUE);
|
||||||
|
gtk_widget_show(button->button_font_color);
|
||||||
|
gtk_table_attach(GTK_TABLE(table), button->button_font_color, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
|
||||||
|
col++;
|
||||||
|
|
||||||
|
row++, col = 2;
|
||||||
|
label = gtk_label_new(_("Centered"));
|
||||||
|
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++;
|
||||||
|
|
||||||
|
button->button_centered = gtk_check_button_new();
|
||||||
|
gtk_widget_show(button->button_centered);
|
||||||
|
gtk_table_attach(GTK_TABLE(table), button->button_centered, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
|
||||||
|
col++;
|
||||||
|
|
||||||
|
row++, col = 2;
|
||||||
|
label = gtk_label_new(_("Maximum icon size"));
|
||||||
|
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++;
|
||||||
|
|
||||||
|
button->button_max_icon_size = gtk_spin_button_new_with_range(0, 500, 1);
|
||||||
|
gtk_widget_show(button->button_max_icon_size);
|
||||||
|
gtk_table_attach(GTK_TABLE(table), button->button_max_icon_size, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
|
||||||
|
col++;
|
||||||
|
|
||||||
|
change_paragraph(parent);
|
||||||
|
}
|
||||||
|
|
||||||
void separator_create_new()
|
void separator_create_new()
|
||||||
{
|
{
|
||||||
g_array_set_size(separators, separators->len + 1);
|
g_array_set_size(separators, separators->len + 1);
|
||||||
@@ -4172,6 +4517,12 @@ void execp_create_new()
|
|||||||
create_execp(notebook, executors->len - 1);
|
create_execp(notebook, executors->len - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void button_create_new()
|
||||||
|
{
|
||||||
|
g_array_set_size(buttons, buttons->len + 1);
|
||||||
|
create_button(notebook, buttons->len - 1);
|
||||||
|
}
|
||||||
|
|
||||||
Separator *separator_get_last()
|
Separator *separator_get_last()
|
||||||
{
|
{
|
||||||
if (separators->len <= 0)
|
if (separators->len <= 0)
|
||||||
@@ -4186,6 +4537,13 @@ Executor *execp_get_last()
|
|||||||
return &g_array_index(executors, Executor, executors->len - 1);
|
return &g_array_index(executors, Executor, executors->len - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Button *button_get_last()
|
||||||
|
{
|
||||||
|
if (buttons->len <= 0)
|
||||||
|
button_create_new();
|
||||||
|
return &g_array_index(buttons, Button, buttons->len - 1);
|
||||||
|
}
|
||||||
|
|
||||||
void separator_remove(int i)
|
void separator_remove(int i)
|
||||||
{
|
{
|
||||||
Separator *separator = &g_array_index(separators, Separator, i);
|
Separator *separator = &g_array_index(separators, Separator, i);
|
||||||
@@ -4216,6 +4574,21 @@ void execp_remove(int i)
|
|||||||
executors = g_array_remove_index(executors, i);
|
executors = g_array_remove_index(executors, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void button_remove(int i)
|
||||||
|
{
|
||||||
|
Button *button = &g_array_index(buttons, Button, i);
|
||||||
|
|
||||||
|
for (int i_page = 0; i_page < gtk_notebook_get_n_pages(GTK_NOTEBOOK(notebook)); i_page++) {
|
||||||
|
GtkWidget *page = gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook), i_page);
|
||||||
|
if (page == button->container) {
|
||||||
|
gtk_widget_hide(page);
|
||||||
|
gtk_notebook_remove_page(GTK_NOTEBOOK(notebook), i_page);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
buttons = g_array_remove_index(buttons, i);
|
||||||
|
}
|
||||||
|
|
||||||
void separator_update_indices()
|
void separator_update_indices()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < separators->len; i++) {
|
for (int i = 0; i < separators->len; i++) {
|
||||||
@@ -4290,6 +4663,43 @@ void execp_update_indices()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void button_update_indices()
|
||||||
|
{
|
||||||
|
for (int i = 0; i < buttons->len; i++) {
|
||||||
|
Button *button = &g_array_index(buttons, Button, i);
|
||||||
|
sprintf(button->name, "%s %d", _("Button"), i + 1);
|
||||||
|
gtk_label_set_text(GTK_LABEL(button->page_label), button->name);
|
||||||
|
}
|
||||||
|
|
||||||
|
GtkTreeModel *model = GTK_TREE_MODEL(panel_items);
|
||||||
|
GtkTreeIter iter;
|
||||||
|
if (!gtk_tree_model_get_iter_first(model, &iter))
|
||||||
|
return;
|
||||||
|
int button_index = -1;
|
||||||
|
while (1) {
|
||||||
|
gchar *name;
|
||||||
|
gchar *value;
|
||||||
|
gtk_tree_model_get(model, &iter,
|
||||||
|
itemsColName, &name,
|
||||||
|
itemsColValue, &value,
|
||||||
|
-1);
|
||||||
|
|
||||||
|
if (g_str_equal(value, "P")) {
|
||||||
|
button_index++;
|
||||||
|
char buffer[256];
|
||||||
|
buffer[0] = 0;
|
||||||
|
sprintf(buffer, "%s %d", _("Button"), button_index + 1);
|
||||||
|
|
||||||
|
gtk_list_store_set(panel_items, &iter,
|
||||||
|
itemsColName, buffer,
|
||||||
|
-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!gtk_tree_model_iter_next(model, &iter))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void create_systemtray(GtkWidget *parent)
|
void create_systemtray(GtkWidget *parent)
|
||||||
{
|
{
|
||||||
GtkWidget *table;
|
GtkWidget *table;
|
||||||
@@ -4484,6 +4894,19 @@ void create_systemtray(GtkWidget *parent)
|
|||||||
gtk_table_attach(GTK_TABLE(table), systray_icon_brightness, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
|
gtk_table_attach(GTK_TABLE(table), systray_icon_brightness, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
|
||||||
col++;
|
col++;
|
||||||
gtk_tooltips_set_tip(tooltips, systray_icon_brightness, _("Specifies the brightness adjustment of the system tray icons, in percent."), NULL);
|
gtk_tooltips_set_tip(tooltips, systray_icon_brightness, _("Specifies the brightness adjustment of the system tray icons, in percent."), NULL);
|
||||||
|
|
||||||
|
row++, col = 2;
|
||||||
|
label = gtk_label_new(_("Name filter"));
|
||||||
|
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++;
|
||||||
|
|
||||||
|
systray_name_filter = gtk_entry_new();
|
||||||
|
gtk_widget_show(systray_name_filter);
|
||||||
|
gtk_entry_set_width_chars(GTK_ENTRY(systray_name_filter), 50);
|
||||||
|
gtk_table_attach(GTK_TABLE(table), systray_name_filter, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
|
||||||
|
col++;
|
||||||
}
|
}
|
||||||
|
|
||||||
void create_battery(GtkWidget *parent)
|
void create_battery(GtkWidget *parent)
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ extern GtkWidget *ac_connected_cmd, *ac_disconnected_cmd;
|
|||||||
// systray
|
// systray
|
||||||
extern GtkWidget *systray_icon_order, *systray_padding_x, *systray_padding_y, *systray_spacing;
|
extern GtkWidget *systray_icon_order, *systray_padding_x, *systray_padding_y, *systray_spacing;
|
||||||
extern GtkWidget *systray_icon_size, *systray_icon_opacity, *systray_icon_saturation, *systray_icon_brightness;
|
extern GtkWidget *systray_icon_size, *systray_icon_opacity, *systray_icon_saturation, *systray_icon_brightness;
|
||||||
extern GtkWidget *systray_background, *systray_monitor;
|
extern GtkWidget *systray_background, *systray_monitor, *systray_name_filter;
|
||||||
|
|
||||||
// tooltip
|
// tooltip
|
||||||
extern GtkWidget *tooltip_padding_x, *tooltip_padding_y, *tooltip_font, *tooltip_font_set, *tooltip_font_color;
|
extern GtkWidget *tooltip_padding_x, *tooltip_padding_y, *tooltip_font, *tooltip_font_set, *tooltip_font_color;
|
||||||
@@ -151,6 +151,21 @@ typedef struct Executor {
|
|||||||
|
|
||||||
extern GArray *executors;
|
extern GArray *executors;
|
||||||
|
|
||||||
|
// Button
|
||||||
|
typedef struct Button {
|
||||||
|
char name[256];
|
||||||
|
GtkWidget *container;
|
||||||
|
GtkWidget *page_button;
|
||||||
|
GtkWidget *page_label;
|
||||||
|
GtkWidget *button_icon, *button_text, *button_tooltip;
|
||||||
|
GtkWidget *button_left_command, *button_right_command;
|
||||||
|
GtkWidget *button_mclick_command, *button_rclick_command, *button_uwheel_command, *button_dwheel_command;
|
||||||
|
GtkWidget *button_font, *button_font_set, *button_font_color, *button_padding_x, *button_padding_y, *button_centered;
|
||||||
|
GtkWidget *button_background, *button_max_icon_size;
|
||||||
|
} Button;
|
||||||
|
|
||||||
|
extern GArray *buttons;
|
||||||
|
|
||||||
// launcher
|
// launcher
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
@@ -264,6 +279,11 @@ Executor *execp_get_last();
|
|||||||
void execp_remove(int i);
|
void execp_remove(int i);
|
||||||
void execp_update_indices();
|
void execp_update_indices();
|
||||||
|
|
||||||
|
void button_create_new();
|
||||||
|
Button *button_get_last();
|
||||||
|
void button_remove(int i);
|
||||||
|
void button_update_indices();
|
||||||
|
|
||||||
void create_please_wait(GtkWindow *parent);
|
void create_please_wait(GtkWindow *parent);
|
||||||
void process_events();
|
void process_events();
|
||||||
void destroy_please_wait();
|
void destroy_please_wait();
|
||||||
|
|||||||
@@ -38,13 +38,6 @@ void config_read_file(const char *path)
|
|||||||
background_create_new();
|
background_create_new();
|
||||||
gradient_create_new(GRADIENT_CONFIG_VERTICAL);
|
gradient_create_new(GRADIENT_CONFIG_VERTICAL);
|
||||||
|
|
||||||
FILE *fp;
|
|
||||||
char line[512];
|
|
||||||
char *key, *value;
|
|
||||||
|
|
||||||
if ((fp = fopen(path, "r")) == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
config_has_panel_items = 0;
|
config_has_panel_items = 0;
|
||||||
config_has_battery = 0;
|
config_has_battery = 0;
|
||||||
config_battery_enabled = 0;
|
config_battery_enabled = 0;
|
||||||
@@ -54,14 +47,21 @@ void config_read_file(const char *path)
|
|||||||
no_items_systray_enabled = 0;
|
no_items_systray_enabled = 0;
|
||||||
no_items_battery_enabled = 0;
|
no_items_battery_enabled = 0;
|
||||||
|
|
||||||
while (fgets(line, sizeof(line), fp) != NULL) {
|
FILE *fp = fopen(path, "r");
|
||||||
if (parse_line(line, &key, &value)) {
|
if (fp) {
|
||||||
add_entry(key, value);
|
char* line = NULL;
|
||||||
free(key);
|
size_t line_size = 0;
|
||||||
free(value);
|
while (getline(&line, &line_size, fp) >= 0) {
|
||||||
|
char *key, *value;
|
||||||
|
if (parse_line(line, &key, &value)) {
|
||||||
|
add_entry(key, value);
|
||||||
|
free(key);
|
||||||
|
free(value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
free(line);
|
||||||
|
fclose(fp);
|
||||||
}
|
}
|
||||||
fclose(fp);
|
|
||||||
|
|
||||||
finalize_gradient();
|
finalize_gradient();
|
||||||
finalize_bg();
|
finalize_bg();
|
||||||
@@ -622,6 +622,8 @@ void config_write_systray(FILE *fp)
|
|||||||
fprintf(fp, "%d", MAX(1, 1 + gtk_combo_box_get_active(GTK_COMBO_BOX(systray_monitor))));
|
fprintf(fp, "%d", MAX(1, 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, "\n");
|
fprintf(fp, "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -864,6 +866,53 @@ void config_write_execp(FILE *fp)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void config_write_button(FILE *fp)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < buttons->len; i++) {
|
||||||
|
fprintf(fp, "#-------------------------------------\n");
|
||||||
|
fprintf(fp, "# Button %d\n", i + 1);
|
||||||
|
|
||||||
|
Button *button = &g_array_index(buttons, Button, i);
|
||||||
|
|
||||||
|
fprintf(fp, "button = new\n");
|
||||||
|
if (strlen(gtk_entry_get_text(GTK_ENTRY(button->button_icon))))
|
||||||
|
fprintf(fp, "button_icon = %s\n", gtk_entry_get_text(GTK_ENTRY(button->button_icon)));
|
||||||
|
if (gtk_entry_get_text(GTK_ENTRY(button->button_text)))
|
||||||
|
fprintf(fp, "button_text = %s\n", gtk_entry_get_text(GTK_ENTRY(button->button_text)));
|
||||||
|
if (strlen(gtk_entry_get_text(GTK_ENTRY(button->button_tooltip))))
|
||||||
|
fprintf(fp, "button_tooltip = %s\n", gtk_entry_get_text(GTK_ENTRY(button->button_tooltip)));
|
||||||
|
|
||||||
|
fprintf(fp, "button_lclick_command = %s\n", gtk_entry_get_text(GTK_ENTRY(button->button_left_command)));
|
||||||
|
fprintf(fp, "button_rclick_command = %s\n", gtk_entry_get_text(GTK_ENTRY(button->button_right_command)));
|
||||||
|
fprintf(fp, "button_mclick_command = %s\n", gtk_entry_get_text(GTK_ENTRY(button->button_mclick_command)));
|
||||||
|
fprintf(fp, "button_uwheel_command = %s\n", gtk_entry_get_text(GTK_ENTRY(button->button_uwheel_command)));
|
||||||
|
fprintf(fp, "button_dwheel_command = %s\n", gtk_entry_get_text(GTK_ENTRY(button->button_dwheel_command)));
|
||||||
|
|
||||||
|
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button->button_font_set)))
|
||||||
|
fprintf(fp, "button_font = %s\n", gtk_font_button_get_font_name(GTK_FONT_BUTTON(button->button_font)));
|
||||||
|
GdkColor color;
|
||||||
|
gtk_color_button_get_color(GTK_COLOR_BUTTON(button->button_font_color), &color);
|
||||||
|
config_write_color(fp,
|
||||||
|
"button_font_color",
|
||||||
|
color,
|
||||||
|
gtk_color_button_get_alpha(GTK_COLOR_BUTTON(button->button_font_color)) * 100 / 0xffff);
|
||||||
|
fprintf(fp,
|
||||||
|
"button_padding = %d %d\n",
|
||||||
|
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(button->button_padding_x)),
|
||||||
|
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(button->button_padding_y)));
|
||||||
|
fprintf(fp, "button_background_id = %d\n", gtk_combo_box_get_active(GTK_COMBO_BOX(button->button_background)));
|
||||||
|
fprintf(fp,
|
||||||
|
"button_centered = %d\n",
|
||||||
|
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button->button_centered)) ? 1 : 0);
|
||||||
|
fprintf(fp,
|
||||||
|
"button_max_icon_size = %d\n",
|
||||||
|
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(button->button_max_icon_size)));
|
||||||
|
|
||||||
|
|
||||||
|
fprintf(fp, "\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void config_write_tooltip(FILE *fp)
|
void config_write_tooltip(FILE *fp)
|
||||||
{
|
{
|
||||||
fprintf(fp, "#-------------------------------------\n");
|
fprintf(fp, "#-------------------------------------\n");
|
||||||
@@ -937,6 +986,7 @@ void config_save_file(const char *path)
|
|||||||
config_write_battery(fp);
|
config_write_battery(fp);
|
||||||
config_write_separator(fp);
|
config_write_separator(fp);
|
||||||
config_write_execp(fp);
|
config_write_execp(fp);
|
||||||
|
config_write_button(fp);
|
||||||
config_write_tooltip(fp);
|
config_write_tooltip(fp);
|
||||||
|
|
||||||
checksum = checksum_txt(fp);
|
checksum = checksum_txt(fp);
|
||||||
@@ -1705,6 +1755,8 @@ void add_entry(char *key, char *value)
|
|||||||
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));
|
||||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(systray_icon_saturation), atoi(value2));
|
gtk_spin_button_set_value(GTK_SPIN_BUTTON(systray_icon_saturation), atoi(value2));
|
||||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(systray_icon_brightness), atoi(value3));
|
gtk_spin_button_set_value(GTK_SPIN_BUTTON(systray_icon_brightness), atoi(value3));
|
||||||
|
} else if (strcmp(key, "systray_name_filter") == 0) {
|
||||||
|
gtk_entry_set_text(GTK_ENTRY(systray_name_filter), value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Launcher */
|
/* Launcher */
|
||||||
@@ -1884,6 +1936,51 @@ void add_entry(char *key, char *value)
|
|||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(execp_get_last()->execp_centered), atoi(value));
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(execp_get_last()->execp_centered), atoi(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Button */
|
||||||
|
else if (strcmp(key, "button") == 0) {
|
||||||
|
button_create_new();
|
||||||
|
} else if (strcmp(key, "button_icon") == 0) {
|
||||||
|
gtk_entry_set_text(GTK_ENTRY(button_get_last()->button_icon), value);
|
||||||
|
} else if (strcmp(key, "button_text") == 0) {
|
||||||
|
gtk_entry_set_text(GTK_ENTRY(button_get_last()->button_text), value);
|
||||||
|
} else if (strcmp(key, "button_tooltip") == 0) {
|
||||||
|
gtk_entry_set_text(GTK_ENTRY(button_get_last()->button_tooltip), value);
|
||||||
|
} else if (strcmp(key, "button_lclick_command") == 0) {
|
||||||
|
gtk_entry_set_text(GTK_ENTRY(button_get_last()->button_left_command), value);
|
||||||
|
} else if (strcmp(key, "button_rclick_command") == 0) {
|
||||||
|
gtk_entry_set_text(GTK_ENTRY(button_get_last()->button_right_command), value);
|
||||||
|
} else if (strcmp(key, "button_mclick_command") == 0) {
|
||||||
|
gtk_entry_set_text(GTK_ENTRY(button_get_last()->button_mclick_command), value);
|
||||||
|
} else if (strcmp(key, "button_uwheel_command") == 0) {
|
||||||
|
gtk_entry_set_text(GTK_ENTRY(button_get_last()->button_uwheel_command), value);
|
||||||
|
} else if (strcmp(key, "button_dwheel_command") == 0) {
|
||||||
|
gtk_entry_set_text(GTK_ENTRY(button_get_last()->button_dwheel_command), value);
|
||||||
|
} else if (strcmp(key, "button_font") == 0) {
|
||||||
|
gtk_font_button_set_font_name(GTK_FONT_BUTTON(button_get_last()->button_font), value);
|
||||||
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button_get_last()->button_font_set), TRUE);
|
||||||
|
} else if (strcmp(key, "button_font_color") == 0) {
|
||||||
|
extract_values(value, &value1, &value2, &value3);
|
||||||
|
GdkColor col;
|
||||||
|
hex2gdk(value1, &col);
|
||||||
|
gtk_color_button_set_color(GTK_COLOR_BUTTON(button_get_last()->button_font_color), &col);
|
||||||
|
if (value2) {
|
||||||
|
int alpha = atoi(value2);
|
||||||
|
gtk_color_button_set_alpha(GTK_COLOR_BUTTON(button_get_last()->button_font_color), (alpha * 65535) / 100);
|
||||||
|
}
|
||||||
|
} else if (strcmp(key, "button_padding") == 0) {
|
||||||
|
extract_values(value, &value1, &value2, &value3);
|
||||||
|
gtk_spin_button_set_value(GTK_SPIN_BUTTON(button_get_last()->button_padding_x), atoi(value1));
|
||||||
|
if (value2)
|
||||||
|
gtk_spin_button_set_value(GTK_SPIN_BUTTON(button_get_last()->button_padding_y), atoi(value2));
|
||||||
|
} else if (strcmp(key, "button_background_id") == 0) {
|
||||||
|
int id = background_index_safe(atoi(value));
|
||||||
|
gtk_combo_box_set_active(GTK_COMBO_BOX(button_get_last()->button_background), id);
|
||||||
|
} else if (strcmp(key, "button_centered") == 0) {
|
||||||
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button_get_last()->button_centered), atoi(value));
|
||||||
|
} else if (strcmp(key, "button_max_icon_size") == 0) {
|
||||||
|
gtk_spin_button_set_value(GTK_SPIN_BUTTON(button_get_last()->button_max_icon_size), atoi(value));
|
||||||
|
}
|
||||||
|
|
||||||
if (value1)
|
if (value1)
|
||||||
free(value1);
|
free(value1);
|
||||||
if (value2)
|
if (value2)
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ GtkWidget *create_view()
|
|||||||
GtkCellRenderer *renderer;
|
GtkCellRenderer *renderer;
|
||||||
|
|
||||||
theme_list_store =
|
theme_list_store =
|
||||||
gtk_list_store_new(NB_COL, G_TYPE_STRING, G_TYPE_STRING, GDK_TYPE_PIXBUF, G_TYPE_INT, G_TYPE_INT);
|
gtk_list_store_new(NB_COL, G_TYPE_STRING, G_TYPE_STRING, GDK_TYPE_PIXBUF, G_TYPE_INT, G_TYPE_INT, G_TYPE_BOOLEAN);
|
||||||
|
|
||||||
GtkWidget *view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(theme_list_store));
|
GtkWidget *view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(theme_list_store));
|
||||||
gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(view), TRUE);
|
gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(view), TRUE);
|
||||||
@@ -148,12 +148,12 @@ void theme_list_append(const gchar *path)
|
|||||||
g_free(dir);
|
g_free(dir);
|
||||||
|
|
||||||
gchar *display_name = g_strdup_printf("%s\n(%s)", name, suffix);
|
gchar *display_name = g_strdup_printf("%s\n(%s)", name, suffix);
|
||||||
gtk_list_store_set(theme_list_store, &iter, COL_THEME_FILE, path, COL_THEME_NAME, display_name, -1);
|
gtk_list_store_set(theme_list_store, &iter, COL_THEME_FILE, path, COL_THEME_NAME, display_name, COL_FORCE_REFRESH, FALSE, -1);
|
||||||
g_free(display_name);
|
g_free(display_name);
|
||||||
g_free(suffix);
|
g_free(suffix);
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean update_snapshot()
|
gboolean update_snapshot(gpointer ignored)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
gchar *tint2_cache_dir = g_build_filename(g_get_user_cache_dir(), "tint2", NULL);
|
gchar *tint2_cache_dir = g_build_filename(g_get_user_cache_dir(), "tint2", NULL);
|
||||||
@@ -183,14 +183,15 @@ gboolean update_snapshot()
|
|||||||
}
|
}
|
||||||
|
|
||||||
gchar *path;
|
gchar *path;
|
||||||
gtk_tree_model_get(model, &iter, COL_THEME_FILE, &path, -1);
|
gboolean force_refresh;
|
||||||
|
gtk_tree_model_get(model, &iter, COL_THEME_FILE, &path, COL_FORCE_REFRESH, &force_refresh, -1);
|
||||||
|
|
||||||
char hash[MD4_HEX_SIZE + 4];
|
char hash[MD4_HEX_SIZE + 4];
|
||||||
md4hexf(path, hash);
|
md4hexf(path, hash);
|
||||||
strcat(hash, ".png");
|
strcat(hash, ".png");
|
||||||
|
|
||||||
gchar *snap = g_build_filename(g_get_user_cache_dir(), "tint2", hash, NULL);
|
gchar *snap = g_build_filename(g_get_user_cache_dir(), "tint2", hash, NULL);
|
||||||
pixbuf = gdk_pixbuf_new_from_file(snap, NULL);
|
pixbuf = force_refresh ? NULL : gdk_pixbuf_new_from_file(snap, NULL);
|
||||||
if (!pixbuf) {
|
if (!pixbuf) {
|
||||||
gchar *cmd = g_strdup_printf("tint2 -c \'%s\' -s \'%s\' 1>/dev/null 2>/dev/null", path, snap);
|
gchar *cmd = g_strdup_printf("tint2 -c \'%s\' -s \'%s\' 1>/dev/null 2>/dev/null", path, snap);
|
||||||
num_updates++;
|
num_updates++;
|
||||||
@@ -216,6 +217,8 @@ gboolean update_snapshot()
|
|||||||
gdk_pixbuf_get_width(pixbuf) + PADDING,
|
gdk_pixbuf_get_width(pixbuf) + PADDING,
|
||||||
COL_HEIGHT,
|
COL_HEIGHT,
|
||||||
gdk_pixbuf_get_height(pixbuf) + PADDING,
|
gdk_pixbuf_get_height(pixbuf) + PADDING,
|
||||||
|
COL_FORCE_REFRESH,
|
||||||
|
FALSE,
|
||||||
-1);
|
-1);
|
||||||
if (pixbuf)
|
if (pixbuf)
|
||||||
g_object_unref(pixbuf);
|
g_object_unref(pixbuf);
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ enum { COL_THEME_FILE = 0,
|
|||||||
COL_SNAPSHOT,
|
COL_SNAPSHOT,
|
||||||
COL_WIDTH,
|
COL_WIDTH,
|
||||||
COL_HEIGHT,
|
COL_HEIGHT,
|
||||||
|
COL_FORCE_REFRESH,
|
||||||
NB_COL, };
|
NB_COL, };
|
||||||
|
|
||||||
GtkWidget *create_view();
|
GtkWidget *create_view();
|
||||||
|
|||||||
411
src/tint2rc.c
Normal file
411
src/tint2rc.c
Normal file
@@ -0,0 +1,411 @@
|
|||||||
|
#include "tint2rc.h"
|
||||||
|
|
||||||
|
unsigned char themes_tint2rc[] = {
|
||||||
|
0x23, 0x2d, 0x2d, 0x2d, 0x2d, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61,
|
||||||
|
0x74, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x69, 0x6e, 0x74, 0x32,
|
||||||
|
0x63, 0x6f, 0x6e, 0x66, 0x20, 0x32, 0x36, 0x34, 0x31, 0x20, 0x2d, 0x2d,
|
||||||
|
0x2d, 0x2d, 0x0a, 0x23, 0x20, 0x53, 0x65, 0x65, 0x20, 0x68, 0x74, 0x74,
|
||||||
|
0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e,
|
||||||
|
0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x39, 0x30, 0x30, 0x30, 0x2f, 0x74, 0x69,
|
||||||
|
0x6e, 0x74, 0x32, 0x2f, 0x77, 0x69, 0x6b, 0x69, 0x73, 0x2f, 0x43, 0x6f,
|
||||||
|
0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20,
|
||||||
|
0x0a, 0x23, 0x20, 0x66, 0x75, 0x6c, 0x6c, 0x20, 0x64, 0x6f, 0x63, 0x75,
|
||||||
|
0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66,
|
||||||
|
0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75,
|
||||||
|
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f,
|
||||||
|
0x6e, 0x73, 0x2e, 0x0a, 0x23, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
|
||||||
|
0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
|
||||||
|
0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
|
||||||
|
0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x23, 0x20, 0x42, 0x61, 0x63,
|
||||||
|
0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x0a, 0x23, 0x20, 0x42,
|
||||||
|
0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x31, 0x3a,
|
||||||
|
0x20, 0x50, 0x61, 0x6e, 0x65, 0x6c, 0x0a, 0x72, 0x6f, 0x75, 0x6e, 0x64,
|
||||||
|
0x65, 0x64, 0x20, 0x3d, 0x20, 0x30, 0x0a, 0x62, 0x6f, 0x72, 0x64, 0x65,
|
||||||
|
0x72, 0x5f, 0x77, 0x69, 0x64, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x30, 0x0a,
|
||||||
|
0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63,
|
||||||
|
0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x23, 0x30, 0x30, 0x30, 0x30,
|
||||||
|
0x30, 0x30, 0x20, 0x36, 0x30, 0x0a, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72,
|
||||||
|
0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x23, 0x30, 0x30,
|
||||||
|
0x30, 0x30, 0x30, 0x30, 0x20, 0x33, 0x30, 0x0a, 0x62, 0x61, 0x63, 0x6b,
|
||||||
|
0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72,
|
||||||
|
0x5f, 0x68, 0x6f, 0x76, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x23, 0x30, 0x30,
|
||||||
|
0x30, 0x30, 0x30, 0x30, 0x20, 0x36, 0x30, 0x0a, 0x62, 0x6f, 0x72, 0x64,
|
||||||
|
0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x68, 0x6f, 0x76,
|
||||||
|
0x65, 0x72, 0x20, 0x3d, 0x20, 0x23, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
|
||||||
|
0x20, 0x33, 0x30, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75,
|
||||||
|
0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x70, 0x72, 0x65,
|
||||||
|
0x73, 0x73, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x23, 0x30, 0x30, 0x30, 0x30,
|
||||||
|
0x30, 0x30, 0x20, 0x36, 0x30, 0x0a, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72,
|
||||||
|
0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x73,
|
||||||
|
0x65, 0x64, 0x20, 0x3d, 0x20, 0x23, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
|
||||||
|
0x20, 0x33, 0x30, 0x0a, 0x0a, 0x23, 0x20, 0x42, 0x61, 0x63, 0x6b, 0x67,
|
||||||
|
0x72, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x32, 0x3a, 0x20, 0x44, 0x65, 0x66,
|
||||||
|
0x61, 0x75, 0x6c, 0x74, 0x20, 0x74, 0x61, 0x73, 0x6b, 0x2c, 0x20, 0x49,
|
||||||
|
0x63, 0x6f, 0x6e, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x74, 0x61, 0x73,
|
||||||
|
0x6b, 0x0a, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x20, 0x3d, 0x20,
|
||||||
|
0x34, 0x0a, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x77, 0x69, 0x64,
|
||||||
|
0x74, 0x68, 0x20, 0x3d, 0x20, 0x31, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x67,
|
||||||
|
0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x20,
|
||||||
|
0x3d, 0x20, 0x23, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x20, 0x32, 0x30,
|
||||||
|
0x0a, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f,
|
||||||
|
0x72, 0x20, 0x3d, 0x20, 0x23, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x20,
|
||||||
|
0x33, 0x30, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e,
|
||||||
|
0x64, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x68, 0x6f, 0x76, 0x65,
|
||||||
|
0x72, 0x20, 0x3d, 0x20, 0x23, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x20,
|
||||||
|
0x32, 0x32, 0x0a, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x63, 0x6f,
|
||||||
|
0x6c, 0x6f, 0x72, 0x5f, 0x68, 0x6f, 0x76, 0x65, 0x72, 0x20, 0x3d, 0x20,
|
||||||
|
0x23, 0x65, 0x61, 0x65, 0x61, 0x65, 0x61, 0x20, 0x34, 0x34, 0x0a, 0x62,
|
||||||
|
0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f,
|
||||||
|
0x6c, 0x6f, 0x72, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x20,
|
||||||
|
0x3d, 0x20, 0x23, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x20, 0x34, 0x0a,
|
||||||
|
0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72,
|
||||||
|
0x5f, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x23,
|
||||||
|
0x65, 0x61, 0x65, 0x61, 0x65, 0x61, 0x20, 0x34, 0x34, 0x0a, 0x0a, 0x23,
|
||||||
|
0x20, 0x42, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x20,
|
||||||
|
0x33, 0x3a, 0x20, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x20, 0x74, 0x61,
|
||||||
|
0x73, 0x6b, 0x0a, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x20, 0x3d,
|
||||||
|
0x20, 0x34, 0x0a, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x77, 0x69,
|
||||||
|
0x64, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x31, 0x0a, 0x62, 0x61, 0x63, 0x6b,
|
||||||
|
0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72,
|
||||||
|
0x20, 0x3d, 0x20, 0x23, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x20, 0x32,
|
||||||
|
0x30, 0x0a, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6c,
|
||||||
|
0x6f, 0x72, 0x20, 0x3d, 0x20, 0x23, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
|
||||||
|
0x20, 0x34, 0x30, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75,
|
||||||
|
0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x68, 0x6f, 0x76,
|
||||||
|
0x65, 0x72, 0x20, 0x3d, 0x20, 0x23, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61,
|
||||||
|
0x20, 0x32, 0x32, 0x0a, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x63,
|
||||||
|
0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x68, 0x6f, 0x76, 0x65, 0x72, 0x20, 0x3d,
|
||||||
|
0x20, 0x23, 0x65, 0x61, 0x65, 0x61, 0x65, 0x61, 0x20, 0x34, 0x34, 0x0a,
|
||||||
|
0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63,
|
||||||
|
0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64,
|
||||||
|
0x20, 0x3d, 0x20, 0x23, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x20, 0x34,
|
||||||
|
0x0a, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f,
|
||||||
|
0x72, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x20, 0x3d, 0x20,
|
||||||
|
0x23, 0x65, 0x61, 0x65, 0x61, 0x65, 0x61, 0x20, 0x34, 0x34, 0x0a, 0x0a,
|
||||||
|
0x23, 0x20, 0x42, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64,
|
||||||
|
0x20, 0x34, 0x3a, 0x20, 0x55, 0x72, 0x67, 0x65, 0x6e, 0x74, 0x20, 0x74,
|
||||||
|
0x61, 0x73, 0x6b, 0x0a, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x20,
|
||||||
|
0x3d, 0x20, 0x34, 0x0a, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x77,
|
||||||
|
0x69, 0x64, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x31, 0x0a, 0x62, 0x61, 0x63,
|
||||||
|
0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6c, 0x6f,
|
||||||
|
0x72, 0x20, 0x3d, 0x20, 0x23, 0x61, 0x61, 0x34, 0x34, 0x30, 0x30, 0x20,
|
||||||
|
0x31, 0x30, 0x30, 0x0a, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x63,
|
||||||
|
0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x23, 0x61, 0x61, 0x37, 0x37,
|
||||||
|
0x33, 0x33, 0x20, 0x31, 0x30, 0x30, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x67,
|
||||||
|
0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f,
|
||||||
|
0x68, 0x6f, 0x76, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x23, 0x63, 0x63, 0x37,
|
||||||
|
0x37, 0x30, 0x30, 0x20, 0x31, 0x30, 0x30, 0x0a, 0x62, 0x6f, 0x72, 0x64,
|
||||||
|
0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x68, 0x6f, 0x76,
|
||||||
|
0x65, 0x72, 0x20, 0x3d, 0x20, 0x23, 0x61, 0x61, 0x37, 0x37, 0x33, 0x33,
|
||||||
|
0x20, 0x31, 0x30, 0x30, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f,
|
||||||
|
0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x70, 0x72,
|
||||||
|
0x65, 0x73, 0x73, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x23, 0x35, 0x35, 0x35,
|
||||||
|
0x35, 0x35, 0x35, 0x20, 0x34, 0x0a, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72,
|
||||||
|
0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x73,
|
||||||
|
0x65, 0x64, 0x20, 0x3d, 0x20, 0x23, 0x61, 0x61, 0x37, 0x37, 0x33, 0x33,
|
||||||
|
0x20, 0x31, 0x30, 0x30, 0x0a, 0x0a, 0x23, 0x20, 0x42, 0x61, 0x63, 0x6b,
|
||||||
|
0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x35, 0x3a, 0x20, 0x54, 0x6f,
|
||||||
|
0x6f, 0x6c, 0x74, 0x69, 0x70, 0x0a, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x65,
|
||||||
|
0x64, 0x20, 0x3d, 0x20, 0x31, 0x0a, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72,
|
||||||
|
0x5f, 0x77, 0x69, 0x64, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x31, 0x0a, 0x62,
|
||||||
|
0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f,
|
||||||
|
0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x23, 0x66, 0x66, 0x66, 0x66, 0x61,
|
||||||
|
0x61, 0x20, 0x31, 0x30, 0x30, 0x0a, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72,
|
||||||
|
0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x23, 0x30, 0x30,
|
||||||
|
0x30, 0x30, 0x30, 0x30, 0x20, 0x31, 0x30, 0x30, 0x0a, 0x62, 0x61, 0x63,
|
||||||
|
0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6c, 0x6f,
|
||||||
|
0x72, 0x5f, 0x68, 0x6f, 0x76, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x23, 0x66,
|
||||||
|
0x66, 0x66, 0x66, 0x61, 0x61, 0x20, 0x31, 0x30, 0x30, 0x0a, 0x62, 0x6f,
|
||||||
|
0x72, 0x64, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x68,
|
||||||
|
0x6f, 0x76, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x23, 0x30, 0x30, 0x30, 0x30,
|
||||||
|
0x30, 0x30, 0x20, 0x31, 0x30, 0x30, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x67,
|
||||||
|
0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f,
|
||||||
|
0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x23, 0x66,
|
||||||
|
0x66, 0x66, 0x66, 0x61, 0x61, 0x20, 0x31, 0x30, 0x30, 0x0a, 0x62, 0x6f,
|
||||||
|
0x72, 0x64, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x70,
|
||||||
|
0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x23, 0x30, 0x30,
|
||||||
|
0x30, 0x30, 0x30, 0x30, 0x20, 0x31, 0x30, 0x30, 0x0a, 0x0a, 0x23, 0x2d,
|
||||||
|
0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
|
||||||
|
0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
|
||||||
|
0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
|
||||||
|
0x0a, 0x23, 0x20, 0x50, 0x61, 0x6e, 0x65, 0x6c, 0x0a, 0x70, 0x61, 0x6e,
|
||||||
|
0x65, 0x6c, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x20, 0x3d, 0x20, 0x4c,
|
||||||
|
0x54, 0x53, 0x43, 0x0a, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x5f, 0x73, 0x69,
|
||||||
|
0x7a, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x30, 0x30, 0x25, 0x20, 0x33, 0x30,
|
||||||
|
0x0a, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x5f, 0x6d, 0x61, 0x72, 0x67, 0x69,
|
||||||
|
0x6e, 0x20, 0x3d, 0x20, 0x30, 0x20, 0x30, 0x0a, 0x70, 0x61, 0x6e, 0x65,
|
||||||
|
0x6c, 0x5f, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x3d, 0x20,
|
||||||
|
0x32, 0x20, 0x30, 0x20, 0x32, 0x0a, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x5f,
|
||||||
|
0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69,
|
||||||
|
0x64, 0x20, 0x3d, 0x20, 0x31, 0x0a, 0x77, 0x6d, 0x5f, 0x6d, 0x65, 0x6e,
|
||||||
|
0x75, 0x20, 0x3d, 0x20, 0x31, 0x0a, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x5f,
|
||||||
|
0x64, 0x6f, 0x63, 0x6b, 0x20, 0x3d, 0x20, 0x30, 0x0a, 0x70, 0x61, 0x6e,
|
||||||
|
0x65, 0x6c, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20,
|
||||||
|
0x3d, 0x20, 0x62, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x20, 0x63, 0x65, 0x6e,
|
||||||
|
0x74, 0x65, 0x72, 0x20, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x6f, 0x6e, 0x74,
|
||||||
|
0x61, 0x6c, 0x0a, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x5f, 0x6c, 0x61, 0x79,
|
||||||
|
0x65, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6f, 0x70, 0x0a, 0x70, 0x61, 0x6e,
|
||||||
|
0x65, 0x6c, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x20, 0x3d,
|
||||||
|
0x20, 0x61, 0x6c, 0x6c, 0x0a, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79,
|
||||||
|
0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x5f, 0x66, 0x69, 0x72,
|
||||||
|
0x73, 0x74, 0x20, 0x3d, 0x20, 0x30, 0x0a, 0x61, 0x75, 0x74, 0x6f, 0x68,
|
||||||
|
0x69, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x30, 0x0a, 0x61, 0x75, 0x74, 0x6f,
|
||||||
|
0x68, 0x69, 0x64, 0x65, 0x5f, 0x73, 0x68, 0x6f, 0x77, 0x5f, 0x74, 0x69,
|
||||||
|
0x6d, 0x65, 0x6f, 0x75, 0x74, 0x20, 0x3d, 0x20, 0x30, 0x0a, 0x61, 0x75,
|
||||||
|
0x74, 0x6f, 0x68, 0x69, 0x64, 0x65, 0x5f, 0x68, 0x69, 0x64, 0x65, 0x5f,
|
||||||
|
0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x20, 0x3d, 0x20, 0x30, 0x2e,
|
||||||
|
0x35, 0x0a, 0x61, 0x75, 0x74, 0x6f, 0x68, 0x69, 0x64, 0x65, 0x5f, 0x68,
|
||||||
|
0x65, 0x69, 0x67, 0x68, 0x74, 0x20, 0x3d, 0x20, 0x32, 0x0a, 0x73, 0x74,
|
||||||
|
0x72, 0x75, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x20, 0x3d,
|
||||||
|
0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x73, 0x69, 0x7a, 0x65,
|
||||||
|
0x0a, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f,
|
||||||
|
0x77, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x74, 0x69, 0x6e,
|
||||||
|
0x74, 0x32, 0x0a, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x74,
|
||||||
|
0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x20,
|
||||||
|
0x3d, 0x20, 0x31, 0x0a, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x5f, 0x65, 0x66,
|
||||||
|
0x66, 0x65, 0x63, 0x74, 0x73, 0x20, 0x3d, 0x20, 0x31, 0x0a, 0x66, 0x6f,
|
||||||
|
0x6e, 0x74, 0x5f, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x20, 0x3d, 0x20,
|
||||||
|
0x30, 0x0a, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x5f, 0x68, 0x6f, 0x76, 0x65,
|
||||||
|
0x72, 0x5f, 0x69, 0x63, 0x6f, 0x6e, 0x5f, 0x61, 0x73, 0x62, 0x20, 0x3d,
|
||||||
|
0x20, 0x31, 0x30, 0x30, 0x20, 0x30, 0x20, 0x31, 0x30, 0x0a, 0x6d, 0x6f,
|
||||||
|
0x75, 0x73, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x5f,
|
||||||
|
0x69, 0x63, 0x6f, 0x6e, 0x5f, 0x61, 0x73, 0x62, 0x20, 0x3d, 0x20, 0x31,
|
||||||
|
0x30, 0x30, 0x20, 0x30, 0x20, 0x30, 0x0a, 0x0a, 0x23, 0x2d, 0x2d, 0x2d,
|
||||||
|
0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
|
||||||
|
0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
|
||||||
|
0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x23,
|
||||||
|
0x20, 0x54, 0x61, 0x73, 0x6b, 0x62, 0x61, 0x72, 0x0a, 0x74, 0x61, 0x73,
|
||||||
|
0x6b, 0x62, 0x61, 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20,
|
||||||
|
0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x6b, 0x74,
|
||||||
|
0x6f, 0x70, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x62, 0x61, 0x72, 0x5f, 0x70,
|
||||||
|
0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x3d, 0x20, 0x30, 0x20, 0x30,
|
||||||
|
0x20, 0x32, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x62, 0x61, 0x72, 0x5f, 0x62,
|
||||||
|
0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x64,
|
||||||
|
0x20, 0x3d, 0x20, 0x30, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x62, 0x61, 0x72,
|
||||||
|
0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b,
|
||||||
|
0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x64, 0x20, 0x3d, 0x20,
|
||||||
|
0x30, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x62, 0x61, 0x72, 0x5f, 0x6e, 0x61,
|
||||||
|
0x6d, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x62,
|
||||||
|
0x61, 0x72, 0x5f, 0x68, 0x69, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x61, 0x63,
|
||||||
|
0x74, 0x69, 0x76, 0x65, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x20, 0x3d,
|
||||||
|
0x20, 0x30, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x62, 0x61, 0x72, 0x5f, 0x68,
|
||||||
|
0x69, 0x64, 0x65, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e,
|
||||||
|
0x74, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x20, 0x3d, 0x20,
|
||||||
|
0x30, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x62, 0x61, 0x72, 0x5f, 0x61, 0x6c,
|
||||||
|
0x77, 0x61, 0x79, 0x73, 0x5f, 0x73, 0x68, 0x6f, 0x77, 0x5f, 0x61, 0x6c,
|
||||||
|
0x6c, 0x5f, 0x64, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x5f, 0x74, 0x61,
|
||||||
|
0x73, 0x6b, 0x73, 0x20, 0x3d, 0x20, 0x30, 0x0a, 0x74, 0x61, 0x73, 0x6b,
|
||||||
|
0x62, 0x61, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x70, 0x61, 0x64,
|
||||||
|
0x64, 0x69, 0x6e, 0x67, 0x20, 0x3d, 0x20, 0x34, 0x20, 0x32, 0x0a, 0x74,
|
||||||
|
0x61, 0x73, 0x6b, 0x62, 0x61, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f,
|
||||||
|
0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69,
|
||||||
|
0x64, 0x20, 0x3d, 0x20, 0x30, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x62, 0x61,
|
||||||
|
0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76,
|
||||||
|
0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64,
|
||||||
|
0x5f, 0x69, 0x64, 0x20, 0x3d, 0x20, 0x30, 0x0a, 0x74, 0x61, 0x73, 0x6b,
|
||||||
|
0x62, 0x61, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x66, 0x6f, 0x6e,
|
||||||
|
0x74, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x23, 0x65,
|
||||||
|
0x33, 0x65, 0x33, 0x65, 0x33, 0x20, 0x31, 0x30, 0x30, 0x0a, 0x74, 0x61,
|
||||||
|
0x73, 0x6b, 0x62, 0x61, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x61,
|
||||||
|
0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x66, 0x6f, 0x6e, 0x74, 0x5f, 0x63,
|
||||||
|
0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x23, 0x66, 0x66, 0x66, 0x66,
|
||||||
|
0x66, 0x66, 0x20, 0x31, 0x30, 0x30, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x62,
|
||||||
|
0x61, 0x72, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
|
||||||
|
0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x20, 0x3d, 0x20, 0x30, 0x0a, 0x74,
|
||||||
|
0x61, 0x73, 0x6b, 0x62, 0x61, 0x72, 0x5f, 0x73, 0x6f, 0x72, 0x74, 0x5f,
|
||||||
|
0x6f, 0x72, 0x64, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x6e, 0x6f, 0x6e, 0x65,
|
||||||
|
0x0a, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x20,
|
||||||
|
0x3d, 0x20, 0x6c, 0x65, 0x66, 0x74, 0x0a, 0x0a, 0x23, 0x2d, 0x2d, 0x2d,
|
||||||
|
0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
|
||||||
|
0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
|
||||||
|
0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x23,
|
||||||
|
0x20, 0x54, 0x61, 0x73, 0x6b, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74,
|
||||||
|
0x65, 0x78, 0x74, 0x20, 0x3d, 0x20, 0x31, 0x0a, 0x74, 0x61, 0x73, 0x6b,
|
||||||
|
0x5f, 0x69, 0x63, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x31, 0x0a, 0x74, 0x61,
|
||||||
|
0x73, 0x6b, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x64, 0x20,
|
||||||
|
0x3d, 0x20, 0x31, 0x0a, 0x75, 0x72, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x6e,
|
||||||
|
0x62, 0x5f, 0x6f, 0x66, 0x5f, 0x62, 0x6c, 0x69, 0x6e, 0x6b, 0x20, 0x3d,
|
||||||
|
0x20, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x0a, 0x74, 0x61, 0x73, 0x6b,
|
||||||
|
0x5f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x73, 0x69, 0x7a,
|
||||||
|
0x65, 0x20, 0x3d, 0x20, 0x31, 0x35, 0x30, 0x20, 0x33, 0x35, 0x0a, 0x74,
|
||||||
|
0x61, 0x73, 0x6b, 0x5f, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x20,
|
||||||
|
0x3d, 0x20, 0x32, 0x20, 0x32, 0x20, 0x34, 0x0a, 0x74, 0x61, 0x73, 0x6b,
|
||||||
|
0x5f, 0x74, 0x6f, 0x6f, 0x6c, 0x74, 0x69, 0x70, 0x20, 0x3d, 0x20, 0x31,
|
||||||
|
0x0a, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x66, 0x6f, 0x6e, 0x74, 0x5f, 0x63,
|
||||||
|
0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x23, 0x66, 0x66, 0x66, 0x66,
|
||||||
|
0x66, 0x66, 0x20, 0x31, 0x30, 0x30, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x5f,
|
||||||
|
0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69,
|
||||||
|
0x64, 0x20, 0x3d, 0x20, 0x32, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x61,
|
||||||
|
0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72,
|
||||||
|
0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x64, 0x20, 0x3d, 0x20, 0x33, 0x0a,
|
||||||
|
0x74, 0x61, 0x73, 0x6b, 0x5f, 0x75, 0x72, 0x67, 0x65, 0x6e, 0x74, 0x5f,
|
||||||
|
0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69,
|
||||||
|
0x64, 0x20, 0x3d, 0x20, 0x34, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69,
|
||||||
|
0x63, 0x6f, 0x6e, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x62, 0x61, 0x63,
|
||||||
|
0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x64, 0x20, 0x3d,
|
||||||
|
0x20, 0x32, 0x0a, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x5f, 0x6c, 0x65, 0x66,
|
||||||
|
0x74, 0x20, 0x3d, 0x20, 0x74, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x5f, 0x69,
|
||||||
|
0x63, 0x6f, 0x6e, 0x69, 0x66, 0x79, 0x0a, 0x6d, 0x6f, 0x75, 0x73, 0x65,
|
||||||
|
0x5f, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x20, 0x3d, 0x20, 0x6e, 0x6f,
|
||||||
|
0x6e, 0x65, 0x0a, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x5f, 0x72, 0x69, 0x67,
|
||||||
|
0x68, 0x74, 0x20, 0x3d, 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x0a, 0x6d,
|
||||||
|
0x6f, 0x75, 0x73, 0x65, 0x5f, 0x73, 0x63, 0x72, 0x6f, 0x6c, 0x6c, 0x5f,
|
||||||
|
0x75, 0x70, 0x20, 0x3d, 0x20, 0x74, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x0a,
|
||||||
|
0x6d, 0x6f, 0x75, 0x73, 0x65, 0x5f, 0x73, 0x63, 0x72, 0x6f, 0x6c, 0x6c,
|
||||||
|
0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x20, 0x3d, 0x20, 0x69, 0x63, 0x6f, 0x6e,
|
||||||
|
0x69, 0x66, 0x79, 0x0a, 0x0a, 0x23, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
|
||||||
|
0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
|
||||||
|
0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
|
||||||
|
0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x23, 0x20, 0x53, 0x79,
|
||||||
|
0x73, 0x74, 0x65, 0x6d, 0x20, 0x74, 0x72, 0x61, 0x79, 0x20, 0x28, 0x6e,
|
||||||
|
0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20,
|
||||||
|
0x61, 0x72, 0x65, 0x61, 0x29, 0x0a, 0x73, 0x79, 0x73, 0x74, 0x72, 0x61,
|
||||||
|
0x79, 0x5f, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x3d, 0x20,
|
||||||
|
0x30, 0x20, 0x34, 0x20, 0x32, 0x0a, 0x73, 0x79, 0x73, 0x74, 0x72, 0x61,
|
||||||
|
0x79, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64,
|
||||||
|
0x5f, 0x69, 0x64, 0x20, 0x3d, 0x20, 0x30, 0x0a, 0x73, 0x79, 0x73, 0x74,
|
||||||
|
0x72, 0x61, 0x79, 0x5f, 0x73, 0x6f, 0x72, 0x74, 0x20, 0x3d, 0x20, 0x61,
|
||||||
|
0x73, 0x63, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x0a, 0x73, 0x79, 0x73,
|
||||||
|
0x74, 0x72, 0x61, 0x79, 0x5f, 0x69, 0x63, 0x6f, 0x6e, 0x5f, 0x73, 0x69,
|
||||||
|
0x7a, 0x65, 0x20, 0x3d, 0x20, 0x32, 0x34, 0x0a, 0x73, 0x79, 0x73, 0x74,
|
||||||
|
0x72, 0x61, 0x79, 0x5f, 0x69, 0x63, 0x6f, 0x6e, 0x5f, 0x61, 0x73, 0x62,
|
||||||
|
0x20, 0x3d, 0x20, 0x31, 0x30, 0x30, 0x20, 0x30, 0x20, 0x30, 0x0a, 0x73,
|
||||||
|
0x79, 0x73, 0x74, 0x72, 0x61, 0x79, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74,
|
||||||
|
0x6f, 0x72, 0x20, 0x3d, 0x20, 0x31, 0x0a, 0x0a, 0x23, 0x2d, 0x2d, 0x2d,
|
||||||
|
0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
|
||||||
|
0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
|
||||||
|
0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x23,
|
||||||
|
0x20, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x65, 0x72, 0x0a, 0x6c, 0x61,
|
||||||
|
0x75, 0x6e, 0x63, 0x68, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x64, 0x64, 0x69,
|
||||||
|
0x6e, 0x67, 0x20, 0x3d, 0x20, 0x32, 0x20, 0x34, 0x20, 0x32, 0x0a, 0x6c,
|
||||||
|
0x61, 0x75, 0x6e, 0x63, 0x68, 0x65, 0x72, 0x5f, 0x62, 0x61, 0x63, 0x6b,
|
||||||
|
0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x64, 0x20, 0x3d, 0x20,
|
||||||
|
0x30, 0x0a, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x65, 0x72, 0x5f, 0x69,
|
||||||
|
0x63, 0x6f, 0x6e, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75,
|
||||||
|
0x6e, 0x64, 0x5f, 0x69, 0x64, 0x20, 0x3d, 0x20, 0x30, 0x0a, 0x6c, 0x61,
|
||||||
|
0x75, 0x6e, 0x63, 0x68, 0x65, 0x72, 0x5f, 0x69, 0x63, 0x6f, 0x6e, 0x5f,
|
||||||
|
0x73, 0x69, 0x7a, 0x65, 0x20, 0x3d, 0x20, 0x32, 0x34, 0x0a, 0x6c, 0x61,
|
||||||
|
0x75, 0x6e, 0x63, 0x68, 0x65, 0x72, 0x5f, 0x69, 0x63, 0x6f, 0x6e, 0x5f,
|
||||||
|
0x61, 0x73, 0x62, 0x20, 0x3d, 0x20, 0x31, 0x30, 0x30, 0x20, 0x30, 0x20,
|
||||||
|
0x30, 0x0a, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x65, 0x72, 0x5f, 0x69,
|
||||||
|
0x63, 0x6f, 0x6e, 0x5f, 0x74, 0x68, 0x65, 0x6d, 0x65, 0x5f, 0x6f, 0x76,
|
||||||
|
0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x30, 0x0a, 0x73,
|
||||||
|
0x74, 0x61, 0x72, 0x74, 0x75, 0x70, 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x66,
|
||||||
|
0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x3d, 0x20, 0x31,
|
||||||
|
0x0a, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x65, 0x72, 0x5f, 0x74, 0x6f,
|
||||||
|
0x6f, 0x6c, 0x74, 0x69, 0x70, 0x20, 0x3d, 0x20, 0x31, 0x0a, 0x6c, 0x61,
|
||||||
|
0x75, 0x6e, 0x63, 0x68, 0x65, 0x72, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x5f,
|
||||||
|
0x61, 0x70, 0x70, 0x20, 0x3d, 0x20, 0x2f, 0x75, 0x73, 0x72, 0x2f, 0x73,
|
||||||
|
0x68, 0x61, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,
|
||||||
|
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x69, 0x6e, 0x74, 0x32, 0x63,
|
||||||
|
0x6f, 0x6e, 0x66, 0x2e, 0x64, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x0a,
|
||||||
|
0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x65, 0x72, 0x5f, 0x69, 0x74, 0x65,
|
||||||
|
0x6d, 0x5f, 0x61, 0x70, 0x70, 0x20, 0x3d, 0x20, 0x2f, 0x75, 0x73, 0x72,
|
||||||
|
0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x2f, 0x73, 0x68, 0x61, 0x72, 0x65,
|
||||||
|
0x2f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
|
0x73, 0x2f, 0x74, 0x69, 0x6e, 0x74, 0x32, 0x63, 0x6f, 0x6e, 0x66, 0x2e,
|
||||||
|
0x64, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x0a, 0x6c, 0x61, 0x75, 0x6e,
|
||||||
|
0x63, 0x68, 0x65, 0x72, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x61, 0x70,
|
||||||
|
0x70, 0x20, 0x3d, 0x20, 0x2f, 0x75, 0x73, 0x72, 0x2f, 0x73, 0x68, 0x61,
|
||||||
|
0x72, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,
|
||||||
|
0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x66, 0x6f, 0x78, 0x2e,
|
||||||
|
0x64, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x0a, 0x6c, 0x61, 0x75, 0x6e,
|
||||||
|
0x63, 0x68, 0x65, 0x72, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x61, 0x70,
|
||||||
|
0x70, 0x20, 0x3d, 0x20, 0x2f, 0x75, 0x73, 0x72, 0x2f, 0x73, 0x68, 0x61,
|
||||||
|
0x72, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,
|
||||||
|
0x6f, 0x6e, 0x73, 0x2f, 0x69, 0x63, 0x65, 0x77, 0x65, 0x61, 0x73, 0x65,
|
||||||
|
0x6c, 0x2e, 0x64, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x0a, 0x6c, 0x61,
|
||||||
|
0x75, 0x6e, 0x63, 0x68, 0x65, 0x72, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x5f,
|
||||||
|
0x61, 0x70, 0x70, 0x20, 0x3d, 0x20, 0x2f, 0x75, 0x73, 0x72, 0x2f, 0x73,
|
||||||
|
0x68, 0x61, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,
|
||||||
|
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69,
|
||||||
|
0x75, 0x6d, 0x2d, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x2e, 0x64,
|
||||||
|
0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x0a, 0x6c, 0x61, 0x75, 0x6e, 0x63,
|
||||||
|
0x68, 0x65, 0x72, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x61, 0x70, 0x70,
|
||||||
|
0x20, 0x3d, 0x20, 0x2f, 0x75, 0x73, 0x72, 0x2f, 0x73, 0x68, 0x61, 0x72,
|
||||||
|
0x65, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
|
||||||
|
0x6e, 0x73, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2d, 0x63, 0x68,
|
||||||
|
0x72, 0x6f, 0x6d, 0x65, 0x2e, 0x64, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70,
|
||||||
|
0x0a, 0x0a, 0x23, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
|
||||||
|
0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
|
||||||
|
0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
|
||||||
|
0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x23, 0x20, 0x43, 0x6c, 0x6f, 0x63, 0x6b,
|
||||||
|
0x0a, 0x74, 0x69, 0x6d, 0x65, 0x31, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61,
|
||||||
|
0x74, 0x20, 0x3d, 0x20, 0x25, 0x48, 0x3a, 0x25, 0x4d, 0x0a, 0x74, 0x69,
|
||||||
|
0x6d, 0x65, 0x32, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x20, 0x3d,
|
||||||
|
0x20, 0x25, 0x41, 0x20, 0x25, 0x64, 0x20, 0x25, 0x42, 0x0a, 0x74, 0x69,
|
||||||
|
0x6d, 0x65, 0x31, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65,
|
||||||
|
0x20, 0x3d, 0x20, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x32, 0x5f, 0x74, 0x69,
|
||||||
|
0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, 0x20, 0x3d, 0x20, 0x0a, 0x63, 0x6c,
|
||||||
|
0x6f, 0x63, 0x6b, 0x5f, 0x66, 0x6f, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6c,
|
||||||
|
0x6f, 0x72, 0x20, 0x3d, 0x20, 0x23, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
|
||||||
|
0x20, 0x31, 0x30, 0x30, 0x0a, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x70,
|
||||||
|
0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x3d, 0x20, 0x32, 0x20, 0x30,
|
||||||
|
0x0a, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x67,
|
||||||
|
0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x64, 0x20, 0x3d, 0x20, 0x30,
|
||||||
|
0x0a, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x6f, 0x6f, 0x6c, 0x74,
|
||||||
|
0x69, 0x70, 0x20, 0x3d, 0x20, 0x0a, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x5f,
|
||||||
|
0x74, 0x6f, 0x6f, 0x6c, 0x74, 0x69, 0x70, 0x5f, 0x74, 0x69, 0x6d, 0x65,
|
||||||
|
0x7a, 0x6f, 0x6e, 0x65, 0x20, 0x3d, 0x20, 0x0a, 0x63, 0x6c, 0x6f, 0x63,
|
||||||
|
0x6b, 0x5f, 0x6c, 0x63, 0x6c, 0x69, 0x63, 0x6b, 0x5f, 0x63, 0x6f, 0x6d,
|
||||||
|
0x6d, 0x61, 0x6e, 0x64, 0x20, 0x3d, 0x20, 0x0a, 0x63, 0x6c, 0x6f, 0x63,
|
||||||
|
0x6b, 0x5f, 0x72, 0x63, 0x6c, 0x69, 0x63, 0x6b, 0x5f, 0x63, 0x6f, 0x6d,
|
||||||
|
0x6d, 0x61, 0x6e, 0x64, 0x20, 0x3d, 0x20, 0x6f, 0x72, 0x61, 0x67, 0x65,
|
||||||
|
0x0a, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6d, 0x63, 0x6c, 0x69, 0x63,
|
||||||
|
0x6b, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x20, 0x3d, 0x20,
|
||||||
|
0x0a, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x75, 0x77, 0x68, 0x65, 0x65,
|
||||||
|
0x6c, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x20, 0x3d, 0x20,
|
||||||
|
0x0a, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x64, 0x77, 0x68, 0x65, 0x65,
|
||||||
|
0x6c, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x20, 0x3d, 0x20,
|
||||||
|
0x0a, 0x0a, 0x23, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
|
||||||
|
0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
|
||||||
|
0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
|
||||||
|
0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x23, 0x20, 0x42, 0x61, 0x74, 0x74, 0x65,
|
||||||
|
0x72, 0x79, 0x0a, 0x62, 0x61, 0x74, 0x74, 0x65, 0x72, 0x79, 0x5f, 0x74,
|
||||||
|
0x6f, 0x6f, 0x6c, 0x74, 0x69, 0x70, 0x20, 0x3d, 0x20, 0x31, 0x0a, 0x62,
|
||||||
|
0x61, 0x74, 0x74, 0x65, 0x72, 0x79, 0x5f, 0x6c, 0x6f, 0x77, 0x5f, 0x73,
|
||||||
|
0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x3d, 0x20, 0x31, 0x30, 0x0a, 0x62,
|
||||||
|
0x61, 0x74, 0x74, 0x65, 0x72, 0x79, 0x5f, 0x6c, 0x6f, 0x77, 0x5f, 0x63,
|
||||||
|
0x6d, 0x64, 0x20, 0x3d, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x2d,
|
||||||
|
0x73, 0x65, 0x6e, 0x64, 0x20, 0x22, 0x62, 0x61, 0x74, 0x74, 0x65, 0x72,
|
||||||
|
0x79, 0x20, 0x6c, 0x6f, 0x77, 0x22, 0x0a, 0x62, 0x61, 0x74, 0x74, 0x65,
|
||||||
|
0x72, 0x79, 0x5f, 0x66, 0x6f, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6c, 0x6f,
|
||||||
|
0x72, 0x20, 0x3d, 0x20, 0x23, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x20,
|
||||||
|
0x31, 0x30, 0x30, 0x0a, 0x62, 0x61, 0x74, 0x74, 0x65, 0x72, 0x79, 0x5f,
|
||||||
|
0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x3d, 0x20, 0x31, 0x20,
|
||||||
|
0x30, 0x0a, 0x62, 0x61, 0x74, 0x74, 0x65, 0x72, 0x79, 0x5f, 0x62, 0x61,
|
||||||
|
0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x64, 0x20,
|
||||||
|
0x3d, 0x20, 0x30, 0x0a, 0x62, 0x61, 0x74, 0x74, 0x65, 0x72, 0x79, 0x5f,
|
||||||
|
0x68, 0x69, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x30, 0x31, 0x0a, 0x62,
|
||||||
|
0x61, 0x74, 0x74, 0x65, 0x72, 0x79, 0x5f, 0x6c, 0x63, 0x6c, 0x69, 0x63,
|
||||||
|
0x6b, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x20, 0x3d, 0x20,
|
||||||
|
0x0a, 0x62, 0x61, 0x74, 0x74, 0x65, 0x72, 0x79, 0x5f, 0x72, 0x63, 0x6c,
|
||||||
|
0x69, 0x63, 0x6b, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x20,
|
||||||
|
0x3d, 0x20, 0x0a, 0x62, 0x61, 0x74, 0x74, 0x65, 0x72, 0x79, 0x5f, 0x6d,
|
||||||
|
0x63, 0x6c, 0x69, 0x63, 0x6b, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e,
|
||||||
|
0x64, 0x20, 0x3d, 0x20, 0x0a, 0x62, 0x61, 0x74, 0x74, 0x65, 0x72, 0x79,
|
||||||
|
0x5f, 0x75, 0x77, 0x68, 0x65, 0x65, 0x6c, 0x5f, 0x63, 0x6f, 0x6d, 0x6d,
|
||||||
|
0x61, 0x6e, 0x64, 0x20, 0x3d, 0x20, 0x0a, 0x62, 0x61, 0x74, 0x74, 0x65,
|
||||||
|
0x72, 0x79, 0x5f, 0x64, 0x77, 0x68, 0x65, 0x65, 0x6c, 0x5f, 0x63, 0x6f,
|
||||||
|
0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x20, 0x3d, 0x20, 0x0a, 0x61, 0x63, 0x5f,
|
||||||
|
0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6d,
|
||||||
|
0x64, 0x20, 0x3d, 0x20, 0x0a, 0x61, 0x63, 0x5f, 0x64, 0x69, 0x73, 0x63,
|
||||||
|
0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6d, 0x64,
|
||||||
|
0x20, 0x3d, 0x20, 0x0a, 0x0a, 0x23, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
|
||||||
|
0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
|
||||||
|
0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
|
||||||
|
0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x23, 0x20, 0x54, 0x6f,
|
||||||
|
0x6f, 0x6c, 0x74, 0x69, 0x70, 0x0a, 0x74, 0x6f, 0x6f, 0x6c, 0x74, 0x69,
|
||||||
|
0x70, 0x5f, 0x73, 0x68, 0x6f, 0x77, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f,
|
||||||
|
0x75, 0x74, 0x20, 0x3d, 0x20, 0x30, 0x2e, 0x35, 0x0a, 0x74, 0x6f, 0x6f,
|
||||||
|
0x6c, 0x74, 0x69, 0x70, 0x5f, 0x68, 0x69, 0x64, 0x65, 0x5f, 0x74, 0x69,
|
||||||
|
0x6d, 0x65, 0x6f, 0x75, 0x74, 0x20, 0x3d, 0x20, 0x30, 0x2e, 0x31, 0x0a,
|
||||||
|
0x74, 0x6f, 0x6f, 0x6c, 0x74, 0x69, 0x70, 0x5f, 0x70, 0x61, 0x64, 0x64,
|
||||||
|
0x69, 0x6e, 0x67, 0x20, 0x3d, 0x20, 0x32, 0x20, 0x32, 0x0a, 0x74, 0x6f,
|
||||||
|
0x6f, 0x6c, 0x74, 0x69, 0x70, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72,
|
||||||
|
0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x64, 0x20, 0x3d, 0x20, 0x35, 0x0a,
|
||||||
|
0x74, 0x6f, 0x6f, 0x6c, 0x74, 0x69, 0x70, 0x5f, 0x66, 0x6f, 0x6e, 0x74,
|
||||||
|
0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x23, 0x32, 0x32,
|
||||||
|
0x32, 0x32, 0x32, 0x32, 0x20, 0x31, 0x30, 0x30, 0x0a, 0x0a
|
||||||
|
};
|
||||||
|
unsigned int themes_tint2rc_len = 4870;
|
||||||
10
src/tint2rc.h
Normal file
10
src/tint2rc.h
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
#ifndef TINT2RC_H
|
||||||
|
#define TINT2RC_H
|
||||||
|
|
||||||
|
// Content of .c file generated with xxd from the vim package:
|
||||||
|
// echo '#include "tint2rc.h"' > src/tint2rc.c && xxd -i themes/tint2rc >> src/tint2rc.c
|
||||||
|
|
||||||
|
extern unsigned char themes_tint2rc[];
|
||||||
|
extern unsigned int themes_tint2rc_len;
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -449,9 +449,9 @@ Imlib_Image load_image(const char *path, int cached)
|
|||||||
}
|
}
|
||||||
if (!image && g_str_has_suffix(path, ".svg")) {
|
if (!image && g_str_has_suffix(path, ".svg")) {
|
||||||
char tmp_filename[128];
|
char tmp_filename[128];
|
||||||
sprintf(tmp_filename, "/tmp/tint2-%d-XXXXXX.png", (int)getpid());
|
sprintf(tmp_filename, "/tmp/tint2-%d.png", (int)getpid());
|
||||||
int fd = mkstemps(tmp_filename, 4);
|
int fd = open(tmp_filename, O_CREAT | O_EXCL, 0600);
|
||||||
if (fd) {
|
if (fd >= 0) {
|
||||||
// We fork here because librsvg allocates memory like crazy
|
// We fork here because librsvg allocates memory like crazy
|
||||||
pid_t pid = fork();
|
pid_t pid = fork();
|
||||||
if (pid == 0) {
|
if (pid == 0) {
|
||||||
@@ -469,6 +469,7 @@ Imlib_Image load_image(const char *path, int cached)
|
|||||||
exit(0);
|
exit(0);
|
||||||
} else {
|
} else {
|
||||||
// Parent
|
// Parent
|
||||||
|
close(fd);
|
||||||
waitpid(pid, 0, 0);
|
waitpid(pid, 0, 0);
|
||||||
image = imlib_load_image_immediately_without_cache(tmp_filename);
|
image = imlib_load_image_immediately_without_cache(tmp_filename);
|
||||||
unlink(tmp_filename);
|
unlink(tmp_filename);
|
||||||
@@ -639,7 +640,8 @@ GSList *load_locations_from_env(GSList *locations, const char *var, ...)
|
|||||||
if (value) {
|
if (value) {
|
||||||
value = strdup(value);
|
value = strdup(value);
|
||||||
char *p = value;
|
char *p = value;
|
||||||
for (char *token = strsep(&value, ":"); token; token = strsep(&value, ":")) {
|
char *t;
|
||||||
|
for (char *token = strtok_r(value, ":", &t); token; token = strtok_r(NULL, ":", &t)) {
|
||||||
va_list ap;
|
va_list ap;
|
||||||
va_start(ap, var);
|
va_start(ap, var);
|
||||||
for (const char *suffix = va_arg(ap, const char *); suffix; suffix = va_arg(ap, const char *)) {
|
for (const char *suffix = va_arg(ap, const char *); suffix; suffix = va_arg(ap, const char *)) {
|
||||||
|
|||||||
@@ -221,3 +221,7 @@ src/tint2conf/gradient_gui.h
|
|||||||
src/tint2conf/gradient_gui.c
|
src/tint2conf/gradient_gui.c
|
||||||
src/tint2conf/md4.h
|
src/tint2conf/md4.h
|
||||||
src/tint2conf/md4.c
|
src/tint2conf/md4.c
|
||||||
|
src/tint2rc.c
|
||||||
|
src/tint2rc.h
|
||||||
|
src/button/button.c
|
||||||
|
src/button/button.h
|
||||||
|
|||||||
@@ -24,3 +24,4 @@ src/execplugin
|
|||||||
src/separator
|
src/separator
|
||||||
themes
|
themes
|
||||||
doc
|
doc
|
||||||
|
src/button
|
||||||
|
|||||||
Reference in New Issue
Block a user