1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-14 17:52:10 -04:00

keybinds: dont pass dirs

This commit is contained in:
bbedward
2026-02-16 23:55:11 -05:00
parent cf4ce3c476
commit f280cd9d3b
4 changed files with 34 additions and 15 deletions

View File

@@ -3,6 +3,7 @@ package providers
import (
"fmt"
"os"
"path/filepath"
"strings"
"github.com/AvengeMedia/DankMaterialShell/core/internal/keybinds"
@@ -18,11 +19,19 @@ func NewSwayProvider(configPath string) *SwayProvider {
_, scrollEnvSet := os.LookupEnv("SCROLLSOCK")
if configPath == "" {
configDir, err := os.UserConfigDir()
if err != nil {
configDir = ""
}
if scrollEnvSet {
configPath = "$HOME/.config/scroll"
if configDir != "" {
configPath = filepath.Join(configDir, "scroll")
}
isScroll = true
} else {
configPath = "$HOME/.config/sway"
if configDir != "" {
configPath = filepath.Join(configDir, "sway")
}
}
} else {
isScroll = strings.Contains(configPath, "scroll")