I backup my HOME directory to another drive every 6 months or so. I add/remove a lot of styles/backgrounds/fonts/icons/etc. and like to keep the most recent version available at all times for new installs.
Sort and improve readability of init
Re: Sort and improve readability of init
This is my Fluxbox . There are many others like it, but this one is mine. My Fluxbox is my best friend. It is my life.
I must master it as I must master my life. Without me, my Fluxbox is useless. Without my Fluxbox, I am useless.
I must master it as I must master my life. Without me, my Fluxbox is useless. Without my Fluxbox, I am useless.
Re: Sort and improve readability of init
search iconbar before search workspace
Make it known to avoid using the case sensitive search keyword sequences in comments, toolbar.button names and labels, workspace names.
Melber Your script is fantastic. You have remained on track to provide Jerry3904's model.
I selfishly have shared my own model ideas both here and in another topic.
If You have Your own model we will like to see it.
Make it known to avoid using the case sensitive search keyword sequences in comments, toolbar.button names and labels, workspace names.
Melber Your script is fantastic. You have remained on track to provide Jerry3904's model.
I selfishly have shared my own model ideas both here and in another topic.
If You have Your own model we will like to see it.
Re: Sort and improve readability of init
Hello Jerry3904
Got one into a category:
elif [[ $item = *tooltipDelay:* ]]; then
iconbar_items+=($item)
Got one into a category:
elif [[ $item = *tooltipDelay:* ]]; then
iconbar_items+=($item)
Re: Sort and improve readability of init
Thanks.
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin
Re: Sort and improve readability of init
Hello Jerry3904 and Melber
session.screen0.tabs.intitlebar:
Reason to search tab before search titlebar?
session.screen0.tabs.intitlebar:
Reason to search tab before search titlebar?
Re: Sort and improve readability of init
Hello Jerry3904 and Everyone
Another category has evidenced itself.
The "do not edit" Category.
Observing two lines that report a value not for editing.
session.configVersion:
session.screen0.slit.direction:
Another category has evidenced itself.
The "do not edit" Category.
Observing two lines that report a value not for editing.
session.configVersion:
session.screen0.slit.direction:
Re: Sort and improve readability of init
I appreciate your ongoing attention here, but I'm done with structure and am now trying to finish out implementation.
BTW: I'm sorry but I don't understand the point of your question about sort order--maybe @Melber does. And I'm not interested in a category with only 2 entries.
BTW: I'm sorry but I don't understand the point of your question about sort order--maybe @Melber does. And I'm not interested in a category with only 2 entries.
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin
Re: Sort and improve readability of init
i_ri means that session.screen0.tabs.intitlebar gets sorted into the titlebar category rather than the tabs category.
This version searches for "tab" before "titlebar", so that line gets sorted into "tabs".
It also sorts session.screen0.tooltipDelay into the iconbar category as per i_ri's Post #53.
Code: Select all
#!/bin/bash
#script to sort fluxbox init file
#version 2503-3
init_location=$HOME/.fluxbox/init
backup_location=$HOME/.restore/fluxbox
target_location=$HOME/.fluxbox/init
OLDIFS=$IFS
IFS="|"
while read -r item; do
if [[ $item = *toolbar* ]]; then
toolbar_items+=($item)
elif [[ $item = *systray* ]]; then
toolbar_items+=($item)
elif [[ $item = *time* ]]; then
toolbar_items+=($item)
elif [[ $item = *tab* ]]; then
tab_items+=($item)
elif [[ $item = *window* ]]; then
window_items+=($item)
elif [[ $item = *NewWindows* ]]; then
window_items+=($item)
elif [[ $item = *Maximization* ]]; then
window_items+=($item)
elif [[ $item = *Deco* ]]; then
window_items+=($item)
elif [[ $item = *titlebar* ]]; then
window_items+=($item)
elif [[ $item = *workspace* ]]; then
workspace_items+=($item)
elif [[ $item = *slit* ]]; then
slit_items+=($item)
elif [[ $item = *iconbar* ]]; then
iconbar_items+=($item)
elif [[ $item = *tooltipDelay* ]]; then
iconbar_items+=($item)
elif [[ $item = *menu* ]]; then
menu_items+=($item)
elif [[ $item = *Menu* ]]; then
menu_items+=($item)
elif [[ $item = *File* ]]; then
config_items+=($item)
elif [[ $item = *Overlay* ]]; then
config_items+=($item)
elif [[ $item = *Raise* ]]; then
window_items+=($item)
elif [[ $item = *##* ]]; then
trash_items+=($item)
else
misc_items+=($item)
fi
done < $init_location
#####
if [ ! -d $backup_location ]; then
mkdir -p $backup_location
fi
cp $init_location $backup_location/init.bak
#####
printf '### HELP: https://fluxboxwiki.github.io/category/howtos/en/Editing_the_init_file.html ###\n' > $target_location
printf "\n### WINDOW ###\n" >> $target_location
printf '%s\n' "${window_items[@]}" >> $target_location
printf "\n### WORKSPACE ###\n" >> $target_location
printf '%s\n' "${workspace_items[@]}" >> $target_location
printf "\n### TOOLBAR ###\n" >> $target_location
printf '%s\n' "${toolbar_items[@]}" >> $target_location
printf "\n### SLIT ###\n" >> $target_location
printf '%s\n' "${slit_items[@]}" >> $target_location
printf "\n### TABS ###\n" >> $target_location
printf '%s\n' "${tab_items[@]}" >> $target_location
printf "\n### ICONBAR ###\n" >> $target_location
printf '%s\n' "${iconbar_items[@]}" >> $target_location
printf "\n### MENU ###\n" >> $target_location
printf '%s\n' "${menu_items[@]}" >> $target_location
printf "\n### CONFIG FILES ###\n" >> $target_location
printf '%s\n' "${config_items[@]}" >> $target_location
printf "\n### MISCELLANEOUS ###\n" >> $target_location
printf '%s\n' "${misc_items[@]}" >> $target_location
IFS=$OLDIFS
exit 0
Re: Sort and improve readability of init
Are you ready to upload it to mxfb-accessories? And if yes, how do you want to name it (I have a provisional mxfb-sortinit)?
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin
Re: Sort and improve readability of init
showing Reason to search iconbar before search workspace.
session.screen0.iconbar.mode: {static groups} (workspace)
session.screen0.iconbar.mode: {static groups} (workspace)