Page 1 of 7

Sort and improve readability of init

Posted: Sun Feb 23, 2025 8:30 am
by Jerry3904
Because I'm currently working with a MXFB version that does not have tint2, I've been spending a lot of time with the init file--and am re-experiencing my annoyance at that file's user-unfriendliness. So I've started a project to change that, beginning with a sorted structure: labeling sections and pulling entries together that are often scattered. Here is how far I got early this morning:

Code: Select all

#####WINDOW#####
session.screen0.window.focus.alpha:	255
session.screen0.window.unfocus.alpha:	255
session.screen0.focusNewWindows:	true
session.screen0.windowMenu:	~/.fluxbox/submenus/windowmenu
session.screen0.titlebar.left:	Stick 
session.screen0.titlebar.right:	Minimize Maximize Close 
session.screen0.showwindowposition:	false
session.screen0.windowPlacement:	RowMinOverlapPlacement

#####TOOLBAR#####
session.screen0.toolbar.tools:	button.<menu>, iconbar, systemtray, clock
session.screen0.toolbar.layer:	Normal
session.screen0.toolbar.alpha:	252
session.screen0.toolbar.onhead:	1
session.screen0.toolbar.autoRaise:	false
session.screen0.toolbar.visible:	true
session.screen0.toolbar.height:	16
session.screen0.toolbar.placement:	TopCenter
session.screen0.toolbar.widthPercent:	50
session.screen0.toolbar.maxOver:	false
session.screen0.toolbar.autoHide:	false
session.screen0.strftimeFormat:	%I:%M  %b %d

#####SLIT#####
session.screen0.slit.acceptKdeDockapps:	true
session.screen0.slit.layer:	Desktop
session.screen0.slit.placement: LeftCenter
session.screen0.slit.maxOver:	true
session.screen0.slit.onhead:	0
session.screen0.slit.autoRaise:	true
session.screen0.slit.autoHide:	false
session.screen0.slit.alpha:	255
session.slitlistFile:	~/.fluxbox/slitlist

#####TABS#####
session.screen0.tab.placement:	TopLeft
session.screen0.tab.width:	64
session.screen0.struts.1:	0,0,0,0
session.screen0.tabs.usePixmap:	true
session.screen0.tabs.maxOver:	false
session.screen0.tabs.intitlebar:	true

#####ICONBAR#####
session.screen0.iconbar.alignment:	Relative
session.screen0.iconbar.mode:	{static groups}
session.screen0.iconbar.usePixmap:	true
session.screen0.iconbar.iconWidth:	128
session.screen0.iconbar.iconifiedPattern:	Left
session.screen0.iconbar.iconTextPadding:	10

#####WORKSPACE#####
session.screen0.workspacewarping:	true
session.screen0.workspacewarpinghorizontaloffset:	1
session.screen0.workspaceNames:	W-1,W-2,
session.screen0.workspacewarpingverticaloffset:	1
session.screen0.workspacewarpinghorizontal:	true
session.screen0.workspaces:	2
session.screen0.workspacewarpingvertical:	false

#####MENUS#####
session.screen0.clientMenu.usePixmap:	true
session.screen0.menu.alpha:	255
session.screen0.menuDelay:	200
session.menuFile:	~/.fluxbox/menu-mx
session.menuSearch:	itemstart

#####CONFIG FILES#####
session.keyFile:	~/.fluxbox/keys
session.appsFile:	~/.fluxbox/apps
session.styleFile:	/usr/share/fluxbox/styles/zimek_darkblue
session.styleOverlay:	~/.fluxbox/overlay

#####MISC#####
session.screen0.colPlacementDirection:	TopToBottom
session.screen0.opaqueMove:	true
session.screen0.allowRemoteActions:	true
session.screen0.struts:	0,0,0,0
session.screen0.fullMaximization:	false
session.screen0.noFocusWhileTypingDelay:	0
session.screen0.opaqueResize:	false
session.screen0.edgeResizeSnapThreshold:	0
session.screen0.maxDisableMove:	false
session.screen0.opaqueResizeDelay:	50
session.screen0.focusSameHead:	false
session.screen0.tabFocusModel:	ClickToTabFocus
session.screen0.rootCommand:	~/.fehbg -l
session.screen0.defaultDeco:	NORMAL
session.screen0.tooltipDelay:	500
session.screen0.edgeSnapThreshold:	10
session.screen0.maxIgnoreIncrement:	true
session.screen0.maxDisableResize:	false
session.screen0.autoRaise:	true
session.screen0.focusModel:	ClickFocus
session.screen0.rowPlacementDirection:	LeftToRight
session.screen0.clickRaises:	true
session.forcePseudoTransparency:	true
session.doubleClickInterval:	250
session.ignoreBorder:	false
session.tabsAttachArea:	Window
session.autoRaiseDelay:	250
session.cacheLife:	5
session.tabPadding:	0
session.colorsPerChannel:	4
session.cacheMax:	200
session.configVersion:	13

Notes
--I just haven't looked yet at the items under MISC carefully
--I haven't tested whether init will actually ignore empty lines

My eventual goal is to provide organization (some items I'm going to have to look up) and figure out how to add help to some of the more obscure items. Any suggestions welcome.

Re: Sort and improve readability of init

Posted: Sun Feb 23, 2025 9:04 am
by Nokkaelaein
Great initiative. (Pun almost intended!) And argh, if there was a general script that contained definitions for stuff that can be grouped together, then read Fluxbox configuration/theme files, and categorically "beautified" them like this... I'd be super happy. It's something I've been meaning to do myself for the longest time, and just never seem to get around to actually doing it. Argh again.

Yes, my configuration files are aesthetically a mess :P

Re: Sort and improve readability of init

Posted: Sun Feb 23, 2025 9:28 am
by Jerry3904
Thanks for the encouragement! I'm pretty motivated to work this out for MX-25.

Re: Sort and improve readability of init

Posted: Sun Feb 23, 2025 10:51 am
by CharlesV
+1 a VERY noble effort!! It is always good to get a little documentation and optimization in files like these. Thank you!

Re: Sort and improve readability of init

Posted: Sun Feb 23, 2025 11:41 am
by ceeslans
Oh yes, very noble indeed.
But please don't be disappointed when fluxbox overrides this nicely sorted and categorized structure with its own non-structured output. Because it will do so at every [reconfigure] action, or any given configuration setting change in fluxbox configuration... :frown:

Re: Sort and improve readability of init

Posted: Sun Feb 23, 2025 11:43 am
by Jerry3904
Hmmm, I'll have to check that out, thanks for the warning.

Re: Sort and improve readability of init

Posted: Sun Feb 23, 2025 12:36 pm
by Jerry3904
Well, I ran a test was on the 32bit Lenovo R500 I'm working with ATM: neither refresh, log out nor reboot changed the sorted init file.

Guess we need to test on other machines--and maybe other inits (I'm on systemd on this machine, you're on devuan?).

EDIT: same result on my personal 64bit laptop.

Re: Sort and improve readability of init

Posted: Sun Feb 23, 2025 1:21 pm
by ceeslans
Try to execute a [reconfig] command. Or select an other toolbar position from fluxbox's native configuration menu. That screwed up my freshly categorized init file layout in a split second...

Re: Sort and improve readability of init

Posted: Sun Feb 23, 2025 1:51 pm
by Nokkaelaein
ceeslans wrote: Sun Feb 23, 2025 1:21 pm Try to execute a [reconfig] command. Or select an other toolbar position from fluxbox's native configuration menu. That screwed up my freshly categorized init file layout in a split second...
Cannot reproduce this here, either. Tried it many times, both with an actual [reconfig] command, and also by doing an [exec] (Reconfigure) {fluxbox-remote reconfig} ... Either way, the init file stays grouped, comments intact.

What Fluxbox version are you on? This is the 1.3.7+git20220731-0mx23+1 one, in the MX repo, with all the little improvements and fixes since the more mainstream 2015 version. (One not-so-small aesthetic/usability improvement being, you can do opaque window resizing, which to me is very nice to have in a working environment.) I have configured this version extensively over here, and I've never seen the init file rearrange itself?

Re: Sort and improve readability of init

Posted: Sun Feb 23, 2025 2:27 pm
by ceeslans
The above screw-up happens on my devuan setup, as well as on my MX23.5-fluxbox and MXFB23.5 setup.
All three are running fluxbox v/1.3.7+git20220731-0mx23+1
Yes, not every 'reconfigure' reaves havoc in the init file --> but as soon as a different toolbar position is selected from fluxbox' native configuration, the above categorized structure is lost.

Can you please try following from the rootMenu:
rootMenu --> Settings --> Configure --> Window --> Toolbar --> Placement --> [select.opposite.position]

fwiw, I can't imagine I'm the only one having this issue...