menu.lua (e15abd1f164933eae0c5ddcc6cfebe5fbff1a85c) menu.lua (b57465454b35f6e24a6df02a93a27d0136c016d9)
1--
2-- Copyright (c) 2015 Pedro Souza <pedrosouza@freebsd.org>
3-- Copyright (C) 2018 Kyle Evans <kevans@FreeBSD.org>
4-- All rights reserved.
5--
6-- Redistribution and use in source and binary forms, with or without
7-- modification, are permitted provided that the following conditions
8-- are met:

--- 37 unchanged lines hidden (view full) ---

46 return str .. color.escapef(color.GREEN) .. "On" ..
47 color.escapef(color.WHITE);
48 else
49 return str .. color.escapef(color.RED) .. "off" ..
50 color.escapef(color.WHITE);
51 end
52end
53
1--
2-- Copyright (c) 2015 Pedro Souza <pedrosouza@freebsd.org>
3-- Copyright (C) 2018 Kyle Evans <kevans@FreeBSD.org>
4-- All rights reserved.
5--
6-- Redistribution and use in source and binary forms, with or without
7-- modification, are permitted provided that the following conditions
8-- are met:

--- 37 unchanged lines hidden (view full) ---

46 return str .. color.escapef(color.GREEN) .. "On" ..
47 color.escapef(color.WHITE);
48 else
49 return str .. color.escapef(color.RED) .. "off" ..
50 color.escapef(color.WHITE);
51 end
52end
53
54
54-- Module exports
55menu.handlers = {
56 -- Menu handlers take the current menu and selected entry as parameters,
57 -- and should return a boolean indicating whether execution should
58 -- continue or not. The return value may be omitted if this entry should
59 -- have no bearing on whether we continue or not, indicating that we
60 -- should just continue after execution.
61 [core.MENU_ENTRY] = function(current_menu, entry)
62 -- run function

--- 412 unchanged lines hidden ---
55menu.handlers = {
56 -- Menu handlers take the current menu and selected entry as parameters,
57 -- and should return a boolean indicating whether execution should
58 -- continue or not. The return value may be omitted if this entry should
59 -- have no bearing on whether we continue or not, indicating that we
60 -- should just continue after execution.
61 [core.MENU_ENTRY] = function(current_menu, entry)
62 -- run function

--- 412 unchanged lines hidden ---