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:
@@ -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 == "" {
|
||||||
configPath = "$HOME/.config/sway"
|
if scrollEnvSet {
|
||||||
}
|
configPath = "$HOME/.config/scroll"
|
||||||
if isScroll && configPath == "" {
|
isScroll = true
|
||||||
configPath = "$HOME/.config/scroll"
|
} else {
|
||||||
|
configPath = "$HOME/.config/sway"
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 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,
|
||||||
|
|||||||
Reference in New Issue
Block a user