1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-02 03:28:28 -04:00

Compare commits

..

29 Commits

Author SHA1 Message Date
bbedward c2a5397d8a notification: clip region on animation exit
related #2917
port 1.5

(cherry picked from commit f57f254855)
2026-07-24 18:36:07 +00:00
bbedward 9b5538323d lock: guard dpms window 2026-07-24 14:13:43 -04:00
bbedward 8321d28d18 greeter: don't override manually selected session with saved/defaul 2026-07-24 11:47:59 -04:00
bbedward 39278860c8 cups: fix initialization race
port 1.5

(cherry picked from commit ea03fb2788)
2026-07-24 10:58:41 -04:00
bbedward f455456ff1 dock: limit input mask to body, disable hover headroom unless enabled
fixes #2923

(cherry picked from commit 0815e48465)
2026-07-24 10:35:40 -04:00
bbedward 5a80a32951 network: fix networkPreference reverting from eth to wifi
fixes #2919
port 1.5

(cherry picked from commit 42060366cb)
2026-07-24 14:14:08 +00:00
Aldi Prasetyo 3cedd56f23 fix(minimal-install): add hyprland packages to minimal install preference (#2872)
(I guess we'll find out if this breaks any minimal script to desktop runs)

(cherry picked from commit ff71502083)
2026-07-24 09:31:46 -04:00
Legend-017 dc1ad5b329 Fix(spotlight): improve file search query restoration and mode switching (#2887)
* fix(spotlight): fix empty results on restoring last file search query

- When "remember last query" is enabled and the last query is file search, it shows "no results" until the query is manually modified in full launcher mode.

* fix(spotlight): properly restore last selected mode(tab) when enabled in full launcher mode

* fix(spotlight): allow file trigger in plugins mode(tab)

* fix(spotlight): restore previous mode when clearing '/' file search prefix

When the '/' prefix is removed from the query, the controller now correctly reverts to the previous mode instead of remaining stuck in "files" mode.

* fix(spotlight): code review fix

(cherry picked from commit 367ad5f69a)
2026-07-24 09:31:32 -04:00
Thomas Kroll 25c12a14a9 fix(lock): hold sleep inhibitor until compositor confirms lock (#2907)
lock-before-suspend released the logind sleep delay inhibitor as soon as Qt
reported the lock rendered (afterAnimating/afterRendering). That signal fires
before the compositor has committed/presented the ext-session-lock surface, so
the machine could freeze ~1 frame later with the desktop still the last
presented frame. On resume the desktop was briefly visible before the lock
appeared (both suspend and hibernate).

Gate lockerReady on WlSessionLock.secure (the ext-session-lock `locked` event),
so the inhibitor is held until the compositor confirms the session is locked and
the desktop is hidden. LockSurface passes the WlSessionLock down as sessionLock;
the readiness check returns early until secure, and re-fires on secureChanged.
The Go-side fallback timer in loginctl monitor remains as the backstop.

Reproduced on niri / s2idle with 3 outputs: debug log showed lockerReady sent
18 ms before `PM: suspend entry`; with this change the desktop no longer flashes
on resume.

Signed-off-by: Thomas Kroll <99196436+tkroll-ionos@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
(cherry picked from commit 237fb57d5e)
2026-07-24 09:31:23 -04:00
bbedward b72b276fb4 lock/pam: attempt to fix fprintd retry spam after resume
(cherry picked from commit 958672badd)
2026-07-24 09:30:57 -04:00
bbedward f89fb67316 settings: fix close IPC
fixes #2912
port 1.5

(cherry picked from commit 5854327c28)
2026-07-23 18:10:19 +00:00
bbedward f457e04cb1 calendar/dcal: fix flatpak socket detection
port 1.5

(cherry picked from commit d818067bee)
2026-07-23 14:14:49 +00:00
bbedward 23daca0b57 location: prevent calls when weather auto-locate is disabled
port 1.5

(cherry picked from commit fe561f2b5d)
2026-07-22 03:36:01 +00:00
bbedward accdd0972c popout: fix lifecycle of blur with various popouts
fixes #2901
port 1.5

(cherry picked from commit 93c3030a1e)
2026-07-21 21:47:06 +00:00
bbedward 00c28f69fd wallpaper: use filter chips for rando transitions 2026-07-21 11:45:18 -04:00
bbedward 2e0337b68c lock: avoid lock surface churn
related #2885
port 1.5

(cherry picked from commit 30d9a34011)
2026-07-21 14:51:07 +00:00
bbedward 4975960ea4 compositor/toplevels: filter on screen for generic compositors, without
workspace distinction

fixes #2890
port 1.5

(cherry picked from commit f0bdaa7f72)
2026-07-21 14:27:43 +00:00
bbedward 0381a112b3 polkit: fix DMS_DISABLE_POLKIT regression from qs 0.2 deprecation commit
fixes #2897
port 1.5

(cherry picked from commit 68e60f036d)
2026-07-20 20:08:20 +00:00
bbedward ed5e2a22c0 audio: revert wpctl workaround
related #2899
port 1.5

(cherry picked from commit 70ceee139b)
2026-07-20 19:19:45 +00:00
bbedward 847718459c lock: fix dpms fade surface getting stuck after unlock
port 1.5

(cherry picked from commit 116cef0b3a)
2026-07-20 14:40:30 +00:00
bbedward 95b120b475 systray: fix menu positioning on vbars
fixes #2818
port 1.5

(cherry picked from commit 1402d2312a)
2026-07-19 20:37:56 +00:00
bbedward 4dd2f1d5be matugen: add config dirs to detection of presence
related #2894
port 1.5

(cherry picked from commit 57fd39d84d)
2026-07-19 16:45:46 +00:00
bbedward bf5faf725b mango: suppress excessive reload messages
fixes #2848
port 1.5

(cherry picked from commit 6239e5a8e4)
2026-07-19 16:45:44 +00:00
bbedward e5eff919b8 matugen: remove padding 0 from gtk light
fixes #2884
port 1.5

(cherry picked from commit 2a8b88c1f0)
2026-07-19 15:38:19 +00:00
bbedward 606115748a theme: put full theme catalog in neovim dropdown
fixes #2892
port 1.5

(cherry picked from commit dbaf2e922c)
2026-07-19 15:21:42 +00:00
bbedward ad936bfdc9 dash: fix color tokens for placeholder in calendar, and weather failed
fixes #2891
port 1.5

(cherry picked from commit eb330f62e1)
2026-07-19 15:18:40 +00:00
bbedward 110396cb2a powermenu: don't require key release for actions other than suspend and
hibernate

port 1.5

(cherry picked from commit 2846363f55)
2026-07-18 19:31:08 +00:00
bbedward 7b08e61863 matugen/neovim: respect terminalsAlwaysDark
port 1.5

(cherry picked from commit 4a90bd3fb1)
2026-07-18 15:52:47 +00:00
bbedward 876ead665b lock: add resilience for when the lock surface is rejected
related #2778
related #2841

port 1.5

(cherry picked from commit 698b66cf91)
2026-07-18 15:51:52 +00:00
45 changed files with 670 additions and 315 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ type minimalInstallGroup struct {
func shouldPreferMinimalInstall(pkg string) bool {
switch pkg {
case "niri", "niri-git":
case "niri", "niri-git", "hyprland", "hyprland-git":
return true
default:
return false
+25 -9
View File
@@ -44,6 +44,7 @@ type TemplateDef struct {
ID string
Commands []string
Flatpaks []string
ConfigDirs []string
ConfigFile string
Kind TemplateKind
RunUnconditionally bool
@@ -60,9 +61,9 @@ var templateRegistry = []TemplateDef{
{ID: "firefox", Commands: []string{"firefox"}, ConfigFile: "firefox.toml"},
{ID: "pywalfox", Commands: []string{"pywalfox"}, ConfigFile: "pywalfox.toml"},
{ID: "zenbrowser", Commands: []string{"zen", "zen-browser", "zen-beta", "zen-twilight"}, Flatpaks: []string{"app.zen_browser.zen"}, ConfigFile: "zenbrowser.toml"},
{ID: "vesktop", Commands: []string{"vesktop"}, Flatpaks: []string{"dev.vencord.Vesktop"}, ConfigFile: "vesktop.toml"},
{ID: "vencord", Commands: []string{"discord", "Discord", "discord-canary", "DiscordCanary"}, Flatpaks: []string{"com.discordapp.Discord", "com.discordapp.DiscordCanary"}, ConfigFile: "vencord.toml"},
{ID: "equibop", Commands: []string{"equibop"}, ConfigFile: "equibop.toml"},
{ID: "vesktop", Commands: []string{"vesktop"}, Flatpaks: []string{"dev.vencord.Vesktop"}, ConfigDirs: []string{"vesktop"}, ConfigFile: "vesktop.toml"},
{ID: "vencord", Commands: []string{"discord", "Discord", "discord-canary", "DiscordCanary"}, Flatpaks: []string{"com.discordapp.Discord", "com.discordapp.DiscordCanary"}, ConfigDirs: []string{"Vencord"}, ConfigFile: "vencord.toml"},
{ID: "equibop", Commands: []string{"equibop"}, ConfigDirs: []string{"equibop"}, ConfigFile: "equibop.toml"},
{ID: "ghostty", Commands: []string{"ghostty"}, ConfigFile: "ghostty.toml", Kind: TemplateKindTerminal},
{ID: "kitty", Commands: []string{"kitty"}, ConfigFile: "kitty.toml", Kind: TemplateKindTerminal},
{ID: "foot", Commands: []string{"foot"}, ConfigFile: "foot.toml", Kind: TemplateKindTerminal},
@@ -459,9 +460,9 @@ output_path = '%s'
case TemplateKindGTK:
switch opts.Mode {
case ColorModeLight:
appendConfig(opts, cfgFile, nil, nil, "gtk3-light.toml")
appendConfig(opts, cfgFile, nil, nil, nil, "gtk3-light.toml")
default:
appendConfig(opts, cfgFile, nil, nil, "gtk3-dark.toml")
appendConfig(opts, cfgFile, nil, nil, nil, "gtk3-dark.toml")
}
case TemplateKindTerminal:
appendTerminalConfig(opts, cfgFile, tmpDir, tmpl.Commands, tmpl.Flatpaks, tmpl.ConfigFile)
@@ -474,10 +475,10 @@ output_path = '%s'
appendVSCodeConfig(cfgFile, "vscode-insiders", filepath.Join(homeDir, ".vscode-insiders/extensions"), opts.ShellDir)
case TemplateKindEmacs:
if utils.EmacsConfigDir() != "" {
appendConfig(opts, cfgFile, tmpl.Commands, tmpl.Flatpaks, tmpl.ConfigFile)
appendConfig(opts, cfgFile, tmpl.Commands, tmpl.Flatpaks, tmpl.ConfigDirs, tmpl.ConfigFile)
}
default:
appendConfig(opts, cfgFile, tmpl.Commands, tmpl.Flatpaks, tmpl.ConfigFile)
appendConfig(opts, cfgFile, tmpl.Commands, tmpl.Flatpaks, tmpl.ConfigDirs, tmpl.ConfigFile)
}
}
@@ -512,13 +513,14 @@ func appendConfig(
cfgFile *os.File,
checkCmd []string,
checkFlatpaks []string,
checkConfigDirs []string,
fileName string,
) {
configPath := filepath.Join(opts.ShellDir, "matugen", "configs", fileName)
if _, err := os.Stat(configPath); err != nil {
return
}
if !appExists(opts.AppChecker, checkCmd, checkFlatpaks) {
if !appExists(opts.AppChecker, checkCmd, checkFlatpaks) && !configDirExists(checkConfigDirs) {
return
}
data, err := os.ReadFile(configPath)
@@ -599,6 +601,20 @@ func templateSessionActive(tmpl TemplateDef) bool {
return err == nil
}
func configDirExists(names []string) bool {
configHome := utils.XDGConfigHome()
if configHome == "" {
return false
}
for _, name := range names {
info, err := os.Stat(filepath.Join(configHome, name))
if err == nil && info.IsDir() {
return true
}
}
return false
}
func appExists(checker utils.AppChecker, checkCmd []string, checkFlatpaks []string) bool {
// Both nil is treated as "skip check" / unconditionally run
if checkCmd == nil && checkFlatpaks == nil {
@@ -1096,7 +1112,7 @@ func CheckTemplates(checker utils.AppChecker) []TemplateCheck {
case tmpl.Kind == TemplateKindEmacs:
detected = appExists(checker, tmpl.Commands, tmpl.Flatpaks) && utils.EmacsConfigDir() != ""
default:
detected = appExists(checker, tmpl.Commands, tmpl.Flatpaks) && templateSessionActive(tmpl)
detected = (appExists(checker, tmpl.Commands, tmpl.Flatpaks) || configDirExists(tmpl.ConfigDirs)) && templateSessionActive(tmpl)
}
checks = append(checks, TemplateCheck{ID: tmpl.ID, Detected: detected})
+95 -8
View File
@@ -38,7 +38,7 @@ func TestAppendConfigBinaryExists(t *testing.T) {
opts := &Options{ShellDir: shellDir, AppChecker: mockChecker}
appendConfig(opts, cfgFile, []string{"sh"}, nil, "test.toml")
appendConfig(opts, cfgFile, []string{"sh"}, nil, nil, "test.toml")
cfgFile.Close()
output, err := os.ReadFile(outFile)
@@ -82,7 +82,7 @@ func TestAppendConfigBinaryDoesNotExist(t *testing.T) {
opts := &Options{ShellDir: shellDir, AppChecker: mockChecker}
appendConfig(opts, cfgFile, []string{"nonexistent-binary-12345"}, []string{}, "test.toml")
appendConfig(opts, cfgFile, []string{"nonexistent-binary-12345"}, []string{}, nil, "test.toml")
cfgFile.Close()
output, err := os.ReadFile(outFile)
@@ -122,7 +122,7 @@ func TestAppendConfigFlatpakExists(t *testing.T) {
opts := &Options{ShellDir: shellDir, AppChecker: mockChecker}
appendConfig(opts, cfgFile, nil, []string{"app.zen_browser.zen"}, "test.toml")
appendConfig(opts, cfgFile, nil, []string{"app.zen_browser.zen"}, nil, "test.toml")
cfgFile.Close()
output, err := os.ReadFile(outFile)
@@ -163,7 +163,7 @@ func TestAppendConfigFlatpakDoesNotExist(t *testing.T) {
opts := &Options{ShellDir: shellDir, AppChecker: mockChecker}
appendConfig(opts, cfgFile, []string{}, []string{"com.nonexistent.flatpak"}, "test.toml")
appendConfig(opts, cfgFile, []string{}, []string{"com.nonexistent.flatpak"}, nil, "test.toml")
cfgFile.Close()
output, err := os.ReadFile(outFile)
@@ -203,7 +203,7 @@ func TestAppendConfigBothExist(t *testing.T) {
opts := &Options{ShellDir: shellDir, AppChecker: mockChecker}
appendConfig(opts, cfgFile, []string{"sh"}, []string{"app.zen_browser.zen"}, "test.toml")
appendConfig(opts, cfgFile, []string{"sh"}, []string{"app.zen_browser.zen"}, nil, "test.toml")
cfgFile.Close()
output, err := os.ReadFile(outFile)
@@ -244,7 +244,7 @@ func TestAppendConfigNeitherExists(t *testing.T) {
opts := &Options{ShellDir: shellDir, AppChecker: mockChecker}
appendConfig(opts, cfgFile, []string{"nonexistent-binary-12345"}, []string{"com.nonexistent.flatpak"}, "test.toml")
appendConfig(opts, cfgFile, []string{"nonexistent-binary-12345"}, []string{"com.nonexistent.flatpak"}, nil, "test.toml")
cfgFile.Close()
output, err := os.ReadFile(outFile)
@@ -281,7 +281,7 @@ func TestAppendConfigNoChecks(t *testing.T) {
opts := &Options{ShellDir: shellDir}
appendConfig(opts, cfgFile, nil, nil, "test.toml")
appendConfig(opts, cfgFile, nil, nil, nil, "test.toml")
cfgFile.Close()
output, err := os.ReadFile(outFile)
@@ -312,7 +312,7 @@ func TestAppendConfigFileDoesNotExist(t *testing.T) {
opts := &Options{ShellDir: shellDir}
appendConfig(opts, cfgFile, nil, nil, "nonexistent.toml")
appendConfig(opts, cfgFile, nil, nil, nil, "nonexistent.toml")
cfgFile.Close()
output, err := os.ReadFile(outFile)
@@ -487,3 +487,90 @@ func TestBuildMergedConfigSkipsMangowcWithoutActiveSession(t *testing.T) {
}
assert.NotContains(t, string(output), "[templates.dmsmango]")
}
func TestAppendConfigConfigDirExists(t *testing.T) {
tempDir := t.TempDir()
shellDir := filepath.Join(tempDir, "shell")
configsDir := filepath.Join(shellDir, "matugen", "configs")
if err := os.MkdirAll(configsDir, 0o755); err != nil {
t.Fatalf("failed to create configs dir: %v", err)
}
testConfig := "vencord config content"
if err := os.WriteFile(filepath.Join(configsDir, "vencord.toml"), []byte(testConfig), 0o644); err != nil {
t.Fatalf("failed to write config: %v", err)
}
configHome := filepath.Join(tempDir, "config")
if err := os.MkdirAll(filepath.Join(configHome, "Vencord"), 0o755); err != nil {
t.Fatalf("failed to create Vencord config dir: %v", err)
}
t.Setenv("XDG_CONFIG_HOME", configHome)
outFile := filepath.Join(tempDir, "output.toml")
cfgFile, err := os.Create(outFile)
if err != nil {
t.Fatalf("failed to create output file: %v", err)
}
defer cfgFile.Close()
mockChecker := mocks_utils.NewMockAppChecker(t)
mockChecker.EXPECT().AnyCommandExists("nonexistent-binary-12345").Return(false)
mockChecker.EXPECT().AnyFlatpakExists("com.nonexistent.flatpak").Return(false)
opts := &Options{ShellDir: shellDir, AppChecker: mockChecker}
appendConfig(opts, cfgFile, []string{"nonexistent-binary-12345"}, []string{"com.nonexistent.flatpak"}, []string{"Vencord"}, "vencord.toml")
cfgFile.Close()
output, err := os.ReadFile(outFile)
if err != nil {
t.Fatalf("failed to read output: %v", err)
}
assert.Equal(t, testConfig+"\n", string(output))
}
func TestAppendConfigConfigDirDoesNotExist(t *testing.T) {
tempDir := t.TempDir()
shellDir := filepath.Join(tempDir, "shell")
configsDir := filepath.Join(shellDir, "matugen", "configs")
if err := os.MkdirAll(configsDir, 0o755); err != nil {
t.Fatalf("failed to create configs dir: %v", err)
}
if err := os.WriteFile(filepath.Join(configsDir, "vencord.toml"), []byte("vencord config content"), 0o644); err != nil {
t.Fatalf("failed to write config: %v", err)
}
configHome := filepath.Join(tempDir, "config")
if err := os.MkdirAll(configHome, 0o755); err != nil {
t.Fatalf("failed to create config home: %v", err)
}
t.Setenv("XDG_CONFIG_HOME", configHome)
outFile := filepath.Join(tempDir, "output.toml")
cfgFile, err := os.Create(outFile)
if err != nil {
t.Fatalf("failed to create output file: %v", err)
}
defer cfgFile.Close()
mockChecker := mocks_utils.NewMockAppChecker(t)
mockChecker.EXPECT().AnyCommandExists("nonexistent-binary-12345").Return(false)
mockChecker.EXPECT().AnyFlatpakExists("com.nonexistent.flatpak").Return(false)
opts := &Options{ShellDir: shellDir, AppChecker: mockChecker}
appendConfig(opts, cfgFile, []string{"nonexistent-binary-12345"}, []string{"com.nonexistent.flatpak"}, []string{"Vencord"}, "vencord.toml")
cfgFile.Close()
output, err := os.ReadFile(outFile)
if err != nil {
t.Fatalf("failed to read output: %v", err)
}
assert.Empty(t, string(output))
}
+3 -2
View File
@@ -117,11 +117,12 @@ func RouteRequest(conn net.Conn, req models.Request) {
}
if strings.HasPrefix(req.Method, "cups.") {
if cupsManager == nil {
mgr, err := ensureCupsManager()
if err != nil {
models.RespondError(conn, req.ID, "CUPS manager not initialized")
return
}
cups.HandleRequest(conn, req, cupsManager)
cups.HandleRequest(conn, req, mgr)
return
}
+66 -33
View File
@@ -12,7 +12,6 @@ import (
"strconv"
"strings"
"sync"
"sync/atomic"
"syscall"
"time"
@@ -85,8 +84,8 @@ var geoClientInstance geolocation.Client
const dbusClientID = "dms-dbus-client"
var capabilitySubscribers syncmap.Map[string, chan ServerInfo]
var cupsSubscribers syncmap.Map[string, bool]
var cupsSubscriberCount atomic.Int32
var cupsMu sync.Mutex
var cupsSubscriberCount int
func getSocketDir() string {
if runtime := os.Getenv("XDG_RUNTIME_DIR"); runtime != "" {
@@ -243,17 +242,55 @@ func InitializeAppPickerManager() error {
return nil
}
func InitializeCupsManager() error {
func initializeCupsManagerLocked() (bool, error) {
if cupsManager != nil {
return false, nil
}
manager, err := cups.NewManager()
if err != nil {
log.Warnf("Failed to initialize cups manager: %v", err)
return err
return false, err
}
cupsManager = manager
log.Info("CUPS manager initialized")
return nil
return true, nil
}
func ensureCupsManager() (*cups.Manager, error) {
cupsMu.Lock()
created, err := initializeCupsManagerLocked()
mgr := cupsManager
cupsMu.Unlock()
if err != nil {
return nil, err
}
if created {
notifyCapabilityChange()
}
return mgr, nil
}
func cupsAvailable() bool {
cupsMu.Lock()
defer cupsMu.Unlock()
return cupsManager != nil
}
func releaseCupsSubscriber() {
cupsMu.Lock()
cupsSubscriberCount--
var mgr *cups.Manager
if cupsSubscriberCount == 0 && cupsManager != nil {
mgr = cupsManager
cupsManager = nil
}
cupsMu.Unlock()
if mgr == nil {
return
}
log.Info("Last CUPS subscriber disconnected, shutting down CUPS manager")
mgr.Close()
notifyCapabilityChange()
}
func InitializeBrightnessManager() error {
@@ -463,7 +500,7 @@ func getCapabilities() Capabilities {
caps = append(caps, "browser")
}
if cupsManager != nil {
if cupsAvailable() {
caps = append(caps, "cups")
}
@@ -533,7 +570,7 @@ func getServerInfo() ServerInfo {
caps = append(caps, "browser")
}
if cupsManager != nil {
if cupsAvailable() {
caps = append(caps, "cups")
}
@@ -997,38 +1034,31 @@ func handleSubscribe(conn net.Conn, req models.Request) {
}
if shouldSubscribe("cups") {
cupsSubscribers.Store(clientID+"-cups", true)
count := cupsSubscriberCount.Add(1)
cupsMu.Lock()
cupsSubscriberCount++
created, err := initializeCupsManagerLocked()
mgr := cupsManager
cupsMu.Unlock()
if count == 1 {
if err := InitializeCupsManager(); err != nil {
log.Warnf("Failed to initialize CUPS manager for subscription: %v", err)
} else {
notifyCapabilityChange()
}
if err != nil {
log.Warnf("Failed to initialize CUPS manager for subscription: %v", err)
} else if created {
notifyCapabilityChange()
}
if cupsManager != nil {
if mgr == nil {
releaseCupsSubscriber()
} else {
wg.Add(1)
cupsChan := cupsManager.Subscribe(clientID + "-cups")
cupsChan := mgr.Subscribe(clientID + "-cups")
go func() {
defer wg.Done()
defer func() {
cupsManager.Unsubscribe(clientID + "-cups")
cupsSubscribers.Delete(clientID + "-cups")
count := cupsSubscriberCount.Add(-1)
if count == 0 {
log.Info("Last CUPS subscriber disconnected, shutting down CUPS manager")
if cupsManager != nil {
cupsManager.Close()
cupsManager = nil
notifyCapabilityChange()
}
}
mgr.Unsubscribe(clientID + "-cups")
releaseCupsSubscriber()
}()
initialState := cupsManager.GetState()
initialState := mgr.GetState()
select {
case eventChan <- ServiceEvent{Service: "cups", Data: initialState}:
case <-stopChan:
@@ -1338,9 +1368,12 @@ func cleanupManagers() {
if appPickerManager != nil {
appPickerManager.Close()
}
cupsMu.Lock()
if cupsManager != nil {
cupsManager.Close()
cupsManager = nil
}
cupsMu.Unlock()
if brightnessManager != nil {
brightnessManager.Close()
}
+21 -2
View File
@@ -65,16 +65,35 @@ Singleton {
function _openPopout(popout) {
if (popout.dashVisible !== undefined) {
if (popout.dashVisible && !popout.shouldBeVisible && !popout.isClosing)
let flagStayedTrue = popout.dashVisible === true;
if (popout.dashVisible && !popout.shouldBeVisible && !popout.isClosing) {
popout.dashVisible = false;
flagStayedTrue = false;
}
popout.dashVisible = true;
// Flag already true (e.g. retargeting to another monitor) won't re-fire
// the change handler, so drive the surface open explicitly.
if (flagStayedTrue)
_ensureSurfaceOpen(popout);
return;
}
if (popout.notificationHistoryVisible !== undefined) {
const flagStayedTrue = popout.notificationHistoryVisible === true;
popout.notificationHistoryVisible = true;
if (flagStayedTrue)
_ensureSurfaceOpen(popout);
return;
}
popout.open();
_ensureSurfaceOpen(popout);
}
function _ensureSurfaceOpen(popout) {
if (typeof popout.present === "function") {
popout.present();
return;
}
if (typeof popout.open === "function")
popout.open();
}
function _closePopout(popout) {
+8
View File
@@ -139,6 +139,14 @@ Item {
return;
fadeDpmsWindowLoader.loadedWindow.cancelFade();
}
function onMonitorsOffChanged() {
if (IdleService.monitorsOff)
return;
if (!fadeDpmsWindowLoader.loadedWindow)
return;
fadeDpmsWindowLoader.loadedWindow.dismiss();
}
}
}
}
@@ -449,7 +449,12 @@ Item {
searchQuery = query;
requestSearch();
if (searchMode !== "plugins" && query.startsWith("/")) {
if (autoSwitchedToFiles && !query.startsWith("/")) {
restorePreviousMode();
return;
}
if (query.startsWith("/")) {
var prefix = Utils.parseFileSearchPrefix(query);
var explicitType = prefix && prefix.type !== null ? prefix.type : null;
var targetType = explicitType !== null ? explicitType : (SessionData.launcherLastFileSearchType || "all");
@@ -174,9 +174,12 @@ Item {
spotlightContent.controller.selectedFlatIndex = 0;
spotlightContent.controller.selectedItem = null;
spotlightContent.controller.historyIndex = -1;
spotlightContent.controller.searchQuery = targetQuery;
spotlightContent.controller.performSearch();
if (targetQuery) {
spotlightContent.controller.setSearchQuery(targetQuery);
} else {
spotlightContent.controller.searchQuery = "";
spotlightContent.controller.performSearch();
}
}
if (spotlightContent.resetScroll) {
spotlightContent.resetScroll();
@@ -271,7 +274,7 @@ Item {
target: spotlightContent?.controller ?? null
function onModeChanged(mode, userInitiated) {
if (!userInitiated || !SettingsData.rememberLastMode || (mode !== "all" && mode !== "apps"))
if (!userInitiated || !SettingsData.rememberLastMode)
return;
SessionData.setLauncherLastMode(mode);
}
+61 -28
View File
@@ -27,7 +27,7 @@ DankModal {
property real holdProgress: 0
property bool showHoldHint: false
property bool holdFromKeyboard: false
property string pendingKeyAction: ""
property string committedAction: ""
readonly property bool needsConfirmation: SettingsData.powerActionConfirm
readonly property int holdDurationMs: SettingsData.powerActionHoldDuration * 1000
@@ -39,10 +39,16 @@ DankModal {
return action !== "lock" && action !== "restart";
}
function actionWakesOnKeyRelease(action) {
return action === "suspend" || action === "hibernate";
}
function startHold(action, actionIndex) {
if (committedAction !== "")
return;
if (!needsConfirmation || !actionNeedsConfirm(action)) {
if (holdFromKeyboard) {
pendingKeyAction = action;
if (holdFromKeyboard && actionWakesOnKeyRelease(action)) {
commitAction(action, actionIndex);
return;
}
executeAction(action);
@@ -56,7 +62,6 @@ DankModal {
}
function cancelHold() {
pendingKeyAction = "";
if (holdAction === "")
return;
const wasHolding = holdProgress > 0;
@@ -76,8 +81,8 @@ DankModal {
return;
}
holdTimer.stop();
if (holdFromKeyboard) {
pendingKeyAction = holdAction;
if (holdFromKeyboard && actionWakesOnKeyRelease(holdAction)) {
commitAction(holdAction, holdActionIndex);
return;
}
const action = holdAction;
@@ -87,6 +92,25 @@ DankModal {
executeAction(action);
}
function commitAction(action, actionIndex) {
holdTimer.stop();
holdAction = "";
holdActionIndex = actionIndex;
committedAction = action;
commitFallbackTimer.restart();
}
function executeCommittedAction() {
if (committedAction === "")
return;
commitFallbackTimer.stop();
const action = committedAction;
committedAction = "";
holdActionIndex = -1;
holdProgress = 0;
executeAction(action);
}
signal switchUserRequested
function executeAction(action) {
@@ -128,6 +152,12 @@ DankModal {
onTriggered: root.showHoldHint = false
}
Timer {
id: commitFallbackTimer
interval: 5000
onTriggered: root.executeCommittedAction()
}
function openCentered() {
parentBounds = Qt.rect(0, 0, 0, 0);
parentScreen = null;
@@ -286,7 +316,8 @@ DankModal {
holdProgress = 0;
showHoldHint = false;
holdFromKeyboard = false;
pendingKeyAction = "";
committedAction = "";
commitFallbackTimer.stop();
updateVisibleActions();
const defaultIndex = getDefaultActionIndex();
selectedIndex = defaultIndex;
@@ -309,6 +340,10 @@ DankModal {
event.accepted = true;
return;
}
if (committedAction !== "") {
event.accepted = true;
return;
}
holdFromKeyboard = true;
if (SettingsData.powerMenuGridLayout) {
handleGridNavigation(event, true);
@@ -321,6 +356,11 @@ DankModal {
event.accepted = true;
return;
}
if (committedAction !== "") {
event.accepted = true;
executeCommittedAction();
return;
}
if (SettingsData.powerMenuGridLayout) {
handleGridNavigation(event, false);
} else {
@@ -331,16 +371,7 @@ DankModal {
function handleListNavigation(event, isPressed) {
if (!isPressed) {
if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter || event.key === Qt.Key_R || event.key === Qt.Key_X || event.key === Qt.Key_L || event.key === Qt.Key_S || event.key === Qt.Key_H || event.key === Qt.Key_D || (event.key === Qt.Key_P && !(event.modifiers & Qt.ControlModifier))) {
if (pendingKeyAction !== "") {
const action = pendingKeyAction;
pendingKeyAction = "";
holdAction = "";
holdActionIndex = -1;
holdProgress = 0;
executeAction(action);
} else {
cancelHold();
}
cancelHold();
event.accepted = true;
}
return;
@@ -434,16 +465,7 @@ DankModal {
function handleGridNavigation(event, isPressed) {
if (!isPressed) {
if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter || event.key === Qt.Key_R || event.key === Qt.Key_X || event.key === Qt.Key_L || event.key === Qt.Key_S || event.key === Qt.Key_H || event.key === Qt.Key_D || (event.key === Qt.Key_P && !(event.modifiers & Qt.ControlModifier))) {
if (pendingKeyAction !== "") {
const action = pendingKeyAction;
pendingKeyAction = "";
holdAction = "";
holdActionIndex = -1;
holdProgress = 0;
executeAction(action);
} else {
cancelHold();
}
cancelHold();
event.accepted = true;
}
return;
@@ -812,6 +834,7 @@ DankModal {
Row {
id: hintRow
readonly property bool selectedNeedsHold: root.actionNeedsConfirm(root.getActionAtIndex(root.selectedIndex))
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
anchors.bottomMargin: Theme.spacingS
@@ -826,7 +849,13 @@ DankModal {
}
DankIcon {
name: root.showHoldHint ? "warning" : "touch_app"
name: {
if (root.showHoldHint)
return "warning";
if (!hintRow.selectedNeedsHold)
return "bolt";
return "touch_app";
}
size: Theme.fontSizeSmall
color: root.showHoldHint ? Theme.warning : Theme.surfaceTextSecondary
anchors.verticalCenter: parent.verticalCenter
@@ -836,8 +865,12 @@ DankModal {
readonly property real totalMs: SettingsData.powerActionHoldDuration * 1000
readonly property int remainingMs: Math.ceil(totalMs * (1 - root.holdProgress))
text: {
if (root.committedAction !== "")
return I18n.tr("Release to confirm");
if (root.showHoldHint)
return I18n.tr("Hold longer to confirm");
if (!hintRow.selectedNeedsHold)
return I18n.tr("Activates immediately");
if (root.holdProgress > 0) {
if (totalMs < 1000)
return I18n.tr("Hold to confirm (%1 ms)").arg(remainingMs);
+11 -5
View File
@@ -41,6 +41,9 @@ FloatingWindow {
signal closingModal
function show() {
if (visible && !backingWindowVisible) {
visible = false;
}
visible = true;
}
@@ -49,7 +52,11 @@ FloatingWindow {
}
function toggle() {
visible = !visible;
if (visible && backingWindowVisible) {
hide();
return;
}
show();
}
function setTabIndex(tabIndex: int) {
@@ -61,13 +68,12 @@ FloatingWindow {
function showWithTab(tabIndex: int) {
setTabIndex(tabIndex);
visible = true;
show();
}
function showWithTabName(tabName: string) {
var idx = sidebar.resolveTabIndex(tabName);
setTabIndex(idx);
visible = true;
setTabIndex(sidebar.resolveTabIndex(tabName));
show();
}
function resolveTabIndex(tabName: string): int {
@@ -77,6 +77,12 @@ DankPopout {
readonly property color _containerBg: Theme.nestedSurface
// Defer open one tick so screen-change geometry settles before the surface
// maps; a synchronous open churns the surface and loses the blur on a switch.
function present() {
Qt.callLater(open);
}
function openWithSection(section) {
StateUtils.openWithSection(root, section);
}
@@ -63,8 +63,8 @@ BasePill {
anchors.fill: parent
acceptedButtons: Qt.LeftButton | Qt.RightButton
cursorShape: Qt.PointingHandCursor
onPressed: mouse => root.triggerRipple(this, mouse.x, mouse.y)
onClicked: function (mouse) {
onPressed: function (mouse) {
root.triggerRipple(this, mouse.x, mouse.y);
switch (mouse.button) {
case Qt.RightButton:
openContextMenu();
@@ -1250,13 +1250,8 @@ BasePill {
if (root.isVerticalOrientation) {
const edge = root.axis?.edge;
if (edge === "left") {
const targetX = overflowMenu.anchorPos.x;
return Math.max(left, Math.min(right, targetX));
} else {
const targetX = overflowMenu.anchorPos.x - alignedWidth;
return Math.max(left, Math.min(right, targetX));
}
const targetX = edge === "left" ? overflowMenu.anchorPos.x : overflowMenu.anchorPos.x - alignedWidth;
return Math.max(10, Math.min(overflowMenu.width - alignedWidth - 10, targetX));
} else {
const want = overflowMenu.anchorPos.x - alignedWidth / 2;
return Math.max(left, Math.min(right, want));
@@ -1271,13 +1266,8 @@ BasePill {
const want = overflowMenu.anchorPos.y - alignedHeight / 2;
return Math.max(top, Math.min(bottom, want));
} else {
if (root.isAtBottom) {
const targetY = overflowMenu.anchorPos.y - alignedHeight;
return Math.max(top, Math.min(bottom, targetY));
} else {
const targetY = overflowMenu.anchorPos.y;
return Math.max(top, Math.min(bottom, targetY));
}
const targetY = root.isAtBottom ? overflowMenu.anchorPos.y - alignedHeight : overflowMenu.anchorPos.y;
return Math.max(10, Math.min(overflowMenu.height - alignedHeight - 10, targetY));
}
})(), overflowMenu.dpr)
@@ -1770,13 +1760,8 @@ BasePill {
if (menuRoot.isVertical) {
const edge = menuRoot.axis?.edge;
if (edge === "left") {
const targetX = menuWindow.anchorPos.x;
return Math.max(left, Math.min(right, targetX));
} else {
const targetX = menuWindow.anchorPos.x - alignedWidth;
return Math.max(left, Math.min(right, targetX));
}
const targetX = edge === "left" ? menuWindow.anchorPos.x : menuWindow.anchorPos.x - alignedWidth;
return Math.max(10, Math.min(menuWindow.width - alignedWidth - 10, targetX));
} else {
const want = menuWindow.anchorPos.x - alignedWidth / 2;
return Math.max(left, Math.min(right, want));
@@ -1791,13 +1776,8 @@ BasePill {
const want = menuWindow.anchorPos.y - alignedHeight / 2;
return Math.max(top, Math.min(bottom, want));
} else {
if (menuRoot.isAtBottom) {
const targetY = menuWindow.anchorPos.y - alignedHeight;
return Math.max(top, Math.min(bottom, targetY));
} else {
const targetY = menuWindow.anchorPos.y;
return Math.max(top, Math.min(bottom, targetY));
}
const targetY = menuRoot.isAtBottom ? menuWindow.anchorPos.y - alignedHeight : menuWindow.anchorPos.y;
return Math.max(10, Math.min(menuWindow.height - alignedHeight - 10, targetY));
}
})(), menuWindow.dpr)
@@ -1079,7 +1079,7 @@ Rectangle {
Text {
text: I18n.tr("Add a task...", "placeholder in the new-task input field")
color: Theme.onSurface_38
color: Theme.outlineButton
visible: taskInput.text.length === 0
font.pixelSize: Theme.fontSizeSmall
anchors.verticalCenter: parent.verticalCenter
@@ -1,5 +1,4 @@
import QtQuick
import QtQuick.Controls
import qs.Common
import qs.Services
import qs.Widgets
@@ -19,6 +18,7 @@ Card {
anchors.centerIn: parent
spacing: Theme.spacingS
visible: !WeatherService.weather.available
z: 1
DankSpinner {
size: 24
@@ -42,9 +42,9 @@ Card {
anchors.horizontalCenter: parent.horizontalCenter
}
Button {
DankButton {
text: I18n.tr("Refresh")
flat: true
buttonHeight: 32
visible: !WeatherService.weather.loading
anchors.horizontalCenter: parent.horizontalCenter
onClicked: WeatherService.forceRefresh()
+28 -93
View File
@@ -141,52 +141,27 @@ Item {
anchors.verticalCenter: parent.verticalCenter
}
DankIcon {
DankActionButton {
id: refreshButtonTwo
name: "refresh"
size: Theme.iconSize - 4
color: Theme.withAlpha(Theme.surfaceText, 0.4)
anchors.top: parent.top
anchors.verticalCenter: parent.verticalCenter
smoothTransform: isRefreshing
property bool isRefreshing: false
iconName: isRefreshing ? "" : "refresh"
iconColor: Theme.withAlpha(Theme.surfaceText, 0.4)
tooltipText: I18n.tr("Refresh Weather")
tooltipSide: "left"
enabled: !isRefreshing
MouseArea {
id: refreshButtonMouseAreaTwo
anchors.fill: parent
hoverEnabled: true
cursorShape: parent.enabled ? Qt.PointingHandCursor : Qt.ForbiddenCursor
enabled: parent.enabled
property bool isRefreshing: false
Timer {
id: hoverDelayTwo
interval: 300
repeat: false
onTriggered: {
refreshButtonTooltipTwo.show(I18n.tr("Refresh Weather"), refreshButtonTwo, 0, 0, "left");
}
}
onEntered: {
hoverDelayTwo.restart();
}
onExited: {
hoverDelayTwo.stop();
refreshButtonTooltipTwo.hide();
}
onClicked: {
refreshButtonTwo.isRefreshing = true;
WeatherService.forceRefresh();
refreshTimerTwo.restart();
}
onClicked: {
isRefreshing = true;
WeatherService.forceRefresh();
refreshTimerTwo.restart();
}
DankTooltipV2 {
id: refreshButtonTooltipTwo
DankSpinner {
anchors.centerIn: parent
size: refreshButtonTwo.iconSize
visible: refreshButtonTwo.isRefreshing
}
Timer {
@@ -194,14 +169,6 @@ Item {
interval: 2000
onTriggered: refreshButtonTwo.isRefreshing = false
}
RotationAnimator on rotation {
running: refreshButtonTwo.isRefreshing
from: 0
to: 360
duration: 1000
loops: Animation.Infinite
}
}
}
}
@@ -864,52 +831,28 @@ Item {
onClicked: SessionData.setWeatherHourlyDetailed(!SessionData.weatherHourlyDetailed)
}
DankIcon {
DankActionButton {
id: refreshButton
name: "refresh"
size: Theme.iconSize - 4
color: Theme.withAlpha(Theme.surfaceText, 0.4)
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
smoothTransform: isRefreshing
property bool isRefreshing: false
iconName: isRefreshing ? "" : "refresh"
iconColor: Theme.withAlpha(Theme.surfaceText, 0.4)
tooltipText: I18n.tr("Refresh Weather")
tooltipSide: "left"
enabled: !isRefreshing
MouseArea {
id: refreshButtonMouseArea
anchors.fill: parent
hoverEnabled: true
cursorShape: parent.enabled ? Qt.PointingHandCursor : Qt.ForbiddenCursor
enabled: parent.enabled
property bool isRefreshing: false
Timer {
id: hoverDelay
interval: 300
repeat: false
onTriggered: {
refreshButtonTooltip.show(I18n.tr("Refresh Weather"), refreshButton, 0, 0, "left");
}
}
onEntered: {
hoverDelay.restart();
}
onExited: {
hoverDelay.stop();
refreshButtonTooltip.hide();
}
onClicked: {
refreshButton.isRefreshing = true;
WeatherService.forceRefresh();
refreshTimer.restart();
}
onClicked: {
isRefreshing = true;
WeatherService.forceRefresh();
refreshTimer.restart();
}
DankTooltipV2 {
id: refreshButtonTooltip
DankSpinner {
anchors.centerIn: parent
size: refreshButton.iconSize
visible: refreshButton.isRefreshing
}
Timer {
@@ -917,14 +860,6 @@ Item {
interval: 2000
onTriggered: refreshButton.isRefreshing = false
}
RotationAnimator on rotation {
running: refreshButton.isRefreshing
from: 0
to: 360
duration: 1000
loops: Animation.Infinite
}
}
}
+45 -10
View File
@@ -438,20 +438,55 @@ Variants {
parent: dock.contentItem
visible: false
readonly property bool expanded: dock.reveal
readonly property bool chrome: dock.usesConnectedFrameChrome
readonly property bool atEndEdge: SettingsData.dockPosition === SettingsData.Position.Bottom || SettingsData.dockPosition === SettingsData.Position.Right
readonly property real innerReach: borderThickness + (SettingsData.appsDockEnlargeOnHover ? animationHeadroom : 0)
readonly property real bodyX: dockBackground.x + dockContainer.x + dockMouseArea.x + dockCore.x + dockSlide.x
readonly property real bodyY: dockBackground.y + dockContainer.y + dockMouseArea.y + dockCore.y + dockSlide.y
x: {
const baseX = dockCore.x + dockMouseArea.x;
if (isVertical && SettingsData.dockPosition === SettingsData.Position.Right)
return baseX - (expanded ? animationHeadroom + borderThickness + dock.horizontalConnectorExtent : 0);
return baseX - (expanded ? borderThickness + dock.horizontalConnectorExtent : 0);
if (chrome) {
const baseX = dockCore.x + dockMouseArea.x;
if (isVertical && atEndEdge)
return baseX - (expanded ? animationHeadroom + borderThickness + dock.horizontalConnectorExtent : 0);
return baseX - (expanded ? borderThickness + dock.horizontalConnectorExtent : 0);
}
if (!isVertical)
return dockCore.x + dockMouseArea.x - (expanded ? borderThickness : 0);
if (!atEndEdge)
return 0;
return expanded ? Math.min(bodyX - innerReach, dock.width - 1) : dock.width - 1;
}
y: {
const baseY = dockCore.y + dockMouseArea.y;
if (!isVertical && SettingsData.dockPosition === SettingsData.Position.Bottom)
return baseY - (expanded ? animationHeadroom + borderThickness + dock.verticalConnectorExtent : 0);
return baseY - (expanded ? borderThickness + dock.verticalConnectorExtent : 0);
if (chrome) {
const baseY = dockCore.y + dockMouseArea.y;
if (!isVertical && atEndEdge)
return baseY - (expanded ? animationHeadroom + borderThickness + dock.verticalConnectorExtent : 0);
return baseY - (expanded ? borderThickness + dock.verticalConnectorExtent : 0);
}
if (isVertical)
return dockCore.y + dockMouseArea.y - (expanded ? borderThickness : 0);
if (!atEndEdge)
return 0;
return expanded ? Math.min(bodyY - innerReach, dock.height - 1) : dock.height - 1;
}
width: {
if (chrome)
return dockMouseArea.width + (isVertical && expanded ? animationHeadroom : 0) + (expanded ? borderThickness * 2 + dock.horizontalConnectorExtent * 2 : 0);
if (!isVertical)
return dockMouseArea.width + (expanded ? borderThickness * 2 : 0);
if (!expanded)
return 1;
return atEndEdge ? dock.width - x : Math.max(bodyX + dockBackground.width + innerReach, 1);
}
height: {
if (chrome)
return dockMouseArea.height + (!isVertical && expanded ? animationHeadroom : 0) + (expanded ? borderThickness * 2 + dock.verticalConnectorExtent * 2 : 0);
if (isVertical)
return dockMouseArea.height + (expanded ? borderThickness * 2 : 0);
if (!expanded)
return 1;
return atEndEdge ? dock.height - y : Math.max(bodyY + dockBackground.height + innerReach, 1);
}
width: dockMouseArea.width + (isVertical && expanded ? animationHeadroom : 0) + (expanded ? borderThickness * 2 + dock.horizontalConnectorExtent * 2 : 0)
height: dockMouseArea.height + (!isVertical && expanded ? animationHeadroom : 0) + (expanded ? borderThickness * 2 + dock.verticalConnectorExtent * 2 : 0)
}
mask: Region {
@@ -1773,6 +1773,7 @@ Item {
const idx = GreeterState.sessionList.indexOf(value);
if (idx < 0)
return;
GreeterState.sessionManuallySelected = true;
GreeterState.currentSessionIndex = idx;
GreeterState.selectedSession = GreeterState.sessionExecs[idx];
GreeterState.selectedSessionPath = GreeterState.sessionPaths[idx];
@@ -1785,6 +1786,8 @@ Item {
property string currentSessionName: GreeterState.sessionList[GreeterState.currentSessionIndex] || ""
function finalizeSessionSelection() {
if (GreeterState.sessionManuallySelected)
return;
if (GreeterState.sessionList.length === 0)
return;
if (!GreetdMemory.memoryReady)
@@ -21,6 +21,7 @@ Singleton {
property var sessionPaths: []
property var sessionDesktopIds: []
property int currentSessionIndex: 0
property bool sessionManuallySelected: false
property var availableUsers: []
property int selectedUserIndex: -1
+20 -2
View File
@@ -4,11 +4,13 @@ import QtQuick
import Quickshell
import Quickshell.Wayland
import qs.Common
import qs.Services
PanelWindow {
id: root
property bool active: false
property bool _completed: false
signal fadeCompleted
signal fadeCancelled
@@ -35,7 +37,8 @@ PanelWindow {
opacity: 0
onOpacityChanged: {
if (opacity >= 0.99 && root.active) {
if (opacity >= 0.99 && root.active && !root._completed) {
root._completed = true;
root.fadeCompleted();
}
}
@@ -58,6 +61,7 @@ PanelWindow {
function startFade() {
if (!SettingsData.fadeToDpmsEnabled)
return;
_completed = false;
active = true;
fadeOverlay.opacity = 0.0;
fadeSeq.stop();
@@ -65,10 +69,24 @@ PanelWindow {
}
function cancelFade() {
dismiss();
fadeCancelled();
}
function dismiss() {
fadeSeq.stop();
fadeOverlay.opacity = 0.0;
active = false;
fadeCancelled();
_completed = false;
}
Connections {
target: IdleService
function onIsShellLockedChanged() {
if (IdleService.isShellLocked)
return;
root.dismiss();
}
}
MouseArea {
@@ -27,11 +27,14 @@ Item {
function hide() {
if (isKeyboardActive && keyboard !== null) {
keyboard.destroy();
keyboard = null;
isKeyboardActive = false;
} else
log.debug("The keyboard is already hidden");
}
Component.onDestruction: hide()
// private
property Item keyboard: null
Component {
+81 -31
View File
@@ -10,6 +10,8 @@ import qs.Services
Scope {
id: root
readonly property var log: Log.scoped("Lock")
property string sharedPasswordBuffer: ""
property bool shouldLock: false
@@ -21,26 +23,13 @@ Scope {
onShouldLockChanged: {
IdleService.isShellLocked = shouldLock;
if (shouldLock && lockPowerOffArmed) {
lockStateCheck.restart();
}
}
Timer {
id: lockStateCheck
interval: 100
repeat: false
onTriggered: {
if (sessionLock.locked && lockPowerOffArmed) {
pendingLock = false;
lockPowerOffArmed = false;
beginPowerOff();
}
}
}
property bool lockInitiatedLocally: false
property bool pendingLock: false
readonly property int maxLockRetries: 3
property int lockRetryAttempts: 0
property bool lockRetryPending: false
property bool lockPowerOffArmed: false
property bool lockWakeAllowed: false
property bool customLockerSpawned: false
@@ -116,6 +105,24 @@ Scope {
return true;
}
function resetLockRetry() {
lockRetryAttempts = 0;
lockRetryPending = false;
lockRetryTimer.stop();
}
function handleLockLost() {
if (lockRetryAttempts >= maxLockRetries) {
log.error("Compositor refused session lock", maxLockRetries, "times - resetting lock state");
forceReset();
return;
}
lockRetryAttempts++;
lockRetryPending = true;
lockRetryTimer.restart();
log.warn("Session lock lost while lock requested - retry", lockRetryAttempts, "/", maxLockRetries);
}
function lock() {
if (SettingsData.customPowerActionLock?.length > 0) {
spawnCustomLocker();
@@ -124,6 +131,7 @@ Scope {
if (shouldLock || pendingLock)
return;
resetLockRetry();
lockInitiatedLocally = true;
lockPowerOffArmed = powerOffOnLock;
@@ -139,7 +147,7 @@ Scope {
function lockAndOutputsOff() {
IdleService.lockPowerOffRequested = true;
if (sessionLock.locked) {
if (sessionLock.secure) {
beginPowerOff();
return;
}
@@ -150,6 +158,7 @@ Scope {
function unlock() {
if (!shouldLock)
return;
resetLockRetry();
lockInitiatedLocally = false;
notifyLoginctl(false);
shouldLock = false;
@@ -160,6 +169,7 @@ Scope {
pendingLock = false;
shouldLock = false;
customLockerSpawned = false;
resetLockRetry();
resetPowerOffFade();
IdleService.lockPowerOffRequested = false;
}
@@ -198,6 +208,12 @@ Scope {
shouldLock = false;
}
function onSessionResumed() {
if (!shouldLock || sessionLock.locked)
return;
resumeRelockTimer.restart();
}
function onLoginctlStateChanged() {
if (SessionService.active && pendingLock) {
pendingLock = false;
@@ -239,7 +255,7 @@ Scope {
WlSessionLock {
id: sessionLock
locked: shouldLock
locked: shouldLock && !lockRetryPending
WlSessionLockSurface {
id: lockSurface
@@ -312,16 +328,23 @@ Scope {
Connections {
target: sessionLock
function onLockedChanged() {
notifyLockedHint(sessionLock.locked);
if (sessionLock.locked) {
pendingLock = false;
if (lockPowerOffArmed && powerOffOnLock)
beginPowerOff();
lockPowerOffArmed = false;
function onSecureChanged() {
notifyLockedHint(sessionLock.secure);
if (!sessionLock.secure)
return;
}
IdleService.dismissFadeToLock();
lockRetryAttempts = 0;
pendingLock = false;
if (lockPowerOffArmed && powerOffOnLock)
beginPowerOff();
lockPowerOffArmed = false;
}
function onLockedChanged() {
if (sessionLock.locked)
return;
if (shouldLock && (IdleService.monitorsOff || lockPowerOffArmed || IdleService.lockPowerOffRequested))
return;
lockWakeAllowed = false;
resetPowerOffFade();
if (IdleService.monitorsOff && powerOffOnLock) {
@@ -329,6 +352,8 @@ Scope {
CompositorService.powerOnMonitors();
}
IdleService.lockPowerOffRequested = false;
if (shouldLock && !lockRetryPending)
handleLockLost();
}
}
@@ -360,13 +385,15 @@ Scope {
}
function isLocked(): bool {
return sessionLock.locked;
return sessionLock.secure;
}
function status(): string {
return JSON.stringify({
shouldLock: root.shouldLock,
sessionLockLocked: sessionLock.locked,
sessionLockSecure: sessionLock.secure,
lockRetryAttempts: root.lockRetryAttempts,
lockInitiatedLocally: root.lockInitiatedLocally,
pendingLock: root.pendingLock,
loginctlLocked: SessionService.locked,
@@ -395,6 +422,29 @@ Scope {
}
}
Timer {
id: lockRetryTimer
interval: 1000
repeat: false
onTriggered: root.lockRetryPending = false
}
Timer {
id: resumeRelockTimer
interval: 1000
repeat: false
onTriggered: {
if (!root.shouldLock || sessionLock.locked)
return;
if (IdleService.monitorsOff || root.lockPowerOffArmed || IdleService.lockPowerOffRequested)
return;
root.log.warn("Session lock dead after resume - re-locking");
root.resetLockRetry();
root.lockRetryPending = true;
root.lockRetryPending = false;
}
}
Timer {
id: dpmsReapplyTimer
interval: 100
@@ -407,7 +457,7 @@ Scope {
interval: 200
repeat: false
onTriggered: {
if (!sessionLock.locked)
if (!sessionLock.secure)
return;
if (!powerOffOnLock)
return;
@@ -426,7 +476,7 @@ Scope {
MouseArea {
anchors.fill: parent
enabled: sessionLock.locked
enabled: sessionLock.secure
hoverEnabled: enabled
onPressed: lockWakeDebounce.restart()
onPositionChanged: lockWakeDebounce.restart()
@@ -435,10 +485,10 @@ Scope {
FocusScope {
anchors.fill: parent
focus: sessionLock.locked
focus: sessionLock.secure
Keys.onPressed: event => {
if (!sessionLock.locked)
if (!sessionLock.secure)
return;
lockWakeDebounce.restart();
}
+19 -1
View File
@@ -35,6 +35,7 @@ Item {
property int hyprlandLayoutCount: 0
property bool lockerReadySent: false
property bool lockerReadyArmed: false
property var sessionLock: null
readonly property bool hasCustomWallpaper: SettingsData.lockScreenWallpaperPath !== ""
readonly property string lockFontFamily: SettingsData.lockScreenFontFamily
@@ -111,6 +112,8 @@ Item {
}
function sendLockerReadyOnce() {
if (root.demoMode)
return;
if (lockerReadySent)
return;
if (root.unlocking)
@@ -133,12 +136,27 @@ Item {
return;
if (!root.visible || root.opacity <= 0)
return;
// Don't report ready until the compositor has confirmed the session is
// locked (ext-session-lock `locked` event). Qt's afterRendering fires
// before the lock surface is committed/presented, so releasing the sleep
// inhibitor on it lets the machine freeze with the desktop still on screen,
// which then flashes on resume. secure=true guarantees the desktop is hidden.
if (root.sessionLock && !root.sessionLock.secure)
return;
Qt.callLater(() => {
if (root.visible && root.opacity > 0 && !root.unlocking)
sendLockerReadyOnce();
});
}
Connections {
target: root.sessionLock
enabled: target !== null
function onSecureChanged() {
root.maybeSend();
}
}
Connections {
target: root.Window.window
enabled: target !== null
@@ -778,7 +796,7 @@ Item {
return "passkey";
if (pam.fprint.tries >= SettingsData.maxFprintTries)
return "fingerprint_off";
if (pam.fprint.active)
if (pam.fprint.active || pam.fprint.retrying)
return "fingerprint";
if (pam.u2f.active)
return "passkey";
+1
View File
@@ -33,6 +33,7 @@ FocusScope {
anchors.fill: parent
demoMode: false
sessionLock: root.lock
pam: root.pam
passwordBuffer: root.sharedPasswordBuffer
screenName: root.screenName
+8 -1
View File
@@ -262,9 +262,11 @@ Scope {
property bool available: SettingsData.lockFingerprintReady
property int tries
property int errorTries
property bool retrying: false
function checkAvail(): void {
if (!available || !SettingsData.enableFprint || !root.lockSecured || root.fprintSuppressedByPrimaryPam) {
retrying = false;
abort();
return;
}
@@ -273,6 +275,7 @@ Scope {
tries = 0;
errorTries = 0;
retrying = false;
start();
}
@@ -285,6 +288,7 @@ Scope {
switch (res) {
case PamResult.Success:
retrying = false;
if (!root.unlockInProgress) {
passwd.abort();
root.proceedAfterPrimaryAuth();
@@ -293,13 +297,16 @@ Scope {
case PamResult.Error:
errorTries++;
if (errorTries < 200) {
retrying = true;
abort();
errorRetry.restart();
return;
}
retrying = false;
abort();
return;
case PamResult.MaxTries:
retrying = false;
tries++;
if (tries < SettingsData.maxFprintTries) {
root.fprintState = "fail";
@@ -418,7 +425,7 @@ Scope {
Timer {
id: errorRetry
interval: 1500
interval: Math.min(1500 * Math.pow(2, Math.max(0, fprint.errorTries - 1)), 30000)
onTriggered: fprint.start()
}
@@ -61,6 +61,11 @@ DankPopout {
notificationHistoryVisible = !notificationHistoryVisible;
}
// Re-open without toggling the flag (used when retargeting to another monitor).
function present() {
openSized();
}
function openSized() {
if (!notificationHistoryVisible)
return;
@@ -45,6 +45,14 @@ PanelWindow {
blurWidth: !win._finalized && !win.connectedFrameMode ? innerW * s : 0
blurHeight: !win._finalized && !win.connectedFrameMode ? innerH * s : 0
blurRadius: win.connectedFrameMode ? Theme.connectedSurfaceRadius : Theme.cornerRadius
// Slide-out translates the card past the surface edge; intersecting with the
// resting bounds keeps the committed region on the visible content instead of
// leaving a stray blur sliver at the edge (#2917).
clipEnabled: true
clipX: content.x + content.cardInset
clipY: content.y + content.cardInset
clipWidth: innerW
clipHeight: innerH
}
WlrLayershell.namespace: "dms:notification-popup"
@@ -24,6 +24,8 @@ Item {
property string matugenPreviewRequestKey: ""
property var installedRegistryThemes: []
property var templateDetection: []
readonly property var neovimDarkBaseThemes: ["aquarium", "ashes", "aylin", "ayu_dark", "bearded-arc", "carbonfox", "catppuccin", "chadracula", "chadracula-evondev", "chadtain", "chocolate", "darcula-dark", "dark_horizon", "decay", "default-dark", "doomchad", "eldritch", "embark", "everblush", "everforest", "falcon", "flexoki", "flouromachine", "gatekeeper", "github_dark", "gruvbox", "gruvchad", "hiberbee", "horizon", "jabuti", "jellybeans", "kanagawa", "kanagawa-dragon", "material-darker", "material-deep-ocean", "melange", "midnight_breeze", "mito-laser", "monekai", "monochrome", "mountain", "neofusion", "nightfox", "nightlamp", "nightowl", "nord", "obsidian-ember", "oceanic-next", "onedark", "onenord", "oxocarbon", "palenight", "pastelDark", "pastelbeans", "penumbra_dark", "poimandres", "radium", "rosepine", "rxyhn", "scaryforest", "seoul256_dark", "solarized_dark", "solarized_osaka", "starlight", "sweetpastel", "tokyodark", "tokyonight", "tomorrow_night", "tundra", "vesper", "vscode_dark", "wombat", "yoru", "zenburn"]
readonly property var neovimLightBaseThemes: ["ayu_light", "blossom_light", "catppuccin-latte", "default-light", "everforest_light", "flex-light", "flexoki-light", "github_light", "gruvbox_light", "material-lighter", "nano-light", "oceanic-light", "one_light", "onenord_light", "penumbra_light", "rosepine-dawn", "seoul256_light", "solarized_light", "sunrise_breeze", "vscode_light"]
readonly property var matugenSchemeColorMap: {
const map = {};
const mode = SessionData.isLightMode ? "light" : "dark";
@@ -2666,7 +2668,7 @@ Item {
description: "Base to derive dark theme from"
visible: neovimThemeToggle.visible && neovimThemeToggle.checked
currentValue: SettingsData.matugenTemplateNeovimSettings?.dark?.baseTheme ?? "github_dark"
options: ["aquarium", "ashes", "aylin", "ayu_dark", "bearded-arc", "carbonfox", "catppuccin", "chadracula", "chadracula-evondev", "chadtain", "chocolate", "darcula-dark", "dark_horizon", "decay", "default-dark", "doomchad", "eldritch", "embark", "everblush", "everforest", "falcon", "flexoki", "flouromachine", "gatekeeper", "github_dark", "gruvbox", "gruvchad", "hiberbee", "horizon", "jabuti", "jellybeans", "kanagawa", "kanagawa-dragon", "material-darker", "material-deep-ocean", "melange", "midnight_breeze", "mito-laser", "monekai", "monochrome", "mountain", "neofusion", "nightfox", "nightlamp", "nightowl", "nord", "obsidian-ember", "oceanic-next", "onedark", "onenord", "oxocarbon", "palenight", "pastelDark", "pastelbeans", "penumbra_dark", "poimandres", "radium", "rosepine", "rxyhn", "scaryforest", "seoul256_dark", "solarized_dark", "solarized_osaka", "starlight", "sweetpastel", "tokyodark", "tokyonight", "tomorrow_night", "tundra", "vesper", "vscode_dark", "wombat", "yoru", "zenburn"]
options: themeColorsTab.neovimDarkBaseThemes.concat(themeColorsTab.neovimLightBaseThemes)
enableFuzzySearch: true
onValueChanged: value => {
const settings = SettingsData.matugenTemplateNeovimSettings;
@@ -2683,7 +2685,7 @@ Item {
description: "Base to derive light theme from"
visible: neovimThemeToggle.visible && neovimThemeToggle.checked
currentValue: SettingsData.matugenTemplateNeovimSettings?.light?.baseTheme ?? "github_light"
options: ["ayu_light", "blossom_light", "catppuccin-latte", "default-light", "everforest_light", "flex-light", "flexoki-light", "github_light", "gruvbox_light", "material-lighter", "nano-light", "oceanic-light", "one_light", "onenord_light", "penumbra_light", "rosepine-dawn", "seoul256_light", "solarized_light", "sunrise_breeze", "vscode_light"]
options: themeColorsTab.neovimLightBaseThemes.concat(themeColorsTab.neovimDarkBaseThemes)
enableFuzzySearch: true
onValueChanged: value => {
const settings = SettingsData.matugenTemplateNeovimSettings;
+9 -7
View File
@@ -1199,16 +1199,18 @@ Item {
width: parent.width - Theme.spacingM * 2
}
DankButtonGroup {
DankFilterChips {
id: transitionGroup
width: parent.width - Theme.spacingM * 2
selectionMode: "multi"
model: SessionData.availableWallpaperTransitions.filter(t => t !== "none")
initialSelection: SessionData.includedTransitions
currentSelection: SessionData.includedTransitions
multiSelect: true
model: SessionData.availableWallpaperTransitions.filter(t => t !== "none").map(t => ({
"value": t,
"label": t.replace(/\b\w/g, c => c.toUpperCase())
}))
selectedValues: SessionData.includedTransitions
onSelectionChanged: (index, selected) => {
const transition = model[index];
onSelectionToggled: (index, selected) => {
const transition = model[index].value;
let newIncluded = SessionData.includedTransitions.slice();
if (selected && !newIncluded.includes(transition)) {
+7 -5
View File
@@ -847,7 +847,7 @@ EOFCONFIG
const maxVol = root.sinkMaxVolume;
const clampedVolume = Math.max(0, Math.min(maxVol, percentage));
Quickshell.execDetached(["wpctl", "set-volume", "-l", String(maxVol / 100), "@DEFAULT_AUDIO_SINK@", String(clampedVolume / 100)]);
root.sink.audio.volume = clampedVolume / 100;
return `Volume set to ${clampedVolume}%`;
}
@@ -857,14 +857,16 @@ EOFCONFIG
}
function adjustDefaultSinkVolume(step, direction) {
const audio = root.sink.audio;
const maxVol = root.sinkMaxVolume;
const stepValue = outputVolumeStep(step);
const currentVolume = Math.round(root.sink.audio.volume * 100);
const currentVolume = Math.round(audio.volume * 100);
const newVolume = Math.max(0, Math.min(maxVol, currentVolume + direction * stepValue));
const suffix = direction > 0 ? "+" : "-";
Quickshell.execDetached(["wpctl", "set-mute", "@DEFAULT_AUDIO_SINK@", "0"]);
Quickshell.execDetached(["wpctl", "set-volume", "-l", String(maxVol / 100), "@DEFAULT_AUDIO_SINK@", `${stepValue}%${suffix}`]);
if (audio.muted)
audio.muted = false;
audio.volume = newVolume / 100;
return newVolume;
}
+19 -8
View File
@@ -15,8 +15,10 @@ Item {
property string socketPath: ""
readonly property bool socketFound: socketPath.length > 0
property bool connected: false
property bool binaryExists: false
readonly property bool binaryExists: launchKind.length > 0
property bool binaryChecked: false
// "dcal" for a host install, "flatpak" for a sandboxed one, "" for neither.
property string launchKind: ""
property var calendars: []
property var events: []
@@ -55,18 +57,20 @@ Item {
Process {
id: binaryCheck
command: ["sh", "-c", "command -v dcal"]
command: ["sh", "-c", "if command -v dcal >/dev/null 2>&1; then echo dcal; elif command -v flatpak >/dev/null 2>&1 && flatpak info com.danklinux.dankcalendar >/dev/null 2>&1; then echo flatpak; fi"]
running: false
onExited: code => {
root.binaryExists = (code === 0);
root.binaryChecked = true;
stdout: StdioCollector {
onStreamFinished: {
root.launchKind = text.trim();
root.binaryChecked = true;
}
}
}
Process {
id: discoverProcess
running: false
command: ["sh", "-c", "s=\"${DANKCAL_SOCKET:-}\"; if [ -S \"$s\" ]; then echo \"$s\"; exit 0; fi; for f in \"${XDG_RUNTIME_DIR:-/tmp}\"/dankcal-*.sock /tmp/dankcal-*.sock; do [ -S \"$f\" ] || continue; p=$(basename \"$f\" .sock); p=${p#dankcal-}; if kill -0 \"$p\" 2>/dev/null; then echo \"$f\"; exit 0; fi; done"]
command: ["sh", "-c", "s=\"${DANKCAL_SOCKET:-}\"; if [ -S \"$s\" ]; then echo \"$s\"; exit 0; fi; for f in \"${XDG_RUNTIME_DIR:-/tmp}\"/app/com.danklinux.dankcalendar/dankcal-*.sock; do if [ -S \"$f\" ]; then echo \"$f\"; exit 0; fi; done; for f in \"${XDG_RUNTIME_DIR:-/tmp}\"/dankcal-*.sock /tmp/dankcal-*.sock; do [ -S \"$f\" ] || continue; p=$(basename \"$f\" .sock); p=${p#dankcal-}; if kill -0 \"$p\" 2>/dev/null; then echo \"$f\"; exit 0; fi; done"]
stdout: StdioCollector {
onStreamFinished: {
@@ -98,9 +102,16 @@ Item {
}
function launch() {
if (!binaryExists)
switch (launchKind) {
case "dcal":
Quickshell.execDetached(["dcal", "run", "-d", "--hidden"]);
break;
case "flatpak":
Quickshell.execDetached(["flatpak", "run", "com.danklinux.dankcalendar", "run", "-d", "--hidden"]);
break;
default:
return;
Quickshell.execDetached(["dcal", "run", "-d", "--hidden"]);
}
if (enabled && !connected)
discoverProcess.running = true;
}
+1 -1
View File
@@ -511,7 +511,7 @@ Singleton {
return MangoService.filterCurrentDisplay(toplevels, screenName);
if (isHyprland)
return filterHyprlandCurrentDisplaySafe(toplevels, screenName);
return toplevels;
return toplevels.filter(t => _toplevelOnScreen(t, screenName));
}
function _screenName(screenOrName) {
+1 -3
View File
@@ -56,7 +56,7 @@ Singleton {
return "wifi_1_bar";
}
property string userPreference: "auto"
readonly property string userPreference: SettingsData.networkPreference
property bool isConnecting: false
property string connectingSSID: ""
property string connectionError: ""
@@ -187,7 +187,6 @@ Singleton {
}
Component.onCompleted: {
root.userPreference = SettingsData.networkPreference;
lastConnectedVpnUuid = SessionData.vpnLastConnected || "";
if (socketPath && socketPath.length > 0) {
checkDMSCapabilities();
@@ -672,7 +671,6 @@ Singleton {
function setNetworkPreference(preference) {
if (!networkAvailable)
return;
userPreference = preference;
changingPreference = true;
targetPreference = preference;
SettingsData.set("networkPreference", preference);
+1 -1
View File
@@ -69,7 +69,7 @@ Singleton {
property bool screensaverInhibited: false
property var screensaverInhibitors: []
property var activeSubscriptions: ["network", "network.credentials", "loginctl", "freedesktop", "freedesktop.screensaver", "gamma", "theme.auto", "wallpaper", "bluetooth", "bluetooth.pairing", "brightness", "wlroutput", "evdev", "browser", "dbus", "clipboard", "location", "sysupdate"]
property var activeSubscriptions: ["network", "network.credentials", "loginctl", "freedesktop", "freedesktop.screensaver", "gamma", "theme.auto", "wallpaper", "bluetooth", "bluetooth.pairing", "brightness", "wlroutput", "evdev", "browser", "dbus", "clipboard", "sysupdate"]
Component.onCompleted: {
if (socketPath && socketPath.length > 0) {
+10
View File
@@ -80,6 +80,8 @@ Singleton {
respectInhibitors: root.respectInhibitors
enabled: false
onIsIdleChanged: {
if (!enabled)
return;
if (isIdle) {
if (SettingsData.fadeToDpmsEnabled) {
root.fadeToDpmsRequested();
@@ -101,6 +103,8 @@ Singleton {
respectInhibitors: root.respectInhibitors
enabled: false
onIsIdleChanged: {
if (!enabled)
return;
if (isIdle) {
root.requestMonitorOff();
} else {
@@ -115,6 +119,8 @@ Singleton {
respectInhibitors: root.respectInhibitors
enabled: false
onIsIdleChanged: {
if (!enabled)
return;
if (isIdle) {
if (SettingsData.fadeToLockEnabled) {
root.fadeToLockRequested();
@@ -135,6 +141,8 @@ Singleton {
respectInhibitors: root.respectInhibitors
enabled: false
onIsIdleChanged: {
if (!enabled)
return;
if (isIdle)
root.requestSuspend();
}
@@ -149,6 +157,8 @@ Singleton {
respectInhibitors: false
enabled: root.enabled && root.isShellLocked && root.monitorsOff && (SettingsData.lockScreenPowerOffMonitorsOnLock || root.lockPowerOffRequested)
onIsIdleChanged: {
if (!enabled)
return;
if (!isIdle && root.monitorsOff)
root.requestMonitorOn();
}
+39 -7
View File
@@ -3,10 +3,13 @@ pragma ComponentBehavior: Bound
import QtQuick
import Quickshell
import qs.Common
import qs.Services
Singleton {
id: root
readonly property bool wantsLocation: SettingsData.weatherEnabled && SettingsData.useAutoLocation
readonly property bool locationAvailable: DMSService.isConnected && DMSService.capabilities.includes("location")
readonly property bool valid: latitude !== 0 || longitude !== 0
@@ -15,19 +18,46 @@ Singleton {
signal locationChanged(var data)
onLocationAvailableChanged: {
if (locationAvailable && !valid)
getState();
onWantsLocationChanged: {
if (wantsLocation) {
ensureSubscription();
} else if (DMSService.activeSubscriptions.includes("location")) {
DMSService.removeSubscription("location");
}
}
onLocationAvailableChanged: ensureSubscription()
Component.onCompleted: ensureSubscription()
Connections {
target: DMSService
function onLocationStateUpdate(data) {
if (!locationAvailable)
return;
handleStateUpdate(data);
function onConnectionStateChanged() {
if (DMSService.isConnected)
root.ensureSubscription();
}
function onLocationStateUpdate(data) {
if (!root.wantsLocation)
return;
root.handleStateUpdate(data);
}
}
function ensureSubscription() {
if (!wantsLocation)
return;
if (!locationAvailable)
return;
if (DMSService.activeSubscriptions.includes("location"))
return;
if (DMSService.activeSubscriptions.includes("all"))
return;
DMSService.addSubscription("location");
if (!valid)
getState();
}
function handleStateUpdate(data) {
@@ -42,6 +72,8 @@ Singleton {
}
function getState() {
if (!wantsLocation)
return;
if (!locationAvailable)
return;
+1 -1
View File
@@ -467,7 +467,7 @@ Singleton {
if (now - root._lastWatchedReloadAt < 700)
return;
root._lastWatchedReloadAt = now;
root.reloadConfig(true, false);
root.reloadConfig(false, false);
}
function reloadConfig(showToast, suppressWatch) {
@@ -0,0 +1,3 @@
import Quickshell.Services.Polkit
PolkitAgent {}
+6 -4
View File
@@ -3,7 +3,6 @@ pragma ComponentBehavior: Bound
import QtQuick
import Quickshell
import Quickshell.Services.Polkit
Singleton {
id: root
@@ -12,10 +11,13 @@ Singleton {
readonly property bool disablePolkitIntegration: Quickshell.env("DMS_DISABLE_POLKIT") === "1"
readonly property bool polkitAvailable: !disablePolkitIntegration
readonly property alias agent: polkitAgentInstance
readonly property var agent: polkitAgentLoader.item
PolkitAgent {
id: polkitAgentInstance
Loader {
id: polkitAgentLoader
active: root.polkitAvailable
asynchronous: false
source: "PolkitAgentInstance.qml"
}
Component.onCompleted: {
+1 -1
View File
@@ -425,7 +425,7 @@ Singleton {
}
function closeSettings() {
settingsModal?.close();
settingsModal?.hide();
}
function toggleSettings() {
+9 -1
View File
@@ -7,12 +7,15 @@ Flow {
property var model: []
property int currentIndex: 0
property bool multiSelect: false
property var selectedValues: []
property int chipHeight: 32
property int chipPadding: Theme.spacingM
property bool showCheck: true
property bool showCounts: true
signal selectionChanged(int index)
signal selectionToggled(int index, bool selected)
spacing: Theme.spacingS
width: parent ? parent.width : 400
@@ -25,7 +28,8 @@ Flow {
required property var modelData
required property int index
property bool selected: index === root.currentIndex
property var value: typeof modelData === "string" ? modelData : (modelData.value !== undefined ? modelData.value : (modelData.label || ""))
property bool selected: root.multiSelect ? root.selectedValues.includes(value) : (index === root.currentIndex)
property bool hovered: mouseArea.containsMouse
property bool pressed: mouseArea.pressed
property string label: typeof modelData === "string" ? modelData : (modelData.label || "")
@@ -99,6 +103,10 @@ Flow {
cursorShape: Qt.PointingHandCursor
onPressed: mouse => chipRipple.trigger(mouse.x, mouse.y)
onClicked: {
if (root.multiSelect) {
root.selectionToggled(chip.index, !chip.selected);
return;
}
root.currentIndex = chip.index;
root.selectionChanged(chip.index);
}
+9 -8
View File
@@ -79,6 +79,9 @@ Item {
"rightBar": 0
})
property var screen: null
// Output the surface binds to; retargeted only in open() while hidden. A live
// screen change on a mapped surface loses the popup blur on niri.
property var surfaceScreen: null
readonly property bool frameGapStandaloneActive: CompositorService.frameConfiguredForScreen(screen) && !CompositorService.usesConnectedFrameChromeForScreen(screen)
readonly property bool fluidStandaloneActive: Theme.isDirectionalEffect
readonly property bool backgroundDismissWindowRequired: backgroundInteractive
@@ -133,8 +136,6 @@ Item {
signal popoutClosed
signal backgroundClicked
property var _lastOpenedScreen: null
property int effectiveBarPosition: 0
property real effectiveBarBottomGap: 0
readonly property string autoBarShadowDirection: {
@@ -338,14 +339,14 @@ Item {
_frozenMaskWidth = maskWidth;
_frozenMaskHeight = maskHeight;
const screenChanged = _lastOpenedScreen !== null && _lastOpenedScreen !== screen;
const screenChanged = surfaceScreen !== null && surfaceScreen !== screen;
if (screenChanged) {
// Hide on this tick so Qt actually tears down the wl_surface; the show
// gets deferred below so the unmap is processed before the remap.
// Unmap before retargeting so the surface is destroyed and recreated
// on the new output rather than live-migrated.
contentWindow.visible = false;
backgroundWindow.visible = false;
}
_lastOpenedScreen = screen;
surfaceScreen = screen;
if (contentContainer && !shouldBeVisible) {
// Snap morph closed only on a fresh open; on screen-change re-open we stay at 1
@@ -559,7 +560,7 @@ Item {
PanelWindow {
id: backgroundWindow
screen: root.screen
screen: root.surfaceScreen
visible: false
color: "transparent"
// Skip buffer updates when there's nothing to render. Briefly flipped
@@ -625,7 +626,7 @@ Item {
PanelWindow {
id: contentWindow
screen: root.screen
screen: root.surfaceScreen
visible: false
color: "transparent"
readonly property bool closeVisualActive: root.shouldBeVisible || root.isClosing
@@ -131,7 +131,6 @@
@define-color content_view_bg @view_bg_color;
@define-color text_view_bg @view_bg_color;
* {
padding: 0;
-GtkToolButton-icon-spacing: 4;
-GtkTextView-error-underline-color: @error_bg_color;
-GtkScrolledWindow-scrollbar-spacing: 0;
@@ -44,6 +44,10 @@ if mode ~= nil then
end
end
if settings.terminalsAlwaysDark then
vim.o.background = "dark"
end
local current_file_path = debug.getinfo(1, "S").source:sub(2)
local theme_base = deepGet(settings, { "matugenTemplateNeovimSettings", vim.o.background, "baseTheme" })
or ("github_" .. vim.o.background)