Skip to content

Commit

Permalink
feat: monaspace font
Browse files Browse the repository at this point in the history
  • Loading branch information
khaneliman committed Nov 11, 2023
1 parent 83eb035 commit 1718ace
Show file tree
Hide file tree
Showing 19 changed files with 101 additions and 44 deletions.
48 changes: 24 additions & 24 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion modules/home/desktop/addons/alacritty/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ in
options.khanelinix.desktop.addons.alacritty = with types; {
enable = mkBoolOpt false "Whether to enable alacritty.";
theme = mkOpt attr macchiato "Theme to use for alacritty.";
font = mkOpt str "Liga SFMono Nerd Font" "Font to use for alacritty.";
font = mkOpt str "Monaspace Krypton" "Font to use for alacritty.";
};

config = mkIf cfg.enable {
Expand Down
2 changes: 1 addition & 1 deletion modules/home/desktop/addons/kitty/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ in
{
options.khanelinix.desktop.addons.kitty = with types; {
enable = mkBoolOpt false "Whether to enable kitty.";
font = mkOpt str "Liga SFMono Nerd Font" "Font to use for kitty.";
font = mkOpt str "Monaspace Krypton" "Font to use for kitty.";
theme = mkOpt str "Catppuccin-Macchiato" "Theme to use for kitty.";
};

Expand Down
4 changes: 2 additions & 2 deletions modules/home/desktop/addons/qt/qt5ct/qt5ct.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ standard_dialogs=gtk3
style="kvantum"

[Fonts]
fixed="Liga SFMono Nerd Font Mono 10"
general="Liga SFMono Nerd Font 10"
fixed="Monaspace Krypton Mono 10"
general="Monaspace Argon 10"

[Interface]
activate_item_on_single_click=1
Expand Down
4 changes: 2 additions & 2 deletions modules/home/desktop/addons/qt/qt6ct/qt6ct.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ standard_dialogs=gtk3
style="kvantum"

[Fonts]
fixed="Liga SFMono Nerd Font Mono 10"
general="Liga SFMono Nerd Font 10"
fixed="Monaspace Krypton Mono 10"
general="Monaspace Argon 10"

[Interface]
activate_item_on_single_click=1
Expand Down
6 changes: 3 additions & 3 deletions modules/home/desktop/addons/rofi/config/appmenu/rofi.rasi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
configuration {
font: "Liga SFMono Nerd Font 14";
font: "Monaspace Argon 14";
show-icons: true;
drun-display-format: "{name}";
icon-theme: "Papirus-Dark";
Expand Down Expand Up @@ -28,7 +28,7 @@ window {
button {
action: "ok";
str: " ";
font: "Liga SFMono Nerd Font Mono 11";
font: "Monaspace Krypton Mono 11";
expand: false;
text-color: @text;
background-color: @base;
Expand All @@ -37,7 +37,7 @@ button {
}

entry {
font: "Liga SFMono Nerd Font 11";
font: "Monaspace Argon 11";
background-color: @base;
text-color: @text;
expand: true;
Expand Down
2 changes: 1 addition & 1 deletion modules/home/desktop/addons/rofi/config/config.rasi
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
configuration{
modi: "run,drun";
lines: 6;
font: "Liga SFMono Nerd Font 14";
font: "Monaspace Argon 14";
show-icons: true;
icon-theme: "Papirus-Dark";
terminal: "st";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
configuration {
font: "Liga SFMono Nerd Font 14";
font: "Monaspace Argon 14";
show-icons: true;
drun-display-format: "{name}";
icon-theme: "Papirus-Dark";
Expand Down
2 changes: 1 addition & 1 deletion modules/home/desktop/addons/rofi/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ in
enable = true;
package = pkgs.rofi-wayland;

font = "Liga SFMono Nerd Font 14";
font = "Monaspace Argon 14";
location = "center";
theme = "catppuccin";

Expand Down
2 changes: 1 addition & 1 deletion modules/home/desktop/addons/swaylock/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ in
settings = {
ignore-empty-password = true;
disable-caps-lock-text = true;
font = "Liga SFMono Nerd Font";
font = "Monaspace Argon";
grace = 300;

clock = true;
Expand Down
6 changes: 3 additions & 3 deletions modules/home/desktop/addons/waybar/modules/group-modules.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
};
"modules" = [
"custom/wlogout"
"custom/quit"
"custom/lock"
"custom/reboot"
# "custom/quit"
# "custom/lock"
# "custom/reboot"
];
};

Expand Down
2 changes: 1 addition & 1 deletion modules/home/desktop/addons/waybar/styles/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Global configuration for theme
* */
* {
font-family: Liga SFMono Nerd Font;
font-family: Monaspace Argon;
font-size: 16px;
border-radius: 0.75em;
}
Expand Down
1 change: 1 addition & 0 deletions modules/home/desktop/addons/waybar/styles/workspaces.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
}

#workspaces label {
font-family: Monaspace Argon;
font-size: 20px;
}

Expand Down
2 changes: 1 addition & 1 deletion modules/home/desktop/addons/wezterm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ in
return {
window_decorations = "RESIZE",
font = wezterm.font_with_fallback {
'Liga SFMono Nerd Font',
'Monaspace Krypton',
'CaskaydiaCove Nerd Font',
'JetBrains Mono',
},
Expand Down
3 changes: 3 additions & 0 deletions modules/nixos/apps/firefox/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ let
# "media.hardware-video-decoding.force-enabled" = true;
"media.videocontrols.picture-in-picture.video-toggle.enabled" = false;
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
"font.name.monospace.x-western" = "Monaspace Krypton";
"font.name.sans-serif.x-western" = "Monaspace Argon";
"font.name.serif.x-western" = "Monaspace Argon";
};
in
{
Expand Down
2 changes: 1 addition & 1 deletion modules/nixos/desktop/addons/wlogout/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ in
"wlogout/style.css".text = ''
* {
background-image: none;
font-family: Liga SFMono Nerd Font;
font-family: Monaspace Argon;
font-size: 20px;
}
window {
Expand Down
3 changes: 2 additions & 1 deletion modules/shared/system/fonts/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ in
noto-fonts-cjk-serif
noto-fonts-emoji
(nerdfonts.override { fonts = [ "Hack" "CascadiaCode" ]; })
khanelinix.monaspace
] "Custom font packages to install.";
default = mkOpt types.str "Liga SFMono Nerd Font" "Default font name";
default = mkOpt types.str "Monaspace Kyrpton" "Default font name";
};

config = mkIf cfg.enable {
Expand Down
51 changes: 51 additions & 0 deletions packages/monaspace/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{ lib
, stdenvNoCC
, fetchzip
}:

stdenvNoCC.mkDerivation (finalAttrs: {
pname = "monaspace";
version = "1.000";

src = fetchzip {
url = "https://github.com/githubnext/monaspace/releases/download/v${finalAttrs.version}/monaspace-v${finalAttrs.version}.zip";
stripRoot = false;
hash = "sha256-H8NOS+pVkrY9DofuJhPR2OlzkF4fMdmP2zfDBfrk83A=";
};

outputs = [ "out" "woff" ];

installPhase = ''
runHook preInstall
pushd monaspace-v${finalAttrs.version}/fonts/
install -Dm644 otf/*.otf -t $out/share/fonts/opentype
install -Dm644 variable/*.ttf -t $out/share/fonts/truetype
install -Dm644 webfonts/*.woff -t $woff/share/fonts/woff
popd
runHook postInstall
'';

meta = {
description = "An innovative superfamily of fonts for code";
longDescription = ''
Since the earliest days of the teletype machine, code has been set in
monospaced type — letters, on a grid. Monaspace is a new type system that
advances the state of the art for the display of code on screen.
Every advancement in the technology of computing has been accompanied by
advancements to the display and editing of code. CRTs made screen editors
possible. The advent of graphical user interfaces gave rise to integrated
development environments.
Even today, we still have limited options when we want to layer additional
meaning on top of code. Syntax highlighting was invented in 1982 to help
children to code in BASIC. But beyond colors, most editors must
communicate with developers through their interfaces — hovers, underlines,
and other graphical decorations.
Monaspace offers a more expressive palette for code and the tools we use
to work with it.
'';
homepage = "https://monaspace.githubnext.com/";
license = lib.licenses.ofl;
maintainers = with lib.maintainers; [ AndersonTorres ];
platforms = lib.platforms.all;
};
})
1 change: 1 addition & 0 deletions result

0 comments on commit 1718ace

Please sign in to comment.