qt font sizes... qt font sizes are real!
This commit is contained in:
parent
241bc58783
commit
3ce57565b0
3 changed files with 41 additions and 14 deletions
|
@ -24,5 +24,6 @@ each host should have these files:
|
|||
- tags for pip and popups in hyprland config
|
||||
- make wl-clip-persist and networkmanager applet systemd services?
|
||||
- gtk cursors are MESSED UP. top priority rn
|
||||
- qt icons just... don't apply
|
||||
- niri.. yum
|
||||
- do lockscreen better somehow
|
||||
|
|
|
@ -31,6 +31,9 @@ in {
|
|||
Restart = "on-failure";
|
||||
RestartSec = 5;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
hm.xdg.configFile."nwg-drawer/drawer.css".text = config.modules.desktop.themes.nwg-drawer;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ lib, config, ... }:
|
||||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.my;
|
||||
|
@ -75,7 +75,6 @@ in {
|
|||
|
||||
config = mkIf (cfg.active != null) {
|
||||
programs.dconf.enable = true;
|
||||
|
||||
hm.dconf = {
|
||||
enable = true;
|
||||
settings."org/gnome/desktop/interface".color-scheme = mkIf cfg.dark "prefer-dark";
|
||||
|
@ -102,7 +101,7 @@ in {
|
|||
|
||||
hm.qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "kvantum";
|
||||
platformTheme.name = "qtct";
|
||||
style.name = "kvantum";
|
||||
};
|
||||
|
||||
|
@ -145,18 +144,42 @@ in {
|
|||
|
||||
hm.programs.rofi.theme = cfg.rofi;
|
||||
|
||||
hm.xdg.configFile = {
|
||||
# kvantum
|
||||
"Kvantum/${cfg.kvantumTheme.name}".source = "${cfg.kvantumTheme.package}/share/Kvantum/${cfg.kvantumTheme.name}";
|
||||
"Kvantum/kvantum.kvconfig" = {
|
||||
text = ''
|
||||
[General]
|
||||
theme=${cfg.kvantumTheme.name}
|
||||
'';
|
||||
};
|
||||
hm.xdg.configFile = let
|
||||
iniFmt = pkgs.formats.ini {};
|
||||
mkQtctConf = version: let
|
||||
zeroCount = if version == 5 then 5 else if version == 6 then 10 else builtins.throw "invalid qtct version";
|
||||
zeros = builtins.concatStringsSep "," (builtins.genList (_: "0") zeroCount);
|
||||
weight = if version == 5 then 50 else if version == 6 then 400 else builtins.throw "invalid qtct version";
|
||||
in {
|
||||
Appearance = {
|
||||
icon_theme = cfg.iconTheme.name;
|
||||
standard_dialogs = "xdgdesktopportal";
|
||||
style = "kvantum";
|
||||
};
|
||||
|
||||
# nwg-drawer
|
||||
"nwg-drawer/drawer.css".text = cfg.nwg-drawer;
|
||||
Fonts = with config.modules.desktop.fonts.fonts; {
|
||||
# i'm going to go on a rant here
|
||||
# this actually SUCKS omg
|
||||
# god is dead and The Qt Company killed him
|
||||
# (for qt5, font weight is on a different scale where 50 is equivalent to 400 in qt6, even more fun)
|
||||
# font weight is set to 400, this is the default weight for every font ever and it will fall back to something else if the font doesn't have a 400 weight (ex. cozette only has a 500 weight)
|
||||
# setting the font style name is BAD!! i found it breaks font selection for others that aren't the weight that is given, and it's not required anyway
|
||||
# technically this isn't perfect because we are setting the font size in points to -1, but it doesn't matter since we define it in pixels right afterwards. this causes only a warning in the logs for some qt apps!! so it's fine but it's still a bit annoying because i'm weird
|
||||
# oh and, because why not, the qt5 font config has less zeros than the qt6 font config. the docs don't say anything about this. i am going to kill myself @The Qt Company
|
||||
# yapping over. this is the best we can do for now
|
||||
general = ''"${sansSerif.family},-1,${toString sansSerif.size},5,${toString weight},${zeros},1"'';
|
||||
fixed = ''"${monospace.family},-1,${toString monospace.size},5,${toString weight},${zeros},1"'';
|
||||
};
|
||||
};
|
||||
in {
|
||||
"Kvantum/${cfg.kvantumTheme.name}".source = "${cfg.kvantumTheme.package}/share/Kvantum/${cfg.kvantumTheme.name}";
|
||||
"Kvantum/kvantum.kvconfig".text = ''
|
||||
[General]
|
||||
theme=${cfg.kvantumTheme.name}
|
||||
'';
|
||||
|
||||
"qt5ct/qt5ct.conf".source = iniFmt.generate "qt5ct.conf" (mkQtctConf 5);
|
||||
"qt6ct/qt6ct.conf".source = iniFmt.generate "qt6ct.conf" (mkQtctConf 6);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue