1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

Compare commits

...

4 Commits

Author SHA1 Message Date
bbedward
bb2234d328 cc: dont show preference flip if not on ethernet and wifi 2026-01-10 10:35:48 -05:00
bbedward
edbdeb0fb8 widgets: add artix and void NF mappings 2026-01-10 10:18:09 -05:00
Kostiantyn To
19541fc573 update-service: add Artix Linux to supported distributions list (#1318) 2026-01-10 10:18:00 -05:00
bbedward
7c936cacfb niri: fix effectiveScreenAssignment in modal 2026-01-10 10:13:41 -05:00
7 changed files with 40 additions and 32 deletions

View File

@@ -13,17 +13,16 @@ Singleton {
property var currentModalsByScreen: ({}) property var currentModalsByScreen: ({})
function openModal(modal) { function openModal(modal) {
if (!modal.allowStacking) {
closeAllModalsExcept(modal);
}
if (!modal.keepPopoutsOpen) {
PopoutManager.closeAllPopouts();
}
TrayMenuManager.closeAllMenus();
const screenName = modal.effectiveScreen?.name ?? "unknown"; const screenName = modal.effectiveScreen?.name ?? "unknown";
currentModalsByScreen[screenName] = modal; currentModalsByScreen[screenName] = modal;
modalChanged(); modalChanged();
Qt.callLater(() => {
if (!modal.allowStacking)
closeAllModalsExcept(modal);
if (!modal.keepPopoutsOpen)
PopoutManager.closeAllPopouts();
TrayMenuManager.closeAllMenus();
});
} }
function closeModal(modal) { function closeModal(modal) {

View File

@@ -58,7 +58,6 @@ Item {
property bool animationsEnabled: true property bool animationsEnabled: true
function open() { function open() {
ModalManager.openModal(root);
closeTimer.stop(); closeTimer.stop();
const focusedScreen = CompositorService.getFocusedScreen(); const focusedScreen = CompositorService.getFocusedScreen();
if (focusedScreen) { if (focusedScreen) {
@@ -66,6 +65,7 @@ Item {
if (!useSingleWindow) if (!useSingleWindow)
clickCatcher.screen = focusedScreen; clickCatcher.screen = focusedScreen;
} }
ModalManager.openModal(root);
shouldBeVisible = true; shouldBeVisible = true;
if (!useSingleWindow) if (!useSingleWindow)
clickCatcher.visible = true; clickCatcher.visible = true;
@@ -302,7 +302,7 @@ Item {
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
enabled: root.useSingleWindow enabled: root.useSingleWindow && root.shouldBeVisible
hoverEnabled: false hoverEnabled: false
acceptedButtons: Qt.AllButtons acceptedButtons: Qt.AllButtons
onPressed: mouse.accepted = true onPressed: mouse.accepted = true

View File

@@ -38,11 +38,10 @@ DankModal {
isClosing = false; isClosing = false;
resetContent(); resetContent();
spotlightOpen = true; spotlightOpen = true;
if (spotlightContent?.appLauncher)
spotlightContent.appLauncher.ensureInitialized();
open(); open();
Qt.callLater(() => { Qt.callLater(() => {
if (spotlightContent?.appLauncher)
spotlightContent.appLauncher.ensureInitialized();
if (spotlightContent?.searchField) if (spotlightContent?.searchField)
spotlightContent.searchField.forceActiveFocus(); spotlightContent.searchField.forceActiveFocus();
}); });
@@ -53,15 +52,14 @@ DankModal {
isClosing = false; isClosing = false;
resetContent(); resetContent();
spotlightOpen = true; spotlightOpen = true;
if (spotlightContent?.appLauncher) {
spotlightContent.appLauncher.ensureInitialized();
spotlightContent.appLauncher.searchQuery = query;
}
if (spotlightContent?.searchField) if (spotlightContent?.searchField)
spotlightContent.searchField.text = query; spotlightContent.searchField.text = query;
open(); open();
Qt.callLater(() => { Qt.callLater(() => {
if (spotlightContent?.appLauncher) {
spotlightContent.appLauncher.ensureInitialized();
spotlightContent.appLauncher.searchQuery = query;
}
if (spotlightContent?.searchField) if (spotlightContent?.searchField)
spotlightContent.searchField.forceActiveFocus(); spotlightContent.searchField.forceActiveFocus();
}); });

View File

@@ -37,6 +37,10 @@ Rectangle {
NetworkService.removeRef(); NetworkService.removeRef();
} }
property bool hasEthernetAvailable: (NetworkService.ethernetDevices?.length ?? 0) > 0
property bool hasWifiAvailable: (NetworkService.wifiDevices?.length ?? 0) > 0
property bool hasBothConnectionTypes: hasEthernetAvailable && hasWifiAvailable
property int currentPreferenceIndex: { property int currentPreferenceIndex: {
if (DMSService.apiVersion < 5) { if (DMSService.apiVersion < 5) {
return 1; return 1;
@@ -46,19 +50,24 @@ Rectangle {
return 1; return 1;
} }
const pref = NetworkService.userPreference; if (!hasEthernetAvailable) {
const status = NetworkService.networkStatus; return 1;
let index = 1;
if (pref === "ethernet") {
index = 0;
} else if (pref === "wifi") {
index = 1;
} else {
index = status === "ethernet" ? 0 : 1;
} }
return index; if (!hasWifiAvailable) {
return 0;
}
const pref = NetworkService.userPreference;
const status = NetworkService.networkStatus;
if (pref === "ethernet") {
return 0;
}
if (pref === "wifi") {
return 1;
}
return status === "ethernet" ? 0 : 1;
} }
Row { Row {
@@ -117,7 +126,7 @@ Rectangle {
DankButtonGroup { DankButtonGroup {
id: preferenceControls id: preferenceControls
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
visible: NetworkService.backend === "networkmanager" && DMSService.apiVersion > 10 visible: hasBothConnectionTypes && NetworkService.backend === "networkmanager" && DMSService.apiVersion > 10
buttonHeight: 28 buttonHeight: 28
textSize: Theme.fontSizeSmall textSize: Theme.fontSizeSmall

View File

@@ -14,7 +14,7 @@ Scope {
property bool isClosing: false property bool isClosing: false
property bool releaseKeyboard: false property bool releaseKeyboard: false
readonly property bool spotlightModalOpen: PopoutService.spotlightModal?.spotlightOpen ?? false readonly property bool spotlightModalOpen: PopoutService.spotlightModal?.spotlightOpen ?? false
property bool overlayActive: (NiriService.inOverview && !spotlightModalOpen) || searchActive property bool overlayActive: NiriService.inOverview || searchActive
function showSpotlight(screenName) { function showSpotlight(screenName) {
isClosing = false; isClosing = false;

View File

@@ -96,7 +96,7 @@ Singleton {
"paru": archBasedPMSettings, "paru": archBasedPMSettings,
"dnf": fedoraBasedPMSettings "dnf": fedoraBasedPMSettings
} }
readonly property list<string> supportedDistributions: ["arch", "cachyos", "manjaro", "endeavouros", "fedora"] readonly property list<string> supportedDistributions: ["arch", "artix", "cachyos", "manjaro", "endeavouros", "fedora"]
readonly property int updateCount: availableUpdates.length readonly property int updateCount: availableUpdates.length
readonly property bool helperAvailable: pkgManager !== "" && distributionSupported readonly property bool helperAvailable: pkgManager !== "" && distributionSupported

View File

@@ -26,6 +26,8 @@ Item {
"endeavouros": "\u{f322}", "endeavouros": "\u{f322}",
"manjaro": "\u{f160a}", "manjaro": "\u{f160a}",
"opensuse": "\u{f314}", "opensuse": "\u{f314}",
"artix": "\u{f31f}",
"void": "\u{f32e}",
// --- special types --- // --- special types ---
"folder": "\u{F024B}", "folder": "\u{F024B}",