1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 13:32:50 -05:00

scrollwm: fix keybind provider registration

This commit is contained in:
bbedward
2025-12-09 20:14:07 -05:00
parent 2b73077b50
commit c3d64ab185

View File

@@ -15,16 +15,20 @@ type SwayProvider struct {
func NewSwayProvider(configPath string) *SwayProvider {
isScroll := false
_, ok := os.LookupEnv("SCROLLSOCK")
if ok {
isScroll = true
}
_, scrollEnvSet := os.LookupEnv("SCROLLSOCK")
if configPath == "" {
configPath = "$HOME/.config/sway"
}
if isScroll && configPath == "" {
configPath = "$HOME/.config/scroll"
if scrollEnvSet {
configPath = "$HOME/.config/scroll"
isScroll = true
} else {
configPath = "$HOME/.config/sway"
}
} else {
// Determine isScroll based on the provided config path
isScroll = strings.Contains(configPath, "scroll")
}
return &SwayProvider{
configPath: configPath,
isScroll: isScroll,