Compare commits
28 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
487774eac9 | ||
|
|
d710eb9cea | ||
|
|
0385ca46dc | ||
|
|
e7c3f99e28 | ||
|
|
14d5c4e43d | ||
|
|
a9330b424b | ||
|
|
5486c93f4c | ||
|
|
b9508450b7 | ||
|
|
7384fd8270 | ||
|
|
7ea2452ae4 | ||
|
|
c3b60f1b4d | ||
|
|
193b3b5a81 | ||
|
|
9bd4257fcf | ||
|
|
5bf8efac03 | ||
|
|
bd9e12b993 | ||
|
|
78595a3d1f | ||
|
|
71df0bc553 | ||
|
|
c4c07fc9cc | ||
|
|
da5d1c5979 | ||
|
|
95fa0bbf83 | ||
|
|
afd4a806a6 | ||
|
|
e6612d2893 | ||
|
|
298f60f1b0 | ||
|
|
7794272f8e | ||
|
|
8e5a1a3848 | ||
|
|
3810080be2 | ||
|
|
74dd8e11a3 | ||
|
|
a2efc493b2 |
@@ -147,9 +147,9 @@ set_target_properties( tint2 PROPERTIES LINK_FLAGS "-pthread -fno-strict-aliasin
|
||||
install( TARGETS tint2 DESTINATION bin )
|
||||
install( FILES sample/tint2rc DESTINATION ${SYSCONFDIR}/xdg/tint2 )
|
||||
install( FILES default_icon.png DESTINATION ${DATADIR}/tint2 )
|
||||
install( FILES AUTHORS ChangeLog README DESTINATION ${DOCDIR} )
|
||||
install( FILES AUTHORS ChangeLog README.md DESTINATION ${DOCDIR} )
|
||||
install( FILES doc/tint2.1 DESTINATION ${MANDIR}/man1 )
|
||||
if( ENABLE_EXAMPLES )
|
||||
file( GLOB SAMPLEFILES sample/*.tint2rc )
|
||||
install( FILES ${SAMPLEFILES} DESTINATION ${DOCDIR}/examples )
|
||||
endif( ENABLE_EXAMPLES )
|
||||
endif( ENABLE_EXAMPLES )
|
||||
20
ChangeLog
20
ChangeLog
@@ -1,4 +1,4 @@
|
||||
2015-04-25 tint2-0.12-rc1
|
||||
2015-05-03 master
|
||||
- Note: the changes listed here are based on the previous release tint2 0.11, however some distributions (e.g. Debian)
|
||||
offered packages using newer commits and/or patches; thus from the user's perspective some of these features are
|
||||
already present. They are marked with '(already released by distros)'.
|
||||
@@ -9,8 +9,8 @@
|
||||
- Enhancement: more thorough search for icons
|
||||
- Configuration GUI: tint2conf
|
||||
- Experimental, testing/feedback needed
|
||||
- System tray:
|
||||
- Changed rendering method to fix icon corruptions (need user feedback)
|
||||
- Icons (system tray, task buttons, launcher):
|
||||
- Changed rendering method to fix icon corruptions (please report any problems)
|
||||
- Many bugfixes
|
||||
- New config options (see https://gitlab.com/o9000/tint2/wikis/Configure):
|
||||
- Panel:
|
||||
@@ -27,6 +27,7 @@
|
||||
- launcher* (already released by distros)
|
||||
- launcher_apps_dir (previously patched in by some distros)
|
||||
- startup_notifications
|
||||
- launcher_icon_theme_override
|
||||
- System tray:
|
||||
- systray_monitor
|
||||
- Config options with changed behavior:
|
||||
@@ -36,15 +37,12 @@
|
||||
set it to zero (or change the border color/style to match tint2). If you set it to zero, make sure you do not have
|
||||
reserved space at the edge of the screen in the OpenBox config.
|
||||
Reason for change: issues 257, 394, 461, 465, 481.
|
||||
- panel_layer: previously, 'panel_layer = normal' was not functioning correctly. Now it does (it requires panel_dock = 0).
|
||||
Note that in this case some compositors will draw shadows of other windows behind tint2. This can be avoided in compton
|
||||
using the option shadow-exclude-reg = "x35+0-0" where 35 should be replaced with the size of the panel.
|
||||
- font_shadow: shadows are thicker and softer, and are now applied to all text elements, not just the taskbar.
|
||||
Reason for change: legibility improved for transparent panels.
|
||||
- Launcher:
|
||||
- launcher_icon_theme: previously, this parameter had a lower priority than the icon theme provided through the
|
||||
XSettings manager; as virtually all DEs provide one, it was useless. Now the parameter has a higher priority.
|
||||
Remove it to respect the XSettings manager settings.
|
||||
Reasons for change:
|
||||
* ability to use a custom icon theme only in tint2
|
||||
* several DEs do not allow selecting the hicolor theme
|
||||
- launcher_item_app: now it expands leading ~ to the path to the user's home directory.
|
||||
- Project hosting:
|
||||
- Migrated from https://code.google.com/p/tint2 to https://gitlab.com/o9000/tint2 and switched from svn to git
|
||||
@@ -633,6 +631,4 @@ released tint-0.2
|
||||
|
||||
2008-04-22
|
||||
- fork ttm projet from p://code.google.com/p/ttm/ (by Pål Staurland staura@gmail.com)
|
||||
while the projet is no longer in developpement, have not changed the name of 'tint'.
|
||||
|
||||
|
||||
while the projet is no longer in developpement, have not changed the name of 'tint'.
|
||||
25
README.md
25
README.md
@@ -1,3 +1,26 @@
|
||||
### New unstable release: 0.12-rc3
|
||||
Changes: https://gitlab.com/o9000/tint2/blob/master/ChangeLog
|
||||
|
||||
Documentation: https://gitlab.com/o9000/tint2/wikis/home
|
||||
|
||||
Try it out with (see also [dependencies](https://gitlab.com/o9000/tint2/wikis/Install#dependencies)):
|
||||
```
|
||||
mkdir tint2-0.12-rc3
|
||||
cd tint2-0.12-rc3
|
||||
wget 'https://gitlab.com/o9000/tint2/repository/archive.tar.gz?ref=v0.12-rc3' --output-document tint2-0.12-rc3.tar.gz
|
||||
tar -xzf tint2-0.12-rc3.tar.gz
|
||||
cd tint2.git
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make -j4
|
||||
./tint2 &
|
||||
./src/tint2conf/tint2conf &
|
||||
```
|
||||
Please report any problems to https://gitlab.com/o9000/tint2/issues. Your feedback is much appreciated.
|
||||
|
||||
P.S. GitLab is now the official location of the tint2 project, migrated from Google Code, which is shutting down. In case you are wondering why not GitHub, BitBucket etc., we chose GitLab because it is open source, it is mature and works well, looks cool and has a very nice team.
|
||||
|
||||
### What is tint2?
|
||||
|
||||
tint2 is a simple panel/taskbar made for modern X window managers. It was specifically made for Openbox but it should also work with other window managers (GNOME, KDE, XFCE etc.). It is based on ttm http://code.google.com/p/ttm/.
|
||||
@@ -26,7 +49,7 @@ tint2 is a simple panel/taskbar made for modern X window managers. It was specif
|
||||
* [Configure](https://gitlab.com/o9000/tint2/wikis/Configure)
|
||||
* [Add applet not supported by tint2](https://gitlab.com/o9000/tint2/wikis/ThirdPartyApplets)
|
||||
* [Other frequently asked questions](https://gitlab.com/o9000/tint2/wikis/FAQ)
|
||||
* [Debug](https://gitlab.com/o9000/tint2/wikis/Debug)
|
||||
* [Debug](https://gitlab.com/o9000/tint2/wikis/Debug)
|
||||
|
||||
### How can I help out?
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Usage: ./make_release.sh
|
||||
# Creates a tar.bz2 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:
|
||||
#
|
||||
@@ -9,7 +9,7 @@
|
||||
#
|
||||
# To generate a release for an older tagged commit, first list the tags with:
|
||||
#
|
||||
# git tags
|
||||
# git tag
|
||||
#
|
||||
# then checkout the tagged commit with:
|
||||
#
|
||||
@@ -18,6 +18,8 @@
|
||||
# Finally, to revert to HEAD:
|
||||
#
|
||||
# git checkout master
|
||||
#
|
||||
# See more at https://gitlab.com/o9000/tint2/wikis/Development
|
||||
|
||||
VERSION=$(./get_version.sh --strict)
|
||||
if [ ! $? -eq 0 ]
|
||||
@@ -27,8 +29,9 @@ then
|
||||
fi
|
||||
|
||||
DIR=tint2-$VERSION
|
||||
ARCHIVE=$DIR.tar.gz
|
||||
echo "Making release $DIR"
|
||||
rm -rf $DIR
|
||||
rm -rf $DIR $ARCHIVE
|
||||
|
||||
git checkout-index --prefix=$DIR/ -a
|
||||
|
||||
@@ -38,8 +41,8 @@ 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 -cjf $DIR.tar.bz2 $DIR
|
||||
tar -czf $ARCHIVE $DIR
|
||||
rm -rf $DIR
|
||||
|
||||
sha1sum -b $DIR.tar.bz2
|
||||
sha256sum -b $DIR.tar.bz2
|
||||
sha1sum -b $ARCHIVE
|
||||
sha256sum -b $ARCHIVE
|
||||
|
||||
162
sample/horizontal-dark-opaque.tint2rc
Normal file
162
sample/horizontal-dark-opaque.tint2rc
Normal file
@@ -0,0 +1,162 @@
|
||||
#---- Generated by tint2conf 1238 ----
|
||||
#-------------------------------------
|
||||
# Backgrounds
|
||||
# Background 1
|
||||
rounded = 5
|
||||
border_width = 1
|
||||
background_color = #111111 100
|
||||
border_color = #333333 100
|
||||
|
||||
# Background 2
|
||||
rounded = 5
|
||||
border_width = 0
|
||||
background_color = #111111 100
|
||||
border_color = #222222 100
|
||||
|
||||
# Background 3
|
||||
rounded = 5
|
||||
border_width = 1
|
||||
background_color = #222222 100
|
||||
border_color = #777777 100
|
||||
|
||||
# Background 4
|
||||
rounded = 5
|
||||
border_width = 1
|
||||
background_color = #aa4400 100
|
||||
border_color = #aa7733 100
|
||||
|
||||
# Background 5
|
||||
rounded = 2
|
||||
border_width = 1
|
||||
background_color = #ffffaa 100
|
||||
border_color = #999999 100
|
||||
|
||||
# Background 6
|
||||
rounded = 2
|
||||
border_width = 1
|
||||
background_color = #111111 100
|
||||
border_color = #222222 100
|
||||
|
||||
# Background 7
|
||||
rounded = 2
|
||||
border_width = 1
|
||||
background_color = #222222 100
|
||||
border_color = #777777 100
|
||||
|
||||
#-------------------------------------
|
||||
# Panel
|
||||
panel_items = LTSC
|
||||
panel_size = 100% 32
|
||||
panel_margin = 0 0
|
||||
panel_padding = 4 2 4
|
||||
panel_background_id = 1
|
||||
wm_menu = 1
|
||||
panel_dock = 0
|
||||
panel_position = bottom center horizontal
|
||||
panel_layer = normal
|
||||
panel_monitor = all
|
||||
autohide = 0
|
||||
autohide_show_timeout = 0
|
||||
autohide_hide_timeout = 0.5
|
||||
autohide_height = 2
|
||||
strut_policy = follow_size
|
||||
panel_window_name = tint2
|
||||
disable_transparency = 0
|
||||
font_shadow = 0
|
||||
|
||||
#-------------------------------------
|
||||
# Taskbar
|
||||
taskbar_mode = single_desktop
|
||||
taskbar_padding = 0 0 2
|
||||
taskbar_background_id = 0
|
||||
taskbar_active_background_id = 0
|
||||
taskbar_name = 1
|
||||
taskbar_hide_inactive_tasks = 0
|
||||
taskbar_hide_different_monitor = 0
|
||||
taskbar_name_padding = 6 3
|
||||
taskbar_name_background_id = 6
|
||||
taskbar_name_active_background_id = 7
|
||||
taskbar_name_font = sans bold 9
|
||||
taskbar_name_font_color = #dddddd 100
|
||||
taskbar_name_active_font_color = #dddddd 100
|
||||
taskbar_distribute_size = 1
|
||||
taskbar_sort_order = none
|
||||
|
||||
#-------------------------------------
|
||||
# Task
|
||||
task_text = 1
|
||||
task_icon = 1
|
||||
task_centered = 1
|
||||
urgent_nb_of_blink = 100000
|
||||
task_maximum_size = 140 35
|
||||
task_padding = 4 3 4
|
||||
task_font = sans 8
|
||||
task_tooltip = 1
|
||||
task_font_color = #eeeeee 100
|
||||
task_icon_asb = 100 0 0
|
||||
task_background_id = 2
|
||||
task_active_background_id = 3
|
||||
task_urgent_background_id = 4
|
||||
task_iconified_background_id = 2
|
||||
mouse_left = toggle_iconify
|
||||
mouse_middle = none
|
||||
mouse_right = close
|
||||
mouse_scroll_up = prev_task
|
||||
mouse_scroll_down = next_task
|
||||
|
||||
#-------------------------------------
|
||||
# System tray (notification area)
|
||||
systray_padding = 0 0 2
|
||||
systray_background_id = 0
|
||||
systray_sort = ascending
|
||||
systray_icon_size = 22
|
||||
systray_icon_asb = 100 0 0
|
||||
systray_monitor = 1
|
||||
|
||||
#-------------------------------------
|
||||
# Launcher
|
||||
launcher_padding = 0 0 2
|
||||
launcher_background_id = 0
|
||||
launcher_icon_size = 22
|
||||
launcher_icon_asb = 100 0 0
|
||||
startup_notifications = 1
|
||||
launcher_tooltip = 1
|
||||
launcher_item_app = /usr/share/applications/firefox.desktop
|
||||
launcher_item_app = /usr/share/applications/iceweasel.desktop
|
||||
|
||||
#-------------------------------------
|
||||
# Clock
|
||||
time1_format = %H:%M
|
||||
time2_format = %A %d %B
|
||||
time1_font = sans bold 8
|
||||
time1_timezone =
|
||||
time2_timezone =
|
||||
time2_font = sans 7
|
||||
clock_font_color = #eeeeee 100
|
||||
clock_padding = 1 0
|
||||
clock_background_id = 0
|
||||
clock_tooltip =
|
||||
clock_tooltip_timezone =
|
||||
clock_lclick_command = zenity --calendar --text ""
|
||||
clock_rclick_command = orage
|
||||
|
||||
#-------------------------------------
|
||||
# Battery
|
||||
battery_low_status = 10
|
||||
battery_low_cmd = notify-send "battery low"
|
||||
bat1_font = sans 8
|
||||
bat2_font = sans 6
|
||||
battery_font_color = #eeeeee 100
|
||||
battery_padding = 1 0
|
||||
battery_background_id = 0
|
||||
battery_hide = 101
|
||||
|
||||
#-------------------------------------
|
||||
# Tooltip
|
||||
tooltip_show_timeout = 0.5
|
||||
tooltip_hide_timeout = 0.1
|
||||
tooltip_padding = 2 2
|
||||
tooltip_background_id = 5
|
||||
tooltip_font_color = #222222 100
|
||||
tooltip_font = sans 9
|
||||
|
||||
162
sample/horizontal-dark-transparent.tint2rc
Normal file
162
sample/horizontal-dark-transparent.tint2rc
Normal file
@@ -0,0 +1,162 @@
|
||||
#---- Generated by tint2conf 24b3 ----
|
||||
#-------------------------------------
|
||||
# Backgrounds
|
||||
# Background 1
|
||||
rounded = 5
|
||||
border_width = 1
|
||||
background_color = #000000 80
|
||||
border_color = #555555 80
|
||||
|
||||
# Background 2
|
||||
rounded = 5
|
||||
border_width = 0
|
||||
background_color = #777777 0
|
||||
border_color = #777777 10
|
||||
|
||||
# Background 3
|
||||
rounded = 5
|
||||
border_width = 1
|
||||
background_color = #555555 10
|
||||
border_color = #ffffff 60
|
||||
|
||||
# Background 4
|
||||
rounded = 5
|
||||
border_width = 1
|
||||
background_color = #aa4400 100
|
||||
border_color = #aa7733 100
|
||||
|
||||
# Background 5
|
||||
rounded = 2
|
||||
border_width = 1
|
||||
background_color = #ffffaa 100
|
||||
border_color = #999999 100
|
||||
|
||||
# Background 6
|
||||
rounded = 2
|
||||
border_width = 1
|
||||
background_color = #777777 0
|
||||
border_color = #777777 30
|
||||
|
||||
# Background 7
|
||||
rounded = 2
|
||||
border_width = 1
|
||||
background_color = #555555 10
|
||||
border_color = #ffffff 60
|
||||
|
||||
#-------------------------------------
|
||||
# Panel
|
||||
panel_items = LTSC
|
||||
panel_size = 100% 32
|
||||
panel_margin = 0 0
|
||||
panel_padding = 4 2 4
|
||||
panel_background_id = 1
|
||||
wm_menu = 1
|
||||
panel_dock = 0
|
||||
panel_position = bottom center horizontal
|
||||
panel_layer = normal
|
||||
panel_monitor = all
|
||||
autohide = 0
|
||||
autohide_show_timeout = 0
|
||||
autohide_hide_timeout = 0.5
|
||||
autohide_height = 2
|
||||
strut_policy = follow_size
|
||||
panel_window_name = tint2
|
||||
disable_transparency = 0
|
||||
font_shadow = 0
|
||||
|
||||
#-------------------------------------
|
||||
# Taskbar
|
||||
taskbar_mode = single_desktop
|
||||
taskbar_padding = 0 0 2
|
||||
taskbar_background_id = 0
|
||||
taskbar_active_background_id = 0
|
||||
taskbar_name = 1
|
||||
taskbar_hide_inactive_tasks = 0
|
||||
taskbar_hide_different_monitor = 0
|
||||
taskbar_name_padding = 6 3
|
||||
taskbar_name_background_id = 6
|
||||
taskbar_name_active_background_id = 7
|
||||
taskbar_name_font = sans bold 9
|
||||
taskbar_name_font_color = #dddddd 100
|
||||
taskbar_name_active_font_color = #dddddd 100
|
||||
taskbar_distribute_size = 1
|
||||
taskbar_sort_order = none
|
||||
|
||||
#-------------------------------------
|
||||
# Task
|
||||
task_text = 1
|
||||
task_icon = 1
|
||||
task_centered = 1
|
||||
urgent_nb_of_blink = 100000
|
||||
task_maximum_size = 140 35
|
||||
task_padding = 4 3 4
|
||||
task_font = sans 8
|
||||
task_tooltip = 1
|
||||
task_font_color = #eeeeee 100
|
||||
task_icon_asb = 100 0 0
|
||||
task_background_id = 2
|
||||
task_active_background_id = 3
|
||||
task_urgent_background_id = 4
|
||||
task_iconified_background_id = 2
|
||||
mouse_left = toggle_iconify
|
||||
mouse_middle = none
|
||||
mouse_right = close
|
||||
mouse_scroll_up = prev_task
|
||||
mouse_scroll_down = next_task
|
||||
|
||||
#-------------------------------------
|
||||
# System tray (notification area)
|
||||
systray_padding = 0 0 2
|
||||
systray_background_id = 0
|
||||
systray_sort = ascending
|
||||
systray_icon_size = 22
|
||||
systray_icon_asb = 100 0 0
|
||||
systray_monitor = 1
|
||||
|
||||
#-------------------------------------
|
||||
# Launcher
|
||||
launcher_padding = 0 0 2
|
||||
launcher_background_id = 0
|
||||
launcher_icon_size = 22
|
||||
launcher_icon_asb = 100 0 0
|
||||
startup_notifications = 1
|
||||
launcher_tooltip = 1
|
||||
launcher_item_app = /usr/share/applications/firefox.desktop
|
||||
launcher_item_app = /usr/share/applications/iceweasel.desktop
|
||||
|
||||
#-------------------------------------
|
||||
# Clock
|
||||
time1_format = %H:%M
|
||||
time2_format = %A %d %B
|
||||
time1_font = sans bold 8
|
||||
time1_timezone =
|
||||
time2_timezone =
|
||||
time2_font = sans 7
|
||||
clock_font_color = #eeeeee 100
|
||||
clock_padding = 1 0
|
||||
clock_background_id = 0
|
||||
clock_tooltip =
|
||||
clock_tooltip_timezone =
|
||||
clock_lclick_command = zenity --calendar --text ""
|
||||
clock_rclick_command = orage
|
||||
|
||||
#-------------------------------------
|
||||
# Battery
|
||||
battery_low_status = 10
|
||||
battery_low_cmd = notify-send "battery low"
|
||||
bat1_font = sans 8
|
||||
bat2_font = sans 6
|
||||
battery_font_color = #eeeeee 100
|
||||
battery_padding = 1 0
|
||||
battery_background_id = 0
|
||||
battery_hide = 101
|
||||
|
||||
#-------------------------------------
|
||||
# Tooltip
|
||||
tooltip_show_timeout = 0.5
|
||||
tooltip_hide_timeout = 0.1
|
||||
tooltip_padding = 2 2
|
||||
tooltip_background_id = 5
|
||||
tooltip_font_color = #222222 100
|
||||
tooltip_font = sans 9
|
||||
|
||||
168
sample/horizontal-light-opaque.tint2rc
Normal file
168
sample/horizontal-light-opaque.tint2rc
Normal file
@@ -0,0 +1,168 @@
|
||||
#---- Generated by tint2conf 3ad3 ----
|
||||
#-------------------------------------
|
||||
# Backgrounds
|
||||
# Background 1
|
||||
rounded = 0
|
||||
border_width = 1
|
||||
background_color = #eeeeee 100
|
||||
border_color = #bbbbbb 100
|
||||
|
||||
# Background 2
|
||||
rounded = 5
|
||||
border_width = 0
|
||||
background_color = #eeeeee 100
|
||||
border_color = #cccccc 100
|
||||
|
||||
# Background 3
|
||||
rounded = 5
|
||||
border_width = 1
|
||||
background_color = #dddddd 100
|
||||
border_color = #999999 100
|
||||
|
||||
# Background 4
|
||||
rounded = 5
|
||||
border_width = 1
|
||||
background_color = #aa4400 100
|
||||
border_color = #aa7733 100
|
||||
|
||||
# Background 5
|
||||
rounded = 2
|
||||
border_width = 1
|
||||
background_color = #ffffaa 100
|
||||
border_color = #999999 100
|
||||
|
||||
# Background 6
|
||||
rounded = 2
|
||||
border_width = 1
|
||||
background_color = #eeeeee 100
|
||||
border_color = #cccccc 100
|
||||
|
||||
# Background 7
|
||||
rounded = 2
|
||||
border_width = 1
|
||||
background_color = #dddddd 100
|
||||
border_color = #999999 100
|
||||
|
||||
# Background 8
|
||||
rounded = 3
|
||||
border_width = 0
|
||||
background_color = #999999 100
|
||||
border_color = #cccccc 100
|
||||
|
||||
#-------------------------------------
|
||||
# Panel
|
||||
panel_items = LTSC
|
||||
panel_size = 100% 32
|
||||
panel_margin = 0 0
|
||||
panel_padding = 4 2 4
|
||||
panel_background_id = 1
|
||||
wm_menu = 1
|
||||
panel_dock = 0
|
||||
panel_position = bottom center horizontal
|
||||
panel_layer = normal
|
||||
panel_monitor = all
|
||||
autohide = 0
|
||||
autohide_show_timeout = 0
|
||||
autohide_hide_timeout = 0.5
|
||||
autohide_height = 2
|
||||
strut_policy = follow_size
|
||||
panel_window_name = tint2
|
||||
disable_transparency = 0
|
||||
font_shadow = 0
|
||||
|
||||
#-------------------------------------
|
||||
# Taskbar
|
||||
taskbar_mode = single_desktop
|
||||
taskbar_padding = 0 0 2
|
||||
taskbar_background_id = 0
|
||||
taskbar_active_background_id = 0
|
||||
taskbar_name = 1
|
||||
taskbar_hide_inactive_tasks = 0
|
||||
taskbar_hide_different_monitor = 0
|
||||
taskbar_name_padding = 6 3
|
||||
taskbar_name_background_id = 6
|
||||
taskbar_name_active_background_id = 7
|
||||
taskbar_name_font = sans bold 9
|
||||
taskbar_name_font_color = #222222 100
|
||||
taskbar_name_active_font_color = #222222 100
|
||||
taskbar_distribute_size = 1
|
||||
taskbar_sort_order = none
|
||||
|
||||
#-------------------------------------
|
||||
# Task
|
||||
task_text = 1
|
||||
task_icon = 1
|
||||
task_centered = 1
|
||||
urgent_nb_of_blink = 100000
|
||||
task_maximum_size = 140 35
|
||||
task_padding = 4 3 4
|
||||
task_font = sans 8
|
||||
task_tooltip = 1
|
||||
task_font_color = #222222 100
|
||||
task_icon_asb = 100 0 0
|
||||
task_background_id = 2
|
||||
task_active_background_id = 3
|
||||
task_urgent_background_id = 4
|
||||
task_iconified_background_id = 2
|
||||
mouse_left = toggle_iconify
|
||||
mouse_middle = none
|
||||
mouse_right = close
|
||||
mouse_scroll_up = prev_task
|
||||
mouse_scroll_down = next_task
|
||||
|
||||
#-------------------------------------
|
||||
# System tray (notification area)
|
||||
systray_padding = 4 0 2
|
||||
systray_background_id = 8
|
||||
systray_sort = ascending
|
||||
systray_icon_size = 22
|
||||
systray_icon_asb = 100 0 0
|
||||
systray_monitor = 1
|
||||
|
||||
#-------------------------------------
|
||||
# Launcher
|
||||
launcher_padding = 0 0 2
|
||||
launcher_background_id = 0
|
||||
launcher_icon_size = 22
|
||||
launcher_icon_asb = 100 0 0
|
||||
startup_notifications = 1
|
||||
launcher_tooltip = 1
|
||||
launcher_item_app = /usr/share/applications/firefox.desktop
|
||||
launcher_item_app = /usr/share/applications/iceweasel.desktop
|
||||
|
||||
#-------------------------------------
|
||||
# Clock
|
||||
time1_format = %H:%M
|
||||
time2_format = %A %d %B
|
||||
time1_font = sans bold 8
|
||||
time1_timezone =
|
||||
time2_timezone =
|
||||
time2_font = sans 7
|
||||
clock_font_color = #222222 100
|
||||
clock_padding = 1 0
|
||||
clock_background_id = 0
|
||||
clock_tooltip =
|
||||
clock_tooltip_timezone =
|
||||
clock_lclick_command = zenity --calendar --text ""
|
||||
clock_rclick_command = orage
|
||||
|
||||
#-------------------------------------
|
||||
# Battery
|
||||
battery_low_status = 10
|
||||
battery_low_cmd = notify-send "battery low"
|
||||
bat1_font = sans 8
|
||||
bat2_font = sans 6
|
||||
battery_font_color = #222222 100
|
||||
battery_padding = 1 0
|
||||
battery_background_id = 0
|
||||
battery_hide = 101
|
||||
|
||||
#-------------------------------------
|
||||
# Tooltip
|
||||
tooltip_show_timeout = 0.5
|
||||
tooltip_hide_timeout = 0.1
|
||||
tooltip_padding = 2 2
|
||||
tooltip_background_id = 5
|
||||
tooltip_font_color = #222222 100
|
||||
tooltip_font = sans 9
|
||||
|
||||
162
sample/vertical-dark-opaque.tint2rc
Normal file
162
sample/vertical-dark-opaque.tint2rc
Normal file
@@ -0,0 +1,162 @@
|
||||
#---- Generated by tint2conf c113 ----
|
||||
#-------------------------------------
|
||||
# Backgrounds
|
||||
# Background 1
|
||||
rounded = 5
|
||||
border_width = 1
|
||||
background_color = #111111 100
|
||||
border_color = #333333 100
|
||||
|
||||
# Background 2
|
||||
rounded = 5
|
||||
border_width = 0
|
||||
background_color = #111111 100
|
||||
border_color = #222222 100
|
||||
|
||||
# Background 3
|
||||
rounded = 5
|
||||
border_width = 1
|
||||
background_color = #222222 100
|
||||
border_color = #777777 100
|
||||
|
||||
# Background 4
|
||||
rounded = 5
|
||||
border_width = 1
|
||||
background_color = #aa4400 100
|
||||
border_color = #aa7733 100
|
||||
|
||||
# Background 5
|
||||
rounded = 2
|
||||
border_width = 1
|
||||
background_color = #ffffaa 100
|
||||
border_color = #999999 100
|
||||
|
||||
# Background 6
|
||||
rounded = 2
|
||||
border_width = 1
|
||||
background_color = #111111 100
|
||||
border_color = #222222 100
|
||||
|
||||
# Background 7
|
||||
rounded = 2
|
||||
border_width = 1
|
||||
background_color = #222222 100
|
||||
border_color = #777777 100
|
||||
|
||||
#-------------------------------------
|
||||
# Panel
|
||||
panel_items = CSTL
|
||||
panel_size = 100% 152
|
||||
panel_margin = 0 0
|
||||
panel_padding = 2 2 2
|
||||
panel_background_id = 1
|
||||
wm_menu = 1
|
||||
panel_dock = 0
|
||||
panel_position = bottom left vertical
|
||||
panel_layer = normal
|
||||
panel_monitor = all
|
||||
autohide = 0
|
||||
autohide_show_timeout = 0
|
||||
autohide_hide_timeout = 0.5
|
||||
autohide_height = 2
|
||||
strut_policy = follow_size
|
||||
panel_window_name = tint2
|
||||
disable_transparency = 0
|
||||
font_shadow = 0
|
||||
|
||||
#-------------------------------------
|
||||
# Taskbar
|
||||
taskbar_mode = multi_desktop
|
||||
taskbar_padding = 0 0 2
|
||||
taskbar_background_id = 0
|
||||
taskbar_active_background_id = 0
|
||||
taskbar_name = 1
|
||||
taskbar_hide_inactive_tasks = 0
|
||||
taskbar_hide_different_monitor = 0
|
||||
taskbar_name_padding = 6 3
|
||||
taskbar_name_background_id = 6
|
||||
taskbar_name_active_background_id = 7
|
||||
taskbar_name_font = sans bold 9
|
||||
taskbar_name_font_color = #dddddd 100
|
||||
taskbar_name_active_font_color = #dddddd 100
|
||||
taskbar_distribute_size = 1
|
||||
taskbar_sort_order = none
|
||||
|
||||
#-------------------------------------
|
||||
# Task
|
||||
task_text = 1
|
||||
task_icon = 1
|
||||
task_centered = 0
|
||||
urgent_nb_of_blink = 100000
|
||||
task_maximum_size = 152 35
|
||||
task_padding = 4 3 4
|
||||
task_font = sans 8
|
||||
task_tooltip = 1
|
||||
task_font_color = #eeeeee 100
|
||||
task_icon_asb = 100 0 0
|
||||
task_background_id = 2
|
||||
task_active_background_id = 3
|
||||
task_urgent_background_id = 4
|
||||
task_iconified_background_id = 2
|
||||
mouse_left = toggle_iconify
|
||||
mouse_middle = none
|
||||
mouse_right = close
|
||||
mouse_scroll_up = prev_task
|
||||
mouse_scroll_down = next_task
|
||||
|
||||
#-------------------------------------
|
||||
# System tray (notification area)
|
||||
systray_padding = 0 0 2
|
||||
systray_background_id = 0
|
||||
systray_sort = ascending
|
||||
systray_icon_size = 22
|
||||
systray_icon_asb = 100 0 0
|
||||
systray_monitor = 1
|
||||
|
||||
#-------------------------------------
|
||||
# Launcher
|
||||
launcher_padding = 0 0 2
|
||||
launcher_background_id = 0
|
||||
launcher_icon_size = 22
|
||||
launcher_icon_asb = 100 0 0
|
||||
startup_notifications = 1
|
||||
launcher_tooltip = 1
|
||||
launcher_item_app = /usr/share/applications/firefox.desktop
|
||||
launcher_item_app = /usr/share/applications/iceweasel.desktop
|
||||
|
||||
#-------------------------------------
|
||||
# Clock
|
||||
time1_format = %H:%M
|
||||
time2_format = %A %d %B
|
||||
time1_font = sans bold 9
|
||||
time1_timezone =
|
||||
time2_timezone =
|
||||
time2_font = sans 9
|
||||
clock_font_color = #eeeeee 100
|
||||
clock_padding = 1 0
|
||||
clock_background_id = 0
|
||||
clock_tooltip =
|
||||
clock_tooltip_timezone =
|
||||
clock_lclick_command = zenity --calendar --text ""
|
||||
clock_rclick_command = orage
|
||||
|
||||
#-------------------------------------
|
||||
# Battery
|
||||
battery_low_status = 10
|
||||
battery_low_cmd = notify-send "battery low"
|
||||
bat1_font = sans 8
|
||||
bat2_font = sans 6
|
||||
battery_font_color = #eeeeee 100
|
||||
battery_padding = 1 0
|
||||
battery_background_id = 0
|
||||
battery_hide = 101
|
||||
|
||||
#-------------------------------------
|
||||
# Tooltip
|
||||
tooltip_show_timeout = 0.5
|
||||
tooltip_hide_timeout = 0.1
|
||||
tooltip_padding = 2 2
|
||||
tooltip_background_id = 5
|
||||
tooltip_font_color = #222222 100
|
||||
tooltip_font = sans 9
|
||||
|
||||
162
sample/vertical-dark-transparent.tint2rc
Normal file
162
sample/vertical-dark-transparent.tint2rc
Normal file
@@ -0,0 +1,162 @@
|
||||
#---- Generated by tint2conf bec8 ----
|
||||
#-------------------------------------
|
||||
# Backgrounds
|
||||
# Background 1
|
||||
rounded = 5
|
||||
border_width = 1
|
||||
background_color = #000000 80
|
||||
border_color = #555555 80
|
||||
|
||||
# Background 2
|
||||
rounded = 5
|
||||
border_width = 0
|
||||
background_color = #777777 0
|
||||
border_color = #777777 10
|
||||
|
||||
# Background 3
|
||||
rounded = 5
|
||||
border_width = 1
|
||||
background_color = #555555 10
|
||||
border_color = #ffffff 60
|
||||
|
||||
# Background 4
|
||||
rounded = 5
|
||||
border_width = 1
|
||||
background_color = #aa4400 100
|
||||
border_color = #aa7733 100
|
||||
|
||||
# Background 5
|
||||
rounded = 2
|
||||
border_width = 1
|
||||
background_color = #ffffaa 100
|
||||
border_color = #999999 100
|
||||
|
||||
# Background 6
|
||||
rounded = 2
|
||||
border_width = 1
|
||||
background_color = #777777 0
|
||||
border_color = #777777 30
|
||||
|
||||
# Background 7
|
||||
rounded = 2
|
||||
border_width = 1
|
||||
background_color = #555555 10
|
||||
border_color = #ffffff 60
|
||||
|
||||
#-------------------------------------
|
||||
# Panel
|
||||
panel_items = CSTL
|
||||
panel_size = 100% 152
|
||||
panel_margin = 0 0
|
||||
panel_padding = 2 2 2
|
||||
panel_background_id = 1
|
||||
wm_menu = 1
|
||||
panel_dock = 0
|
||||
panel_position = bottom left vertical
|
||||
panel_layer = normal
|
||||
panel_monitor = all
|
||||
autohide = 0
|
||||
autohide_show_timeout = 0
|
||||
autohide_hide_timeout = 0.5
|
||||
autohide_height = 2
|
||||
strut_policy = follow_size
|
||||
panel_window_name = tint2
|
||||
disable_transparency = 0
|
||||
font_shadow = 0
|
||||
|
||||
#-------------------------------------
|
||||
# Taskbar
|
||||
taskbar_mode = multi_desktop
|
||||
taskbar_padding = 0 0 2
|
||||
taskbar_background_id = 0
|
||||
taskbar_active_background_id = 0
|
||||
taskbar_name = 1
|
||||
taskbar_hide_inactive_tasks = 0
|
||||
taskbar_hide_different_monitor = 0
|
||||
taskbar_name_padding = 6 3
|
||||
taskbar_name_background_id = 6
|
||||
taskbar_name_active_background_id = 7
|
||||
taskbar_name_font = sans bold 9
|
||||
taskbar_name_font_color = #dddddd 100
|
||||
taskbar_name_active_font_color = #dddddd 100
|
||||
taskbar_distribute_size = 1
|
||||
taskbar_sort_order = none
|
||||
|
||||
#-------------------------------------
|
||||
# Task
|
||||
task_text = 1
|
||||
task_icon = 1
|
||||
task_centered = 0
|
||||
urgent_nb_of_blink = 100000
|
||||
task_maximum_size = 152 35
|
||||
task_padding = 4 3 4
|
||||
task_font = sans 8
|
||||
task_tooltip = 1
|
||||
task_font_color = #eeeeee 100
|
||||
task_icon_asb = 100 0 0
|
||||
task_background_id = 2
|
||||
task_active_background_id = 3
|
||||
task_urgent_background_id = 4
|
||||
task_iconified_background_id = 2
|
||||
mouse_left = toggle_iconify
|
||||
mouse_middle = none
|
||||
mouse_right = close
|
||||
mouse_scroll_up = prev_task
|
||||
mouse_scroll_down = next_task
|
||||
|
||||
#-------------------------------------
|
||||
# System tray (notification area)
|
||||
systray_padding = 0 0 2
|
||||
systray_background_id = 0
|
||||
systray_sort = ascending
|
||||
systray_icon_size = 22
|
||||
systray_icon_asb = 100 0 0
|
||||
systray_monitor = 1
|
||||
|
||||
#-------------------------------------
|
||||
# Launcher
|
||||
launcher_padding = 0 0 2
|
||||
launcher_background_id = 0
|
||||
launcher_icon_size = 22
|
||||
launcher_icon_asb = 100 0 0
|
||||
startup_notifications = 1
|
||||
launcher_tooltip = 1
|
||||
launcher_item_app = /usr/share/applications/firefox.desktop
|
||||
launcher_item_app = /usr/share/applications/iceweasel.desktop
|
||||
|
||||
#-------------------------------------
|
||||
# Clock
|
||||
time1_format = %H:%M
|
||||
time2_format = %A %d %B
|
||||
time1_font = sans bold 9
|
||||
time1_timezone =
|
||||
time2_timezone =
|
||||
time2_font = sans 9
|
||||
clock_font_color = #eeeeee 100
|
||||
clock_padding = 1 0
|
||||
clock_background_id = 0
|
||||
clock_tooltip =
|
||||
clock_tooltip_timezone =
|
||||
clock_lclick_command = zenity --calendar --text ""
|
||||
clock_rclick_command = orage
|
||||
|
||||
#-------------------------------------
|
||||
# Battery
|
||||
battery_low_status = 10
|
||||
battery_low_cmd = notify-send "battery low"
|
||||
bat1_font = sans 8
|
||||
bat2_font = sans 6
|
||||
battery_font_color = #eeeeee 100
|
||||
battery_padding = 1 0
|
||||
battery_background_id = 0
|
||||
battery_hide = 101
|
||||
|
||||
#-------------------------------------
|
||||
# Tooltip
|
||||
tooltip_show_timeout = 0.5
|
||||
tooltip_hide_timeout = 0.1
|
||||
tooltip_padding = 2 2
|
||||
tooltip_background_id = 5
|
||||
tooltip_font_color = #222222 100
|
||||
tooltip_font = sans 9
|
||||
|
||||
168
sample/vertical-light-opaque.tint2rc
Normal file
168
sample/vertical-light-opaque.tint2rc
Normal file
@@ -0,0 +1,168 @@
|
||||
#---- Generated by tint2conf f7f7 ----
|
||||
#-------------------------------------
|
||||
# Backgrounds
|
||||
# Background 1
|
||||
rounded = 0
|
||||
border_width = 1
|
||||
background_color = #eeeeee 100
|
||||
border_color = #bbbbbb 100
|
||||
|
||||
# Background 2
|
||||
rounded = 5
|
||||
border_width = 0
|
||||
background_color = #eeeeee 100
|
||||
border_color = #cccccc 100
|
||||
|
||||
# Background 3
|
||||
rounded = 5
|
||||
border_width = 1
|
||||
background_color = #dddddd 100
|
||||
border_color = #999999 100
|
||||
|
||||
# Background 4
|
||||
rounded = 5
|
||||
border_width = 1
|
||||
background_color = #aa4400 100
|
||||
border_color = #aa7733 100
|
||||
|
||||
# Background 5
|
||||
rounded = 2
|
||||
border_width = 1
|
||||
background_color = #ffffaa 100
|
||||
border_color = #999999 100
|
||||
|
||||
# Background 6
|
||||
rounded = 2
|
||||
border_width = 1
|
||||
background_color = #eeeeee 100
|
||||
border_color = #cccccc 100
|
||||
|
||||
# Background 7
|
||||
rounded = 2
|
||||
border_width = 1
|
||||
background_color = #dddddd 100
|
||||
border_color = #999999 100
|
||||
|
||||
# Background 8
|
||||
rounded = 3
|
||||
border_width = 0
|
||||
background_color = #aaaaaa 100
|
||||
border_color = #cccccc 100
|
||||
|
||||
#-------------------------------------
|
||||
# Panel
|
||||
panel_items = CSTL
|
||||
panel_size = 100% 152
|
||||
panel_margin = 0 0
|
||||
panel_padding = 2 2 2
|
||||
panel_background_id = 1
|
||||
wm_menu = 1
|
||||
panel_dock = 0
|
||||
panel_position = bottom left vertical
|
||||
panel_layer = normal
|
||||
panel_monitor = all
|
||||
autohide = 0
|
||||
autohide_show_timeout = 0
|
||||
autohide_hide_timeout = 0.5
|
||||
autohide_height = 2
|
||||
strut_policy = follow_size
|
||||
panel_window_name = tint2
|
||||
disable_transparency = 0
|
||||
font_shadow = 0
|
||||
|
||||
#-------------------------------------
|
||||
# Taskbar
|
||||
taskbar_mode = multi_desktop
|
||||
taskbar_padding = 0 0 2
|
||||
taskbar_background_id = 0
|
||||
taskbar_active_background_id = 0
|
||||
taskbar_name = 1
|
||||
taskbar_hide_inactive_tasks = 0
|
||||
taskbar_hide_different_monitor = 0
|
||||
taskbar_name_padding = 6 3
|
||||
taskbar_name_background_id = 6
|
||||
taskbar_name_active_background_id = 7
|
||||
taskbar_name_font = sans bold 9
|
||||
taskbar_name_font_color = #222222 100
|
||||
taskbar_name_active_font_color = #222222 100
|
||||
taskbar_distribute_size = 1
|
||||
taskbar_sort_order = none
|
||||
|
||||
#-------------------------------------
|
||||
# Task
|
||||
task_text = 1
|
||||
task_icon = 1
|
||||
task_centered = 0
|
||||
urgent_nb_of_blink = 100000
|
||||
task_maximum_size = 152 35
|
||||
task_padding = 4 3 4
|
||||
task_font = sans 8
|
||||
task_tooltip = 1
|
||||
task_font_color = #222222 100
|
||||
task_icon_asb = 100 0 0
|
||||
task_background_id = 2
|
||||
task_active_background_id = 3
|
||||
task_urgent_background_id = 4
|
||||
task_iconified_background_id = 2
|
||||
mouse_left = toggle_iconify
|
||||
mouse_middle = none
|
||||
mouse_right = close
|
||||
mouse_scroll_up = prev_task
|
||||
mouse_scroll_down = next_task
|
||||
|
||||
#-------------------------------------
|
||||
# System tray (notification area)
|
||||
systray_padding = 0 0 2
|
||||
systray_background_id = 8
|
||||
systray_sort = ascending
|
||||
systray_icon_size = 22
|
||||
systray_icon_asb = 100 0 0
|
||||
systray_monitor = 1
|
||||
|
||||
#-------------------------------------
|
||||
# Launcher
|
||||
launcher_padding = 0 0 2
|
||||
launcher_background_id = 0
|
||||
launcher_icon_size = 22
|
||||
launcher_icon_asb = 100 0 0
|
||||
startup_notifications = 1
|
||||
launcher_tooltip = 1
|
||||
launcher_item_app = /usr/share/applications/firefox.desktop
|
||||
launcher_item_app = /usr/share/applications/iceweasel.desktop
|
||||
|
||||
#-------------------------------------
|
||||
# Clock
|
||||
time1_format = %H:%M
|
||||
time2_format = %A %d %B
|
||||
time1_font = sans bold 9
|
||||
time1_timezone =
|
||||
time2_timezone =
|
||||
time2_font = sans 9
|
||||
clock_font_color = #222222 100
|
||||
clock_padding = 1 0
|
||||
clock_background_id = 0
|
||||
clock_tooltip =
|
||||
clock_tooltip_timezone =
|
||||
clock_lclick_command = zenity --calendar --text ""
|
||||
clock_rclick_command = orage
|
||||
|
||||
#-------------------------------------
|
||||
# Battery
|
||||
battery_low_status = 10
|
||||
battery_low_cmd = notify-send "battery low"
|
||||
bat1_font = sans 8
|
||||
bat2_font = sans 6
|
||||
battery_font_color = #222222 100
|
||||
battery_padding = 1 0
|
||||
battery_background_id = 0
|
||||
battery_hide = 101
|
||||
|
||||
#-------------------------------------
|
||||
# Tooltip
|
||||
tooltip_show_timeout = 0.5
|
||||
tooltip_hide_timeout = 0.1
|
||||
tooltip_padding = 2 2
|
||||
tooltip_background_id = 5
|
||||
tooltip_font_color = #222222 100
|
||||
tooltip_font = sans 9
|
||||
|
||||
@@ -188,7 +188,11 @@ void init_battery()
|
||||
battery_found = 1;
|
||||
}
|
||||
#elif defined(__FreeBSD__)
|
||||
// Nothing to do
|
||||
int sysctl_out = 0;
|
||||
size_t len = sizeof(sysctl_out);
|
||||
battery_found = (sysctlbyname("hw.acpi.battery.state", &sysctl_out, &len, NULL, 0) == 0) ||
|
||||
(sysctlbyname("hw.acpi.battery.time", &sysctl_out, &len, NULL, 0) == 0) ||
|
||||
(sysctlbyname("hw.acpi.battery.life", &sysctl_out, &len, NULL, 0) == 0);
|
||||
#else // Linux
|
||||
GDir *directory = 0;
|
||||
GError *error = NULL;
|
||||
|
||||
@@ -474,6 +474,7 @@ void add_entry (char *key, char *value)
|
||||
else if (strcmp (key, "taskbar_name_padding") == 0) {
|
||||
extract_values(value, &value1, &value2, &value3);
|
||||
panel_config.g_taskbar.area_name.paddingxlr = panel_config.g_taskbar.area_name.paddingx = atoi (value1);
|
||||
if (value2) panel_config.g_taskbar.area_name.paddingy = atoi (value2);
|
||||
}
|
||||
else if (strcmp (key, "taskbar_name_background_id") == 0) {
|
||||
int id = atoi (value);
|
||||
@@ -663,6 +664,9 @@ void add_entry (char *key, char *value)
|
||||
free(icon_theme_name_config);
|
||||
icon_theme_name_config = strdup(value);
|
||||
}
|
||||
else if (strcmp(key, "launcher_icon_theme_override") == 0) {
|
||||
launcher_icon_theme_override = atoi(value);
|
||||
}
|
||||
else if (strcmp(key, "launcher_icon_asb") == 0) {
|
||||
extract_values(value, &value1, &value2, &value3);
|
||||
launcher_alpha = atoi(value1);
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
|
||||
#ifdef HAVE_RSVG
|
||||
#include <librsvg/rsvg.h>
|
||||
#include <librsvg/rsvg-cairo.h>
|
||||
#endif
|
||||
|
||||
#include "window.h"
|
||||
@@ -54,6 +53,7 @@ int launcher_saturation;
|
||||
int launcher_brightness;
|
||||
char *icon_theme_name_config;
|
||||
char *icon_theme_name_xsettings;
|
||||
int launcher_icon_theme_override;
|
||||
XSettingsClient *xsettings_client;
|
||||
int startup_notifications;
|
||||
|
||||
@@ -70,6 +70,7 @@ void default_launcher()
|
||||
launcher_brightness = 0;
|
||||
icon_theme_name_config = NULL;
|
||||
icon_theme_name_xsettings = NULL;
|
||||
launcher_icon_theme_override = 0;
|
||||
xsettings_client = NULL;
|
||||
startup_notifications = 0;
|
||||
}
|
||||
@@ -355,10 +356,14 @@ void draw_launcher_icon(void *obj, cairo_t *c)
|
||||
|
||||
Imlib_Image icon_scaled = launcherIcon->icon_scaled;
|
||||
// Render
|
||||
imlib_context_set_image (icon_scaled);
|
||||
imlib_context_set_blend(1);
|
||||
imlib_context_set_drawable(launcherIcon->area.pix);
|
||||
imlib_render_image_on_drawable(0, 0);
|
||||
imlib_context_set_image(icon_scaled);
|
||||
if (server.real_transparency) {
|
||||
render_image(launcherIcon->area.pix, 0, 0);
|
||||
} else {
|
||||
imlib_context_set_blend(1);
|
||||
imlib_context_set_drawable(launcherIcon->area.pix);
|
||||
imlib_render_image_on_drawable(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
Imlib_Image scale_icon(Imlib_Image original, int icon_size)
|
||||
@@ -367,11 +372,14 @@ Imlib_Image scale_icon(Imlib_Image original, int icon_size)
|
||||
if (original) {
|
||||
imlib_context_set_image (original);
|
||||
icon_scaled = imlib_create_cropped_scaled_image(0, 0, imlib_image_get_width(), imlib_image_get_height(), icon_size, icon_size);
|
||||
|
||||
imlib_context_set_image (icon_scaled);
|
||||
imlib_image_set_has_alpha(1);
|
||||
DATA32* data = imlib_image_get_data();
|
||||
adjust_asb(data, icon_size, icon_size, launcher_alpha, (float)launcher_saturation/100, (float)launcher_brightness/100);
|
||||
imlib_image_put_back_data(data);
|
||||
|
||||
imlib_context_set_image (icon_scaled);
|
||||
} else {
|
||||
icon_scaled = imlib_create_image(icon_size, icon_size);
|
||||
imlib_context_set_image (icon_scaled);
|
||||
@@ -487,9 +495,15 @@ void launcher_load_icons(Launcher *launcher)
|
||||
// Populates the list_themes list
|
||||
void launcher_load_themes(Launcher *launcher)
|
||||
{
|
||||
launcher->list_themes = load_themes(icon_theme_name_config
|
||||
? icon_theme_name_config
|
||||
: icon_theme_name_xsettings
|
||||
? icon_theme_name_xsettings
|
||||
: "hicolor");
|
||||
launcher->list_themes = load_themes(launcher_icon_theme_override
|
||||
? (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
|
||||
: icon_theme_name_config
|
||||
? icon_theme_name_config
|
||||
: "hicolor"));
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ extern int launcher_saturation;
|
||||
extern int launcher_brightness;
|
||||
extern char *icon_theme_name_xsettings; // theme name
|
||||
extern char *icon_theme_name_config;
|
||||
extern int launcher_icon_theme_override;
|
||||
extern XSettingsClient *xsettings_client;
|
||||
extern int startup_notifications;
|
||||
|
||||
|
||||
@@ -524,7 +524,9 @@ void set_panel_properties(Panel *p)
|
||||
}
|
||||
|
||||
// Dock
|
||||
long val = panel_dock ? server.atom._NET_WM_WINDOW_TYPE_DOCK : server.atom._NET_WM_WINDOW_TYPE_SPLASH;
|
||||
long val = (!panel_dock && panel_layer == NORMAL_LAYER)
|
||||
? server.atom._NET_WM_WINDOW_TYPE_SPLASH
|
||||
: server.atom._NET_WM_WINDOW_TYPE_DOCK;
|
||||
XChangeProperty (server.dsp, p->main_win, server.atom._NET_WM_WINDOW_TYPE, XA_ATOM, 32, PropModeReplace, (unsigned char *) &val, 1);
|
||||
|
||||
val = ALLDESKTOP;
|
||||
|
||||
@@ -601,7 +601,7 @@ void systray_render_icon_now(void* t)
|
||||
adjust_asb(data, traywin->width, traywin->height, systray.alpha, (float)systray.saturation/100, (float)systray.brightness/100);
|
||||
imlib_image_put_back_data(data);
|
||||
XCopyArea(server.dsp, render_background, systray.area.pix, server.gc, traywin->x-systray.area.posx, traywin->y-systray.area.posy, traywin->width, traywin->height, traywin->x-systray.area.posx, traywin->y-systray.area.posy);
|
||||
render_image(systray.area.pix, traywin->x-systray.area.posx, traywin->y-systray.area.posy, traywin->width, traywin->height);
|
||||
render_image(systray.area.pix, traywin->x-systray.area.posx, traywin->y-systray.area.posy);
|
||||
XCopyArea(server.dsp, systray.area.pix, panel->main_win, server.gc, traywin->x-systray.area.posx, traywin->y-systray.area.posy, traywin->width, traywin->height, traywin->x, traywin->y);
|
||||
imlib_free_image_and_decache();
|
||||
XFreePixmap(server.dsp, tmp_pmap);
|
||||
|
||||
@@ -193,18 +193,14 @@ int get_title(Task *tsk)
|
||||
name = server_get_property (tsk->win, server.atom._NET_WM_NAME, server.atom.UTF8_STRING, 0);
|
||||
if (!name || !strlen(name)) {
|
||||
name = server_get_property (tsk->win, server.atom.WM_NAME, XA_STRING, 0);
|
||||
if (!name || !strlen(name)) {
|
||||
name = calloc(10, 1);
|
||||
strcpy(name, "Untitled");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// add space before title
|
||||
title = calloc(strlen(name)+2, 1);
|
||||
if (panel->g_task.icon) strcpy(title, " ");
|
||||
else title[0] = 0;
|
||||
strcat(title, name);
|
||||
if (name && strlen(name)) {
|
||||
title = strdup(name);
|
||||
} else {
|
||||
title = strdup("Untitled");
|
||||
}
|
||||
if (name) XFree (name);
|
||||
|
||||
if (tsk->title) {
|
||||
@@ -352,9 +348,13 @@ void draw_task_icon (Task *tsk, int text_width)
|
||||
|
||||
// Render
|
||||
imlib_context_set_image (tsk->icon[tsk->current_state]);
|
||||
imlib_context_set_blend(1);
|
||||
imlib_context_set_drawable(tsk->area.pix);
|
||||
imlib_render_image_on_drawable(pos_x, panel->g_task.icon_posy);
|
||||
if (server.real_transparency) {
|
||||
render_image(tsk->area.pix, pos_x, panel->g_task.icon_posy);
|
||||
} else {
|
||||
imlib_context_set_blend(1);
|
||||
imlib_context_set_drawable(tsk->area.pix);
|
||||
imlib_render_image_on_drawable(pos_x, panel->g_task.icon_posy);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -378,7 +378,7 @@ void draw_task (void *obj, cairo_t *c)
|
||||
// pango use U+22EF or U+2026
|
||||
pango_layout_set_width(layout, ((Taskbar*)tsk->area.parent)->text_width * PANGO_SCALE);
|
||||
pango_layout_set_height(layout, panel->g_task.text_height * PANGO_SCALE);
|
||||
pango_layout_set_wrap(layout, PANGO_WRAP_CHAR);
|
||||
pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR);
|
||||
pango_layout_set_ellipsize (layout, PANGO_ELLIPSIZE_END);
|
||||
|
||||
/* Center text */
|
||||
|
||||
@@ -239,7 +239,7 @@ void init_taskbar_panel(void *p)
|
||||
panel->g_task.text_height = panel->g_task.area.height - (2 * panel->g_task.area.paddingy);
|
||||
if (panel->g_task.icon) {
|
||||
panel->g_task.icon_size1 = panel->g_task.area.height - (2 * panel->g_task.area.paddingy);
|
||||
panel->g_task.text_posx += panel->g_task.icon_size1;
|
||||
panel->g_task.text_posx += panel->g_task.icon_size1 + panel->g_task.area.paddingx;
|
||||
panel->g_task.icon_posy = (panel->g_task.area.height - panel->g_task.icon_size1) / 2;
|
||||
}
|
||||
//printf("monitor %d, task_maximum_width %d\n", panel->monitor, panel->g_task.maximum_width);
|
||||
@@ -342,12 +342,12 @@ int resize_taskbar(void *obj)
|
||||
break;
|
||||
}
|
||||
}
|
||||
taskbar->text_width = text_width - panel->g_task.text_posx - panel->g_task.area.bg->border.width - panel->g_task.area.paddingx;
|
||||
taskbar->text_width = text_width - panel->g_task.text_posx - panel->g_task.area.bg->border.width - panel->g_task.area.paddingxlr;
|
||||
}
|
||||
else {
|
||||
resize_by_layout(obj, panel->g_task.maximum_height);
|
||||
|
||||
taskbar->text_width = taskbar->area.width - (2 * panel->g_taskbar.area.paddingy) - panel->g_task.text_posx - panel->g_task.area.bg->border.width - panel->g_task.area.paddingx;
|
||||
taskbar->text_width = taskbar->area.width - (2 * panel->g_taskbar.area.paddingy) - panel->g_task.text_posx - panel->g_task.area.bg->border.width - panel->g_task.area.paddingxlr;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -69,6 +69,7 @@ static void refresh_current_theme();
|
||||
static void menuAbout();
|
||||
static gboolean view_onPopupMenu(GtkWidget *treeview, gpointer userdata);
|
||||
static gboolean view_onButtonPressed(GtkWidget *treeview, GdkEventButton *event, gpointer userdata);
|
||||
static void viewRowActivated(GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data);
|
||||
static gboolean theme_selected(GtkTreeSelection *selection,
|
||||
GtkTreeModel *model,
|
||||
GtkTreePath *path,
|
||||
@@ -204,6 +205,7 @@ int main(int argc, char **argv)
|
||||
gtk_widget_show(g_theme_view);
|
||||
g_signal_connect(g_theme_view, "button-press-event", (GCallback)view_onButtonPressed, NULL);
|
||||
g_signal_connect(g_theme_view, "popup-menu", (GCallback)view_onPopupMenu, NULL);
|
||||
g_signal_connect(g_theme_view, "row-activated", G_CALLBACK(viewRowActivated), NULL);
|
||||
gtk_tree_selection_set_select_function(gtk_tree_view_get_selection(GTK_TREE_VIEW(g_theme_view)), theme_selected, NULL, NULL);
|
||||
|
||||
// load themes
|
||||
@@ -244,6 +246,7 @@ static void menuImport()
|
||||
{
|
||||
GtkWidget *dialog = gtk_file_chooser_dialog_new(_("Import theme(s)"), GTK_WINDOW(g_window), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_ADD, GTK_RESPONSE_ACCEPT, NULL);
|
||||
GtkFileChooser *chooser = GTK_FILE_CHOOSER(dialog);
|
||||
gtk_file_chooser_set_select_multiple(chooser, TRUE);
|
||||
|
||||
if (gtk_dialog_run(GTK_DIALOG(dialog)) != GTK_RESPONSE_ACCEPT) {
|
||||
gtk_widget_destroy(dialog);
|
||||
@@ -476,6 +479,11 @@ static void edit_current_theme()
|
||||
}
|
||||
}
|
||||
|
||||
static void viewRowActivated(GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data)
|
||||
{
|
||||
edit_current_theme();
|
||||
}
|
||||
|
||||
// ====== Theme load/reload ======
|
||||
|
||||
static void load_all_themes()
|
||||
|
||||
@@ -44,7 +44,7 @@ GtkWidget *panel_background;
|
||||
// taskbar
|
||||
GtkWidget *taskbar_show_desktop, *taskbar_show_name, *taskbar_padding_x, *taskbar_padding_y, *taskbar_spacing;
|
||||
GtkWidget *taskbar_hide_inactive_tasks, *taskbar_hide_diff_monitor;
|
||||
GtkWidget *taskbar_name_padding_x, *taskbar_name_inactive_color, *taskbar_name_active_color, *taskbar_name_font;
|
||||
GtkWidget *taskbar_name_padding_x, *taskbar_name_padding_y, *taskbar_name_inactive_color, *taskbar_name_active_color, *taskbar_name_font;
|
||||
GtkWidget *taskbar_active_background, *taskbar_inactive_background;
|
||||
GtkWidget *taskbar_name_active_background, *taskbar_name_inactive_background;
|
||||
GtkWidget *taskbar_distribute_size, *taskbar_sort_order;
|
||||
@@ -52,7 +52,7 @@ GtkWidget *taskbar_distribute_size, *taskbar_sort_order;
|
||||
// task
|
||||
GtkWidget *task_mouse_left, *task_mouse_middle, *task_mouse_right, *task_mouse_scroll_up, *task_mouse_scroll_down;
|
||||
GtkWidget *task_show_icon, *task_show_text, *task_align_center, *font_shadow;
|
||||
GtkWidget *task_maximum_width, *task_maximum_height, *task_padding_x, *task_padding_y, *task_font;
|
||||
GtkWidget *task_maximum_width, *task_maximum_height, *task_padding_x, *task_padding_y, *task_spacing, *task_font;
|
||||
GtkWidget *task_default_color, *task_default_color_set,
|
||||
*task_default_icon_opacity, *task_default_icon_osb_set,
|
||||
*task_default_icon_saturation,
|
||||
@@ -109,11 +109,13 @@ GtkWidget *launcher_apps_view, *all_apps_view;
|
||||
GtkWidget *launcher_apps_dirs;
|
||||
|
||||
GtkWidget *launcher_icon_size, *launcher_icon_theme, *launcher_padding_x, *launcher_padding_y, *launcher_spacing;
|
||||
GtkWidget *launcher_icon_opacity, *launcher_icon_saturation, *launcher_icon_brightness;
|
||||
GtkWidget *margin_x, *margin_y;
|
||||
GtkWidget *launcher_background;
|
||||
GtkWidget *startup_notifications;
|
||||
IconThemeWrapper *icon_theme;
|
||||
GtkWidget *launcher_tooltip;
|
||||
GtkWidget *launcher_icon_theme_override;
|
||||
|
||||
GtkListStore *backgrounds;
|
||||
GtkWidget *current_background,
|
||||
@@ -173,7 +175,7 @@ void applyClicked(GtkWidget *widget, gpointer data)
|
||||
|
||||
config_save_file(file);
|
||||
}
|
||||
int unused = system("killall -SIGUSR1 tint2");
|
||||
int unused = system("killall -SIGUSR1 tint2 || pkill -SIGUSR1 -x tint2");
|
||||
(void)unused;
|
||||
g_free(file);
|
||||
g_timeout_add(SNAPSHOT_TICK, (GSourceFunc)update_snapshot, NULL);
|
||||
@@ -294,7 +296,7 @@ GtkWidget *create_properties()
|
||||
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), addScrollBarToWidget(page_clock), label);
|
||||
create_clock(page_clock);
|
||||
|
||||
label = gtk_label_new(_("Notification area"));
|
||||
label = gtk_label_new(_("System tray"));
|
||||
gtk_widget_show(label);
|
||||
page_systemtray = gtk_vbox_new(FALSE, DEFAULT_HOR_SPACING);
|
||||
gtk_container_set_border_width(GTK_CONTAINER(page_systemtray), 10);
|
||||
@@ -491,7 +493,6 @@ int get_model_length(GtkTreeModel *model)
|
||||
|
||||
int background_index_safe(int index)
|
||||
{
|
||||
index--;
|
||||
if (index <= 0)
|
||||
index = 0;
|
||||
if (index >= get_model_length(GTK_TREE_MODEL(backgrounds)))
|
||||
@@ -501,14 +502,14 @@ int background_index_safe(int index)
|
||||
|
||||
void background_create_new()
|
||||
{
|
||||
int r = 12;
|
||||
int b = 1;
|
||||
int r = 0;
|
||||
int b = 0;
|
||||
GdkColor fillColor;
|
||||
cairoColor2GdkColor(0, 0, 0.3, &fillColor);
|
||||
int fillOpacity = 100;
|
||||
cairoColor2GdkColor(0, 0, 0, &fillColor);
|
||||
int fillOpacity = 0;
|
||||
GdkColor borderColor;
|
||||
cairoColor2GdkColor(0, 0, 0.7, &borderColor);
|
||||
int borderOpacity = 100;
|
||||
cairoColor2GdkColor(0, 0, 0, &borderColor);
|
||||
int borderOpacity = 0;
|
||||
|
||||
int index = 0;
|
||||
GtkTreeIter iter;
|
||||
@@ -701,9 +702,9 @@ void background_update(GtkWidget *widget, gpointer data)
|
||||
r = gtk_spin_button_get_value(GTK_SPIN_BUTTON(background_corner_radius));
|
||||
b = gtk_spin_button_get_value(GTK_SPIN_BUTTON(background_border_width));
|
||||
gtk_color_button_get_color(GTK_COLOR_BUTTON(background_fill_color), &fillColor);
|
||||
fillOpacity = gtk_color_button_get_alpha(GTK_COLOR_BUTTON(background_fill_color)) * 100 / 0xffff;
|
||||
fillOpacity = MIN(100, 0.5 + gtk_color_button_get_alpha(GTK_COLOR_BUTTON(background_fill_color)) * 100.0 / 0xffff);
|
||||
gtk_color_button_get_color(GTK_COLOR_BUTTON(background_border_color), &borderColor);
|
||||
borderOpacity = gtk_color_button_get_alpha(GTK_COLOR_BUTTON(background_border_color)) * 100 / 0xffff;
|
||||
borderOpacity = MIN(100, 0.5 + gtk_color_button_get_alpha(GTK_COLOR_BUTTON(background_border_color)) * 100.0 / 0xffff);
|
||||
|
||||
gtk_list_store_set(backgrounds, &iter,
|
||||
bgColPixbuf, NULL,
|
||||
@@ -847,6 +848,7 @@ void create_panel(GtkWidget *parent)
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_monitor), _("4"));
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_monitor), _("5"));
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_monitor), _("6"));
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(panel_combo_monitor), 0);
|
||||
gtk_tooltips_set_tip(tooltips, panel_combo_monitor, "The monitor on which the panel is placed", NULL);
|
||||
|
||||
row++;
|
||||
@@ -869,6 +871,7 @@ void create_panel(GtkWidget *parent)
|
||||
col++;
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_width_type), _("Percent"));
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_width_type), _("Pixels"));
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(panel_combo_width_type), 0);
|
||||
gtk_tooltips_set_tip(tooltips, panel_combo_width_type, "The units used to specify the width of the panel: pixels or percentage of the monitor size", NULL);
|
||||
|
||||
row++;
|
||||
@@ -891,6 +894,7 @@ void create_panel(GtkWidget *parent)
|
||||
col++;
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_height_type), _("Percent"));
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_height_type), _("Pixels"));
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(panel_combo_height_type), 0);
|
||||
gtk_tooltips_set_tip(tooltips, panel_combo_height_type, "The units used to specify the height of the panel: pixels or percentage of the monitor size", NULL);
|
||||
|
||||
row++;
|
||||
@@ -1172,6 +1176,7 @@ void create_panel(GtkWidget *parent)
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_layer), _("Top"));
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_layer), _("Normal"));
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_layer), _("Bottom"));
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(panel_combo_layer), 1);
|
||||
gtk_tooltips_set_tip(tooltips, panel_combo_layer, "Specifies the layer on which the panel window should be placed. \n"
|
||||
"Top means the panel should always cover other windows. \n"
|
||||
"Bottom means other windows should always cover the panel. \n"
|
||||
@@ -1193,6 +1198,7 @@ void create_panel(GtkWidget *parent)
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_strut_policy), _("Match the panel size"));
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_strut_policy), _("Match the hidden panel size"));
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_strut_policy), _("Fill the screen"));
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(panel_combo_strut_policy), 0);
|
||||
gtk_tooltips_set_tip(tooltips, panel_combo_strut_policy, "Specifies the size of maximized windows. \n"
|
||||
"Match the panel size means that maximized windows should extend to the edge of the panel. \n"
|
||||
"Match the hidden panel size means that maximized windows should extend to the edge of the panel when hidden; "
|
||||
@@ -1740,6 +1746,14 @@ void load_desktop_file(const char *file, gboolean selected)
|
||||
g_object_unref(pixbuf);
|
||||
} else {
|
||||
printf("Could not load %s\n", file);
|
||||
GtkTreeIter iter;
|
||||
gtk_list_store_append(selected ? launcher_apps : all_apps, &iter);
|
||||
gtk_list_store_set(selected ? launcher_apps :all_apps, &iter,
|
||||
appsColIcon, NULL,
|
||||
appsColText, g_strdup(file),
|
||||
appsColPath, g_strdup(file),
|
||||
appsColIconName, g_strdup(""),
|
||||
-1);
|
||||
}
|
||||
free_desktop_entry(&entry);
|
||||
}
|
||||
@@ -1869,7 +1883,7 @@ void create_launcher(GtkWidget *parent)
|
||||
icon_theme = NULL;
|
||||
|
||||
launcher_apps = gtk_list_store_new(appsNumCols, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
|
||||
all_apps = gtk_list_store_new(appsNumCols, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING);
|
||||
all_apps = gtk_list_store_new(appsNumCols, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
|
||||
icon_themes = gtk_list_store_new(iconsNumCols, G_TYPE_STRING, G_TYPE_STRING);
|
||||
|
||||
launcher_apps_view = gtk_tree_view_new();
|
||||
@@ -2079,6 +2093,48 @@ void create_launcher(GtkWidget *parent)
|
||||
col++;
|
||||
gtk_tooltips_set_tip(tooltips, launcher_icon_size, "Specifies the size of the launcher icons, in pixels.", NULL);
|
||||
|
||||
row++;
|
||||
col = 2;
|
||||
label = gtk_label_new(_("Icon opacity"));
|
||||
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++;
|
||||
|
||||
launcher_icon_opacity = gtk_spin_button_new_with_range(0, 100, 1);
|
||||
gtk_widget_show(launcher_icon_opacity);
|
||||
gtk_table_attach(GTK_TABLE(table), launcher_icon_opacity, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
|
||||
col++;
|
||||
gtk_tooltips_set_tip(tooltips, launcher_icon_opacity, "Specifies the opacity of the launcher icons, in percent.", NULL);
|
||||
|
||||
row++;
|
||||
col = 2;
|
||||
label = gtk_label_new(_("Icon saturation"));
|
||||
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++;
|
||||
|
||||
launcher_icon_saturation = gtk_spin_button_new_with_range(-100, 100, 1);
|
||||
gtk_widget_show(launcher_icon_saturation);
|
||||
gtk_table_attach(GTK_TABLE(table), launcher_icon_saturation, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
|
||||
col++;
|
||||
gtk_tooltips_set_tip(tooltips, launcher_icon_saturation, "Specifies the saturation adjustment of the launcher icons, in percent.", NULL);
|
||||
|
||||
row++;
|
||||
col = 2;
|
||||
label = gtk_label_new(_("Icon brightness"));
|
||||
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++;
|
||||
|
||||
launcher_icon_brightness = gtk_spin_button_new_with_range(-100, 100, 1);
|
||||
gtk_widget_show(launcher_icon_brightness);
|
||||
gtk_table_attach(GTK_TABLE(table), launcher_icon_brightness, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
|
||||
col++;
|
||||
gtk_tooltips_set_tip(tooltips, launcher_icon_brightness, "Specifies the brightness adjustment of the launcher icons, in percent.", NULL);
|
||||
|
||||
row++, col = 2;
|
||||
label = gtk_label_new(_("Icon theme"));
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
|
||||
@@ -2098,6 +2154,12 @@ void create_launcher(GtkWidget *parent)
|
||||
"tint2 will detect and use the icon theme of your desktop as long as you have "
|
||||
"an XSETTINGS manager running (most desktop environments do).", NULL);
|
||||
|
||||
launcher_icon_theme_override = gtk_check_button_new_with_label("Overrides XSETTINGS");
|
||||
gtk_widget_show(launcher_icon_theme_override);
|
||||
gtk_table_attach(GTK_TABLE(table), launcher_icon_theme_override, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
|
||||
col++;
|
||||
gtk_tooltips_set_tip(tooltips, launcher_icon_theme_override, "If enabled, the icon theme selected here will override the one provided by XSETTINGS.", NULL);
|
||||
|
||||
row++, col = 2;
|
||||
label = gtk_label_new(_("Startup notifications"));
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
|
||||
@@ -2143,6 +2205,7 @@ void create_launcher(GtkWidget *parent)
|
||||
|
||||
fprintf(stderr, "Loading .desktop files\n");
|
||||
load_desktop_files("/usr/share/applications");
|
||||
load_desktop_files("/usr/local/share/applications");
|
||||
gchar *path = g_build_filename(g_get_home_dir(), ".local/share/applications", NULL);
|
||||
load_desktop_files(path);
|
||||
g_free(path);
|
||||
@@ -2245,6 +2308,7 @@ void create_taskbar(GtkWidget *parent)
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(taskbar_sort_order), _("None"));
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(taskbar_sort_order), _("By title"));
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(taskbar_sort_order), _("By center"));
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(taskbar_sort_order), 0);
|
||||
gtk_tooltips_set_tip(tooltips, taskbar_sort_order, "Specifies how tasks should be sorted on the taskbar. \n"
|
||||
"'None' means that new tasks are added to the end, and the user can also reorder task buttons by mouse dragging. \n"
|
||||
"'By title' means that tasks are sorted by their window titles. \n"
|
||||
@@ -2382,6 +2446,21 @@ void create_taskbar(GtkWidget *parent)
|
||||
gtk_tooltips_set_tip(tooltips, taskbar_name_padding_x, "Specifies the horizontal padding of the desktop name. "
|
||||
"This is the space between the border and the text inside.", NULL);
|
||||
|
||||
col = 2;
|
||||
row++;
|
||||
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++;
|
||||
|
||||
taskbar_name_padding_y = gtk_spin_button_new_with_range(0, 500, 1);
|
||||
gtk_widget_show(taskbar_name_padding_y);
|
||||
gtk_table_attach(GTK_TABLE(table), taskbar_name_padding_y, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
|
||||
col++;
|
||||
gtk_tooltips_set_tip(tooltips, taskbar_name_padding_y, "Specifies the vertical padding of the desktop name. "
|
||||
"This is the space between the border and the text inside.", NULL);
|
||||
|
||||
col = 2;
|
||||
row++;
|
||||
label = gtk_label_new(_("Active font color"));
|
||||
@@ -2500,6 +2579,7 @@ void create_task(GtkWidget *parent)
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_left), _("Desktop right"));
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_left), _("Next task"));
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_left), _("Previous task"));
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(task_mouse_left), 5);
|
||||
gtk_tooltips_set_tip(tooltips, task_mouse_left, "Specifies the action performed when task buttons receive a left click event: \n"
|
||||
"'None' means that no action is taken. \n"
|
||||
"'Close' closes the task. \n"
|
||||
@@ -2535,6 +2615,7 @@ void create_task(GtkWidget *parent)
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_scroll_up), _("Desktop right"));
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_scroll_up), _("Next task"));
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_scroll_up), _("Previous task"));
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(task_mouse_scroll_up), 0);
|
||||
gtk_tooltips_set_tip(tooltips, task_mouse_scroll_up, "Specifies the action performed when task buttons receive a scroll up event: \n"
|
||||
"'None' means that no action is taken. \n"
|
||||
"'Close' closes the task. \n"
|
||||
@@ -2570,6 +2651,7 @@ void create_task(GtkWidget *parent)
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_middle), _("Desktop right"));
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_middle), _("Next task"));
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_middle), _("Previous task"));
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(task_mouse_middle), 0);
|
||||
gtk_tooltips_set_tip(tooltips, task_mouse_middle, "Specifies the action performed when task buttons receive a middle click event: \n"
|
||||
"'None' means that no action is taken. \n"
|
||||
"'Close' closes the task. \n"
|
||||
@@ -2605,6 +2687,7 @@ void create_task(GtkWidget *parent)
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_scroll_down), _("Desktop right"));
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_scroll_down), _("Next task"));
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_scroll_down), _("Previous task"));
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(task_mouse_scroll_down), 0);
|
||||
gtk_tooltips_set_tip(tooltips, task_mouse_scroll_down, "Specifies the action performed when task buttons receive a scroll down event: \n"
|
||||
"'None' means that no action is taken. \n"
|
||||
"'Close' closes the task. \n"
|
||||
@@ -2640,6 +2723,7 @@ void create_task(GtkWidget *parent)
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_right), _("Desktop right"));
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_right), _("Next task"));
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_right), _("Previous task"));
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(task_mouse_right), 1);
|
||||
gtk_tooltips_set_tip(tooltips, task_mouse_right, "Specifies the action performed when task buttons receive a right click event: \n"
|
||||
"'None' means that no action is taken. \n"
|
||||
"'Close' closes the task. \n"
|
||||
@@ -2773,6 +2857,19 @@ void create_task(GtkWidget *parent)
|
||||
gtk_tooltips_set_tip(tooltips, task_padding_y, "Specifies the vertical padding of the task buttons. "
|
||||
"This is the space between the border and the content inside.", NULL);
|
||||
|
||||
row++, col = 2;
|
||||
label = gtk_label_new(_("Spacing"));
|
||||
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++;
|
||||
|
||||
task_spacing = gtk_spin_button_new_with_range(0, 9000, 1);
|
||||
gtk_widget_show(task_spacing);
|
||||
gtk_table_attach(GTK_TABLE(table), task_spacing, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
|
||||
col++;
|
||||
gtk_tooltips_set_tip(tooltips, task_spacing, "Specifies the spacing between the icon and the text.", NULL);
|
||||
|
||||
row++, col = 2;
|
||||
label = gtk_label_new(_("Font"));
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
|
||||
@@ -3334,6 +3431,7 @@ void create_systemtray(GtkWidget *parent)
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(systray_icon_order), _("Descending"));
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(systray_icon_order), _("Left to right"));
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(systray_icon_order), _("Right to left"));
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_icon_order), 0);
|
||||
gtk_tooltips_set_tip(tooltips, systray_icon_order, "Specifies the order used to arrange the system tray icons. \n"
|
||||
"'Ascending' means that icons are sorted in ascending order of their window names. \n"
|
||||
"'Descending' means that icons are sorted in descending order of their window names. \n"
|
||||
@@ -3358,6 +3456,7 @@ void create_systemtray(GtkWidget *parent)
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(systray_monitor), _("4"));
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(systray_monitor), _("5"));
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(systray_monitor), _("6"));
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 0);
|
||||
gtk_tooltips_set_tip(tooltips, systray_monitor, "Specifies the monitor on which to place the system tray. "
|
||||
"Due to technical limitations, the system tray cannot be displayed on multiple monitors.", NULL);
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ extern GtkWidget *panel_background;
|
||||
// taskbar
|
||||
extern GtkWidget *taskbar_show_desktop, *taskbar_show_name, *taskbar_padding_x, *taskbar_padding_y, *taskbar_spacing;
|
||||
extern GtkWidget *taskbar_hide_inactive_tasks, *taskbar_hide_diff_monitor;
|
||||
extern GtkWidget *taskbar_name_padding_x, *taskbar_name_inactive_color, *taskbar_name_active_color, *taskbar_name_font;
|
||||
extern GtkWidget *taskbar_name_padding_x, *taskbar_name_padding_y, *taskbar_name_inactive_color, *taskbar_name_active_color, *taskbar_name_font;
|
||||
extern GtkWidget *taskbar_active_background, *taskbar_inactive_background;
|
||||
extern GtkWidget *taskbar_name_active_background, *taskbar_name_inactive_background;
|
||||
extern GtkWidget *taskbar_distribute_size, *taskbar_sort_order;
|
||||
@@ -56,7 +56,7 @@ extern GtkWidget *taskbar_distribute_size, *taskbar_sort_order;
|
||||
// task
|
||||
extern GtkWidget *task_mouse_left, *task_mouse_middle, *task_mouse_right, *task_mouse_scroll_up, *task_mouse_scroll_down;
|
||||
extern GtkWidget *task_show_icon, *task_show_text, *task_align_center, *font_shadow;
|
||||
extern GtkWidget *task_maximum_width, *task_maximum_height, *task_padding_x, *task_padding_y, *task_font;
|
||||
extern GtkWidget *task_maximum_width, *task_maximum_height, *task_padding_x, *task_padding_y, *task_spacing, *task_font;
|
||||
extern GtkWidget *task_default_color, *task_default_color_set,
|
||||
*task_default_icon_opacity, *task_default_icon_osb_set,
|
||||
*task_default_icon_saturation,
|
||||
@@ -121,11 +121,13 @@ extern GtkWidget *launcher_apps_view, *all_apps_view;
|
||||
extern GtkWidget *launcher_apps_dirs;
|
||||
|
||||
extern GtkWidget *launcher_icon_size, *launcher_icon_theme, *launcher_padding_x, *launcher_padding_y, *launcher_spacing;
|
||||
extern GtkWidget *launcher_icon_opacity, *launcher_icon_saturation, *launcher_icon_brightness;
|
||||
extern GtkWidget *margin_x, *margin_y;
|
||||
extern GtkWidget *launcher_background;
|
||||
extern GtkWidget *startup_notifications;
|
||||
extern IconThemeWrapper *icon_theme;
|
||||
extern GtkWidget *launcher_tooltip;
|
||||
extern GtkWidget *launcher_icon_theme_override;
|
||||
|
||||
void load_desktop_file(const char *file, gboolean selected);
|
||||
void set_current_icon_theme(const char *theme);
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
|
||||
void add_entry(char *key, char *value);
|
||||
void hex2gdk(char *hex, GdkColor *color);
|
||||
void get_action(char *event, GtkWidget *combo);
|
||||
void set_action(char *event, GtkWidget *combo);
|
||||
char *get_action(GtkWidget *combo);
|
||||
|
||||
int config_has_panel_items;
|
||||
int config_has_battery;
|
||||
@@ -24,6 +25,8 @@ int no_items_battery_enabled;
|
||||
|
||||
void config_read_file(const char *path)
|
||||
{
|
||||
background_create_new();
|
||||
|
||||
FILE *fp;
|
||||
char line[512];
|
||||
char *key, *value;
|
||||
@@ -90,7 +93,7 @@ void config_write_backgrounds(FILE *fp)
|
||||
fprintf(fp, "# Backgrounds\n");
|
||||
|
||||
int index;
|
||||
for (index = 0; ; index++) {
|
||||
for (index = 1; ; index++) {
|
||||
GtkTreePath *path;
|
||||
GtkTreeIter iter;
|
||||
|
||||
@@ -117,7 +120,7 @@ void config_write_backgrounds(FILE *fp)
|
||||
bgColBorderWidth, &b,
|
||||
bgColCornerRadius, &r,
|
||||
-1);
|
||||
fprintf(fp, "#%d\n", index + 1);
|
||||
fprintf(fp, "# Background %d\n", index);
|
||||
fprintf(fp, "rounded = %d\n", r);
|
||||
fprintf(fp, "border_width = %d\n", b);
|
||||
config_write_color(fp, "background_color", *fillColor, fillOpacity);
|
||||
@@ -145,7 +148,7 @@ void config_write_panel(FILE *fp)
|
||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(panel_padding_x)),
|
||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(panel_padding_y)),
|
||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(panel_spacing)));
|
||||
fprintf(fp, "panel_background_id = %d\n", 1 + gtk_combo_box_get_active(GTK_COMBO_BOX(panel_background)));
|
||||
fprintf(fp, "panel_background_id = %d\n", gtk_combo_box_get_active(GTK_COMBO_BOX(panel_background)));
|
||||
fprintf(fp, "wm_menu = %d\n", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(panel_wm_menu)) ? 1 : 0);
|
||||
fprintf(fp, "panel_dock = %d\n", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(panel_dock)) ? 1 : 0);
|
||||
|
||||
@@ -181,7 +184,7 @@ void config_write_panel(FILE *fp)
|
||||
if (gtk_combo_box_get_active(GTK_COMBO_BOX(panel_combo_layer)) == 0) {
|
||||
fprintf(fp, "top");
|
||||
} else if (gtk_combo_box_get_active(GTK_COMBO_BOX(panel_combo_layer)) == 1) {
|
||||
fprintf(fp, "center");
|
||||
fprintf(fp, "normal");
|
||||
} else {
|
||||
fprintf(fp, "bottom");
|
||||
}
|
||||
@@ -232,16 +235,17 @@ void config_write_taskbar(FILE *fp)
|
||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(taskbar_padding_x)),
|
||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(taskbar_padding_y)),
|
||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(taskbar_spacing)));
|
||||
fprintf(fp, "taskbar_background_id = %d\n", 1 + gtk_combo_box_get_active(GTK_COMBO_BOX(taskbar_inactive_background)));
|
||||
fprintf(fp, "taskbar_active_background_id = %d\n", 1 + gtk_combo_box_get_active(GTK_COMBO_BOX(taskbar_active_background)));
|
||||
fprintf(fp, "taskbar_background_id = %d\n", gtk_combo_box_get_active(GTK_COMBO_BOX(taskbar_inactive_background)));
|
||||
fprintf(fp, "taskbar_active_background_id = %d\n", gtk_combo_box_get_active(GTK_COMBO_BOX(taskbar_active_background)));
|
||||
fprintf(fp, "taskbar_name = %d\n", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(taskbar_show_name)) ? 1 : 0);
|
||||
fprintf(fp, "taskbar_hide_inactive_tasks = %d\n", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(taskbar_hide_inactive_tasks)) ? 1 : 0);
|
||||
fprintf(fp, "taskbar_hide_different_monitor = %d\n", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(taskbar_hide_diff_monitor)) ? 1 : 0);
|
||||
fprintf(fp,
|
||||
"taskbar_name_padding = %d\n",
|
||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(taskbar_name_padding_x)));
|
||||
fprintf(fp, "taskbar_name_background_id = %d\n", 1 + gtk_combo_box_get_active(GTK_COMBO_BOX(taskbar_name_inactive_background)));
|
||||
fprintf(fp, "taskbar_name_active_background_id = %d\n", 1 + gtk_combo_box_get_active(GTK_COMBO_BOX(taskbar_name_active_background)));
|
||||
"taskbar_name_padding = %d %d\n",
|
||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(taskbar_name_padding_x)),
|
||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(taskbar_name_padding_y)));
|
||||
fprintf(fp, "taskbar_name_background_id = %d\n", gtk_combo_box_get_active(GTK_COMBO_BOX(taskbar_name_inactive_background)));
|
||||
fprintf(fp, "taskbar_name_active_background_id = %d\n", gtk_combo_box_get_active(GTK_COMBO_BOX(taskbar_name_active_background)));
|
||||
fprintf(fp, "taskbar_name_font = %s\n", gtk_font_button_get_font_name(GTK_FONT_BUTTON(taskbar_name_font)));
|
||||
|
||||
GdkColor color;
|
||||
@@ -260,7 +264,7 @@ void config_write_taskbar(FILE *fp)
|
||||
fprintf(fp, "taskbar_distribute_size = %d\n", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(taskbar_distribute_size)) ? 1 : 0);
|
||||
|
||||
fprintf(fp, "taskbar_sort_order = ");
|
||||
if (gtk_combo_box_get_active(GTK_COMBO_BOX(taskbar_sort_order)) == 0) {
|
||||
if (gtk_combo_box_get_active(GTK_COMBO_BOX(taskbar_sort_order)) <= 0) {
|
||||
fprintf(fp, "none");
|
||||
} else if (gtk_combo_box_get_active(GTK_COMBO_BOX(taskbar_sort_order)) == 1) {
|
||||
fprintf(fp, "title");
|
||||
@@ -304,7 +308,7 @@ void config_write_task_background(FILE *fp, char *name, GtkWidget *task_backgrou
|
||||
{
|
||||
char full_name[128];
|
||||
sprintf(full_name, "task%s_background_id", name);
|
||||
fprintf(fp, "%s = %d\n", full_name, 1 + gtk_combo_box_get_active(GTK_COMBO_BOX(task_background)));
|
||||
fprintf(fp, "%s = %d\n", full_name, gtk_combo_box_get_active(GTK_COMBO_BOX(task_background)));
|
||||
}
|
||||
|
||||
void config_write_task(FILE *fp)
|
||||
@@ -321,9 +325,10 @@ void config_write_task(FILE *fp)
|
||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(task_maximum_width)),
|
||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(task_maximum_height)));
|
||||
fprintf(fp,
|
||||
"task_padding = %d %d\n",
|
||||
"task_padding = %d %d %d\n",
|
||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(task_padding_x)),
|
||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(task_padding_y)));
|
||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(task_padding_y)),
|
||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(task_spacing)));
|
||||
fprintf(fp, "task_font = %s\n", gtk_font_button_get_font_name(GTK_FONT_BUTTON(task_font)));
|
||||
fprintf(fp, "task_tooltip = %d\n", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(tooltip_task_show)) ? 1 : 0);
|
||||
|
||||
@@ -393,6 +398,13 @@ void config_write_task(FILE *fp)
|
||||
config_write_task_background(fp, "_iconified", task_iconified_background);
|
||||
}
|
||||
|
||||
|
||||
fprintf(fp, "mouse_left = %s\n", get_action(task_mouse_left));
|
||||
fprintf(fp, "mouse_middle = %s\n", get_action(task_mouse_middle));
|
||||
fprintf(fp, "mouse_right = %s\n", get_action(task_mouse_right));
|
||||
fprintf(fp, "mouse_scroll_up = %s\n", get_action(task_mouse_scroll_up));
|
||||
fprintf(fp, "mouse_scroll_down = %s\n", get_action(task_mouse_scroll_down));
|
||||
|
||||
fprintf(fp, "\n");
|
||||
}
|
||||
|
||||
@@ -406,7 +418,7 @@ void config_write_systray(FILE *fp)
|
||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(systray_padding_x)),
|
||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(systray_padding_y)),
|
||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(systray_spacing)));
|
||||
fprintf(fp, "systray_background_id = %d\n", 1 + gtk_combo_box_get_active(GTK_COMBO_BOX(systray_background)));
|
||||
fprintf(fp, "systray_background_id = %d\n", gtk_combo_box_get_active(GTK_COMBO_BOX(systray_background)));
|
||||
|
||||
fprintf(fp, "systray_sort = ");
|
||||
if (gtk_combo_box_get_active(GTK_COMBO_BOX(systray_icon_order)) == 0) {
|
||||
@@ -428,7 +440,7 @@ void config_write_systray(FILE *fp)
|
||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(systray_icon_brightness)));
|
||||
|
||||
fprintf(fp, "systray_monitor = ");
|
||||
fprintf(fp, "%d", 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");
|
||||
@@ -444,14 +456,20 @@ void config_write_launcher(FILE *fp)
|
||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(launcher_padding_x)),
|
||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(launcher_padding_y)),
|
||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(launcher_spacing)));
|
||||
fprintf(fp, "launcher_background_id = %d\n", 1 + gtk_combo_box_get_active(GTK_COMBO_BOX(launcher_background)));
|
||||
fprintf(fp, "launcher_background_id = %d\n", gtk_combo_box_get_active(GTK_COMBO_BOX(launcher_background)));
|
||||
fprintf(fp, "launcher_icon_size = %d\n", (int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(launcher_icon_size)));
|
||||
fprintf(fp,
|
||||
"launcher_icon_asb = %d %d %d\n",
|
||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(launcher_icon_opacity)),
|
||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(launcher_icon_saturation)),
|
||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(launcher_icon_brightness)));
|
||||
gchar *icon_theme = get_current_icon_theme();
|
||||
if (icon_theme && !g_str_equal(icon_theme, "")) {
|
||||
fprintf(fp, "launcher_icon_theme = %s\n", icon_theme);
|
||||
g_free(icon_theme);
|
||||
icon_theme = NULL;
|
||||
}
|
||||
fprintf(fp, "launcher_icon_theme_override = %d\n", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(launcher_icon_theme_override)) ? 1 : 0);
|
||||
fprintf(fp, "startup_notifications = %d\n", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(startup_notifications)) ? 1 : 0);
|
||||
fprintf(fp, "launcher_tooltip = %d\n", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(launcher_tooltip)) ? 1 : 0);
|
||||
|
||||
@@ -515,8 +533,8 @@ void config_write_clock(FILE *fp)
|
||||
fprintf(fp,
|
||||
"clock_padding = %d %d\n",
|
||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(clock_padding_x)),
|
||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(clock_padding_x)));
|
||||
fprintf(fp, "clock_background_id = %d\n", 1 + gtk_combo_box_get_active(GTK_COMBO_BOX(clock_background)));
|
||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(clock_padding_y)));
|
||||
fprintf(fp, "clock_background_id = %d\n", gtk_combo_box_get_active(GTK_COMBO_BOX(clock_background)));
|
||||
fprintf(fp, "clock_tooltip = %s\n", gtk_entry_get_text(GTK_ENTRY(clock_format_tooltip)));
|
||||
fprintf(fp, "clock_tooltip_timezone = %s\n", gtk_entry_get_text(GTK_ENTRY(clock_tmz_tooltip)));
|
||||
fprintf(fp, "clock_lclick_command = %s\n", gtk_entry_get_text(GTK_ENTRY(clock_left_command)));
|
||||
@@ -544,7 +562,7 @@ void config_write_battery(FILE *fp)
|
||||
"battery_padding = %d %d\n",
|
||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(battery_padding_x)),
|
||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(battery_padding_y)));
|
||||
fprintf(fp, "battery_background_id = %d\n", 1 + gtk_combo_box_get_active(GTK_COMBO_BOX(battery_background)));
|
||||
fprintf(fp, "battery_background_id = %d\n", gtk_combo_box_get_active(GTK_COMBO_BOX(battery_background)));
|
||||
fprintf(fp, "battery_hide = %d\n", (int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(battery_hide_if_higher)));
|
||||
|
||||
fprintf(fp, "\n");
|
||||
@@ -561,7 +579,7 @@ void config_write_tooltip(FILE *fp)
|
||||
"tooltip_padding = %d %d\n",
|
||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(tooltip_padding_x)),
|
||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(tooltip_padding_y)));
|
||||
fprintf(fp, "tooltip_background_id = %d\n", 1 + gtk_combo_box_get_active(GTK_COMBO_BOX(tooltip_background)));
|
||||
fprintf(fp, "tooltip_background_id = %d\n", gtk_combo_box_get_active(GTK_COMBO_BOX(tooltip_background)));
|
||||
|
||||
GdkColor color;
|
||||
gtk_color_button_get_color(GTK_COLOR_BUTTON(tooltip_font_color), &color);
|
||||
@@ -1008,6 +1026,7 @@ void add_entry(char *key, char *value)
|
||||
else if (strcmp(key, "taskbar_name_padding") == 0) {
|
||||
extract_values(value, &value1, &value2, &value3);
|
||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(taskbar_name_padding_x), atoi(value1));
|
||||
if (value2) gtk_spin_button_set_value(GTK_SPIN_BUTTON(taskbar_name_padding_y), atoi(value2));
|
||||
}
|
||||
else if (strcmp(key, "taskbar_name_background_id") == 0) {
|
||||
int id = background_index_safe(atoi(value));
|
||||
@@ -1071,7 +1090,9 @@ void add_entry(char *key, char *value)
|
||||
else if (strcmp(key, "task_padding") == 0) {
|
||||
extract_values(value, &value1, &value2, &value3);
|
||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(task_padding_x), atoi(value1));
|
||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(task_spacing), atoi(value1));
|
||||
if (value2) gtk_spin_button_set_value(GTK_SPIN_BUTTON(task_padding_y), atoi(value2));
|
||||
if (value3) gtk_spin_button_set_value(GTK_SPIN_BUTTON(task_spacing), atoi(value3));
|
||||
}
|
||||
else if (strcmp(key, "task_font") == 0) {
|
||||
gtk_font_button_set_font_name(GTK_FONT_BUTTON(task_font), value);
|
||||
@@ -1209,20 +1230,18 @@ void add_entry(char *key, char *value)
|
||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(systray_icon_size), atoi(value));
|
||||
}
|
||||
else if (strcmp(key, "systray_monitor") == 0) {
|
||||
if (strcmp(value, "0") == 0)
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 1);
|
||||
else if (strcmp(value, "1") == 0)
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 2);
|
||||
if (strcmp(value, "1") == 0)
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 0);
|
||||
else if (strcmp(value, "2") == 0)
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 3);
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 1);
|
||||
else if (strcmp(value, "3") == 0)
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 4);
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 2);
|
||||
else if (strcmp(value, "4") == 0)
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 5);
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 3);
|
||||
else if (strcmp(value, "5") == 0)
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 6);
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 4);
|
||||
else if (strcmp(value, "6") == 0)
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 7);
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 5);
|
||||
}
|
||||
else if (strcmp(key, "systray_icon_asb") == 0) {
|
||||
extract_values(value, &value1, &value2, &value3);
|
||||
@@ -1265,12 +1284,21 @@ void add_entry(char *key, char *value)
|
||||
else if (strcmp(key, "launcher_icon_theme") == 0) {
|
||||
set_current_icon_theme(value);
|
||||
}
|
||||
else if (strcmp(key, "launcher_icon_theme_override") == 0) {
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(launcher_icon_theme_override), atoi(value));
|
||||
}
|
||||
else if (strcmp(key, "launcher_tooltip") == 0) {
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(launcher_tooltip), atoi(value));
|
||||
}
|
||||
else if (strcmp(key, "startup_notifications") == 0) {
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(startup_notifications), atoi(value));
|
||||
}
|
||||
else if (strcmp(key, "launcher_icon_asb") == 0) {
|
||||
extract_values(value, &value1, &value2, &value3);
|
||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(launcher_icon_opacity), atoi(value1));
|
||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(launcher_icon_saturation), atoi(value2));
|
||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(launcher_icon_brightness), atoi(value3));
|
||||
}
|
||||
|
||||
/* Tooltip */
|
||||
else if (strcmp(key, "tooltip_show_timeout") == 0) {
|
||||
@@ -1304,19 +1332,19 @@ void add_entry(char *key, char *value)
|
||||
|
||||
/* Mouse actions */
|
||||
else if (strcmp(key, "mouse_left") == 0) {
|
||||
get_action(value, task_mouse_left);
|
||||
set_action(value, task_mouse_left);
|
||||
}
|
||||
else if (strcmp(key, "mouse_middle") == 0) {
|
||||
get_action(value, task_mouse_middle);
|
||||
set_action(value, task_mouse_middle);
|
||||
}
|
||||
else if (strcmp(key, "mouse_right") == 0) {
|
||||
get_action(value, task_mouse_right);
|
||||
set_action(value, task_mouse_right);
|
||||
}
|
||||
else if (strcmp(key, "mouse_scroll_up") == 0) {
|
||||
get_action(value, task_mouse_scroll_up);
|
||||
set_action(value, task_mouse_scroll_up);
|
||||
}
|
||||
else if (strcmp(key, "mouse_scroll_down") == 0) {
|
||||
get_action(value, task_mouse_scroll_down);
|
||||
set_action(value, task_mouse_scroll_down);
|
||||
}
|
||||
|
||||
if (value1) free(value1);
|
||||
@@ -1334,7 +1362,7 @@ void hex2gdk(char *hex, GdkColor *color)
|
||||
color->pixel = 0;
|
||||
}
|
||||
|
||||
void get_action(char *event, GtkWidget *combo)
|
||||
void set_action(char *event, GtkWidget *combo)
|
||||
{
|
||||
if (strcmp(event, "none") == 0)
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(combo), 0);
|
||||
@@ -1359,3 +1387,30 @@ void get_action(char *event, GtkWidget *combo)
|
||||
else if (strcmp(event, "prev_task") == 0)
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(combo), 10);
|
||||
}
|
||||
|
||||
char *get_action(GtkWidget *combo)
|
||||
{
|
||||
if (gtk_combo_box_get_active(GTK_COMBO_BOX(combo)) == 0)
|
||||
return "none";
|
||||
if (gtk_combo_box_get_active(GTK_COMBO_BOX(combo)) == 1)
|
||||
return "close";
|
||||
if (gtk_combo_box_get_active(GTK_COMBO_BOX(combo)) == 2)
|
||||
return "toggle";
|
||||
if (gtk_combo_box_get_active(GTK_COMBO_BOX(combo)) == 3)
|
||||
return "iconify";
|
||||
if (gtk_combo_box_get_active(GTK_COMBO_BOX(combo)) == 4)
|
||||
return "shade";
|
||||
if (gtk_combo_box_get_active(GTK_COMBO_BOX(combo)) == 5)
|
||||
return "toggle_iconify";
|
||||
if (gtk_combo_box_get_active(GTK_COMBO_BOX(combo)) == 6)
|
||||
return "maximize_restore";
|
||||
if (gtk_combo_box_get_active(GTK_COMBO_BOX(combo)) == 7)
|
||||
return "desktop_left";
|
||||
if (gtk_combo_box_get_active(GTK_COMBO_BOX(combo)) == 8)
|
||||
return "desktop_right";
|
||||
if (gtk_combo_box_get_active(GTK_COMBO_BOX(combo)) == 9)
|
||||
return "next_task";
|
||||
if (gtk_combo_box_get_active(GTK_COMBO_BOX(combo)) == 10)
|
||||
return "prev_task";
|
||||
return "none";
|
||||
}
|
||||
|
||||
@@ -363,24 +363,30 @@ void createHeuristicMask(DATA32* data, int w, int h)
|
||||
}
|
||||
|
||||
|
||||
void render_image(Drawable d, int x, int y, int w, int h)
|
||||
void render_image(Drawable d, int x, int y)
|
||||
{
|
||||
// in real_transparency mode imlib_render_image_on_drawable does not the right thing, because
|
||||
// the operation is IMLIB_OP_COPY, but we would need IMLIB_OP_OVER (which does not exist)
|
||||
// Therefore we have to do it with the XRender extension (i.e. copy what imlib is doing internally)
|
||||
// But first we need to render the image onto itself with PictOpIn to adjust the colors to the alpha channel
|
||||
Pixmap pmap_tmp = XCreatePixmap(server.dsp, server.root_win, w, h, 32);
|
||||
imlib_context_set_drawable(pmap_tmp);
|
||||
int w = imlib_image_get_width(), h = imlib_image_get_height();
|
||||
|
||||
Pixmap pixmap = XCreatePixmap(server.dsp, server.root_win, w, h, 32);
|
||||
imlib_context_set_drawable(pixmap);
|
||||
imlib_context_set_blend(0);
|
||||
imlib_render_image_on_drawable(0, 0);
|
||||
Picture pict_image = XRenderCreatePicture(server.dsp, pmap_tmp, XRenderFindStandardFormat(server.dsp, PictStandardARGB32), 0, 0);
|
||||
|
||||
Pixmap mask = XCreatePixmap(server.dsp, server.root_win, w, h, 32);
|
||||
imlib_context_set_drawable(mask);
|
||||
imlib_context_set_blend(0);
|
||||
imlib_render_image_on_drawable(0, 0);
|
||||
|
||||
Picture pict = XRenderCreatePicture(server.dsp, pixmap, XRenderFindStandardFormat(server.dsp, PictStandardARGB32), 0, 0);
|
||||
Picture pict_drawable = XRenderCreatePicture(server.dsp, d, XRenderFindVisualFormat(server.dsp, server.visual), 0, 0);
|
||||
XRenderComposite(server.dsp, PictOpIn, pict_image, None, pict_image, 0, 0, 0, 0, 0, 0, w, h);
|
||||
XRenderComposite(server.dsp, PictOpOver, pict_image, None, pict_drawable, 0, 0, 0, 0, x, y, w, h);
|
||||
imlib_context_set_blend(1);
|
||||
XFreePixmap(server.dsp, pmap_tmp);
|
||||
XRenderFreePicture(server.dsp, pict_image);
|
||||
Picture pict_mask = XRenderCreatePicture(server.dsp, mask, XRenderFindStandardFormat(server.dsp, PictStandardARGB32), 0, 0);
|
||||
XRenderComposite(server.dsp, PictOpOver, pict, pict_mask, pict_drawable, 0, 0, 0, 0, x, y, w, h);
|
||||
|
||||
XRenderFreePicture(server.dsp, pict_mask);
|
||||
XRenderFreePicture(server.dsp, pict_drawable);
|
||||
XRenderFreePicture(server.dsp, pict);
|
||||
XFreePixmap(server.dsp, mask);
|
||||
XFreePixmap(server.dsp, pixmap);
|
||||
}
|
||||
|
||||
void draw_text(PangoLayout *layout, cairo_t *c, int posx, int posy, Color *color, int font_shadow)
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#ifndef COMMON_H
|
||||
#define COMMON_H
|
||||
|
||||
|
||||
#define WM_CLASS_TINT "panel"
|
||||
|
||||
#include <Imlib2.h>
|
||||
@@ -64,7 +63,7 @@ void extract_values (const char *value, char **value1, char **value2, char **val
|
||||
void adjust_asb(DATA32 *data, int w, int h, int alpha, float satur, float bright);
|
||||
void createHeuristicMask(DATA32* data, int w, int h);
|
||||
|
||||
void render_image(Drawable d, int x, int y, int w, int h);
|
||||
void render_image(Drawable d, int x, int y);
|
||||
|
||||
void draw_text(PangoLayout *layout, cairo_t *c, int posx, int posy, Color *color, int font_shadow);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user