1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -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 { func NewSwayProvider(configPath string) *SwayProvider {
isScroll := false isScroll := false
_, ok := os.LookupEnv("SCROLLSOCK") _, scrollEnvSet := os.LookupEnv("SCROLLSOCK")
if ok {
isScroll = true
}
if configPath == "" { if configPath == "" {
if scrollEnvSet {
configPath = "$HOME/.config/scroll"
isScroll = true
} else {
configPath = "$HOME/.config/sway" configPath = "$HOME/.config/sway"
} }
if isScroll && configPath == "" { } else {
configPath = "$HOME/.config/scroll" // Determine isScroll based on the provided config path
isScroll = strings.Contains(configPath, "scroll")
} }
return &SwayProvider{ return &SwayProvider{
configPath: configPath, configPath: configPath,
isScroll: isScroll, isScroll: isScroll,