예제 #1
0
파일: core.py 프로젝트: hualet/grub2-module
def reset_all_setttings():
    set_setting_item("GRUB_TIMEOUT", "10")
    remove_item("GRUB_GFXMODE")
    remove_item("GRUB_MENU_PICTURE")
    remove_item("GRUB_COLOR_HIGHLIGHT")
    remove_item("GRUB_COLOR_NORMAL")
    remove_item("GRUB_FONT")
예제 #2
0
파일: core.py 프로젝트: hualet/grub2-module
def set_item_color(color_fg, color_bg, is_highlight_item=False):
    '''
    Set the color of grub items
    '''
    if is_highlight_item:
        set_setting_item("GRUB_COLOR_HIGHLIGHT", "%s/%s" % (color_fg, color_bg))
    else:
        set_setting_item("GRUB_COLOR_NORMAL", "%s/%s" % (color_fg, color_bg))
예제 #3
0
파일: core.py 프로젝트: hualet/grub2-module
def set_font(font_size, font_file):
    run_command("sudo grub-mkfont -s %s -o /boot/grub/unicode.pf2 %s" % (font_size, font_file))
    set_setting_item("GRUB_FONT", "/boot/grub/unicode.pf2")
예제 #4
0
파일: core.py 프로젝트: hualet/grub2-module
def set_background_image(valid_img_file):
    """
    Set grub background
    """
    set_setting_item("GRUB_MENU_PICTURE", valid_img_file)
예제 #5
0
파일: core.py 프로젝트: hualet/grub2-module
def set_resolution(resolution):
    '''
    Set resolution.
    '''
    set_setting_item("GRUB_GFXMODE", resolution)
예제 #6
0
파일: core.py 프로젝트: hualet/grub2-module
def set_default_delay(delay_time):
    set_setting_item("GRUB_TIMEOUT", delay_time)