mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-08 04:09:15 -04:00
refactor(Spotlight): Use Spotlight alongside OG Launcher
- Update to add DMS Action keys in Keyboard Shortcuts - Defaulted in niri/hyprland includes file as `Alt+Space` - New (IPC): `dms ipc call spotlight-bar toggle` - Slight UI update to follow user radius
This commit is contained in:
@@ -34,6 +34,8 @@ Singleton {
|
||||
property var clipboardHistoryModal: null
|
||||
property var dankLauncherV2Modal: null
|
||||
property var dankLauncherV2ModalLoader: null
|
||||
property var spotlightBarModal: null
|
||||
property var spotlightBarModalLoader: null
|
||||
property var powerMenuModal: null
|
||||
property var processListModal: null
|
||||
property var processListModalLoader: null
|
||||
@@ -616,6 +618,45 @@ Singleton {
|
||||
}
|
||||
}
|
||||
|
||||
property bool _spotlightBarWantsOpen: false
|
||||
property bool _spotlightBarWantsToggle: false
|
||||
|
||||
function openSpotlightBar() {
|
||||
if (spotlightBarModal) {
|
||||
spotlightBarModal.show();
|
||||
} else if (spotlightBarModalLoader) {
|
||||
_spotlightBarWantsOpen = true;
|
||||
_spotlightBarWantsToggle = false;
|
||||
spotlightBarModalLoader.active = true;
|
||||
}
|
||||
}
|
||||
|
||||
function closeSpotlightBar() {
|
||||
spotlightBarModal?.hide();
|
||||
}
|
||||
|
||||
function toggleSpotlightBar() {
|
||||
if (spotlightBarModal) {
|
||||
spotlightBarModal.toggle();
|
||||
} else if (spotlightBarModalLoader) {
|
||||
_spotlightBarWantsToggle = true;
|
||||
_spotlightBarWantsOpen = false;
|
||||
spotlightBarModalLoader.active = true;
|
||||
}
|
||||
}
|
||||
|
||||
function _onSpotlightBarModalLoaded() {
|
||||
if (_spotlightBarWantsOpen) {
|
||||
_spotlightBarWantsOpen = false;
|
||||
spotlightBarModal?.show();
|
||||
return;
|
||||
}
|
||||
if (_spotlightBarWantsToggle) {
|
||||
_spotlightBarWantsToggle = false;
|
||||
spotlightBarModal?.toggle();
|
||||
}
|
||||
}
|
||||
|
||||
function openPowerMenu() {
|
||||
powerMenuModal?.openCentered();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user