2023-11-05 11:26:09 +00:00
{
pkgs ,
config ,
. . .
} : {
gtk . enable = true ;
gtk . gtk2 . configLocation = " ${ config . xdg . configHome } / g t k - 2 . 0 / g t k r c " ;
### Cursor
home . pointerCursor = {
gtk . enable = true ;
x11 . enable = true ;
name = " A d w a i t a " ;
package = pkgs . gnome . adwaita-icon-theme ;
size = 24 ;
} ;
# gtk.cursorTheme is unneeded
# https://github.com/nix-community/home-manager/blob/8765d4e38aa0be53cdeee26f7386173e6c65618d/modules/config/home-cursor.nix#L179C33-L179C33
### Icon
gtk = {
iconTheme = {
#name = "Tela-dracula-dark";
#package = pkgs.tela-icon-theme;
name = " P a p i r u s - D a r k " ;
package = pkgs . papirus-icon-theme ;
} ;
} ;
### Font
gtk . font . name = " S a n s " ;
### GTK theme
gtk . theme = {
name = " a d w - g t k 3 - d a r k " ;
package = pkgs . adw-gtk3 ;
} ;
### Dconf
dconf . settings = {
" o r g / g n o m e / d e s k t o p / w m / p r e f e r e n c e s " = {
" t i t l e b a r - f o n t " = " S a n s B o l d " ;
2023-11-05 23:57:14 +00:00
" b u t t o n - l a y o u t " = " i c o n , a p p m e n u : " ; # remove csd window buttons
2023-11-05 11:26:09 +00:00
} ;
" o r g / g n o m e / d e s k t o p / i n t e r f a c e " = {
" d o c u m e n t - f o n t - n a m e " = " S a n s " ;
" m o n o s p a c e - f o n t - n a m e " = " M o n o s p a c e " ;
# "font-name" is unneeded
# https://github.com/nix-community/home-manager/blob/8765d4e38aa0be53cdeee26f7386173e6c65618d/modules/misc/gtk.nix#L237C19-L237C19
" c l o c k - f o r m a t " = " 1 2 h " ;
" c o l o r - s c h e m e " = " p r e f e r - d a r k " ;
# i want to split dconf but
#
# error: attribute '"org/gnome/desktop/interface"' already defined at /nix/store/cjr3qn1kg0z268dnbmc2vry4sbgqvnvm-source/users/guanranwang/home-manager/nixos/theming.nix:52:5
#
# at /nix/store/cjr3qn1kg0z268dnbmc2vry4sbgqvnvm-source/users/guanranwang/home-manager/nixos/theming.nix:36:5:
#
# 35| };
# 36| "org/gnome/desktop/interface" = {
# | ^
# 37| "document-font-name" = "Sans";
} ;
} ;
# Misc
xresources . properties = {
# Cursor
" X c u r s o r . t h e m e " = " A d w a i t a " ;
# Fonts
" X f t . a u t o h i n t " = " 0 " ;
" X f t . l c d f i l t e r " = " l c d d e f a u l t " ;
" X f t . h i n t s t y l e " = " h i n t s l i g h t " ;
" X f t . h i n t i n g " = " 1 " ;
" X f t . a n t i a l i a s " = " 1 " ;
" X f t . r g b a " = " r g b " ;
# Tokyonight color scheme
# i have no idea what does it apply to
" * b a c k g r o u n d " = " # 1 a 1 b 2 6 " ;
" * f o r e g r o u n d " = " # c 0 c a f 5 " ;
" * c o l o r 0 " = " # 1 5 1 6 1 e " ;
" * c o l o r 1 " = " # f 7 7 6 8 e " ;
" * c o l o r 2 " = " # 9 e c e 6 a " ;
" * c o l o r 3 " = " # e 0 a f 6 8 " ;
" * c o l o r 4 " = " # 7 a a 2 f 7 " ;
" * c o l o r 5 " = " # b b 9 a f 7 " ;
" * c o l o r 6 " = " # 7 d c f f f " ;
" * c o l o r 7 " = " # a 9 b 1 d 6 " ;
" * c o l o r 8 " = " # 4 1 4 8 6 8 " ;
" * c o l o r 9 " = " # f 7 7 6 8 e " ;
" * c o l o r 1 0 " = " # 9 e c e 6 a " ;
" * c o l o r 1 1 " = " # e 0 a f 6 8 " ;
" * c o l o r 1 2 " = " # 7 a a 2 f 7 " ;
" * c o l o r 1 3 " = " # b b 9 a f 7 " ;
" * c o l o r 1 4 " = " # 7 d c f f f " ;
" * c o l o r 1 5 " = " # c 0 c a f 5 " ;
} ;
}