add More button for network config on sidebar

This commit is contained in:
end-4
2024-06-19 21:06:03 +07:00
parent f4b223879a
commit 18dcdfaa49
3 changed files with 16 additions and 4 deletions
@@ -34,7 +34,7 @@ let configOptions = {
'bluetooth': "blueberry", 'bluetooth': "blueberry",
'imageViewer': "loupe", 'imageViewer': "loupe",
'network': "XDG_CURRENT_DESKTOP=\"gnome\" gnome-control-center wifi", 'network': "XDG_CURRENT_DESKTOP=\"gnome\" gnome-control-center wifi",
'settings': "XDG_CURRENT_DESKTOP=\"gnome\" gnome-control-center wifi", 'settings': "XDG_CURRENT_DESKTOP=\"gnome\" gnome-control-center",
'taskManager': "gnome-usage", 'taskManager': "gnome-usage",
'terminal': "foot", // This is only for shell actions 'terminal': "foot", // This is only for shell actions
}, },
@@ -135,7 +135,7 @@ export default (props) => {
hpack: 'center', hpack: 'center',
className: 'txt-small txt sidebar-centermodules-bottombar-button', className: 'txt-small txt sidebar-centermodules-bottombar-button',
onClicked: () => { onClicked: () => {
execAsync(userOptions.apps.bluetooth).catch(print); execAsync(['bash', '-c', userOptions.apps.bluetooth]).catch(print);
closeEverything(); closeEverything();
}, },
label: 'More', label: 'More',
@@ -185,6 +185,19 @@ export default (props) => {
}) })
}) })
] ]
});
const bottomBar = Box({
homogeneous: true,
children: [Button({
hpack: 'center',
className: 'txt-small txt sidebar-centermodules-bottombar-button',
onClicked: () => {
execAsync(['bash', '-c', userOptions.apps.network]).catch(print);
closeEverything();
},
label: 'More',
setup: setupCursorHover,
})],
}) })
return Box({ return Box({
...props, ...props,
@@ -193,8 +206,7 @@ export default (props) => {
children: [ children: [
CurrentNetwork(), CurrentNetwork(),
networkList, networkList,
// mainContent, bottomBar,
// status,
] ]
}); });
} }