Venom1991 / refind-btrfs

Generate rEFInd manual boot stanzas from Btrfs snapshots
GNU General Public License v3.0
144 stars 8 forks source link

Specify icon file for the generated snapshot stanzas? #11

Closed Barbaross93 closed 2 years ago

Barbaross93 commented 3 years ago

I was wondering if its possible to specify a unique icon for the generated snapshot stanza? I use a minimalist refind theme (https://github.com/andersfischernielsen/rEFInd-minimal-black) and unfortunately having both the main boot option and the snapshot option look the exact same can be a bit confusing. Alternatively, can I set the manual stanza to disabled but the generated won't be disabled? Sorry if this is pointed out in the README, I might've missed it.

Barbaross93 commented 3 years ago

Indeed, I did miss it. It was right at the bottom. I guess my thoughts are that while it would be cool to add the btrfs logo onto the manual stanza's specified logo, I would be content with being able to specify any other icon in the icon directory. For example, I'm happy with using the linux logo as it clearly differentiates from the arch logo.

For now, any suggestions to work around this? My guess is that there's an option to display text when highlighting a selection, just not sure which it is

EDIT: Looks like removing labels from the hideui option works. Not ideal, but it'll have to do for now.

Venom1991 commented 3 years ago

The theme itself appears to have quite a few UI element hiding options.
For now I believe that adding a new option in the refind-btrfs.conf should suffice. This option would let one define an alternative icon's path (relative to rEFInd's directory). Of course, care would have to be taken regarding its format, dimensions and so on but that is outside the scope of this tool, imho. I can easily validate the provided path but that's about it.

Venom1991 commented 3 years ago

Alternatively, can I set the manual stanza to disabled but the generated won't be disabled? Sorry if this is pointed out in the README, I might've missed it.

Disabled boot stanzas are completely ignored by this tool so that isn't an option.

rizzini commented 2 years ago

+1 vote for this. It would be awesome if we could specify the icon path inside ESP partition at /etc/refind-btrfs.conf or something like that.

Venom1991 commented 2 years ago

Yeah, I find it annoying, as well. I'll try to implement something in the coming weeks. My idea is to incorporate the Btrfs logo into the original stanza's icon. I've been granted permission to use it by the author himself.

rogueai commented 2 years ago

I was actually able to work around this problem by having a separate refind.conf, with just a single stanza in it to be used by refind-btrfs for parsing.

Basically my layout is:

This is of course a workaround, and there are a few caveats:

Hope this helps!

Venom1991 commented 2 years ago

Nice one - now that's a really creative approach!

Be sure to check for a new release because custom icon definition and/or generation (for generated boot stanzas) is something I'm working on, currently. It's going to be an entirely optional feature so you can continue utilizing your workaround, if you so desire.

rizzini commented 2 years ago

I was actually able to work around this problem by having a separate refind.conf, with just a single stanza in it to be used by refind-btrfs for parsing.

Basically my layout is:

  • /efi/refind.conf: here I have no stanzas enabled, as I'm relying on refind_linux.conf discovery instead of manual stanzas. You can still have a manual stanza though if you're using it.
  • /efi/refind-btrfs.conf: this contains a copy of the stanza you might have in refind.conf, you can change the icon and of course it won't affect the original refind.conf
  • /etc/refind-btrfs.conf will point to the new /efi/refind-btrfs.conf

This is of course a workaround, and there are a few caveats:

  • if, unlike me, you're using a manual stanza in refind.conf, you need to remember to port any changes to the copied config
  • the include path generated in the copied conf need to be manually added to the original refind.conf. This is generally something you do once, but if you're changing the default folder /efi/btrfs-snapshot-stanzas/ to something else, you need to include it manually again.

Hope this helps!

Amazing. Nice catch!

Be sure to check for a new release because custom icon definition and/or generation (for generated boot stanzas) is something I'm working on, currently.

Definitely. I'm looking forward to it.

Venom1991 commented 2 years ago

Implemented as part of the 0.4.1 release.