mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-13 01:02:18 -04:00
@@ -268,7 +268,7 @@ func buildOnce(opts *Options) error {
|
|||||||
refreshQt6ct()
|
refreshQt6ct()
|
||||||
}
|
}
|
||||||
|
|
||||||
signalTerminals()
|
signalTerminals(opts)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@@ -692,11 +692,15 @@ func refreshQt6ct() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func signalTerminals() {
|
func signalTerminals(opts *Options) {
|
||||||
signalByName("kitty", syscall.SIGUSR1)
|
if !opts.ShouldSkipTemplate("kitty") && appExists(opts.AppChecker, []string{"kitty"}, nil) {
|
||||||
signalByName("ghostty", syscall.SIGUSR2)
|
signalByName("kitty", syscall.SIGUSR1)
|
||||||
signalByName(".kitty-wrapped", syscall.SIGUSR1)
|
signalByName(".kitty-wrapped", syscall.SIGUSR1)
|
||||||
signalByName(".ghostty-wrappe", syscall.SIGUSR2)
|
}
|
||||||
|
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) {
|
func signalByName(name string, sig syscall.Signal) {
|
||||||
|
|||||||
@@ -136,6 +136,19 @@ BasePill {
|
|||||||
}
|
}
|
||||||
readonly property int windowCount: _groupByApp ? (groupedWindows?.length || 0) : (sortedToplevels?.length || 0)
|
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 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
|
visible: windowCount > 0
|
||||||
|
|
||||||
property real scrollAccumulator: 0
|
property real scrollAccumulator: 0
|
||||||
@@ -227,21 +240,7 @@ BasePill {
|
|||||||
property bool isGrouped: root._groupByApp
|
property bool isGrouped: root._groupByApp
|
||||||
property var groupData: isGrouped ? modelData : null
|
property var groupData: isGrouped ? modelData : null
|
||||||
property var toplevelData: isGrouped ? (modelData.windows.length > 0 ? modelData.windows[0].toplevel : null) : modelData
|
property var toplevelData: isGrouped ? (modelData.windows.length > 0 ? modelData.windows[0].toplevel : null) : modelData
|
||||||
property bool isFocused: {
|
property bool isFocused: isGrouped ? (root.focusedAppId === appId) : (toplevelData ? toplevelData.activated : false)
|
||||||
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 string appId: isGrouped ? modelData.appId : (modelData.appId || "")
|
property string appId: isGrouped ? modelData.appId : (modelData.appId || "")
|
||||||
property string windowTitle: toplevelData ? (toplevelData.title || "(Unnamed)") : "(Unnamed)"
|
property string windowTitle: toplevelData ? (toplevelData.title || "(Unnamed)") : "(Unnamed)"
|
||||||
property var toplevelObject: toplevelData
|
property var toplevelObject: toplevelData
|
||||||
@@ -496,21 +495,7 @@ BasePill {
|
|||||||
property bool isGrouped: root._groupByApp
|
property bool isGrouped: root._groupByApp
|
||||||
property var groupData: isGrouped ? modelData : null
|
property var groupData: isGrouped ? modelData : null
|
||||||
property var toplevelData: isGrouped ? (modelData.windows.length > 0 ? modelData.windows[0].toplevel : null) : modelData
|
property var toplevelData: isGrouped ? (modelData.windows.length > 0 ? modelData.windows[0].toplevel : null) : modelData
|
||||||
property bool isFocused: {
|
property bool isFocused: isGrouped ? (root.focusedAppId === appId) : (toplevelData ? toplevelData.activated : false)
|
||||||
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 string appId: isGrouped ? modelData.appId : (modelData.appId || "")
|
property string appId: isGrouped ? modelData.appId : (modelData.appId || "")
|
||||||
property string windowTitle: toplevelData ? (toplevelData.title || "(Unnamed)") : "(Unnamed)"
|
property string windowTitle: toplevelData ? (toplevelData.title || "(Unnamed)") : "(Unnamed)"
|
||||||
property var toplevelObject: toplevelData
|
property var toplevelObject: toplevelData
|
||||||
|
|||||||
Reference in New Issue
Block a user