Tuesday, December 27, 2016

onyx-silver

Debian 8 ("Jessie") doesn't have a huge number of available Openbox themes, but creating a new Openbox theme from an existing one takes only a few minutes. System-wide themes are stored in the /usr/share/themes directory, and user-specific themes can be placed in ~/.local/share/themes. Just look for the themerc config file. The config file uses hexadecimal color codes, and of course one can find a number of sites out there for picking hex codes and viewing the corresponding colors.

I've been using the Onyx theme, which uses shades of blue for the selected menu items. The following shot shows the Onyx theme in the Openbox Configuration Manager (aka "obconf"), with my right-click desktop menu opened up:


To create a new theme called Onyx-Silver, I copied the /usr/share/themes/Onyx directory to ~/.local/share/themes, renamed the new directory as ~/.local/share/themes/Onyx-Silver, and edited the ~/.local/share/themes/Onyx-Silver/openbox-3/themerc file as follows.

Changed:

!! Selected menu item
menu.items.active.bg: raised splitvertical gradient
menu.items.active.bg.color: #6d95de
menu.items.active.bg.colorTo: #2b829d
menu.items.active.text.color: #f8f8f8


To:

!! Selected menu item
menu.items.active.bg: raised splitvertical gradient
menu.items.active.bg.color: #a5a5a5
menu.items.active.bg.colorTo: #929292
menu.items.active.text.color: #f8f8f8


As well, I changed the color of the window buttons when the cursor is hovering over them.

Changed:

!! Window buttons
window.*.button.*.bg: parentrelative
window.active.button.*.hover.bg: flat splitvertical gradient border
window.inactive.button.*.hover.bg: parentrelative
window.*.button.*.pressed.bg: flat splitvertical gradient border

window.active.button.*.hover.bg.color: #398dc6
window.active.button.*.hover.bg.colorTo: #236d83
window.active.button.*.hover.bg.border.color: #236d83


To:

!! Window buttons
window.*.button.*.bg: parentrelative
window.active.button.*.hover.bg: flat splitvertical gradient border
window.inactive.button.*.hover.bg: parentrelative
window.*.button.*.pressed.bg: flat splitvertical gradient border

window.active.button.*.hover.bg.color: #c5c5c5
window.active.button.*.hover.bg.colorTo: #878989
window.active.button.*.hover.bg.border.color: #236d83



Then I simply saved the file and ran obconf, where the new theme was available to select.


For more info on Openbox theme specifications, see: http://openbox.org/wiki/Help:Themes

No comments: