mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
vanadium/xmonad: refactor opacity rules
This commit is contained in:
parent
3dd8a32561
commit
bbf6651440
1 changed files with 20 additions and 8 deletions
|
|
@ -49,19 +49,31 @@ main =
|
|||
|
||||
, logHook =
|
||||
let
|
||||
isOneOf :: Eq a => Query a -> [a] -> Query Bool
|
||||
isOneOf q = fmap or . traverse (q =?)
|
||||
|
||||
isFocused :: Query Bool
|
||||
isFocused = fmap not isUnfocused
|
||||
|
||||
fadeHook =
|
||||
composeOne
|
||||
[ className ~? "steam" -?> opaque
|
||||
[ -- easier to paint over stuff
|
||||
isFloating
|
||||
<&&> isFocused
|
||||
<&&> title ~? "Wplace"
|
||||
-?> transparency 0.5
|
||||
|
||||
-- easier to paint over stuff
|
||||
, isFloating
|
||||
<&&> fmap not isUnfocused
|
||||
<&&> title ~? "Wplace" -?> transparency 0.5
|
||||
|
||||
, className =? "firefox" -?> opaque
|
||||
-- matches the second string of the WM_CLASS
|
||||
, className `isOneOf`
|
||||
[ "firefox"
|
||||
, "Signal"
|
||||
, "steam"
|
||||
, "discord"
|
||||
]
|
||||
-?> opaque
|
||||
|
||||
, isFloating -?> ifM isFocused (transparency 0.04) (transparency 0.08)
|
||||
, isUnfocused -?> transparency 0.02
|
||||
, isFloating -?> transparency 0.08
|
||||
]
|
||||
in
|
||||
fadeWindowsLogHook fadeHook
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue