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 .. ")";
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to