mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-05-02 10:32:07 -04:00
Compare commits
36 Commits
1307454075
...
c163812d89
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c163812d89 | ||
|
|
594d0f163d | ||
|
|
f5c841569a | ||
|
|
af930c065d | ||
|
|
0725163699 | ||
|
|
d45d5c526f | ||
|
|
26caa644da | ||
|
|
c232460c49 | ||
|
|
be5cce0d7d | ||
|
|
aa365e1e8a | ||
|
|
870317df04 | ||
|
|
72978b93e7 | ||
|
|
beaaebf0ff | ||
|
|
bb5a115589 | ||
|
|
40fabd73f4 | ||
|
|
c8908279fd | ||
|
|
e13004f517 | ||
|
|
f83e5ff84b | ||
|
|
6db3ba5059 | ||
|
|
f3ae87cf44 | ||
|
|
f9b2693e5b | ||
|
|
d0f209a697 | ||
|
|
69b194e722 | ||
|
|
898b70cdee | ||
|
|
18562a526f | ||
|
|
2354ba7365 | ||
|
|
bbf0c2c630 | ||
|
|
9139fd2fb1 | ||
|
|
da3df9bb77 | ||
|
|
e7834c981a | ||
|
|
316428b14a | ||
|
|
6a9de8b423 | ||
|
|
f1e3452307 | ||
|
|
4c2c193766 | ||
|
|
112f2165f3 | ||
|
|
40e3a22b99 |
@@ -11,6 +11,7 @@ import (
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
"github.com/AvengeMedia/DankMaterialShell/core/internal/blur"
|
||||
"github.com/AvengeMedia/DankMaterialShell/core/internal/clipboard"
|
||||
"github.com/AvengeMedia/DankMaterialShell/core/internal/config"
|
||||
"github.com/AvengeMedia/DankMaterialShell/core/internal/distros"
|
||||
@@ -90,6 +91,7 @@ var (
|
||||
wayfireVersionRegex = regexp.MustCompile(`wayfire (\d+\.\d+)`)
|
||||
labwcVersionRegex = regexp.MustCompile(`labwc (\d+\.\d+\.\d+)`)
|
||||
mangowcVersionRegex = regexp.MustCompile(`mango (\d+\.\d+\.\d+)`)
|
||||
miracleVersionRegex = regexp.MustCompile(`miracle-wm v?(\d+\.\d+\.\d+)`)
|
||||
)
|
||||
|
||||
var doctorCmd = &cobra.Command{
|
||||
@@ -468,6 +470,7 @@ func checkWindowManagers() []checkResult {
|
||||
{"Wayfire", "wayfire", "--version", wayfireVersionRegex, []string{"wayfire"}},
|
||||
{"labwc", "labwc", "--version", labwcVersionRegex, []string{"labwc"}},
|
||||
{"mangowc", "mango", "-v", mangowcVersionRegex, []string{"mango"}},
|
||||
{"Miracle WM", "miracle-wm", "--version", miracleVersionRegex, []string{"miracle-wm"}},
|
||||
}
|
||||
|
||||
var results []checkResult
|
||||
@@ -500,7 +503,7 @@ func checkWindowManagers() []checkResult {
|
||||
results = append(results, checkResult{
|
||||
catCompositor, "Compositor", statusError,
|
||||
"No supported Wayland compositor found",
|
||||
"Install Hyprland, niri, Sway, River, or Wayfire",
|
||||
"Install Hyprland, niri, Sway, River, Wayfire, or miracle-wm",
|
||||
doctorDocsURL + "#compositor-checks",
|
||||
})
|
||||
}
|
||||
@@ -509,9 +512,24 @@ func checkWindowManagers() []checkResult {
|
||||
results = append(results, checkResult{catCompositor, "Active", statusInfo, wm, "", doctorDocsURL + "#compositor"})
|
||||
}
|
||||
|
||||
results = append(results, checkCompositorBlurSupport())
|
||||
|
||||
return results
|
||||
}
|
||||
|
||||
func checkCompositorBlurSupport() checkResult {
|
||||
supported, err := blur.ProbeSupport()
|
||||
if err != nil {
|
||||
return checkResult{catCompositor, "Background Blur", statusInfo, "Unable to verify", err.Error(), doctorDocsURL + "#compositor-checks"}
|
||||
}
|
||||
|
||||
if supported {
|
||||
return checkResult{catCompositor, "Background Blur", statusOK, "Supported", "Compositor supports ext-background-effect-v1", doctorDocsURL + "#compositor-checks"}
|
||||
}
|
||||
|
||||
return checkResult{catCompositor, "Background Blur", statusWarn, "Unsupported", "Compositor does not support ext-background-effect-v1", doctorDocsURL + "#compositor-checks"}
|
||||
}
|
||||
|
||||
func getVersionFromCommand(cmd, arg string, regex *regexp.Regexp) string {
|
||||
output, err := exec.Command(cmd, arg).CombinedOutput()
|
||||
if err != nil && len(output) == 0 {
|
||||
@@ -535,6 +553,8 @@ func detectRunningWM() string {
|
||||
return "Hyprland"
|
||||
case os.Getenv("NIRI_SOCKET") != "":
|
||||
return "niri"
|
||||
case os.Getenv("MIRACLESOCK") != "":
|
||||
return "Miracle WM"
|
||||
case os.Getenv("XDG_CURRENT_DESKTOP") != "":
|
||||
return os.Getenv("XDG_CURRENT_DESKTOP")
|
||||
}
|
||||
@@ -553,6 +573,7 @@ func checkQuickshellFeatures() ([]checkResult, bool) {
|
||||
qmlContent := `
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
|
||||
ShellRoot {
|
||||
id: root
|
||||
@@ -561,6 +582,7 @@ ShellRoot {
|
||||
property bool idleMonitorAvailable: false
|
||||
property bool idleInhibitorAvailable: false
|
||||
property bool shortcutInhibitorAvailable: false
|
||||
property bool backgroundBlurAvailable: false
|
||||
|
||||
Timer {
|
||||
interval: 50
|
||||
@@ -578,16 +600,18 @@ ShellRoot {
|
||||
|
||||
try {
|
||||
var testItem = Qt.createQmlObject(
|
||||
'import Quickshell.Wayland; import QtQuick; QtObject { ' +
|
||||
'import Quickshell; import Quickshell.Wayland; import QtQuick; QtObject { ' +
|
||||
'readonly property bool hasIdleMonitor: typeof IdleMonitor !== "undefined"; ' +
|
||||
'readonly property bool hasIdleInhibitor: typeof IdleInhibitor !== "undefined"; ' +
|
||||
'readonly property bool hasShortcutInhibitor: typeof ShortcutInhibitor !== "undefined" ' +
|
||||
'readonly property bool hasShortcutInhibitor: typeof ShortcutInhibitor !== "undefined"; ' +
|
||||
'readonly property bool hasBackgroundBlur: typeof BackgroundEffect !== "undefined" ' +
|
||||
'}',
|
||||
root
|
||||
)
|
||||
root.idleMonitorAvailable = testItem.hasIdleMonitor
|
||||
root.idleInhibitorAvailable = testItem.hasIdleInhibitor
|
||||
root.shortcutInhibitorAvailable = testItem.hasShortcutInhibitor
|
||||
root.backgroundBlurAvailable = testItem.hasBackgroundBlur
|
||||
testItem.destroy()
|
||||
} catch (e) {}
|
||||
|
||||
@@ -596,6 +620,8 @@ ShellRoot {
|
||||
console.warn(root.idleInhibitorAvailable ? "FEATURE:IdleInhibitor:OK" : "FEATURE:IdleInhibitor:UNAVAILABLE")
|
||||
console.warn(root.shortcutInhibitorAvailable ? "FEATURE:ShortcutInhibitor:OK" : "FEATURE:ShortcutInhibitor:UNAVAILABLE")
|
||||
|
||||
console.warn(root.backgroundBlurAvailable ? "FEATURE:BackgroundBlur:OK" : "FEATURE:BackgroundBlur:UNAVAILABLE")
|
||||
|
||||
Quickshell.execDetached(["kill", "-TERM", String(Quickshell.processId)])
|
||||
}
|
||||
}
|
||||
@@ -616,6 +642,7 @@ ShellRoot {
|
||||
{"IdleMonitor", "Idle detection"},
|
||||
{"IdleInhibitor", "Prevent idle/sleep"},
|
||||
{"ShortcutInhibitor", "Allow shortcut management (niri)"},
|
||||
{"BackgroundBlur", "Background blur API support in Quickshell"},
|
||||
}
|
||||
|
||||
var results []checkResult
|
||||
|
||||
11
distro/nix/default.nix
Normal file
11
distro/nix/default.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
(import (
|
||||
let
|
||||
lock = builtins.fromJSON (builtins.readFile ../../flake.lock);
|
||||
in
|
||||
fetchTarball {
|
||||
url =
|
||||
lock.nodes.flake-compat.locked.url
|
||||
or "https://github.com/NixOS/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
||||
sha256 = lock.nodes.flake-compat.locked.narHash;
|
||||
}
|
||||
) { src = ../..; }).defaultNix
|
||||
11
distro/nix/shell.nix
Normal file
11
distro/nix/shell.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
(import (
|
||||
let
|
||||
lock = builtins.fromJSON (builtins.readFile ../../flake.lock);
|
||||
in
|
||||
fetchTarball {
|
||||
url =
|
||||
lock.nodes.flake-compat.locked.url
|
||||
or "https://github.com/NixOS/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
||||
sha256 = lock.nodes.flake-compat.locked.narHash;
|
||||
}
|
||||
) { src = ../..; }).shellNix
|
||||
23
flake.lock
generated
23
flake.lock
generated
@@ -1,12 +1,28 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1767039857,
|
||||
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
|
||||
"owner": "NixOS",
|
||||
"repo": "flake-compat",
|
||||
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1771369470,
|
||||
"narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=",
|
||||
"lastModified": 1776169885,
|
||||
"narHash": "sha256-l/iNYDZ4bGOAFQY2q8y5OAfBBtrDAaPuRQqWaFHVRXM=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "0182a361324364ae3f436a63005877674cf45efb",
|
||||
"rev": "4bd9165a9165d7b5e33ae57f3eecbcb28fb231c9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -39,6 +55,7 @@
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"quickshell": "quickshell"
|
||||
}
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
url = "git+https://git.outfoxxed.me/quickshell/quickshell?rev=41828c4180fb921df7992a5405f5ff05d2ac2fff";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
flake-compat = {
|
||||
url = "github:NixOS/flake-compat";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
|
||||
@@ -24,7 +24,9 @@ Singleton {
|
||||
}
|
||||
|
||||
function expandTilde(path: string): string {
|
||||
return strip(path.replace("~", stringify(root.home)));
|
||||
if (!path.startsWith("~"))
|
||||
return path;
|
||||
return strip(root.home) + path.substring(1);
|
||||
}
|
||||
|
||||
function shortenHome(path: string): string {
|
||||
|
||||
@@ -275,6 +275,7 @@ Singleton {
|
||||
property int selectedGpuIndex: 0
|
||||
property var enabledGpuPciIds: []
|
||||
property bool showSystemTray: true
|
||||
property bool systemTrayMonochromeIcons: false
|
||||
property bool showClock: true
|
||||
property bool showNotificationButton: true
|
||||
property bool showBattery: true
|
||||
|
||||
@@ -1371,7 +1371,7 @@ Singleton {
|
||||
}
|
||||
|
||||
function loadCustomThemeFromFile(filePath) {
|
||||
customThemeFileView.path = filePath;
|
||||
customThemeFileView.path = Paths.expandTilde(filePath);
|
||||
}
|
||||
|
||||
function reloadCustomThemeVariant() {
|
||||
@@ -2023,6 +2023,7 @@ Singleton {
|
||||
|
||||
FileView {
|
||||
id: customThemeFileView
|
||||
blockLoading: false
|
||||
watchChanges: currentTheme === "custom"
|
||||
|
||||
function parseAndLoadTheme() {
|
||||
|
||||
@@ -83,6 +83,7 @@ var SPEC = {
|
||||
selectedGpuIndex: { def: 0 },
|
||||
enabledGpuPciIds: { def: [] },
|
||||
showSystemTray: { def: true },
|
||||
systemTrayMonochromeIcons: { def: false },
|
||||
showClock: { def: true },
|
||||
showNotificationButton: { def: true },
|
||||
showBattery: { def: true },
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import QtQuick
|
||||
import QtQuick.Effects
|
||||
import Quickshell
|
||||
import Quickshell.Hyprland
|
||||
import Quickshell.Services.SystemTray
|
||||
@@ -366,6 +367,10 @@ BasePill {
|
||||
smooth: true
|
||||
mipmap: true
|
||||
visible: status === Image.Ready
|
||||
layer.enabled: SettingsData.systemTrayMonochromeIcons
|
||||
layer.effect: MultiEffect {
|
||||
saturation: -1
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
@@ -581,6 +586,10 @@ BasePill {
|
||||
smooth: true
|
||||
mipmap: true
|
||||
visible: status === Image.Ready
|
||||
layer.enabled: SettingsData.systemTrayMonochromeIcons
|
||||
layer.effect: MultiEffect {
|
||||
saturation: -1
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
@@ -709,6 +718,10 @@ BasePill {
|
||||
smooth: true
|
||||
mipmap: true
|
||||
visible: status === Image.Ready
|
||||
layer.enabled: SettingsData.systemTrayMonochromeIcons
|
||||
layer.effect: MultiEffect {
|
||||
saturation: -1
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
@@ -1210,6 +1223,10 @@ BasePill {
|
||||
smooth: true
|
||||
mipmap: true
|
||||
visible: status === Image.Ready
|
||||
layer.enabled: SettingsData.systemTrayMonochromeIcons
|
||||
layer.effect: MultiEffect {
|
||||
saturation: -1
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
|
||||
@@ -717,6 +717,15 @@ Item {
|
||||
})
|
||||
}
|
||||
|
||||
SettingsToggleCard {
|
||||
iconName: "filter_b_and_w"
|
||||
title: I18n.tr("Monochrome System Tray Icons")
|
||||
description: I18n.tr("Desaturate all system tray icons for a uniform monochrome look")
|
||||
visible: selectedBarConfig?.enabled
|
||||
checked: SettingsData.systemTrayMonochromeIcons
|
||||
onToggled: checked => SettingsData.set("systemTrayMonochromeIcons", checked)
|
||||
}
|
||||
|
||||
SettingsToggleCard {
|
||||
iconName: "mouse"
|
||||
title: I18n.tr("Scroll Wheel")
|
||||
|
||||
15
quickshell/Services/LabwcService.qml
Normal file
15
quickshell/Services/LabwcService.qml
Normal file
@@ -0,0 +1,15 @@
|
||||
pragma Singleton
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
// Exit the labwc session. Used by SessionService when the user
|
||||
// triggers logout and no custom logout command is configured.
|
||||
function quit() {
|
||||
Quickshell.execDetached(["labwc", "--exit"]);
|
||||
}
|
||||
}
|
||||
@@ -192,7 +192,7 @@ Singleton {
|
||||
|
||||
function attachToSession(name) {
|
||||
if (SettingsData.muxUseCustomCommand && SettingsData.muxCustomCommand) {
|
||||
Quickshell.execDetached([SettingsData.muxCustomCommand, name])
|
||||
Quickshell.execDetached([Paths.expandTilde(SettingsData.muxCustomCommand), name])
|
||||
} else if (root.muxType === "zellij") {
|
||||
Quickshell.execDetached(_terminalPrefix().concat(["zellij", "attach", name]))
|
||||
} else {
|
||||
@@ -202,7 +202,7 @@ Singleton {
|
||||
|
||||
function createSession(name) {
|
||||
if (SettingsData.muxUseCustomCommand && SettingsData.muxCustomCommand) {
|
||||
Quickshell.execDetached([SettingsData.muxCustomCommand, name])
|
||||
Quickshell.execDetached([Paths.expandTilde(SettingsData.muxCustomCommand), name])
|
||||
} else if (root.muxType === "zellij") {
|
||||
Quickshell.execDetached(_terminalPrefix().concat(["zellij", "-s", name]))
|
||||
} else {
|
||||
|
||||
@@ -320,6 +320,11 @@ Singleton {
|
||||
return;
|
||||
}
|
||||
|
||||
if (CompositorService.isLabwc) {
|
||||
LabwcService.quit();
|
||||
return;
|
||||
}
|
||||
|
||||
if (CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle) {
|
||||
try {
|
||||
I3.dispatch("exit");
|
||||
|
||||
@@ -5,10 +5,21 @@
|
||||
--toolbar-field-color: {{colors.on_background.default.hex}} !important;
|
||||
--tab-selected-textcolor: {{colors.primary.default.hex}} !important;
|
||||
--toolbar-color: {{colors.on_background.default.hex}} !important;
|
||||
--arrowpanel-color: {{colors.on_surface.default.hex}} !important;
|
||||
--arrowpanel-color: {{colors.on_background.default.hex}} !important;
|
||||
--arrowpanel-background: {{colors.surface_container.default.hex}} !important;
|
||||
--sidebar-text-color: {{colors.on_background.default.hex}} !important;
|
||||
--zen-main-browser-background: {{colors.background.default.hex}} !important;
|
||||
--zen-main-browser-background-toolbar: {{colors.background.default.hex}} !important;
|
||||
}
|
||||
|
||||
#zen-browser-background {
|
||||
--zen-main-browser-background: {{colors.background.default.hex}} !important;
|
||||
--zen-background-opacity: 1 !important;
|
||||
}
|
||||
|
||||
#zen-toolbar-background {
|
||||
--zen-main-browser-background-toolbar: {{colors.background.default.hex}} !important;
|
||||
--zen-background-opacity: 1 !important;
|
||||
}
|
||||
|
||||
.sidebar-placesTree {
|
||||
|
||||
Reference in New Issue
Block a user