mirror of https://github.com/fairyglade/ly.git
Option to hide version string
This commit is contained in:
parent
a8b8292318
commit
3504180e95
|
@ -128,6 +128,9 @@ fg = 0x00FFFFFF
|
|||
# Remove main box borders
|
||||
hide_borders = false
|
||||
|
||||
# Remove version number from the top left corner
|
||||
hide_version_string = false
|
||||
|
||||
# Remove power management command hints
|
||||
hide_key_hints = false
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ error_bg: u32 = 0x00000000,
|
|||
error_fg: u32 = 0x01FF0000,
|
||||
fg: u32 = 0x00FFFFFF,
|
||||
hide_borders: bool = false,
|
||||
hide_version_string: bool = false,
|
||||
hide_key_hints: bool = false,
|
||||
initial_info_text: ?[]const u8 = null,
|
||||
input_len: u8 = 34,
|
||||
|
|
|
@ -422,9 +422,14 @@ pub fn main() !void {
|
|||
if (auth_fails < config.auth_fails) {
|
||||
_ = termbox.tb_clear();
|
||||
|
||||
var length: usize = 0;
|
||||
|
||||
if (!animation_timed_out) animation.draw();
|
||||
|
||||
buffer.drawLabel(ly_top_str, 0, 0);
|
||||
if (!config.hide_version_string) {
|
||||
buffer.drawLabel(ly_top_str, 0, 0);
|
||||
length += ly_top_str.len + 1;
|
||||
}
|
||||
|
||||
if (config.bigclock != .none and buffer.box_height + (bigclock.HEIGHT + 2) * 2 < buffer.height) draw_big_clock: {
|
||||
const format = "%H:%M";
|
||||
|
@ -485,8 +490,6 @@ pub fn main() !void {
|
|||
info_line.label.draw();
|
||||
|
||||
if (!config.hide_key_hints) {
|
||||
var length: usize = ly_top_str.len + 1;
|
||||
|
||||
buffer.drawLabel(config.shutdown_key, length, 0);
|
||||
length += config.shutdown_key.len + 1;
|
||||
buffer.drawLabel(" ", length - 1, 0);
|
||||
|
|
Loading…
Reference in New Issue