1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-03 20:32:07 -04:00

matugen: dont signal terminals when disabled

fixes #1658
This commit is contained in:
bbedward
2026-02-12 16:57:21 -05:00
parent da14d75a3b
commit a77c1adb32
2 changed files with 25 additions and 36 deletions

View File

@@ -268,7 +268,7 @@ func buildOnce(opts *Options) error {
refreshQt6ct()
}
signalTerminals()
signalTerminals(opts)
return nil
}
@@ -692,11 +692,15 @@ func refreshQt6ct() {
}
}
func signalTerminals() {
signalByName("kitty", syscall.SIGUSR1)
signalByName("ghostty", syscall.SIGUSR2)
signalByName(".kitty-wrapped", syscall.SIGUSR1)
signalByName(".ghostty-wrappe", syscall.SIGUSR2)
func signalTerminals(opts *Options) {
if !opts.ShouldSkipTemplate("kitty") && appExists(opts.AppChecker, []string{"kitty"}, nil) {
signalByName("kitty", syscall.SIGUSR1)
signalByName(".kitty-wrapped", syscall.SIGUSR1)
}
if !opts.ShouldSkipTemplate("ghostty") && appExists(opts.AppChecker, []string{"ghostty"}, nil) {
signalByName("ghostty", syscall.SIGUSR2)
signalByName(".ghostty-wrappe", syscall.SIGUSR2)
}
}
func signalByName(name string, sig syscall.Signal) {

View File

@@ -136,6 +136,19 @@ BasePill {
}
readonly property int windowCount: _groupByApp ? (groupedWindows?.length || 0) : (sortedToplevels?.length || 0)
readonly property real iconCellSize: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) + 6
readonly property string focusedAppId: {
const toplevels = CompositorService.sortedToplevels;
if (!toplevels)
return "";
let result = "";
for (let i = 0; i < toplevels.length; i++) {
if (toplevels[i].activated)
result = toplevels[i].appId || "";
}
return result;
}
visible: windowCount > 0
property real scrollAccumulator: 0
@@ -227,21 +240,7 @@ BasePill {
property bool isGrouped: root._groupByApp
property var groupData: isGrouped ? modelData : null
property var toplevelData: isGrouped ? (modelData.windows.length > 0 ? modelData.windows[0].toplevel : null) : modelData
property bool isFocused: {
if (!isGrouped)
return toplevelData ? toplevelData.activated : false;
const toplevels = CompositorService.sortedToplevels;
if (!toplevels)
return false;
let result = false;
for (let i = 0; i < toplevels.length; i++) {
if ((toplevels[i].appId || "") !== appId)
continue;
if (toplevels[i].activated)
result = true;
}
return result;
}
property bool isFocused: isGrouped ? (root.focusedAppId === appId) : (toplevelData ? toplevelData.activated : false)
property string appId: isGrouped ? modelData.appId : (modelData.appId || "")
property string windowTitle: toplevelData ? (toplevelData.title || "(Unnamed)") : "(Unnamed)"
property var toplevelObject: toplevelData
@@ -496,21 +495,7 @@ BasePill {
property bool isGrouped: root._groupByApp
property var groupData: isGrouped ? modelData : null
property var toplevelData: isGrouped ? (modelData.windows.length > 0 ? modelData.windows[0].toplevel : null) : modelData
property bool isFocused: {
if (!isGrouped)
return toplevelData ? toplevelData.activated : false;
const toplevels = CompositorService.sortedToplevels;
if (!toplevels)
return false;
let result = false;
for (let i = 0; i < toplevels.length; i++) {
if ((toplevels[i].appId || "") !== appId)
continue;
if (toplevels[i].activated)
result = true;
}
return result;
}
property bool isFocused: isGrouped ? (root.focusedAppId === appId) : (toplevelData ? toplevelData.activated : false)
property string appId: isGrouped ? modelData.appId : (modelData.appId || "")
property string windowTitle: toplevelData ? (toplevelData.title || "(Unnamed)") : "(Unnamed)"
property var toplevelObject: toplevelData