mirror of
https://codeberg.org/leana8959/.files.git
synced 2026-02-01 14:39:39 +00:00
Compare commits
6 commits
9230f7b378
...
ad6669d42f
| Author | SHA1 | Date | |
|---|---|---|---|
| ad6669d42f | |||
| ae75eae20f | |||
| e08afde62f | |||
| 51d27a224a | |||
| 8cb87dff9b | |||
| bc67b4226f |
10 changed files with 69 additions and 33 deletions
|
|
@ -14,9 +14,49 @@
|
||||||
"Noto Sans CJK TC"
|
"Noto Sans CJK TC"
|
||||||
];
|
];
|
||||||
serif = [ "Noto Serif CJK TC" ];
|
serif = [ "Noto Serif CJK TC" ];
|
||||||
monospace = [ "Iosevka-Normal-PT-Mono" ];
|
monospace = [ "IosevkaPTMono" ];
|
||||||
emoji = [ "Noto Color Emoji" ];
|
emoji = [ "Noto Color Emoji" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
configFile = {
|
||||||
|
thick-iosevka = {
|
||||||
|
enable = true;
|
||||||
|
# https://www.freedesktop.org/software/fontconfig/fontconfig-user.html
|
||||||
|
# https://gist.github.com/yuttie/adb22a6c07ef8e75d82e48d5484b7ad8
|
||||||
|
# https://github.com/N1k3YB/CS2FontChanger_ru/blob/5f1d8189220f42286d773c536ff83a49b2556da2/app.py#L227
|
||||||
|
#
|
||||||
|
# Use the following script to test
|
||||||
|
# for size in (seq 9 15)
|
||||||
|
# echo
|
||||||
|
# echo
|
||||||
|
# for weight in {regular,medium,bold}
|
||||||
|
# echo "weight=$weight:size=$size"
|
||||||
|
# fc-match "mono:weight=$weight:size=$size"
|
||||||
|
# end
|
||||||
|
# end | less
|
||||||
|
text = /* xml */ ''
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||||
|
<fontconfig>
|
||||||
|
<match target="pattern">
|
||||||
|
<test name="family" compare="contains"><string>Iosevka</string></test>
|
||||||
|
<edit name="weight" mode="assign" binding="strong">
|
||||||
|
<if> <eq><name>weight</name><const>bold</const></eq> <!-- then --> <const>bold</const>
|
||||||
|
<if> <eq><name>weight</name><const>medium</const></eq> <!-- then --> <const>medium</const>
|
||||||
|
<!-- not bold nor medium -->
|
||||||
|
<if> <more><name>size</name><double>15</double></more> <!-- then --> <const>regular</const>
|
||||||
|
<if> <more><name>size</name><double>10</double></more> <!-- then --> <const>medium</const>
|
||||||
|
<!-- else --> <const>bold</const>
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
</fontconfig>
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
home.packages = [
|
home.packages = [
|
||||||
pkgs.noto-fonts
|
pkgs.noto-fonts
|
||||||
|
|
@ -26,7 +66,7 @@
|
||||||
pkgs.noto-fonts-color-emoji
|
pkgs.noto-fonts-color-emoji
|
||||||
pkgs.noto-fonts-emoji-blob-bin
|
pkgs.noto-fonts-emoji-blob-bin
|
||||||
pkgs.ubuntu-classic
|
pkgs.ubuntu-classic
|
||||||
pkgs.iosevka-normal-pt-mono
|
pkgs.IosevkaPTMono
|
||||||
];
|
];
|
||||||
|
|
||||||
home.file = {
|
home.file = {
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ config =
|
||||||
|
|
||||||
-- For framework 13
|
-- For framework 13
|
||||||
, dpi = 150
|
, dpi = 150
|
||||||
, font = "Iosevka-Normal-PT-Mono 8"
|
, font = "IosevkaPTMono 8"
|
||||||
, fgColor = "#FFFFFF"
|
, fgColor = "#FFFFFF"
|
||||||
, bgColor = "#000000"
|
, bgColor = "#000000"
|
||||||
, position = BottomH 24
|
, position = BottomH 24
|
||||||
|
|
|
||||||
|
|
@ -351,9 +351,7 @@ keybinds =
|
||||||
|
|
||||||
-- Launcher
|
-- Launcher
|
||||||
++ (let launchFirefox = "zen"
|
++ (let launchFirefox = "zen"
|
||||||
-- dmenu doesn't find the right font, but it falls back to the right one
|
launchDmenu = "dmenu_run -i -fn \"IosevkaPTMono-18\" -nb \"#36363a\" -nf \"#e2e2e4\" -sb \"#f7f7f8\" -sf \"#36363a\" -l 10"
|
||||||
-- https://bbs.archlinux.org/viewtopic.php?id=139829
|
|
||||||
launchDmenu = "dmenu_run -i -nb \"#36363a\" -nf \"#e2e2e4\" -sb \"#f7f7f8\" -sf \"#36363a\" -l 10"
|
|
||||||
lock = "xscreensaver-command -lock"
|
lock = "xscreensaver-command -lock"
|
||||||
in [ ((controlMask .|. altMask, xK_m), namedScratchpadAction myScratchpads "cmus" )
|
in [ ((controlMask .|. altMask, xK_m), namedScratchpadAction myScratchpads "cmus" )
|
||||||
, ((controlMask .|. altMask, xK_t), namedScratchpadAction myScratchpads "btop" )
|
, ((controlMask .|. altMask, xK_t), namedScratchpadAction myScratchpads "btop" )
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ in
|
||||||
{
|
{
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home.packages = [
|
home.packages = [
|
||||||
pkgs.nerd-fonts.iosevka-term-pt-mono
|
pkgs.nerd-fonts.IosevkaTermPTMono
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.ghostty.settings = {
|
programs.ghostty.settings = {
|
||||||
|
|
@ -21,7 +21,7 @@ in
|
||||||
resize-overlay = "never";
|
resize-overlay = "never";
|
||||||
|
|
||||||
# Fonts
|
# Fonts
|
||||||
font-family = "Iosevka Term PT Mono NFM";
|
font-family = "IosevkaTermPTMono NFM";
|
||||||
adjust-cursor-thickness = 2;
|
adjust-cursor-thickness = 2;
|
||||||
keybind = [
|
keybind = [
|
||||||
"ctrl+shift+==increase_font_size:1"
|
"ctrl+shift+==increase_font_size:1"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
home.packages = [ pkgs.iosevka-normal-pt-mono ];
|
home.packages = [ pkgs.IosevkaPTMono ];
|
||||||
services.wired = {
|
services.wired = {
|
||||||
config = "${./wired.ron}";
|
config = "${./wired.ron}";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,7 @@
|
||||||
offset: Vec2(x: 0.0, y: 0.0),
|
offset: Vec2(x: 0.0, y: 0.0),
|
||||||
params: ScrollingTextBlock((
|
params: ScrollingTextBlock((
|
||||||
text: "%s",
|
text: "%s",
|
||||||
font: "Iosevka-Normal-PT-Mono 24",
|
font: "IosevkaPTMono 24",
|
||||||
color: Color(hex: "#fafafa"),
|
color: Color(hex: "#fafafa"),
|
||||||
padding: Padding(left: 7.0, right: 7.0, top: 1.0, bottom: 0.0),
|
padding: Padding(left: 7.0, right: 7.0, top: 1.0, bottom: 0.0),
|
||||||
width: (min: 400, max: 400),
|
width: (min: 400, max: 400),
|
||||||
|
|
@ -140,7 +140,7 @@
|
||||||
offset: Vec2(x: 0.0, y: -3.0),
|
offset: Vec2(x: 0.0, y: -3.0),
|
||||||
params: ScrollingTextBlock((
|
params: ScrollingTextBlock((
|
||||||
text: "%b",
|
text: "%b",
|
||||||
font: "Iosevka-Normal-PT-Mono 18",
|
font: "IosevkaPTMono 18",
|
||||||
color: Color(hex: "#fafafa"),
|
color: Color(hex: "#fafafa"),
|
||||||
padding: Padding(left: 7.0, right: 7.0, top: 3.0, bottom: 7.0),
|
padding: Padding(left: 7.0, right: 7.0, top: 3.0, bottom: 7.0),
|
||||||
width: (min: 400, max: 400),
|
width: (min: 400, max: 400),
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ let
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
[
|
[
|
||||||
(import ./spacings.nix { inherit lib; })
|
(import ./spacings.nix)
|
||||||
([ identityOverlay ] ++ import ./variants.nix)
|
([ identityOverlay ] ++ import ./variants.nix)
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -46,9 +46,8 @@ let
|
||||||
overlay:
|
overlay:
|
||||||
let
|
let
|
||||||
mergedConfig = lib.fix (lib.extends overlay iosevkaConfig);
|
mergedConfig = lib.fix (lib.extends overlay iosevkaConfig);
|
||||||
toKebabCase = x: builtins.replaceStrings [ " " ] [ "-" ] (lib.toLower x);
|
|
||||||
in
|
in
|
||||||
lib.nameValuePair (toKebabCase mergedConfig.family) (mkIosevka mergedConfig)
|
lib.nameValuePair mergedConfig.family (mkIosevka mergedConfig)
|
||||||
);
|
);
|
||||||
|
|
||||||
iosevka-nerds = builtins.mapAttrs (_: mkNerdFont) iosevkas;
|
iosevka-nerds = builtins.mapAttrs (_: mkNerdFont) iosevkas;
|
||||||
|
|
|
||||||
|
|
@ -26,10 +26,12 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
weights = {
|
weights = {
|
||||||
# Build 580, but indicate 400 in output
|
Regular.shape = 400;
|
||||||
Regular.shape = 580;
|
|
||||||
Regular.menu = 400;
|
Regular.menu = 400;
|
||||||
Regular.css = 400;
|
Regular.css = 400;
|
||||||
|
Medium.shape = 500;
|
||||||
|
Medium.menu = 500;
|
||||||
|
Medium.css = 500;
|
||||||
Bold.shape = 700;
|
Bold.shape = 700;
|
||||||
Bold.menu = 700;
|
Bold.menu = 700;
|
||||||
Bold.css = 700;
|
Bold.css = 700;
|
||||||
|
|
@ -39,9 +41,6 @@
|
||||||
Normal.shape = 500;
|
Normal.shape = 500;
|
||||||
Normal.menu = 5;
|
Normal.menu = 5;
|
||||||
Normal.css = "normal";
|
Normal.css = "normal";
|
||||||
Extended.shape = 600;
|
|
||||||
Extended.menu = 7;
|
|
||||||
Extended.css = "expanded";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
slopes = {
|
slopes = {
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,24 @@
|
||||||
{ lib }:
|
|
||||||
|
|
||||||
let
|
let
|
||||||
list = [
|
list = [
|
||||||
{ spacing = "normal"; }
|
{
|
||||||
|
adjustFamily = old: old;
|
||||||
|
spacing = "normal";
|
||||||
|
}
|
||||||
|
|
||||||
# Iosevka + Ghostty makes "…" display in a odd way.
|
# Iosevka + Ghostty makes "…" display in a odd way.
|
||||||
# We use "term" width to avoid this.
|
# We use "term" width to avoid this.
|
||||||
# https://github.com/ghostty-org/ghostty/discussions/10335
|
# https://github.com/ghostty-org/ghostty/discussions/10335
|
||||||
{ spacing = "term"; }
|
{
|
||||||
|
adjustFamily = old: old + "Term";
|
||||||
|
spacing = "term";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
|
|
||||||
map (
|
map (
|
||||||
{ spacing }@cfg:
|
{ adjustFamily, spacing }:
|
||||||
let
|
final: prev: {
|
||||||
name = lib.toSentenceCase spacing;
|
family = adjustFamily prev.family;
|
||||||
in
|
inherit spacing;
|
||||||
final: prev:
|
|
||||||
cfg
|
|
||||||
// {
|
|
||||||
family = prev.family + "-${name}";
|
|
||||||
}
|
}
|
||||||
) list
|
) list
|
||||||
|
|
|
||||||
|
|
@ -82,10 +82,10 @@ in
|
||||||
map (
|
map (
|
||||||
{ name, code }:
|
{ name, code }:
|
||||||
let
|
let
|
||||||
kebabName = builtins.replaceStrings [ " " ] [ "-" ] name;
|
shortName = builtins.replaceStrings [ " " ] [ "" ] name;
|
||||||
in
|
in
|
||||||
final: prev: {
|
final: prev: {
|
||||||
family = prev.family + "-${kebabName}";
|
family = prev.family + "${shortName}";
|
||||||
variants = prev.variants // {
|
variants = prev.variants // {
|
||||||
inherits = code;
|
inherits = code;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue