1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-05-15 00:32:47 -04:00

Compare commits

...

8 Commits

Author SHA1 Message Date
LuckShiba 17ec547737 core: remove unused function 2026-01-15 19:40:14 -03:00
LuckShiba f9a2ed025f doctor: show docs URL for failed checks 2026-01-15 19:24:57 -03:00
LuckShiba f8cfbdcd90 doctor: use dbus for checking on services 2026-01-15 19:15:06 -03:00
Ivan Molodetskikh 623eec3689 Add screencast indicator for niri (#1361)
* niri: Handle new Cast events

* bar: Add screen sharing indicator

Configurable like other icons; on by default.

* lockscreen: Add screen sharing indicator
2026-01-15 00:55:21 -05:00
bbedward 53a033fe35 dankdash: fix weather open IPC
fixes #1367
2026-01-14 22:29:29 -05:00
bbedward c490ee24f4 matugen: fix nvim ID in skipTemplates 2026-01-14 22:27:07 -05:00
bbedward cc1e49294e i18n: update terms 2026-01-14 22:22:27 -05:00
purian23 e6fa46ae26 dankdash: Center Media Art & Controls 2026-01-14 18:03:16 -05:00
19 changed files with 1241 additions and 1152 deletions
+54 -57
View File
@@ -477,7 +477,7 @@ func checkWindowManagers() []checkResult {
results = append(results, checkResult{ results = append(results, checkResult{
catCompositor, c.name, statusOK, catCompositor, c.name, statusOK,
getVersionFromCommand(c.versionCmd, c.versionArg, c.versionRegex), details, getVersionFromCommand(c.versionCmd, c.versionArg, c.versionRegex), details,
doctorDocsURL + "#compositor", doctorDocsURL + "#compositor-checks",
}) })
} }
@@ -486,7 +486,7 @@ func checkWindowManagers() []checkResult {
catCompositor, "Compositor", statusError, catCompositor, "Compositor", statusError,
"No supported Wayland compositor found", "No supported Wayland compositor found",
"Install Hyprland, niri, Sway, River, or Wayfire", "Install Hyprland, niri, Sway, River, or Wayfire",
doctorDocsURL + "#compositor", doctorDocsURL + "#compositor-checks",
}) })
} }
@@ -634,19 +634,14 @@ func checkI2CAvailability() checkResult {
return checkResult{catOptionalFeatures, "I2C/DDC", statusOK, fmt.Sprintf("%d monitor(s) detected", len(devices)), "External monitor brightness control", doctorDocsURL + "#optional-features"} return checkResult{catOptionalFeatures, "I2C/DDC", statusOK, fmt.Sprintf("%d monitor(s) detected", len(devices)), "External monitor brightness control", doctorDocsURL + "#optional-features"}
} }
func detectNetworkBackend() string { func detectNetworkBackend(stackResult *network.DetectResult) string {
result, err := network.DetectNetworkStack() switch stackResult.Backend {
if err != nil {
return ""
}
switch result.Backend {
case network.BackendNetworkManager: case network.BackendNetworkManager:
return "NetworkManager" return "NetworkManager"
case network.BackendIwd: case network.BackendIwd:
return "iwd" return "iwd"
case network.BackendNetworkd: case network.BackendNetworkd:
if result.HasIwd { if stackResult.HasIwd {
return "iwd + systemd-networkd" return "iwd + systemd-networkd"
} }
return "systemd-networkd" return "systemd-networkd"
@@ -657,75 +652,73 @@ func detectNetworkBackend() string {
} }
} }
func getOptionalDBusStatus(busName string) (status, string) {
if utils.IsDBusServiceAvailable(busName) {
return statusOK, "Available"
} else {
return statusWarn, "Not available"
}
}
func checkOptionalDependencies() []checkResult { func checkOptionalDependencies() []checkResult {
var results []checkResult var results []checkResult
if utils.IsServiceActive("accounts-daemon", false) { optionalFeaturesURL := doctorDocsURL + "#optional-features"
results = append(results, checkResult{catOptionalFeatures, "accountsservice", statusOK, "Running", "User accounts", doctorDocsURL + "#optional-features"})
} else {
results = append(results, checkResult{catOptionalFeatures, "accountsservice", statusWarn, "Not running", "User accounts", doctorDocsURL + "#optional-features"})
}
if utils.IsServiceActive("power-profiles-daemon", false) { accountsStatus, accountsMsg := getOptionalDBusStatus("org.freedesktop.Accounts")
results = append(results, checkResult{catOptionalFeatures, "power-profiles-daemon", statusOK, "Running", "Power profile management", doctorDocsURL + "#optional-features"}) results = append(results, checkResult{catOptionalFeatures, "accountsservice", accountsStatus, accountsMsg, "User accounts", optionalFeaturesURL})
} else {
results = append(results, checkResult{catOptionalFeatures, "power-profiles-daemon", statusInfo, "Not running", "Power profile management", doctorDocsURL + "#optional-features"}) ppdStatus, ppdMsg := getOptionalDBusStatus("org.freedesktop.UPower.PowerProfiles")
} results = append(results, checkResult{catOptionalFeatures, "power-profiles-daemon", ppdStatus, ppdMsg, "Power profile management", optionalFeaturesURL})
logindStatus, logindMsg := getOptionalDBusStatus("org.freedesktop.login1")
results = append(results, checkResult{catOptionalFeatures, "logind", logindStatus, logindMsg, "Session management", optionalFeaturesURL})
results = append(results, checkI2CAvailability()) results = append(results, checkI2CAvailability())
terminals := []string{"ghostty", "kitty", "alacritty", "foot", "wezterm"} terminals := []string{"ghostty", "kitty", "alacritty", "foot", "wezterm"}
if idx := slices.IndexFunc(terminals, utils.CommandExists); idx >= 0 { if idx := slices.IndexFunc(terminals, utils.CommandExists); idx >= 0 {
results = append(results, checkResult{catOptionalFeatures, "Terminal", statusOK, terminals[idx], "", doctorDocsURL + "#optional-features"}) results = append(results, checkResult{catOptionalFeatures, "Terminal", statusOK, terminals[idx], "", optionalFeaturesURL})
} else { } else {
results = append(results, checkResult{catOptionalFeatures, "Terminal", statusWarn, "None found", "Install ghostty, kitty, or alacritty", doctorDocsURL + "#optional-features"}) results = append(results, checkResult{catOptionalFeatures, "Terminal", statusWarn, "None found", "Install ghostty, kitty, or alacritty", optionalFeaturesURL})
} }
networkResult, err := network.DetectNetworkStack()
networkStatus, networkMessage, networkDetails := statusOK, "Not available", "Network management"
if err == nil && networkResult.Backend != network.BackendNone {
networkMessage = detectNetworkBackend(networkResult)
if doctorVerbose {
networkDetails = networkResult.ChosenReason
}
} else {
networkStatus = statusInfo
}
results = append(results, checkResult{catOptionalFeatures, "Network", networkStatus, networkMessage, networkDetails, optionalFeaturesURL})
deps := []struct { deps := []struct {
name, cmd, altCmd, desc string name, cmd, desc string
important bool important bool
}{ }{
{"matugen", "matugen", "", "Dynamic theming", true}, {"matugen", "matugen", "Dynamic theming", true},
{"dgop", "dgop", "", "System monitoring", true}, {"dgop", "dgop", "System monitoring", true},
{"cava", "cava", "", "Audio visualizer", true}, {"cava", "cava", "Audio visualizer", true},
{"khal", "khal", "", "Calendar events", false}, {"khal", "khal", "Calendar events", false},
{"Network", "nmcli", "iwctl", "Network management", false}, {"danksearch", "dsearch", "File search", false},
{"danksearch", "dsearch", "", "File search", false}, {"fprintd", "fprintd-list", "Fingerprint auth", false},
{"loginctl", "loginctl", "", "Session management", false},
{"fprintd", "fprintd-list", "", "Fingerprint auth", false},
} }
for _, d := range deps { for _, d := range deps {
found, foundCmd := utils.CommandExists(d.cmd), d.cmd found := utils.CommandExists(d.cmd)
if !found && d.altCmd != "" && utils.CommandExists(d.altCmd) {
found, foundCmd = true, d.altCmd
}
switch { switch {
case found: case found:
message := "Installed" results = append(results, checkResult{catOptionalFeatures, d.name, statusOK, "Installed", d.desc, optionalFeaturesURL})
details := d.desc
if d.name == "Network" {
result, err := network.DetectNetworkStack()
if err == nil && result.Backend != network.BackendNone {
message = detectNetworkBackend() + " (active)"
if doctorVerbose {
details = result.ChosenReason
}
} else {
switch foundCmd {
case "nmcli":
message = "NetworkManager (installed)"
case "iwctl":
message = "iwd (installed)"
}
}
}
results = append(results, checkResult{catOptionalFeatures, d.name, statusOK, message, details, doctorDocsURL + "#optional-features"})
case d.important: case d.important:
results = append(results, checkResult{catOptionalFeatures, d.name, statusWarn, "Missing", d.desc, doctorDocsURL + "#optional-features"}) results = append(results, checkResult{catOptionalFeatures, d.name, statusWarn, "Missing", d.desc, optionalFeaturesURL})
default: default:
results = append(results, checkResult{catOptionalFeatures, d.name, statusInfo, "Not installed", d.desc, doctorDocsURL + "#optional-features"}) results = append(results, checkResult{catOptionalFeatures, d.name, statusInfo, "Not installed", d.desc, optionalFeaturesURL})
} }
} }
@@ -893,6 +886,10 @@ func printResultLine(r checkResult, styles tui.Styles) {
if doctorVerbose && r.details != "" { if doctorVerbose && r.details != "" {
fmt.Printf(" %s\n", styles.Subtle.Render("└─ "+r.details)) fmt.Printf(" %s\n", styles.Subtle.Render("└─ "+r.details))
} }
if (r.status == statusError || r.status == statusWarn) && r.url != "" {
fmt.Printf(" %s\n", styles.Subtle.Render("→ "+r.url))
}
} }
func printSummary(results []checkResult, qsMissingFeatures bool) { func printSummary(results []checkResult, qsMissingFeatures bool) {
+20
View File
@@ -0,0 +1,20 @@
package utils
import (
"github.com/godbus/dbus/v5"
)
func IsDBusServiceAvailable(busName string) bool {
conn, err := dbus.ConnectSystemBus()
if err != nil {
return false
}
defer conn.Close()
obj := conn.Object("org.freedesktop.DBus", "/org/freedesktop/DBus")
var owned bool
if err := obj.Call("org.freedesktop.DBus.NameHasOwner", 0, busName).Store(&owned); err != nil {
return false
}
return owned
}
-14
View File
@@ -2,7 +2,6 @@ package utils
import ( import (
"os/exec" "os/exec"
"strings"
) )
type AppChecker interface { type AppChecker interface {
@@ -43,16 +42,3 @@ func AnyCommandExists(cmds ...string) bool {
} }
return false return false
} }
func IsServiceActive(name string, userService bool) bool {
if !CommandExists("systemctl") {
return false
}
args := []string{"is-active", name}
if userService {
args = []string{"--user", "is-active", name}
}
output, _ := exec.Command("systemctl", args...).Output()
return strings.EqualFold(strings.TrimSpace(string(output)), "active")
}
+1
View File
@@ -145,6 +145,7 @@ Singleton {
property bool controlCenterShowMicPercent: true property bool controlCenterShowMicPercent: true
property bool controlCenterShowBatteryIcon: false property bool controlCenterShowBatteryIcon: false
property bool controlCenterShowPrinterIcon: false property bool controlCenterShowPrinterIcon: false
property bool controlCenterShowScreenSharingIcon: true
property bool showPrivacyButton: true property bool showPrivacyButton: true
property bool privacyShowMicIcon: false property bool privacyShowMicIcon: false
property bool privacyShowCameraIcon: false property bool privacyShowCameraIcon: false
+1 -1
View File
@@ -904,7 +904,7 @@ Singleton {
if (typeof SettingsData !== "undefined") { if (typeof SettingsData !== "undefined") {
const skipTemplates = []; const skipTemplates = [];
if (!SettingsData.runDmsMatugenTemplates) { if (!SettingsData.runDmsMatugenTemplates) {
skipTemplates.push("gtk", "neovim", "niri", "qt5ct", "qt6ct", "firefox", "pywalfox", "zenbrowser", "vesktop", "equibop", "ghostty", "kitty", "foot", "alacritty", "wezterm", "dgop", "kcolorscheme", "vscode"); skipTemplates.push("gtk", "nvim", "niri", "qt5ct", "qt6ct", "firefox", "pywalfox", "zenbrowser", "vesktop", "equibop", "ghostty", "kitty", "foot", "alacritty", "wezterm", "dgop", "kcolorscheme", "vscode");
} else { } else {
if (!SettingsData.matugenTemplateGtk) if (!SettingsData.matugenTemplateGtk)
skipTemplates.push("gtk"); skipTemplates.push("gtk");
+4 -1
View File
@@ -28,7 +28,8 @@ Singleton {
showMicIcon: false, showMicIcon: false,
showMicPercent: true, showMicPercent: true,
showBatteryIcon: false, showBatteryIcon: false,
showPrinterIcon: false showPrinterIcon: false,
showScreenSharingIcon: true
}; };
leftModel.append(dummy); leftModel.append(dummy);
centerModel.append(dummy); centerModel.append(dummy);
@@ -84,6 +85,8 @@ Singleton {
item.showBatteryIcon = order[i].showBatteryIcon; item.showBatteryIcon = order[i].showBatteryIcon;
if (isObj && order[i].showPrinterIcon !== undefined) if (isObj && order[i].showPrinterIcon !== undefined)
item.showPrinterIcon = order[i].showPrinterIcon; item.showPrinterIcon = order[i].showPrinterIcon;
if (isObj && order[i].showScreenSharingIcon !== undefined)
item.showScreenSharingIcon = order[i].showScreenSharingIcon;
model.append(item); model.append(item);
} }
@@ -70,6 +70,7 @@ var SPEC = {
controlCenterShowMicPercent: { def: false }, controlCenterShowMicPercent: { def: false },
controlCenterShowBatteryIcon: { def: false }, controlCenterShowBatteryIcon: { def: false },
controlCenterShowPrinterIcon: { def: false }, controlCenterShowPrinterIcon: { def: false },
controlCenterShowScreenSharingIcon: { def: true },
showPrivacyButton: { def: true }, showPrivacyButton: { def: true },
privacyShowMicIcon: { def: false }, privacyShowMicIcon: { def: false },
+4 -1
View File
@@ -132,8 +132,11 @@ Item {
case "media": case "media":
root.dankDashPopoutLoader.item.currentTabIndex = 1; root.dankDashPopoutLoader.item.currentTabIndex = 1;
break; break;
case "wallpaper":
root.dankDashPopoutLoader.item.currentTabIndex = 2;
break;
case "weather": case "weather":
root.dankDashPopoutLoader.item.currentTabIndex = SettingsData.weatherEnabled ? 2 : 0; root.dankDashPopoutLoader.item.currentTabIndex = SettingsData.weatherEnabled ? 3 : 0;
break; break;
default: default:
root.dankDashPopoutLoader.item.currentTabIndex = 0; root.dankDashPopoutLoader.item.currentTabIndex = 0;
@@ -24,6 +24,7 @@ BasePill {
property bool showMicPercent: widgetData?.showMicPercent !== undefined ? widgetData.showMicPercent : SettingsData.controlCenterShowMicPercent property bool showMicPercent: widgetData?.showMicPercent !== undefined ? widgetData.showMicPercent : SettingsData.controlCenterShowMicPercent
property bool showBatteryIcon: widgetData?.showBatteryIcon !== undefined ? widgetData.showBatteryIcon : SettingsData.controlCenterShowBatteryIcon property bool showBatteryIcon: widgetData?.showBatteryIcon !== undefined ? widgetData.showBatteryIcon : SettingsData.controlCenterShowBatteryIcon
property bool showPrinterIcon: widgetData?.showPrinterIcon !== undefined ? widgetData.showPrinterIcon : SettingsData.controlCenterShowPrinterIcon property bool showPrinterIcon: widgetData?.showPrinterIcon !== undefined ? widgetData.showPrinterIcon : SettingsData.controlCenterShowPrinterIcon
property bool showScreenSharingIcon: widgetData?.showScreenSharingIcon !== undefined ? widgetData.showScreenSharingIcon : SettingsData.controlCenterShowScreenSharingIcon
property real touchpadThreshold: 100 property real touchpadThreshold: 100
property real micAccumulator: 0 property real micAccumulator: 0
property real volumeAccumulator: 0 property real volumeAccumulator: 0
@@ -213,7 +214,7 @@ BasePill {
} }
function hasNoVisibleIcons() { function hasNoVisibleIcons() {
return !root.showNetworkIcon && !root.showBluetoothIcon && !root.showAudioIcon && !root.showVpnIcon && !root.showBrightnessIcon && !root.showMicIcon && !root.showBatteryIcon && !root.showPrinterIcon; return !root.showNetworkIcon && !root.showBluetoothIcon && !root.showAudioIcon && !root.showVpnIcon && !root.showBrightnessIcon && !root.showMicIcon && !root.showBatteryIcon && !root.showPrinterIcon && !root.showScreenSharingIcon;
} }
content: Component { content: Component {
@@ -227,6 +228,14 @@ BasePill {
anchors.centerIn: parent anchors.centerIn: parent
spacing: Theme.spacingXS spacing: Theme.spacingXS
DankIcon {
name: "screen_record"
size: Theme.barIconSize(root.barThickness, -4)
color: NiriService.hasActiveCast ? Theme.primary : Theme.surfaceText
anchors.horizontalCenter: parent.horizontalCenter
visible: root.showScreenSharingIcon && NiriService.hasCasts
}
DankIcon { DankIcon {
name: root.getNetworkIconName() name: root.getNetworkIconName()
size: Theme.barIconSize(root.barThickness, -4) size: Theme.barIconSize(root.barThickness, -4)
@@ -402,6 +411,14 @@ BasePill {
anchors.centerIn: parent anchors.centerIn: parent
spacing: Theme.spacingXS spacing: Theme.spacingXS
DankIcon {
name: "screen_record"
size: Theme.barIconSize(root.barThickness, -4)
color: NiriService.hasActiveCast ? Theme.primary : Theme.surfaceText
anchors.verticalCenter: parent.verticalCenter
visible: root.showScreenSharingIcon && NiriService.hasCasts
}
DankIcon { DankIcon {
id: networkIcon id: networkIcon
name: root.getNetworkIconName() name: root.getNetworkIconName()
@@ -327,11 +327,12 @@ Item {
clip: false clip: false
visible: !_noneAvailable && (!showNoPlayerNow) visible: !_noneAvailable && (!showNoPlayerNow)
ColumnLayout { ColumnLayout {
x: 72
y: 20
width: 484 width: 484
height: 370 height: 370
spacing: Theme.spacingXS spacing: Theme.spacingXS
anchors.top: parent.top
anchors.topMargin: 20
anchors.horizontalCenter: parent.horizontalCenter
Item { Item {
width: parent.width width: parent.width
@@ -1406,6 +1406,14 @@ Item {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
visible: NetworkService.networkAvailable || (BluetoothService.available && BluetoothService.enabled) || (AudioService.sink && AudioService.sink.audio) visible: NetworkService.networkAvailable || (BluetoothService.available && BluetoothService.enabled) || (AudioService.sink && AudioService.sink.audio)
DankIcon {
name: "screen_record"
size: Theme.iconSize - 2
color: NiriService.hasActiveCast ? "white" : Qt.rgba(255, 255, 255, 0.5)
anchors.verticalCenter: parent.verticalCenter
visible: NiriService.hasCasts
}
DankIcon { DankIcon {
name: { name: {
if (NetworkService.wifiToggling) if (NetworkService.wifiToggling)
+11 -1
View File
@@ -383,6 +383,7 @@ Item {
widgetObj.showMicPercent = SettingsData.controlCenterShowMicPercent; widgetObj.showMicPercent = SettingsData.controlCenterShowMicPercent;
widgetObj.showBatteryIcon = SettingsData.controlCenterShowBatteryIcon; widgetObj.showBatteryIcon = SettingsData.controlCenterShowBatteryIcon;
widgetObj.showPrinterIcon = SettingsData.controlCenterShowPrinterIcon; widgetObj.showPrinterIcon = SettingsData.controlCenterShowPrinterIcon;
widgetObj.showScreenSharingIcon = SettingsData.controlCenterShowScreenSharingIcon;
} }
if (widgetId === "diskUsage") if (widgetId === "diskUsage")
widgetObj.mountPath = "/"; widgetObj.mountPath = "/";
@@ -443,6 +444,7 @@ Item {
newWidget.showMicPercent = widget.showMicPercent ?? SettingsData.controlCenterShowMicPercent; newWidget.showMicPercent = widget.showMicPercent ?? SettingsData.controlCenterShowMicPercent;
newWidget.showBatteryIcon = widget.showBatteryIcon ?? SettingsData.controlCenterShowBatteryIcon; newWidget.showBatteryIcon = widget.showBatteryIcon ?? SettingsData.controlCenterShowBatteryIcon;
newWidget.showPrinterIcon = widget.showPrinterIcon ?? SettingsData.controlCenterShowPrinterIcon; newWidget.showPrinterIcon = widget.showPrinterIcon ?? SettingsData.controlCenterShowPrinterIcon;
newWidget.showScreenSharingIcon = widget.showScreenSharingIcon ?? SettingsData.controlCenterShowScreenSharingIcon;
} }
widgets[i] = newWidget; widgets[i] = newWidget;
break; break;
@@ -499,6 +501,7 @@ Item {
newWidget.showMicPercent = widget.showMicPercent ?? SettingsData.controlCenterShowMicPercent; newWidget.showMicPercent = widget.showMicPercent ?? SettingsData.controlCenterShowMicPercent;
newWidget.showBatteryIcon = widget.showBatteryIcon ?? SettingsData.controlCenterShowBatteryIcon; newWidget.showBatteryIcon = widget.showBatteryIcon ?? SettingsData.controlCenterShowBatteryIcon;
newWidget.showPrinterIcon = widget.showPrinterIcon ?? SettingsData.controlCenterShowPrinterIcon; newWidget.showPrinterIcon = widget.showPrinterIcon ?? SettingsData.controlCenterShowPrinterIcon;
newWidget.showScreenSharingIcon = widget.showScreenSharingIcon ?? SettingsData.controlCenterShowScreenSharingIcon;
} }
widgets[widgetIndex] = newWidget; widgets[widgetIndex] = newWidget;
setWidgetsForSection(sectionId, widgets); setWidgetsForSection(sectionId, widgets);
@@ -577,6 +580,7 @@ Item {
newWidget.showMicPercent = widget.showMicPercent ?? SettingsData.controlCenterShowMicPercent; newWidget.showMicPercent = widget.showMicPercent ?? SettingsData.controlCenterShowMicPercent;
newWidget.showBatteryIcon = widget.showBatteryIcon ?? SettingsData.controlCenterShowBatteryIcon; newWidget.showBatteryIcon = widget.showBatteryIcon ?? SettingsData.controlCenterShowBatteryIcon;
newWidget.showPrinterIcon = widget.showPrinterIcon ?? SettingsData.controlCenterShowPrinterIcon; newWidget.showPrinterIcon = widget.showPrinterIcon ?? SettingsData.controlCenterShowPrinterIcon;
newWidget.showScreenSharingIcon = widget.showScreenSharingIcon ?? SettingsData.controlCenterShowScreenSharingIcon;
} }
widgets[widgetIndex] = newWidget; widgets[widgetIndex] = newWidget;
setWidgetsForSection(sectionId, widgets); setWidgetsForSection(sectionId, widgets);
@@ -608,7 +612,8 @@ Item {
"showMicIcon": widget.showMicIcon ?? SettingsData.controlCenterShowMicIcon, "showMicIcon": widget.showMicIcon ?? SettingsData.controlCenterShowMicIcon,
"showMicPercent": widget.showMicPercent ?? SettingsData.controlCenterShowMicPercent, "showMicPercent": widget.showMicPercent ?? SettingsData.controlCenterShowMicPercent,
"showBatteryIcon": widget.showBatteryIcon ?? SettingsData.controlCenterShowBatteryIcon, "showBatteryIcon": widget.showBatteryIcon ?? SettingsData.controlCenterShowBatteryIcon,
"showPrinterIcon": widget.showPrinterIcon ?? SettingsData.controlCenterShowPrinterIcon "showPrinterIcon": widget.showPrinterIcon ?? SettingsData.controlCenterShowPrinterIcon,
"showScreenSharingIcon": widget.showScreenSharingIcon ?? SettingsData.controlCenterShowScreenSharingIcon
}; };
newWidget[settingName] = value; newWidget[settingName] = value;
@@ -675,6 +680,7 @@ Item {
newWidget.showMicPercent = widget.showMicPercent ?? SettingsData.controlCenterShowMicPercent; newWidget.showMicPercent = widget.showMicPercent ?? SettingsData.controlCenterShowMicPercent;
newWidget.showBatteryIcon = widget.showBatteryIcon ?? SettingsData.controlCenterShowBatteryIcon; newWidget.showBatteryIcon = widget.showBatteryIcon ?? SettingsData.controlCenterShowBatteryIcon;
newWidget.showPrinterIcon = widget.showPrinterIcon ?? SettingsData.controlCenterShowPrinterIcon; newWidget.showPrinterIcon = widget.showPrinterIcon ?? SettingsData.controlCenterShowPrinterIcon;
newWidget.showScreenSharingIcon = widget.showScreenSharingIcon ?? SettingsData.controlCenterShowScreenSharingIcon;
} }
widgets[widgetIndex] = newWidget; widgets[widgetIndex] = newWidget;
setWidgetsForSection(sectionId, widgets); setWidgetsForSection(sectionId, widgets);
@@ -735,6 +741,7 @@ Item {
newWidget.showMicPercent = widget.showMicPercent ?? SettingsData.controlCenterShowMicPercent; newWidget.showMicPercent = widget.showMicPercent ?? SettingsData.controlCenterShowMicPercent;
newWidget.showBatteryIcon = widget.showBatteryIcon ?? SettingsData.controlCenterShowBatteryIcon; newWidget.showBatteryIcon = widget.showBatteryIcon ?? SettingsData.controlCenterShowBatteryIcon;
newWidget.showPrinterIcon = widget.showPrinterIcon ?? SettingsData.controlCenterShowPrinterIcon; newWidget.showPrinterIcon = widget.showPrinterIcon ?? SettingsData.controlCenterShowPrinterIcon;
newWidget.showScreenSharingIcon = widget.showScreenSharingIcon ?? SettingsData.controlCenterShowScreenSharingIcon;
} }
widgets[widgetIndex] = newWidget; widgets[widgetIndex] = newWidget;
setWidgetsForSection(sectionId, widgets); setWidgetsForSection(sectionId, widgets);
@@ -795,6 +802,7 @@ Item {
newWidget.showMicPercent = widget.showMicPercent ?? SettingsData.controlCenterShowMicPercent; newWidget.showMicPercent = widget.showMicPercent ?? SettingsData.controlCenterShowMicPercent;
newWidget.showBatteryIcon = widget.showBatteryIcon ?? SettingsData.controlCenterShowBatteryIcon; newWidget.showBatteryIcon = widget.showBatteryIcon ?? SettingsData.controlCenterShowBatteryIcon;
newWidget.showPrinterIcon = widget.showPrinterIcon ?? SettingsData.controlCenterShowPrinterIcon; newWidget.showPrinterIcon = widget.showPrinterIcon ?? SettingsData.controlCenterShowPrinterIcon;
newWidget.showScreenSharingIcon = widget.showScreenSharingIcon ?? SettingsData.controlCenterShowScreenSharingIcon;
} }
widgets[i] = newWidget; widgets[i] = newWidget;
widget = newWidget; widget = newWidget;
@@ -867,6 +875,8 @@ Item {
item.showBatteryIcon = widget.showBatteryIcon; item.showBatteryIcon = widget.showBatteryIcon;
if (widget.showPrinterIcon !== undefined) if (widget.showPrinterIcon !== undefined)
item.showPrinterIcon = widget.showPrinterIcon; item.showPrinterIcon = widget.showPrinterIcon;
if (widget.showScreenSharingIcon !== undefined)
item.showScreenSharingIcon = widget.showScreenSharingIcon;
if (widget.minimumWidth !== undefined) if (widget.minimumWidth !== undefined)
item.minimumWidth = widget.minimumWidth; item.minimumWidth = widget.minimumWidth;
if (widget.showSwap !== undefined) if (widget.showSwap !== undefined)
@@ -875,6 +875,11 @@ Column {
icon: "print", icon: "print",
label: I18n.tr("Printer"), label: I18n.tr("Printer"),
setting: "showPrinterIcon" setting: "showPrinterIcon"
},
{
icon: "screen_record",
label: I18n.tr("Screen Sharing"),
setting: "showScreenSharingIcon"
} }
] ]
@@ -907,6 +912,8 @@ Column {
return wd?.showBatteryIcon ?? SettingsData.controlCenterShowBatteryIcon; return wd?.showBatteryIcon ?? SettingsData.controlCenterShowBatteryIcon;
case "showPrinterIcon": case "showPrinterIcon":
return wd?.showPrinterIcon ?? SettingsData.controlCenterShowPrinterIcon; return wd?.showPrinterIcon ?? SettingsData.controlCenterShowPrinterIcon;
case "showScreenSharingIcon":
return wd?.showScreenSharingIcon ?? SettingsData.controlCenterShowScreenSharingIcon;
default: default:
return false; return false;
} }
+35
View File
@@ -27,6 +27,10 @@ Singleton {
property bool inOverview: false property bool inOverview: false
property var casts: []
property bool hasCasts: casts.length > 0
property bool hasActiveCast: casts.some(c => c.is_active)
property int currentKeyboardLayoutIndex: 0 property int currentKeyboardLayoutIndex: 0
property var keyboardLayoutNames: [] property var keyboardLayoutNames: []
@@ -356,6 +360,15 @@ Singleton {
case 'ScreenshotCaptured': case 'ScreenshotCaptured':
handleScreenshotCaptured(event.ScreenshotCaptured); handleScreenshotCaptured(event.ScreenshotCaptured);
break; break;
case 'CastsChanged':
handleCastsChanged(event.CastsChanged);
break;
case 'CastStartedOrChanged':
handleCastStartedOrChanged(event.CastStartedOrChanged);
break;
case 'CastStopped':
handleCastStopped(event.CastStopped);
break;
} }
} }
@@ -649,6 +662,28 @@ Singleton {
} }
} }
function handleCastsChanged(data) {
casts = data.casts || [];
}
function handleCastStartedOrChanged(data) {
if (!data.cast)
return;
const cast = data.cast;
const existingIndex = casts.findIndex(c => c.stream_id === cast.stream_id);
if (existingIndex >= 0) {
const updatedCasts = [...casts];
updatedCasts[existingIndex] = cast;
casts = updatedCasts;
} else {
casts = [...casts, cast];
}
}
function handleCastStopped(data) {
casts = casts.filter(c => c.stream_id !== data.stream_id);
}
function updateCurrentOutputWorkspaces() { function updateCurrentOutputWorkspaces() {
if (!currentOutput) { if (!currentOutput) {
currentOutputWorkspaces = allWorkspaces; currentOutputWorkspaces = allWorkspaces;
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+16 -16
View File
@@ -240,7 +240,7 @@
"All displays": "Tutti gli schermi" "All displays": "Tutti gli schermi"
}, },
"Allow clicks to pass through the widget": { "Allow clicks to pass through the widget": {
"Allow clicks to pass through the widget": "" "Allow clicks to pass through the widget": "Consenti il passaggio dei clic attraverso il widget"
}, },
"Alt+←/Backspace: Back • F1/I: File Info • F10: Help • Esc: Close": { "Alt+←/Backspace: Back • F1/I: File Info • F10: Help • Esc: Close": {
"Alt+←/Backspace: Back • F1/I: File Info • F10: Help • Esc: Close": "Alt+←/Backspace: Indietro • F1/I: File Info • F10: Aiuto • Esc: Chiudi" "Alt+←/Backspace: Back • F1/I: File Info • F10: Help • Esc: Close": "Alt+←/Backspace: Indietro • F1/I: File Info • F10: Aiuto • Esc: Chiudi"
@@ -279,7 +279,7 @@
"Anonymous Identity (optional)": "Identità anonima (facoltativa)" "Anonymous Identity (optional)": "Identità anonima (facoltativa)"
}, },
"App ID Substitutions": { "App ID Substitutions": {
"App ID Substitutions": "" "App ID Substitutions": "Sostituzioni App ID"
}, },
"App Launcher": { "App Launcher": {
"App Launcher": "App Launcher" "App Launcher": "App Launcher"
@@ -729,7 +729,7 @@
"Click Import to add a .ovpn or .conf": "Clicca su Importa per aggiungere un file .ovpn o .conf" "Click Import to add a .ovpn or .conf": "Clicca su Importa per aggiungere un file .ovpn o .conf"
}, },
"Click Through": { "Click Through": {
"Click Through": "" "Click Through": "Clic passanti"
}, },
"Click any shortcut to edit. Changes save to %1": { "Click any shortcut to edit. Changes save to %1": {
"Click any shortcut to edit. Changes save to %1": "Clicca su qualsiasi scorciatoia per modificare. Le modifiche vengono salvate in %1" "Click any shortcut to edit. Changes save to %1": "Clicca su qualsiasi scorciatoia per modificare. Le modifiche vengono salvate in %1"
@@ -1797,7 +1797,7 @@
"Grid Columns": "Colonne Griglia" "Grid Columns": "Colonne Griglia"
}, },
"Group": { "Group": {
"Group": "" "Group": "Gruppo"
}, },
"Group Workspace Apps": { "Group Workspace Apps": {
"Group Workspace Apps": "Raggruppa App per Spazio di Lavoro" "Group Workspace Apps": "Raggruppa App per Spazio di Lavoro"
@@ -1809,13 +1809,13 @@
"Group multiple windows of the same app together with a window count indicator": "Raggruppa molteplici finestre della stessa app con un indicatore del numero di finestre" "Group multiple windows of the same app together with a window count indicator": "Raggruppa molteplici finestre della stessa app con un indicatore del numero di finestre"
}, },
"Group removed": { "Group removed": {
"Group removed": "" "Group removed": "Gruppo rimosso"
}, },
"Group repeated application icons in unfocused workspaces": { "Group repeated application icons in unfocused workspaces": {
"Group repeated application icons in unfocused workspaces": "Raggruppa le icone delle applicazioni duplicate negli spazi di lavoro non attivi" "Group repeated application icons in unfocused workspaces": "Raggruppa le icone delle applicazioni duplicate negli spazi di lavoro non attivi"
}, },
"Groups": { "Groups": {
"Groups": "" "Groups": "Gruppi"
}, },
"HDR (EDID)": { "HDR (EDID)": {
"HDR (EDID)": "HDR (EDID)" "HDR (EDID)": "HDR (EDID)"
@@ -2214,7 +2214,7 @@
"Manual Show/Hide": "Mostra/Nascondi Manuale" "Manual Show/Hide": "Mostra/Nascondi Manuale"
}, },
"Map window class names to icon names for proper icon display": { "Map window class names to icon names for proper icon display": {
"Map window class names to icon names for proper icon display": "" "Map window class names to icon names for proper icon display": "Associa i nomi delle classi delle finestre ai nomi delle icone per una corretta visualizzazione"
}, },
"Margin": { "Margin": {
"Margin": "Margini" "Margin": "Margini"
@@ -2439,7 +2439,7 @@
"New York, NY": "New York, NY" "New York, NY": "New York, NY"
}, },
"New group name...": { "New group name...": {
"New group name...": "" "New group name...": "Nome del nuovo gruppo..."
}, },
"Next Transition": { "Next Transition": {
"Next Transition": "Prossima Transizione" "Next Transition": "Prossima Transizione"
@@ -2673,7 +2673,7 @@
"Options": "Opzioni" "Options": "Opzioni"
}, },
"Organize widgets into collapsible groups": { "Organize widgets into collapsible groups": {
"Organize widgets into collapsible groups": "" "Organize widgets into collapsible groups": "Organizza i widget in gruppi comprimibili"
}, },
"Other": { "Other": {
"Other": "Altro" "Other": "Altro"
@@ -2748,7 +2748,7 @@
"Password": "Password" "Password": "Password"
}, },
"Pattern": { "Pattern": {
"Pattern": "" "Pattern": "Pattern"
}, },
"Pause": { "Pause": {
"Pause": "Pausa" "Pause": "Pausa"
@@ -3012,7 +3012,7 @@
"Repeat": "Ripetizione" "Repeat": "Ripetizione"
}, },
"Replacement": { "Replacement": {
"Replacement": "" "Replacement": "Sostituzione"
}, },
"Report": { "Report": {
"Report": "Riepilogo" "Report": "Riepilogo"
@@ -3648,7 +3648,7 @@
"Sync Mode with Portal": "Modalità Sync con Portale" "Sync Mode with Portal": "Modalità Sync con Portale"
}, },
"Sync Position Across Screens": { "Sync Position Across Screens": {
"Sync Position Across Screens": "" "Sync Position Across Screens": "Sincronizza la posizione tra gli schermi"
}, },
"Sync dark mode with settings portals for system-wide theme hints": { "Sync dark mode with settings portals for system-wide theme hints": {
"Sync dark mode with settings portals for system-wide theme hints": "Sincronizza tema scuro con impostazioni di sistema" "Sync dark mode with settings portals for system-wide theme hints": "Sincronizza tema scuro con impostazioni di sistema"
@@ -3876,7 +3876,7 @@
"Unfocused Color": "Colore Inattivo" "Unfocused Color": "Colore Inattivo"
}, },
"Ungrouped": { "Ungrouped": {
"Ungrouped": "" "Ungrouped": "Non Raggruppato"
}, },
"Uninstall Plugin": { "Uninstall Plugin": {
"Uninstall Plugin": "Disinstalla Plugin" "Uninstall Plugin": "Disinstalla Plugin"
@@ -3978,13 +3978,13 @@
"Use light theme instead of dark theme": "Usa tema chiaro invece del tema scuro" "Use light theme instead of dark theme": "Usa tema chiaro invece del tema scuro"
}, },
"Use smaller notification cards": { "Use smaller notification cards": {
"Use smaller notification cards": "" "Use smaller notification cards": "Usa schede di notifica più piccole"
}, },
"Use sound theme from system settings": { "Use sound theme from system settings": {
"Use sound theme from system settings": "Usa tema di suoni dalle impostazioni di sistema" "Use sound theme from system settings": "Usa tema di suoni dalle impostazioni di sistema"
}, },
"Use the same position and size on all displays": { "Use the same position and size on all displays": {
"Use the same position and size on all displays": "" "Use the same position and size on all displays": "Usa la stessa posizione e dimensione su tutti gli schermi"
}, },
"Use trigger prefix to activate": { "Use trigger prefix to activate": {
"Use trigger prefix to activate": "Usa il prefisso attivatore per attivare" "Use trigger prefix to activate": "Usa il prefisso attivatore per attivare"
@@ -4553,7 +4553,7 @@
"No wallpaper selected": "Nessuno sfondo selezionato" "No wallpaper selected": "Nessuno sfondo selezionato"
}, },
"notification center tab": { "notification center tab": {
"Current": "Attuale", "Current": "Attuali",
"History": "Cronologia" "History": "Cronologia"
}, },
"notification history filter": { "notification history filter": {
+15 -15
View File
@@ -240,7 +240,7 @@
"All displays": "所有显示器" "All displays": "所有显示器"
}, },
"Allow clicks to pass through the widget": { "Allow clicks to pass through the widget": {
"Allow clicks to pass through the widget": "" "Allow clicks to pass through the widget": "允许鼠标穿透部件"
}, },
"Alt+←/Backspace: Back • F1/I: File Info • F10: Help • Esc: Close": { "Alt+←/Backspace: Back • F1/I: File Info • F10: Help • Esc: Close": {
"Alt+←/Backspace: Back • F1/I: File Info • F10: Help • Esc: Close": "Alt+←/退格: 返回 • F1/I: 文件信息 • F10: 帮助 • Esc: 关闭" "Alt+←/Backspace: Back • F1/I: File Info • F10: Help • Esc: Close": "Alt+←/退格: 返回 • F1/I: 文件信息 • F10: 帮助 • Esc: 关闭"
@@ -279,7 +279,7 @@
"Anonymous Identity (optional)": "匿名身份(可选)" "Anonymous Identity (optional)": "匿名身份(可选)"
}, },
"App ID Substitutions": { "App ID Substitutions": {
"App ID Substitutions": "" "App ID Substitutions": "应用ID替换"
}, },
"App Launcher": { "App Launcher": {
"App Launcher": "启动器" "App Launcher": "启动器"
@@ -729,7 +729,7 @@
"Click Import to add a .ovpn or .conf": "点击导入添加 .ovpn 或 .conf 文件" "Click Import to add a .ovpn or .conf": "点击导入添加 .ovpn 或 .conf 文件"
}, },
"Click Through": { "Click Through": {
"Click Through": "" "Click Through": "鼠标穿透"
}, },
"Click any shortcut to edit. Changes save to %1": { "Click any shortcut to edit. Changes save to %1": {
"Click any shortcut to edit. Changes save to %1": "点击任意快捷方式以编辑。更改将保存至%1。" "Click any shortcut to edit. Changes save to %1": "点击任意快捷方式以编辑。更改将保存至%1。"
@@ -1797,7 +1797,7 @@
"Grid Columns": "网格列" "Grid Columns": "网格列"
}, },
"Group": { "Group": {
"Group": "" "Group": "分组"
}, },
"Group Workspace Apps": { "Group Workspace Apps": {
"Group Workspace Apps": "分组工作区应用" "Group Workspace Apps": "分组工作区应用"
@@ -1809,13 +1809,13 @@
"Group multiple windows of the same app together with a window count indicator": "将同一应用的多个窗口合并显示,并标注窗口数量" "Group multiple windows of the same app together with a window count indicator": "将同一应用的多个窗口合并显示,并标注窗口数量"
}, },
"Group removed": { "Group removed": {
"Group removed": "" "Group removed": "分组已移除"
}, },
"Group repeated application icons in unfocused workspaces": { "Group repeated application icons in unfocused workspaces": {
"Group repeated application icons in unfocused workspaces": "在不聚焦的工作区中将重复应用图标分组" "Group repeated application icons in unfocused workspaces": "在不聚焦的工作区中将重复应用图标分组"
}, },
"Groups": { "Groups": {
"Groups": "" "Groups": "分组"
}, },
"HDR (EDID)": { "HDR (EDID)": {
"HDR (EDID)": "HDREDID" "HDR (EDID)": "HDREDID"
@@ -2214,7 +2214,7 @@
"Manual Show/Hide": "手动显示/隐藏" "Manual Show/Hide": "手动显示/隐藏"
}, },
"Map window class names to icon names for proper icon display": { "Map window class names to icon names for proper icon display": {
"Map window class names to icon names for proper icon display": "" "Map window class names to icon names for proper icon display": "将窗口类名称映射到图标名称以实现正确的图标显示"
}, },
"Margin": { "Margin": {
"Margin": "边距" "Margin": "边距"
@@ -2439,7 +2439,7 @@
"New York, NY": "纽约,美国纽约州" "New York, NY": "纽约,美国纽约州"
}, },
"New group name...": { "New group name...": {
"New group name...": "" "New group name...": "新分组名..."
}, },
"Next Transition": { "Next Transition": {
"Next Transition": "下一过渡" "Next Transition": "下一过渡"
@@ -2673,7 +2673,7 @@
"Options": "选项" "Options": "选项"
}, },
"Organize widgets into collapsible groups": { "Organize widgets into collapsible groups": {
"Organize widgets into collapsible groups": "" "Organize widgets into collapsible groups": "将部件组织成可折叠分组"
}, },
"Other": { "Other": {
"Other": "其他" "Other": "其他"
@@ -2748,7 +2748,7 @@
"Password": "密码" "Password": "密码"
}, },
"Pattern": { "Pattern": {
"Pattern": "" "Pattern": "模式"
}, },
"Pause": { "Pause": {
"Pause": "暂停" "Pause": "暂停"
@@ -3012,7 +3012,7 @@
"Repeat": "重复" "Repeat": "重复"
}, },
"Replacement": { "Replacement": {
"Replacement": "" "Replacement": "替换"
}, },
"Report": { "Report": {
"Report": "报告" "Report": "报告"
@@ -3648,7 +3648,7 @@
"Sync Mode with Portal": "同步系统深色模式" "Sync Mode with Portal": "同步系统深色模式"
}, },
"Sync Position Across Screens": { "Sync Position Across Screens": {
"Sync Position Across Screens": "" "Sync Position Across Screens": "在显示器间同步位置"
}, },
"Sync dark mode with settings portals for system-wide theme hints": { "Sync dark mode with settings portals for system-wide theme hints": {
"Sync dark mode with settings portals for system-wide theme hints": "随系统设置开启深色模式,以适配全局主题" "Sync dark mode with settings portals for system-wide theme hints": "随系统设置开启深色模式,以适配全局主题"
@@ -3876,7 +3876,7 @@
"Unfocused Color": "未聚焦颜色" "Unfocused Color": "未聚焦颜色"
}, },
"Ungrouped": { "Ungrouped": {
"Ungrouped": "" "Ungrouped": "已解除分组"
}, },
"Uninstall Plugin": { "Uninstall Plugin": {
"Uninstall Plugin": "卸载插件" "Uninstall Plugin": "卸载插件"
@@ -3978,13 +3978,13 @@
"Use light theme instead of dark theme": "使用浅色主题替代深色主题" "Use light theme instead of dark theme": "使用浅色主题替代深色主题"
}, },
"Use smaller notification cards": { "Use smaller notification cards": {
"Use smaller notification cards": "" "Use smaller notification cards": "使用更小的通知卡"
}, },
"Use sound theme from system settings": { "Use sound theme from system settings": {
"Use sound theme from system settings": "使用系统设置中的声音主题" "Use sound theme from system settings": "使用系统设置中的声音主题"
}, },
"Use the same position and size on all displays": { "Use the same position and size on all displays": {
"Use the same position and size on all displays": "" "Use the same position and size on all displays": "在所有显示器上使用同样的位置与大小"
}, },
"Use trigger prefix to activate": { "Use trigger prefix to activate": {
"Use trigger prefix to activate": "使用触发前缀以激活" "Use trigger prefix to activate": "使用触发前缀以激活"