Here's an expanded version of Post # 2, with a circular timer added. The additional entries are listed in bold.
The screenshot actually includes 3 different images - take your pick (just remove the other two sections in the theme) and adjust the "left" and "top" variables to place it where you wish it to appear.
To add the center image:
Add a center image to the theme folder (/boot/grub/themes/ubuntu).
The three examples I copied from Ubuntu system folders are
- /usr/share/app-install/icons/xfce4-clock.png
- /usr/share/app-install/icons/alarm-clock.png
- /usr/share/app-install/icons/gworldclock.png
Add a tick image.
I extracted the tick.png image from the Grub 2 Theming Guide's demo folder.
The number of 'ticks' is set by the "tick_num" setting. In this example, the number was 10, several of which have already disappeared as the timer counted down.
Geometry:
- Placement is set by the variables in the "+ circular progress" section.
- The center image will be the size of the icon. Adjust the icon image with an image editor such as GIMP if you wish to change the center image size.
- The ticks will be displaced around a circle whose diameter is set by the pixel distance designated in the "width" line.
- While the examples all have the tick marks outside the center image, you can set the 'width' smaller and have the tick marks actually appear inside the clock face with some experimentation. See the far right clock image.
- The distance from the left border is set by the "left" variable. It can be designated by pixels, percentage, or both.
- The distance from the top is set by the "top" variable (% or pixels from the top of the screen).
[^]The "'start angle = -56" sets the first tick to disappear as the one at approximately 1 o'clock.
In posting this theme, I've used 'code' tags rather than 'quote' tags to save space.
Code:
# GRUB2 gfxmenu Ubuntu Demo theme
# The Definitive Guide to Theming GRUB2,
# using the ubuntu1 demo theme from http://www.gibibit.com
# Designed for 640x480 resolution
# Global Property
title-text: "GRUB 1.99RC Oneiric 11"
title-font: "Unknown Bold 16"
title-color: "green"
message-font: "Unknown Regular 16"
message-color: "white"
message-bg-color: "black"
desktop-image: "/boot/grub/themes/ubuntu/drs305.png" # overrides any other background image setting
desktop-color: "#000000" # desktop-color only used if desktop-image is not found
# Show the boot menu
+ boot_menu {
left = 10%
top = 15%
width = 85%
height = 55%
item_font = "Unknown Regular 16"
item_color = "lightgrey"
selected_item_color = "yellow"
item_height = 20
item_padding = 10
item_spacing = 10
item_icon_space = 20
icon_width = 20
icon_height = 20
icon_spacing = 10
}
# Show a circular progress bar
+ circular_progress {
id = "__timeout__"
left = 10%
top = 80%
width = 50
height = 50
num_ticks = 10
start_angle = -56
ticks_disappear = true
# /usr/share/app-install/icons/xfce4-clock.png /usr/share/app-install/icons/alarm-clock.png
center_bitmap = "xfce4-clock.png"
tick_bitmap = "tick.png"
}
# Show a circular progress bar
+ circular_progress {
id = "__timeout__"
left = 40%
top = 80%
width = 70
height = 50
num_ticks = 10
start_angle = -56
ticks_disappear = true
center_bitmap = "alarm-clock.png"
tick_bitmap = "tick.png"
}
# Show a circular progress bar
+ circular_progress {
id = "__timeout__"
left = 70%
top = 80%
width = 55 # Reduced so ticks are within the clock face
height = 70
num_ticks = 11
start_angle = -56
ticks_disappear = true
# /usr/share/app-install/icons/xfce4-clock.png /usr/share/app-install/icons/alarm-clock.png
center_bitmap = "gworldclock-lg.png" # Modified image (enlarged)
tick_bitmap = "tick-sm-blk.png" # Modified image (black and reduced size)
}
Bookmarks