Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Feb 2018 04:07:17 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r329427 - head/stand/lua
Message-ID:  <201802170407.w1H47HMQ042963@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Sat Feb 17 04:07:16 2018
New Revision: 329427
URL: https://svnweb.freebsd.org/changeset/base/329427

Log:
  stand/lua: Color non-default kernels blue

Modified:
  head/stand/lua/menu.lua

Modified: head/stand/lua/menu.lua
==============================================================================
--- head/stand/lua/menu.lua	Sat Feb 17 03:39:55 2018	(r329426)
+++ head/stand/lua/menu.lua	Sat Feb 17 04:07:16 2018	(r329427)
@@ -204,11 +204,17 @@ menu.welcome = {
 				return "Kernel: ";
 			end
 
-			local kernel_name = color.escapef(color.GREEN) ..
-			    choice .. color.default();
-			if (idx == 1) then
-				kernel_name = "default/" .. kernel_name;
+			local is_default = (idx == 1);
+			local kernel_name = "";
+			local name_color;
+			if is_default then
+				name_color = color.escapef(color.GREEN);
+				kernel_name = "default/";
+			else
+				name_color = color.escapef(color.BLUE);
 			end
+			kernel_name = kernel_name .. name_color .. choice ..
+			    color.default();
 			return color.highlight("K").."ernel: " .. kernel_name ..
 			    " (" .. idx ..
 			    " of " .. #all_choices .. ")";



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802170407.w1H47HMQ042963>