diff options
| author | Bora Gülerman <49169566+eratoriele@users.noreply.github.com> | 2026-02-19 13:26:10 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-19 21:26:10 +1100 |
| commit | 40a255283083301b9503e1cbb9f0ea7db83e069a (patch) | |
| tree | b98f42e7dd34fffb87fb6f81c82fc93b091163b5 /modules/drawers | |
| parent | [CI] chore: update flake (diff) | |
| download | caelestia-shell-40a255283083301b9503e1cbb9f0ea7db83e069a.tar.gz caelestia-shell-40a255283083301b9503e1cbb9f0ea7db83e069a.tar.bz2 caelestia-shell-40a255283083301b9503e1cbb9f0ea7db83e069a.zip | |
launcher: add favorite apps (#946)
* launcher: add favorite apps
Favorite apps always appear above non-favorite apps
Accepts regex, same logic as #920
Added the same regex logic to hidden apps
Added util file may need to be relocated
* addressed requested changes
* fix: Renamed newly added util singleton
Also added a null check to favorite icon loader in AppItem.qml
* controlCenter/launcherPane: added favorite apps
added icons to the app list to indicate if they are favorited/hidden
marking as favorite/hidden is desabled if the other is selected
* favouriteApps: renamed from favorite to favourite
Also disabled favorite/hidden switch for entries added as regex
* appDb: added notify and emit to favoriteApps
* controlCentre/Launcher: Fixed bug with favourite switch not enabling itself when no hiddenApps exist
Added a comment to explain the enabled state of the switches
icon loader is now a single loader rather than two, hidden icon has
priority
* spelling mistakes
* fixed warning
* formatting fixes
Diffstat (limited to 'modules/drawers')
| -rw-r--r-- | modules/drawers/Drawers.qml | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/modules/drawers/Drawers.qml b/modules/drawers/Drawers.qml index 00f9596..93534ec 100644 --- a/modules/drawers/Drawers.qml +++ b/modules/drawers/Drawers.qml @@ -4,6 +4,7 @@ import qs.components import qs.components.containers import qs.services import qs.config +import qs.utils import qs.modules.bar import Quickshell import Quickshell.Wayland @@ -18,20 +19,7 @@ Variants { id: scope required property ShellScreen modelData - readonly property bool barDisabled: { - const regexChecker = /^\^.*\$$/; - for (const filter of Config.bar.excludedScreens) { - // If filter is a regex - if (regexChecker.test(filter)) { - if ((new RegExp(filter)).test(modelData.name)) - return true; - } else { - if (filter === modelData.name) - return true; - } - } - return false; - } + readonly property bool barDisabled: Strings.testRegexList(Config.bar.excludedScreens, modelData.name) Exclusions { screen: scope.modelData |