NickelMenu config changes
All checks were successful
Build and test project / build-and-test (push) Successful in 1m32s
All checks were successful
Build and test project / build-and-test (push) Successful in 1m32s
This commit is contained in:
@@ -1,18 +1,5 @@
|
||||
# Menu button customization (uncommented by "Hide certain navigation tabs" option)
|
||||
#experimental :menu_main_15505_0_enabled: 1
|
||||
#experimental :menu_main_15505_1_label: Books
|
||||
#experimental :menu_main_15505_2_enabled: 1
|
||||
#experimental :menu_main_15505_2_label: Stats
|
||||
#experimental :menu_main_15505_3_enabled: 0
|
||||
#experimental :menu_main_15505_3_label: Notes
|
||||
#experimental :menu_main_15505_4_enabled: 0
|
||||
#experimental :menu_main_15505_5_enabled: 1
|
||||
#experimental :menu_main_15505_default: 1
|
||||
#experimental :menu_main_15505_enabled: 1
|
||||
|
||||
# The main NickelMenu item is now called Tweak
|
||||
#experimental :menu_main_15505_label :Tweak
|
||||
#experimental :menu_main_15505_icon :/mnt/onboard/.adds/nm/.cog.png
|
||||
experimental :menu_main_15505_label :Tweak
|
||||
experimental :menu_main_15505_icon :/mnt/onboard/.adds/nm/.cog.png
|
||||
|
||||
menu_item :main :Screensaver :cmd_output :500 :quiet :test -e /mnt/onboard/.disabled/screensaver
|
||||
chain_failure : skip : 3
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
const TAB_CONFIG = [
|
||||
'experimental :menu_main_15505_0_enabled: 1',
|
||||
'experimental :menu_main_15505_1_label: Books',
|
||||
'experimental :menu_main_15505_2_enabled: 1',
|
||||
'experimental :menu_main_15505_2_label: Stats',
|
||||
'experimental :menu_main_15505_3_enabled: 0',
|
||||
'experimental :menu_main_15505_3_label: Notes',
|
||||
'experimental :menu_main_15505_4_enabled: 0',
|
||||
'experimental :menu_main_15505_5_enabled: 1',
|
||||
'experimental :menu_main_15505_default: 1',
|
||||
'experimental :menu_main_15505_enabled: 1',
|
||||
].join('\n');
|
||||
|
||||
export default {
|
||||
id: 'simplify-tabs',
|
||||
title: 'Hide certain navigation tabs',
|
||||
@@ -8,13 +21,7 @@ export default {
|
||||
const items = files.find(f => f.path === '.adds/nm/items');
|
||||
if (!items || typeof items.data !== 'string') return files;
|
||||
|
||||
// Uncomment the experimental tab-customization lines
|
||||
items.data = items.data.split('\n').map(line => {
|
||||
if (line.startsWith('#experimental ')) {
|
||||
return line.slice(1); // remove leading #
|
||||
}
|
||||
return line;
|
||||
}).join('\n');
|
||||
items.data = TAB_CONFIG + '\n\n' + items.data;
|
||||
|
||||
return files;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user