View Single Post
  #2   (View Single Post)  
Old 4th April 2018
shep shep is offline
Rc.conf Instructor
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,151
Default

Customizing the Wbar Launch Bar
Note that a customized wbar is included with the default SimpleDE install. The following information is for those who wish to change the dark-blue background in the default install or want to change the dock image.

Although often referred to as a "Dock" x11/wbar, does not offer the ability to "drag" and "dock" an application. Applications with that functionality, such as Cairo-dock or Avant Window Manager, are much larger and require compositing. Wbar is significantly smaller and less resource intensive than a true dock.

What x11/wbar does offer is a means to launch commonly used applications with a single mouse click. Correct positioning of the mouse cursor is enhanced by a "zoomf" factor where the icon enlarges when the cursor is over the icon. Additionally, the icon "bounces" on mouse click, providing visual confirmation that large applications with some startup latency have been truely started.

In OpenBSD x11/wbar lacks the ability to customize the dock appearence with a graphical interface (the gui had partial functionality so it was not included). What follows is a simple method to produce a custom x11/wbar dock.

The default background dock for wbar is /usr/local/share/pixmaps/wbar/dock.png. It is essentially a 1014x70 pixel png background with slightly rounded corners..

The custom dock image in SimpleDE was made in gimp using the following commands:

In graphics/gimp: File -> New. In the "Create a New Image" window select a width of 1014 pixels and a height of 70 pixels. The default resolution of 72 dpi is fine. Open the "color selection dialog" by clicking on the foregound and background colors icon in the Toolbox. What you want to end up with is a 6 character color X11_color_names in the HTML notation box that matches the desktop background color. In the default SimpleDE_local_configs, the background is set in ~/.config/openbox/autostart with the entry
Code:
xsetroot -solid "#172636"
Once you have settled on a color, enter the code in the HTML notation box and click "OK".

In your presently "*Untitled image" select Tools -> Paint Tools -> Bucket Fill. A cursor bucket icon will appear which is positioned over the image followed by another L mouse click to fill the background with the selected color.

Now we will paste a bar image into our background image. A google dock png search will provide a wide selection. Download your choice and open it in a new Gimp window with File -> Open.

The next step is to resize both the dock icon and the canvas size to 1014x70 pixels. First scale the icon with Tools -> Transform Tools -> Scale. In the dialog box, make sure "px" is selected for pixels and that the "chain" that retains maintains the original width/height proportions is uncoupled. Enter the Width 1014 and Height 70 and click Scale. Now match the canvas size to 1014x70 with Image -> Canvas Size...

Copy "visible" part of the icon into the buffer with Edit -> Copy Visible. Paste the buffer into your original and Untitled image with Edit -> Paste Into. Anchor the bar into the backgound with Layer -> Anchor Layer.

Note that if you move Wbar from the bottom of the desktop to the left or top of the desktop you may need to rotate the icon. This can be done with Tools -> Transform Tools -> Rotate.

Export the combined background/dock icon image to the *png format to retain the ability to adjust transparency. File -> Export. Choose a new title (something other than dock), for example dock_blue.png, and click Export.

Finally, copy the new dock icon to /usr/local/share/pixmaps/wbar/ as root. Edit your wbar configuration file, for SimpleDE ~/.config/wbar/wbarrc to utilize the new icon.

Last edited by shep; 4th April 2018 at 08:17 PM.
Reply With Quote