Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update theme.txt #2466

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Update theme.txt #2466

wants to merge 6 commits into from

Conversation

1457384613gh
Copy link

以背景图片的原始比例显示背景图片。

以背景图片的原始比例显示背景图片。
@Tnctr-altay-24
Copy link

以背景图片的原始比例显背景图 fotoğrafları.

  • boot_menu
    How to apply in

@1457384613gh
Copy link
Author

Set resolution max.

@Tnctr-altay-24
Copy link

1024768
19201080

@1457384613gh
Copy link
Author

1457384613gh commented Jul 5, 2023

Another solution, (need a background.png of 16:9)
https://github.com/M-L-P/theme-ventoy/blob/main/ventoy/themes/ventoy/theme.txt

💻️Preview👀

1024x768

1k

1920x1080

1080p
1080p-tree

@Tnctr-altay-24
Copy link

Your theme configuration is very nice. Thank you for the information.

@1457384613gh
Copy link
Author

  • boot_menu

Around yours,
Adjust again to accommodate maximum resolution
width = xxx
height = yyy

@Tnctr-altay-24
Copy link

  • boot_menu {
    left = 20%
    width = 60%
    top = 20%
    height = 55%

The setting is nice according to 1024x768 resolution, 1920x1080 as in the second picture

@Tnctr-altay-24
Copy link

hello @1457384613gh master; I apologize for not sending a notification to the appropriate place.
I'm following your projects, please I need your help on something, can you help me?
Since my computer is limited, I do not have the opportunity to recompile the vento. Could you please make the following changes and compile the vento and send it to me? Thank you in advance and I wish you success in your work.

https://github.com/ventoy/Ventoy/blob/c8dc36a5c3bb042d92a04304caaa7fa7249d9d2e/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_browser.c#L370C9-L384C10

    {
        grub_snprintf(node->menuentry, sizeof(node->menuentry),
            "menuentry \"%-10s [%s]\" --class=vtoydir {\n"
            "  set browser_dir=0x%lx \n"
            "  vt_browser_dir %s ${browser_dir} \"%s/%s\"\n"
            "}\n",
            "DIR", filename, (ulong)g_menu_fs, g_menu_device, g_menu_path_buf, filename);
    }
    else
    {
        grub_snprintf(node->menuentry, sizeof(node->menuentry),
            "menuentry \"[%s]\" --class=vtoydir {\n"
            "  set browser_dir=0x%lx \n"
            "  vt_browser_dir %s ${browser_dir} \"%s/%s\"\n"
            "}\n",
            filename, (ulong)g_menu_fs, g_menu_device, g_menu_path_buf, filename);
    }

@1457384613gh
Copy link
Author

1457384613gh commented Sep 4, 2023

You can make a fork, and then click "actions".

And I don't know what you want me test.

@Tnctr-altay-24
Copy link

Tnctr-altay-24 commented Sep 4, 2023

You can make a fork, and then click "actions".

And I don't know what you want me test.

I made the necessary adjustments in ventoy grub.cfg, only ventoy vt_browser.c needs to be changed and ventoy needs to be recreated. I logged in via tlf.

I opened a discussion here, please take a look.
https://forums.ventoy.net/showthread.php?tid=2604

@1457384613gh
Copy link
Author

1457384613gh commented Sep 4, 2023

I have read something on forums, but I have still not understood, yet.

I just see DIR deleted.

Would you like filename to be the title of menuentry?

@Tnctr-altay-24
Copy link

Tnctr-altay-24 commented Sep 4, 2023

Can you apply the code I gave above to the vt_browser.c file and prepare a cli version?

I made a short video, could you watch it?
https://disk.yandex.com.tr/i/cWzwLX-O24yJ7A

@1457384613gh
Copy link
Author

Oh my god, you are a genius.
Tell me how to make it snow.
Can I try your fm?
And I will give what you need tomorrow, because it is midnight where I am now.

@Tnctr-altay-24
Copy link

Tnctr-altay-24 commented Sep 4, 2023

Thank you my friend. Here it shows 19:30 in the evening. I hope to see you tomorrow. I wish you a good night.

@1457384613gh
Copy link
Author

I hope to see you tomorrow.

Then you can download it by yourself.
https://github.com/1457384613gh/Ventoy/actions/runs/6078716761

@Tnctr-altay-24
Copy link

I hope to see you tomorrow.

Then you can download it by yourself. https://github.com/1457384613gh/Ventoy/actions/runs/6078716761

Thank you very much my friend, I tested the new build, but the command vt_browser_dir hd0.5 ${browser_dir} / did not work, so it does not get the value 0x%lx=${browser_dir} I guess is there something we missed in the command, do you have any ideas?

@1457384613gh
Copy link
Author

1457384613gh commented Sep 5, 2023

I have still not understood your purpose, yet, namely, what you want to achieve.

What is your goal?

@1457384613gh
Copy link
Author

vt_browser_dir hd0.5 ${browser_dir} /

vt_browser_dir (hd0,5) $

@Tnctr-altay-24
Copy link

In Ventoy, we can see the disk partitions with the F2 key, or when we press the e key on any partition, we see a command like vt_browser_dir hd0,1 0x012345678 / I bought this command line, I want to use it in another configuration (.cfg) file. It varies in each partition structure up to disk. so, is it possible to give a name to the 0x%lx value and get our command by typing it like this?
set browser_dir=0x%lx
vt_browser_dir hd0,gpt5 ${browser_dir} /

@Tnctr-altay-24
Copy link

I tried to explain with a picture, I hope I could express what I want to do. I'm sorry if it's causing errors as I'm using translation.

(https://github.com/ventoy/Ventoy/assets/72962883/cb9e5a5e-7f4b-4c13-840b-a88fc4e3cc59)

@1457384613gh
Copy link
Author

1457384613gh commented Sep 5, 2023

Is it as if we pin a folder to startup menu?

@1457384613gh
Copy link
Author

1457384613gh commented Sep 5, 2023

"/" is not DIR there;
"/" is as a DISK.

Line 194~208

    if (ventoy_get_fs_type(fs->name) >= ventoy_fs_max)
    {
        browser_ssprintf(mbuf, "menuentry \"%s\" --class=vtoydisk {\n"
            "   echo \"unsupported file system type!\" \n"
            "   ventoy_pause\n"
            "}\n",
            title);
    }
    else
    {
        browser_ssprintf(mbuf, "menuentry \"%s\" --class=vtoydisk {\n"
            "  vt_browser_dir %s,%d 0x%lx /\n"
            "}\n",
            title, disk->name, partition->number + 1, (ulong)fs);
    }

@Tnctr-altay-24
Copy link

When added to line 208, F2 browser causes disk corruption, I leave the F2 key working normally, I write the following line to grub.cfg, source ${prefix}/main.cfg in main.cfg
vt_browser_dir (hd0,gpt5) 0x12345678 / When I log in to gpt5 with this command, everything works perfectly, but when I insert my memory into a different pc, 0x12345678 value is different, so it does not log into any part of the hdd. so name 0x%lx with a name and eg. I want to run it by typing vt_browser_dir (hd0,gpt*) $browser_dir / .

@1457384613gh
Copy link
Author

You should use regular expressions.
Screenshot_2023-09-05-17-32-22-291_com.android.browser.jpg

@Tnctr-altay-24
Copy link

set browser_dir-> ?
%s->g_menu_device
0x%lx->(ulong)g_menu_fs
%s/%s->g_menu_path_buf

Is the match correct?

@1457384613gh
Copy link
Author

I am not the machine, so I don't know.
You should try and test.

@Tnctr-altay-24
Copy link

when i solve this problem i will send the project to you for testing.

@1457384613gh
Copy link
Author

when i solve this problem i will send the project to you for testing.

Thank you.
May I know how to snow before you will have finished it?

@Tnctr-altay-24
Copy link

when i solve this problem i will send the project to you for testing.

Thank you. May I know how to snow before you will have finished it?

@a1ive master's Grub2Fm also has this feature. It is made using image files that you will obtain from a gif file. First, type the following command in grub2 fm's
init.sh
export grub_frame_speed=110;
Also, in the theme/slack folder, it is sufficient to write the following expressions in the fm.txt file according to your own filenames.

  • animation {
    dir_name = Turkish
    image_format = jpg
    size_ratio = 1
    frame_number = 35
    left = 0%
    width = 100%
    top = 0%
    height = 100%
    }

@1457384613gh
Copy link
Author

How to draw so much snow?

@Tnctr-altay-24
Copy link

Get a gif file and there are online sites for converting from gif to jpeg or png you can get it from there

@Tnctr-altay-24
Copy link

You can make a fork, and then click "actions".

And I don't know what you want me test.

Hello my friend; Could you please guide me with a short video footage of forking from ventoy then modifying the files and creating a cli version from the first step to the last step? Can I get results with trial and error tests in my spare time? Actually two lines of help for dear @longPanda would be greatly appreciated. I hope he responds positively to my message.

@1457384613gh
Copy link
Author

Touch it a few times and you'll learn.

@Tnctr-altay-24
Copy link

thank you very much my friend :)
https://github.com/Tnctr-altay-24/Ventoy

@Tnctr-altay-24
Copy link

How to draw so much snow?

did you make your animated theme?

@1457384613gh
Copy link
Author

1457384613gh commented Sep 12, 2023

did you make your animated theme?

No.

The resolution of pictures probably mis-match the display scale.

There is no animation-scale-method: "crop".

@Tnctr-altay-24
Copy link

did you make your animated theme?

No.

The resolution of pictures probably mis-match the display scale.

There is no animation-scale-method: "crop".

Global Property

desktop-image: "background.png"
desktop-image-h-align: "center"
desktop-color: "#000000"
title-text: ""
title-color: "#000000"
message-color: "#333333"
message-bg-color: "#f2f2f2"
terminal-box: "terminal_*.png"

Show the boot menu

  • boot_menu {
    left = 15%
    width = 70%
    top = 15%
    height = 70%
    item_color = "#f5f5f5"
    selected_item_color = "#f5f5f5"
    item_height = 38
    item_padding = 15
    item_spacing = 5
    icon_width = 32
    icon_height = 32
    item_icon_space = 20
    selected_item_pixmap_style= "select_bkg_.png"
    menu_pixmap_style = "menu_bkg_
    .png"
    scrollbar = true
    scrollbar_width = 16
    scrollbar_thumb = "sb_thumb_.png"
    scrollbar_frame = "sb_frame_
    .png"
    }

  • hbox {
    top = 100%-55
    left = 36%
    width = 27%

    • vbox {
      • label {text = "[F1]" color = "#ffffff"}
      • image {file = "dock/hwinfo.png"}
        }
    • image {file = "dock/space.png"}
    • vbox {
      • label {text = "[F2]" color = "#ffffff"}
      • image {file = "dock/fm.png"}
        }
    • image {file = "dock/space.png"}
    • vbox {
      • label {text = "[F3]" color = "#ffffff"}
      • image {file = "dock/boot.png"}
        }
    • image {file = "dock/space.png"}
    • vbox {
      • label {text = "[F4]" color = "#ffffff"}
      • image {file = "dock/settings.png"}
        }
    • image {file = "dock/space.png"}
    • vbox {
      • label {text = "[F5]" color = "#ffffff"}
      • image {file = "dock/util.png"}
        }
    • image {file = "dock/space.png"}
    • vbox {
      • label {text = "[F6]" color = "#ffffff"}
      • image {file = "dock/logout.png"}
        }
        }
  • hbox {
    top = 100%-21
    left = 0%

    • image {file = "dock/search.png"}
    • label {text = "[Ctrl+F]" color = "#ffffff"}
      }
  • animation {
    dir_name = Türk #Write the name of the folder where your animation files are located.
    image_format = jpg
    size_ratio = 1
    frame_number = 35 #It refers to the number of image files in your folder.
    left = 0%
    width = 100%
    top = 0%
    height = 100%
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants