xmonad / xmonad-contrib

Contributed modules for xmonad
https://xmonad.org
BSD 3-Clause "New" or "Revised" License
588 stars 274 forks source link

X.H.UrgencyHook: Default for DzenUrgencyHook and UrgencyConfig #727

Closed ilya-bobyr closed 2 years ago

ilya-bobyr commented 2 years ago

As the XMonad config is commonly customized by saying

def { startupHook = ...
    , manageHook = ...
    , ...
    }

It seems consistent to allow the same for an individual hook config:

let urgencyHook = def { suppressWhen = ...
                      , remindWhen = ...
                      }

Description

Include a description for your changes, including the motivation behind them.

Checklist

slotThe commented 2 years ago

Additionally, we probably now want to deprecate urgencyConfig and dzenUrgencyHook (or would that be too annoying for users? I don't know)

ilya-bobyr commented 2 years ago

Additionally, we probably now want to deprecate urgencyConfig and dzenUrgencyHook (or would that be too annoying for users? I don't know)

I do not have a strong opinion, though I also do not have a lot of Haskell experience %) It does seem reasonable to deprecate urgencyConfig in favor of the Default instance. Not sure why was Default was not used in the first place. I assumed there might be a reason I was not aware of.

As for dzenUrgencyHook - I do not think it should be deprecated. There could be other urgency hook handlers. And borderUrgencyHook and spawnUrgencyHook are already defined. Most code will probably be more readable if it is using dzenUrgencyHook directly, instead of the def instance.

In short, I could add deprecated to urgencyConfig. Having one way to do simple things is good :)

slotThe commented 2 years ago

In short, I could add deprecated to urgencyConfig. Having one way to do simple things is good :)

This seems fine to me; let's do it!

ilya-bobyr commented 2 years ago

In short, I could add deprecated to urgencyConfig. Having one way to do simple things is good :)

This seems fine to me; let's do it!

Added :)

slotThe commented 2 years ago

Thank you!