Tuesday, February 28, 2012

tint2 in semplice

Semplice Linux, which uses the Openbox window manager, comes with the tint2 panel, which I'd never used, so I had to dig around a bit to learn how to configure it. I referred to the following:

- The tint2 wiki at http://code.google.com/p/tint2/wiki/.

- The ArchLinux wiki page on tint2 at https://wiki.archlinux.org/index.php/Tint2#Applications_Menu_in_OpenBox3

The tint2 version in Semplice (from Debian Sid) is currently 0.11+svn20111022-2. Note the "svn" part; as noted in the tint2 wiki, "Configuration marked as SVN ONLY are not yet supported and could change in the next stable release."

In Semplice, the tint2 configuration file is ~/.config/tint2/tint2rc.

I discovered that after making changes to ~/.config/tint2/tint2rc, the following command will reload the panel:

$ killall -SIGUSR1 tint2

That saved me from having to log out and back in each time I made changes to the config file.

There's no “traditional” pager. In the "Taskbar" section of tint2rc, "taskbar_mode = single_desktop" shows only one taskbar (current desktop). "taskbar_mode = multi_desktop" provides pager-like capability, showing taskbars for each desktop. Clicking on any taskbar takes you to the corresponding desktop.

I put a little space between each part of the panel (Launcher area, Taskbar area, System Tray area, and Clock area), as well as between each taskbar. Most of the tint2 panel configuration is fairly well explained in the tint2 wiki, so for the most part I simply followed that to configure my panel.

In tint2rc, I think that "wm_menu = 1" in the "Panel" section means that wm_menu is enabled, so you can right-click on tint2 to make the Openbox menu pop-up (same as right-clicking anywhere else on the desktop).

There are no launchers on the panel by default, but according to the wiki you're supposed to be able to add launchers in the SVN version. Here's how I did it:

First, in the "Panel" section of ~/.config/tint2/tint2rc, I added the following line right after the "panel_size" line:

panel_items = LTSBC

That sets the order of the items on the panel: Launcher, Taskbar, System Tray, Battery Status, Clock.

Then I added a "Launchers" section below the "Panel Autohide" section. It looks like this:

# Launchers
launcher_icon_theme = SempliceDusk
launcher_padding = 5 0 5
launcher_background_id = 1
launcher_icon_size = 85
launcher_item_app = /usr/share/applications/chromium.desktop
launcher_item_app = /usr/share/applications/roxterm.desktop
launcher_item_app = /usr/share/applications/pcmanfm.desktop
launcher_item_app = /usr/share/applications/synaptic.desktop

For "launcher_icon_theme," I went to ~/.config/openbox/rc.xml and used the theme that was identified there (SempliceDusk).

For "launcher_padding," the three numbers stand for horizontal_left_right_padding, vertical_padding, and horizontal_spacing.

For "launcher_background_id," the number 1 is for which background to use (the first background defined in tint2rc).

I used 85 for "launcher_icon_size" because that's the size I saw in the example in the ArchLinux wiki.

Then I pointed the "launcher_item_app" lines to the appropriate .desktop files.

The launcher for PCManFM worked for launching the app, but the icon didn't work on the tint2 panel. I took a look at /usr/share/applications/pcmanfm.desktop, and the icon was defined as “system-file-manager.” I changed it to “/usr/share/icons/gnome/32x32/apps/system-file-manager.png,” and that gave me a usable icon.

So, my resulting tint2 panel has a launcher area, a taskbar area with four taskbars (one for each desktop -- on desktop #1 I have Chromium running; on #2 I have the file manager, a terminal window, and the tint2rc text file; on #3 I have an untitled text file; and #4, the active desktop in the screenshot, indicated by the darkened taskbar, is empty), a system tray area, and a clock area:




Following is my current ~/.config/tint2/tint2rc:


# Tint2 config file

# For information on manually configuring tint2 see http://code.google.com/p/tint2/wiki/Configure

# (This file edited by Steve.)

# Background definitions
# ID 1
rounded = 0
border_width = 0
background_color = #000000 25
border_color = #FFFFFF 100

# ID 2
rounded = 0
border_width = 0
background_color = #000000 75
border_color = #FFFFFF 100

# Panel
panel_monitor = all
panel_position = bottom center horizontal
panel_size = 90% 24
panel_items = LTSBC
panel_margin = 0 0
panel_padding = 0 0 8
panel_dock = 0
wm_menu = 1
panel_layer = top
panel_background_id = 1

# Panel Autohide
autohide = 0
autohide_show_timeout = 0.5
autohide_hide_timeout = 4
autohide_height = 20
strut_policy = follow_size

# Launchers
launcher_icon_theme = SempliceDusk
launcher_padding = 5 0 5
launcher_background_id = 1
launcher_icon_size = 85
launcher_item_app = /usr/share/applications/chromium.desktop
launcher_item_app = /usr/share/applications/roxterm.desktop
launcher_item_app = /usr/share/applications/pcmanfm.desktop
launcher_item_app = /usr/share/applications/synaptic.desktop

# Taskbar
taskbar_mode = multi_desktop
taskbar_padding = 0 0 0
taskbar_background_id = 1
taskbar_active_background_id = 2

# Tasks
urgent_nb_of_blink = 7
task_icon = 1
task_text = 1
task_centered = 0
task_maximum_size = 200 32
task_padding = 4 1
task_background_id = 0
task_active_background_id = 0
task_urgent_background_id = 1
task_iconified_background_id = 0

# Task Icons
task_icon_asb = 100 0 0
task_active_icon_asb = 100 0 0
task_urgent_icon_asb = 100 50 50
task_iconified_icon_asb = 100 0 -40

# Fonts
task_font = Droid Sans 10
task_font_color = #FFFFFF 100
task_active_font_color = #FFFFFF 100
task_urgent_font_color = #4D77AD 100
task_iconified_font_color = #FFFFFF 43
font_shadow = 0

# System Tray
systray = 1
systray_padding = 5 0 0
systray_sort = right2left
systray_background_id = 1
systray_icon_size = 22
systray_icon_asb = 100 0 0

# Clock
time1_format = %a %d %b  %H:%M
time1_font = Droid Sans Bold 12
clock_font_color = #FFFFFF 100
clock_tooltip = Right-click to open Time Admin.
clock_padding = 0 0
clock_background_id = 1
clock_rclick_command = time-admin
clock_lclick_command = gsimplecal

# Tooltips
tooltip = 1
tooltip_padding = 5 2
tooltip_show_timeout = 0.5
tooltip_hide_timeout = 0
tooltip_background_id = 1
tooltip_font = Droid Sans 10
tooltip_font_color = #FFFFFF 100

# Mouse
mouse_middle = shade
mouse_right = none
mouse_scroll_up = toggle
mouse_scroll_down = iconify

# Battery
battery = 0
battery_low_status = 20
battery_low_cmd = notify-send "battery low"
battery_hide = 90
bat1_font = Sans 12
bat2_font = Sans 12
battery_font_color = #FFFFFF 100
battery_padding = 0 0
battery_background_id = 0

# End of config

No comments: