forked from Shinonome/dots-hyprland
tab switching keybind for keybinds cheatsheet
This commit is contained in:
@@ -88,12 +88,13 @@ const SheetContent = (id) => {
|
||||
}
|
||||
|
||||
export default (id) => {
|
||||
const sheets = SheetContent(id);
|
||||
const widgetContent = Widget.Box({
|
||||
vertical: true,
|
||||
className: "cheatsheet-bg spacing-v-5",
|
||||
children: [
|
||||
CheatsheetHeader(),
|
||||
SheetContent(id),
|
||||
sheets,
|
||||
]
|
||||
});
|
||||
return PopupWindow({
|
||||
@@ -121,6 +122,16 @@ export default (id) => {
|
||||
sheetContents[id].nextTab();
|
||||
else if (checkKeybind(event, userOptions.keybinds.cheatsheet.prevTab))
|
||||
sheetContents[id].prevTab();
|
||||
if (sheets.attribute.names[sheets.attribute.shown.value] == 'Keybinds') { // If Keybinds tab is focused
|
||||
if (checkKeybind(event, userOptions.keybinds.cheatsheet.keybinds.nextTab)) {
|
||||
const toSwitchTab = sheets.attribute.children[sheets.attribute.shown.value];
|
||||
toSwitchTab.nextTab();
|
||||
}
|
||||
else if (checkKeybind(event, userOptions.keybinds.cheatsheet.keybinds.prevTab)) {
|
||||
const toSwitchTab = sheets.attribute.children[sheets.attribute.shown.value];
|
||||
toSwitchTab.prevTab();
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
});
|
||||
|
||||
@@ -108,11 +108,11 @@ export default () => Box({
|
||||
// Switch API type
|
||||
else if (checkKeybind(event, userOptions.keybinds.sidebar.apis.nextTab)) {
|
||||
const toSwitchTab = widgetContent.attribute.children[widgetContent.attribute.shown.value];
|
||||
toSwitchTab.attribute.nextTab();
|
||||
toSwitchTab.nextTab();
|
||||
}
|
||||
else if (checkKeybind(event, userOptions.keybinds.sidebar.apis.prevTab)) {
|
||||
const toSwitchTab = widgetContent.attribute.children[widgetContent.attribute.shown.value];
|
||||
toSwitchTab.attribute.prevTab();
|
||||
toSwitchTab.prevTab();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user