a1ive / grub2-filemanager

GRUB2-based file manager
https://a1ive.github.io/grub2-filemanager/
GNU General Public License v3.0
526 stars 106 forks source link

enhancement: configure menu appearance #103

Closed steve6375 closed 4 years ago

steve6375 commented 4 years ago

It would be nice to be able to configure the menu appearance using the /boot/grubfm/config file.

e.g. change theme background or use graphics mode + specify user background image change text colours change resolution

I tried this in config file, but it keeps reverting to the theme

unset theme
export theme
export gfxmode=800x600
terminal_output gfxterm
background_image -m stretch (${user})/boot/grubfm/seven.jpg
export menu_color_highlight=yellow/dark-gray
export menu_color_normal=black/light-gray
export color_normal=yellow/black
a1ive commented 4 years ago

Now you can even use animated themes. example: boot.zip

steve6375 commented 4 years ago

Any way to not use a theme for agFM? Many techs just want to add their own background image with their own logo on it so they can use it at their place of work but don't want to create and modify a grub2 theme.

a1ive commented 4 years ago

Any way to not use a theme for agFM? Many techs just want to add their own background image with their own logo on it so they can use it at their place of work but don't want to create and modify a grub2 theme.

They could create a theme with only one background.

steve6375 commented 4 years ago

But when you run the agFM File Manager, it reverts back to the internal 'slack' theme and uses the background from memdisk? Or do I need to recompile as well?

a1ive commented 4 years ago

Or do I need to recompile as well?

yes.

a1ive commented 4 years ago

Now you could disable theme and use background_image.

unset theme_std;
unset theme_fm;
unset theme_open;
unset theme_info;
unset theme_help;
background_image -m stretch (${user})/boot/grubfm/xxx.png;
steve6375 commented 4 years ago

Works :-) Thanks. I can copy the 'slack' theme. Presumably any theme would need to have all setmenu icons included too - or will icons in internal slack folder be used?

a1ive commented 4 years ago

You can't load a picture out side of theme menu.

steve6375 commented 4 years ago

The example in your .zip file had wrong theme .txt files!

I have a /boot/grubfm/themes/slack folder (extracted from grubfm.iso) and I use this

export theme_std="(${user})/boot/grubfm/themes/slack/theme.txt";
export theme_fm="(${user})/boot/grubfm/themes/slack/fm.txt";
export theme_open="(${user})/boot/grubfm/themes/slack/open.txt";
export theme_info="(${user})/boot/grubfm/themes/slack/info.txt";
export theme_help="(${user})/boot/grubfm/themes/slack/help.txt";

#current theme
export theme=$theme_std

but icons not working ???

image

Am I doing something wrong?

steve6375 commented 4 years ago

OK - my fault! I had modified theme incorrectly. Sorry for false alarm!

a1ive commented 4 years ago

The example in your .zip file had wrong theme .txt files!

???

深度录屏_选择区域_20200219200455

steve6375 commented 4 years ago

sorry, I thought it had to use the same theme.txt file.

One last query I am using

#Remove standard agFM theme
unset theme_std;
unset theme_fm;
unset theme_open;
unset theme_info;
unset theme_help;
#comment out this section if you want to keep the agFM themed menu system
unset theme
set resolution (1024x768 recommended)
set gfxmode=1024x768
#menu colours - format: text/background  (black background=transparent)
#black,blue,brown,cyan,dark-gray,green,light-cyan,light-blue,light-green,light-gray,light-magenta,light-red,magenta,red,white,yellow
set menu_color_highlight=yellow/black
set menu_color_normal=light-green/black
set color_normal=light-gray/black
#add either your background image or a fill colour - use stretch or normal - .png, .tga, .jpg, or .jpeg
background_image -m stretch (${user})/boot/grubfm/seven.jpg
#valid fill_colors: black,blue,brown,cyan,green,gray,magenta,red,white,yellow

But I am getting the hotkey info list under the menu image

Can I stop the hotkey menu from appearing?

a1ive commented 4 years ago

No.

steve6375 commented 4 years ago

OK. Thanks for the changes.