Page 1 of 1

Fluxbox Toolbar - default config for mxfb?

Posted: Fri Apr 18, 2025 11:31 am
by Melber
Based on @ceeslans excellent tweaking of the native fluxbox toolbar, eg. viewtopic.php?p=812781#p812781, and Jerry's comment
Jerry3904 wrote: Wed Apr 16, 2025 8:45 am I used the traditional FB toolbar a lot during the earlier part of MX-25 Fluxbox version development when much was not yet available, and it got me thinking that we might want our own unique toolbar config for the new version.
I decided to have a quick fiddle and see if I could get something resembling the tint2 toolbar I am currently using (a slight modification of MX-workspaces.tint2rc)

Image

Buttons use font-awesome glyphs (kind of annoying that it's not possible to use image files, hence no mx-logo button).
I added the triangle to open the fluxbox root menu, which is useful when windows are open full screen.
Appfinder and exit options right-click opens respective settings, as in tint2.

I edited the toolbar entries in ~/.fluxbox/init and the theme.cfg of the fluxbox style.
I wanted to avoid using ~/.fluxbox/overlay so that the toolbar's appearance could be changed by just changing the fluxbox style.

init file edits

Code: Select all

### TOOLBAR ###
session.screen0.toolbar.button.tools.label:	\357\202\255
session.screen0.toolbar.button.tools.commands:	exec custom-toolbox /etc/custom-toolbox/mxfb-settings.list
session.screen0.toolbar.button.appfinder.label:	\357\200\202
session.screen0.toolbar.button.appfinder.commands:	:exec rofi -show drun -theme ~/.config/rofi/themes/appfinder/mxfb-appfinder.rasi : :exec appfinder-settings
session.screen0.toolbar.button.exitoptions.label:	\357\200\221
session.screen0.toolbar.button.exitoptions.commands:	:exec exit-options : :exec exit-options-manager
session.screen0.toolbar.button.files.label:	\357\201\273
session.screen0.toolbar.button.files.commands:	exec thunar
session.screen0.toolbar.button.browser.label:	\357\211\251
session.screen0.toolbar.button.browser.commands:	exec sensible-browser
session.screen0.toolbar.button.rootmenu.label:	\357\201\213
session.screen0.toolbar.button.rootmenu.commands:	RootMenu
session.screen0.toolbar.widthPercent:	100
session.screen0.toolbar.layer:	Dock
session.screen0.toolbar.autoHide:	false
session.screen0.toolbar.maxOver:	false
session.screen0.toolbar.height:	26
session.screen0.toolbar.tools:	button.appfinder, button.rootmenu, button.tools, button.files, button.browser, iconbar, workspacename, systemtray,  clock, button.exitoptions,
session.screen0.toolbar.visible:	true
session.screen0.toolbar.onhead:	1
session.screen0.toolbar.placement:	BottomCenter
session.screen0.toolbar.alpha:	255
session.screen0.toolbar.autoRaise:	false
session.screen0.systray.pinLeft:	
session.screen0.systray.pinRight:	
session.screen0.strftimeFormat:	%k:%M
fluxbox style theme.cfg edits

Code: Select all

! Toolbar settings...
toolbar.height:					28
toolbar.shaped:					false
toolbar.justify:				center
toolbar:						flat

toolbar.color:					#505050
toolbar.colorTo:				#1d2324
toolbar.bevelWidth:				0
toolbar.borderColor:			#1d2324
toolbar.borderWidth:			6

toolbar.button:						flat 
toolbar.button.color:				#1d2324
toolbar.button.colorTo:				#1d2324
toolbar.button.picColor:			#ffffff
toolbar.button.pressed:				flat
toolbar.button.pressed.color:		#0f56d9
toolbar.button.pressed.colorTo:		#0f56d9
toolbar.button.pressed.picColor: 	#ffffff
toolbar.button.font:				FontAwesome-14:Regular
toolbar.button.borderWidth:			4
toolbar.button.borderColor:			#1d2324

toolbar.clock:					flat
toolbar.clock.borderColor:		#1d2324
toolbar.clock.borderWidth:		6
toolbar.clock.justify:			Center
toolbar.clock.color:			#1d2324
toolbar.clock.colorTo:			#1d2324
toolbar.clock.textColor:		#ffffff
toolbar.clock.font:		        Liberation Sans-12:Bold

toolbar.workspace:				flat gradient vertical
toolbar.workspace.justify:		Center
toolbar.workspace.borderColor:	#505050
toolbar.workspace.borderWidth:	6
toolbar.workspace.color:		#505050
toolbar.workspace.colorTo:		#505050
toolbar.workspace.textColor:	#cacdd0
toolbar.workspace.font:			Liberation Sans-9:Regular

toolbar.systray:				parentrelative
toolbar.systray.color:		    #505050

toolbar.iconbar.empty:					flat 
toolbar.iconbar.empty.color:			#505050
toolbar.iconbar.empty.colorTo:			#505050
toolbar.iconbar.borderWidth:			6
toolbar.iconbar.borderColor:			#1d2324

toolbar.iconbar.focused:				flat 
toolbar.iconbar.focused.justify:		Center
toolbar.iconbar.focused.color:			#c3d5f6
toolbar.iconbar.focused.colorTo:		#
toolbar.iconbar.focused.borderWidth:	6
toolbar.iconbar.focused.borderColor:	#c3d5f6
toolbar.iconbar.focused.textColor:		#1d2324
toolbar.iconbar.focused.font:			Liberation Sans-11:Regular

toolbar.iconbar.unfocused:				flat 
toolbar.iconbar.unfocused.justify:		Center
toolbar.iconbar.unfocused.color:		#505050
toolbar.iconbar.unfocused.colorTo:		#
toolbar.iconbar.unfocused.borderWidth:	6
toolbar.iconbar.unfocused.borderColor:	#505050
toolbar.iconbar.unfocused.textColor:	#cacdd0
toolbar.iconbar.unfocused.font:			Liberation Sans-11:Regular

Re: Fluxbox Toolbar - default config for mxfb?

Posted: Fri Apr 18, 2025 1:24 pm
by Jerry3904
That looks promising, thanks. Can't see anything on my phone, so will take a careful look tomorrow morning.

Re: Fluxbox Toolbar - default config for mxfb?

Posted: Fri Apr 18, 2025 2:20 pm
by ceeslans
@Melber : yep, that looks great!

Even tho I can understand your concerns in respect of font-setting in ~/.fluxbox/overlay, I'd be hesitant to edit each and every style theme.cfg... I'd still be in favour to set the font in overlay, but with the necessary emphasis not to change the font type.

Oh, and perhaps change the files.command to exo-open $HOME --> to endulge supporters of alternative filemanagers (you know I like pcmanfm, right? :happy: )

Re: Fluxbox Toolbar - default config for mxfb?

Posted: Fri Apr 18, 2025 3:15 pm
by Jerry3904
Took a QUICK look (relatives are here) on my laptop, and it does definitely look TERRIFIC.

--Is there a "world" glyph for web browsers given that many users (hand in air) switch to an alternative and would need to dive into init to get rid of Firefox. Or are there other browser glyphs? WAIT: see next post!
--We would probably want to pull together a Help document...

Re: Fluxbox Toolbar - default config for mxfb?

Posted: Fri Apr 18, 2025 4:21 pm
by ceeslans
@Melber : I noticed that your buttons are adequately spaced - without applying any toolbar-spacer values in the 'session.screen0.toolbar.tools' line.
But when I leave the spacer_ settings out, then buttons are all cramping up --> see below mock-up clipping . Do you know what could cause this?

Image

Re: Fluxbox Toolbar - default config for mxfb?

Posted: Fri Apr 18, 2025 6:20 pm
by Melber
Jerry3904 wrote: Fri Apr 18, 2025 3:15 pm --Is there a "world" glyph for web browsers given that many users (hand in air) switch to an alternative and would need to dive into init to get rid of Firefox. Or are there other browser glyphs? WAIT: see next post!
Globe glyph

Code: Select all

session.screen0.toolbar.button.browser.label: 
otherwise there are specific glyphs for firefox, chrome, edge, opera and safari

Re: Fluxbox Toolbar - default config for mxfb?

Posted: Fri Apr 18, 2025 6:22 pm
by Melber
ceeslans wrote: Fri Apr 18, 2025 4:21 pm @Melber : I noticed that your buttons are adequately spaced - without applying any toolbar-spacer values in the 'session.screen0.toolbar.tools' line.
But when I leave the spacer_ settings out, then buttons are all cramping up --> see below mock-up clipping . Do you know what could cause this?
maybe ?

Code: Select all

toolbar.button.borderWidth: 4

Re: Fluxbox Toolbar - default config for mxfb?

Posted: Fri Apr 18, 2025 7:58 pm
by siamhie
On the menu side of things, will it be easy to switch back to the default fluxbox toolbar?
menu.jpg

Re: Fluxbox Toolbar - default config for mxfb?

Posted: Sat Apr 19, 2025 3:11 am
by Melber
ceeslans wrote: Fri Apr 18, 2025 2:20 pm Even tho I can understand your concerns in respect of font-setting in ~/.fluxbox/overlay, I'd be hesitant to edit each and every style theme.cfg... I'd still be in favour to set the font in overlay, but with the necessary emphasis not to change the font type.
My problem is that setting font-awesome in the overlay file breaks buttons with text labels, or at least I can't get it to display normal letters. On the other hand, if user knows enough to edit the init file entries they should also be capable of editing overlay.

Oh, and perhaps change the files.command to exo-open $HOME --> to endulge supporters of alternative filemanagers (you know I like pcmanfm, right? :happy: )
Noted and agreed.
I just forgot to generalise the command before posting.

Re: Fluxbox Toolbar - default config for mxfb?

Posted: Sat Apr 19, 2025 3:14 am
by Melber
siamhie wrote: Fri Apr 18, 2025 7:58 pm On the menu side of things, will it be easy to switch back to the default fluxbox toolbar?
I would presume so

Re: Fluxbox Toolbar - default config for mxfb?

Posted: Sat Apr 19, 2025 11:48 am
by siamhie
Melber wrote: Sat Apr 19, 2025 3:14 am
siamhie wrote: Fri Apr 18, 2025 7:58 pm On the menu side of things, will it be easy to switch back to the default fluxbox toolbar?
I would presume so
Thanks. I know I'm thinking into the future with that question.

Melber wrote: Sat Apr 19, 2025 3:11 am
ceeslans wrote: Fri Apr 18, 2025 2:20 pm Even tho I can understand your concerns in respect of font-setting in ~/.fluxbox/overlay, I'd be hesitant to edit each and every style theme.cfg... I'd still be in favour to set the font in overlay, but with the necessary emphasis not to change the font type.
My problem is that setting font-awesome in the overlay file breaks buttons with text labels, or at least I can't get it to display normal letters. On the other hand, if user knows enough to edit the init file entries they should also be capable of editing overlay.
One would assume that the user has an understanding of how styles work. Here's my working overlay file at the moment.

Code: Select all

! The following line will prevent styles from setting the background.
background: none

#Example settings for font name, size, etc., for menu and toolbar


# Fonts
toolbar.clock.font: bookman-13:regular
toolbar.workspace.font: bookman-12:regular
toolbar.iconbar.focused.font: bookman-10:regular
toolbar.iconbar.unfocused.font: bookman-10:regular
toolbar.button.*.font: expansiva-12:bold:regular
window.font: monofur-13:bold:italic
menu.title.font: monofur-17:bold:italic
menu.frame.font: monofur-15:bold:italic
menu.title.justify: center

#menu.title.textColor: #9d6800
#menu.frame.textColor: #9d6800
#menu.title.textColor: #FFFFFF
#menu.frame.textColor: #FFFFFF
#menu.title.color:  #0F0F0F
#menu.frame.color:  #0F0F0F
#menu.borderColor: #ff0000
#toolbar.button.picColor: #3ebdff
#toolbar.workspace.textColor: #3ebdff
#toolbar.clock.textColor: #3ebdff

# menu border
menu.borderWidth: 2

# window border
window.borderWidth: 2

# window border color
#window.borderColor: #ff0000

# menu title halo effect
#menu.title.font.effect: halo
#menu.title.font.halo.color: #750805

# menu frame halo effect
#menu.frame.font.effect: halo
#menu.frame.font.halo.color: #750805

# window label color
#window.label.focus.textColor: #FFFF00
#window.label.unfocus.textColor: #750805

# menubar height
#menu.titleHeight: 30

# menu item height
# menu.itemHeight: 18

# titlebar height
window.title.height: 25

# double menu width
menu.bevelWidth: 2

# force elements to un-autohide correctly on MX-23
slit.borderWidth: 0
slit.bevelWidth: 2


# menu bullet
menu.bullet: triangle
menu.bullet.position: right

# position titlebar text
window.justify: right

# toolbar borders
toolbar.borderWidth: 2
#toolbar.bevelWidth: 3

# rounded corners
#menu.roundCorners: TopRight TopLeft BottomRight BottomLeft
#window.roundCorners: TopRight TopLeft BottomRight BottomLeft
#toolbar.shaped: true

# set grip size
window.handleWidth: 5

Re: Fluxbox Toolbar - default config for mxfb?

Posted: Sat Jun 14, 2025 7:33 am
by ceeslans
Lately I've added a 'calendar' button to my fluxbox' native toolbar. This button executes a toggle-script that sets a simple yad-calendar near this button.
The script checks the current value set for session.screen0.toolbar.placement in ~/.fluxbox/init (i.e top|bottom|left|right) and uses the preset 'tbheight' offset value to set its location (--posX|--posY) accordingly. And xdotool takes care of the toggle function, based on the unique --class name, whilst leaving other open yad window(s) intact. See the result in below mockup screenshot.

Image

tbcalendar:

Code: Select all

#!/bin/bash

### Offset in pixels (top or bottom toolbar)
tbheight='32'

###=========================================

CONF_FILE="$HOME/.fluxbox/init"

WINDOW_CLASS="tbcalendar"
WINDOW_ID=$(xdotool search --class "$WINDOW_CLASS")

if [ -z "$WINDOW_ID" ]; then

	if grep -q '.toolbar.placement:	Top' ${CONF_FILE} ; then
		Offset="y=${tbheight}"
	elif grep -q '.toolbar.placement:	Bottom' ${CONF_FILE} ; then
		Offset="y=-${tbheight}"
	elif grep -q '.toolbar.placement:	Left' ${CONF_FILE} ; then
		Offset="x=${tbheight}"
	elif grep -q '.toolbar.placement:	Right' ${CONF_FILE} ; then
		Offset="x=-${tbheight}"
	else
		exit 0
	fi

	yad --calendar --class="tbcalendar" --width=215 --pos${Offset} --mouse --skip-taskbar \
	--title="Calendar" --title-align=center --window-icon="calendar" \
	--no-buttons --undecorated --escape-ok \

else
    xdotool windowkill "$WINDOW_ID"
fi

exit 0


Re: Fluxbox Toolbar - default config for mxfb?

Posted: Sat Jun 14, 2025 9:47 am
by DeepDayze
That looks quite nice a Fluxbox desktop @ceeslans..so now I may try out Fluxbox again !

Looks very GNOME like and the Conky is quite snazzy as well.

Re: Fluxbox Toolbar - default config for mxfb?

Posted: Sat Jun 14, 2025 5:46 pm
by Melber
ceeslans wrote: Sat Jun 14, 2025 7:33 am Lately I've added a 'calendar' button to my fluxbox' native toolbar. This button executes a toggle-script that sets a simple yad-calendar near this button.
interesting, will check it out.

Re: Fluxbox Toolbar - default config for mxfb?

Posted: Sat Jun 14, 2025 5:55 pm
by Jerry3904
That is interesting, thanks for posting