allow sidebar pinning

This commit is contained in:
end-4
2023-12-27 00:26:48 +07:00
parent c11f0e6a2b
commit 81bf723d12
12 changed files with 491 additions and 376 deletions
+1 -4
View File
@@ -71,11 +71,8 @@ const CalendarWidget = () => {
child.destroy();
}
box.children = calendarJson.map((row, i) => Widget.Box({
// homogeneous: true,
className: 'spacing-h-5',
children: row.map((day, i) =>
CalendarDay(day.day, day.today)
)
children: row.map((day, i) => CalendarDay(day.day, day.today)),
}))
}
function shiftCalendarXMonths(x) {
@@ -29,14 +29,12 @@ export const ToggleIconWifi = (props = {}) => Widget.Button({
export const ToggleIconBluetooth = (props = {}) => Widget.Button({
className: 'txt-small sidebar-iconbutton',
tooltipText: 'Bluetooth | Right-click to configure',
onClicked: () => { // Provided service doesn't work hmmm
onClicked: () => {
const status = Bluetooth?.enabled;
if (status) {
if (status)
exec('rfkill block bluetooth');
}
else {
else
exec('rfkill unblock bluetooth');
}
},
onSecondaryClickRelease: () => {
execAsync(['bash', '-c', 'blueberry &']);
@@ -81,6 +81,7 @@ const togglesBox = Widget.Box({
export default () => Box({
vexpand: true,
hexpand: true,
css: 'min-width: 2px;',
children: [
EventBox({
onPrimaryClick: () => App.closeWindow('sideright'),