mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-25 14:02:53 -05:00
* ci: change to prek for pre-commit * refactor: fix shellcheck warnings for the scripts * chore: unify whitespace formatting * nix: add prek to dev shell
26 lines
601 B
JavaScript
26 lines
601 B
JavaScript
function setTriggerPosition(root, x, y, width, section, screen) {
|
|
root.triggerX = x
|
|
root.triggerY = y
|
|
root.triggerWidth = width
|
|
root.triggerSection = section
|
|
root.triggerScreen = screen
|
|
}
|
|
|
|
function openWithSection(root, section) {
|
|
if (root.shouldBeVisible) {
|
|
root.close()
|
|
} else {
|
|
root.expandedSection = section
|
|
root.open()
|
|
}
|
|
}
|
|
|
|
function toggleSection(root, section) {
|
|
if (root.expandedSection === section) {
|
|
root.expandedSection = ""
|
|
root.expandedWidgetIndex = -1
|
|
} else {
|
|
root.expandedSection = section
|
|
}
|
|
}
|