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 =
|
, logHook =
|
||||||
let
|
let
|
||||||
|
isOneOf :: Eq a => Query a -> [a] -> Query Bool
|
||||||
|
isOneOf q = fmap or . traverse (q =?)
|
||||||
|
|
||||||
|
isFocused :: Query Bool
|
||||||
|
isFocused = fmap not isUnfocused
|
||||||
|
|
||||||
fadeHook =
|
fadeHook =
|
||||||
composeOne
|
composeOne
|
||||||
[ className ~? "steam" -?> opaque
|
[ -- easier to paint over stuff
|
||||||
|
isFloating
|
||||||
|
<&&> isFocused
|
||||||
|
<&&> title ~? "Wplace"
|
||||||
|
-?> transparency 0.5
|
||||||
|
|
||||||
-- easier to paint over stuff
|
-- matches the second string of the WM_CLASS
|
||||||
, isFloating
|
, className `isOneOf`
|
||||||
<&&> fmap not isUnfocused
|
[ "firefox"
|
||||||
<&&> title ~? "Wplace" -?> transparency 0.5
|
, "Signal"
|
||||||
|
, "steam"
|
||||||
, className =? "firefox" -?> opaque
|
, "discord"
|
||||||
|
]
|
||||||
|
-?> opaque
|
||||||
|
|
||||||
|
, isFloating -?> ifM isFocused (transparency 0.04) (transparency 0.08)
|
||||||
, isUnfocused -?> transparency 0.02
|
, isUnfocused -?> transparency 0.02
|
||||||
, isFloating -?> transparency 0.08
|
|
||||||
]
|
]
|
||||||
in
|
in
|
||||||
fadeWindowsLogHook fadeHook
|
fadeWindowsLogHook fadeHook
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue