2024-12-18 11:44:18 +03:00
# ISSUE: https://github.com/Alexays/Waybar/issues/3303
# This way I am forced to apply the padding to children of each group
# instead of the whole group.
2024-10-11 23:27:07 +03:00
{
2024-12-18 11:44:18 +03:00
util ,
pkgs ,
config ,
. . .
} @ args :
let
accent = " # ${ config . module . style . color . accent } " ;
fontSerif = config . module . style . font . serif . name ;
fontPropo = " T e r m i n e s s N e r d F o n t P r o p o " ;
fontSize = " ${ toString config . module . style . font . size . desktop } p x " ;
foreground = " # ${ config . module . style . color . fg . light } " ;
paddingH = " 1 2 p x " ;
paddingV = " 0 " ;
backgroundColor = " r g b a ( ${ config . module . style . color . bgR } , ${ config . module . style . color . bgG } , ${ config . module . style . color . bgB } , ${ toString config . module . style . opacity . desktop } ) " ;
borderColor = " r g b a ( ${ config . module . style . color . borderR } , ${ config . module . style . color . borderG } , ${ config . module . style . color . borderB } , ${ toString config . module . style . opacity . desktop } ) " ;
border = " ${ toString config . module . style . window . border } p x s o l i d ${ borderColor } " ;
borderSize = " ${ toString config . module . style . window . border } p x " ;
styleRaw = pkgs . writeText " w a y b a r - s t y l e - r a w " ( util . readFiles ( util . ls ./style ) ) ;
2024-12-18 11:59:37 +03:00
# NOTE: Another option is to use var() like this: https://git.azahi.cc/nixfiles/tree/modules/firefox/default.nix#n41 https://git.azahi.cc/nixfiles/tree/modules/firefox/userContent.css
2024-12-18 11:44:18 +03:00
style = pkgs . replaceVars styleRaw {
inherit
accent
fontSerif
fontPropo
fontSize
foreground
paddingH
paddingV
backgroundColor
borderColor
border
borderSize
;
} ;
in
{
inherit style ;
2024-12-18 09:40:11 +03:00
config = ( import ./config args ) . file ;
2024-05-02 04:47:21 +03:00
}