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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user