diff --git a/config/modules/home/theme.nix b/config/modules/home/theme.nix index 1933530c..100bf99f 100644 --- a/config/modules/home/theme.nix +++ b/config/modules/home/theme.nix @@ -27,7 +27,11 @@ let cfg = config.kw.theme; in font = { name = mkOption { type = types.str; - default = "Cozette"; + default = "Fira Code"; + }; + termName = mkOption { + type = types.str; + default = cfg.font.name; }; size = mkOption { type = types.float; @@ -41,6 +45,7 @@ let cfg = config.kw.theme; in variables = mkOption { type = types.attrsOf types.str; default = (cfg.base16 // cfg.base16t // { + term_font = cfg.font.termName; font = cfg.font.name; font_size = cfg.font.size_css; }); diff --git a/config/profiles/base/default.nix b/config/profiles/base/default.nix index fa972c1a..13c5f438 100644 --- a/config/profiles/base/default.nix +++ b/config/profiles/base/default.nix @@ -6,6 +6,7 @@ users.arc users.hexchen ./system.nix + ./kitty.nix ./home.nix ./profiles.nix ./shell.nix diff --git a/config/profiles/base/kitty.nix b/config/profiles/base/kitty.nix new file mode 100644 index 00000000..007080c4 --- /dev/null +++ b/config/profiles/base/kitty.nix @@ -0,0 +1,5 @@ +{ config, pkgs, ... }: + +{ + environment.systemPackages = [ pkgs.kitty.terminfo ]; +} diff --git a/config/profiles/gui/fonts.nix b/config/profiles/gui/fonts.nix index 1cf68be9..93084066 100644 --- a/config/profiles/gui/fonts.nix +++ b/config/profiles/gui/fonts.nix @@ -16,7 +16,8 @@ }; fonts.fonts = with pkgs; [ - emacs-all-the-icons-fonts + fira-code + font-awesome cozette twitter-color-emoji ]; diff --git a/config/users/kat/base/zsh.nix b/config/users/kat/base/zsh.nix index dd2f92e3..032c34cb 100644 --- a/config/users/kat/base/zsh.nix +++ b/config/users/kat/base/zsh.nix @@ -18,7 +18,7 @@ in nix run nixpkgs.openssl -c openssl rand -hex 6 | sed 's/\(..\)\(..\)\(..\)\(..\)\(..\)\(..\)/\1:\2:\3:\4:\5:\6/' ''; nano = '' - ${pkgs.wezterm}/bin/wezterm imgcat ${./nano.png} + ${pkgs.kitty}/bin/kitty +kitten icat ${./nano.png} ''; } // shellFunAliases { sed = "sd"; diff --git a/config/users/kat/gui/default.nix b/config/users/kat/gui/default.nix index 680d3360..45674f2a 100644 --- a/config/users/kat/gui/default.nix +++ b/config/users/kat/gui/default.nix @@ -1,5 +1,15 @@ { config, ... }: { - imports = [ ./firefox ./packages.nix ./gtk.nix ./foot.nix ./xdg.nix ./ranger.nix ./fonts.nix ./qt.nix ]; + imports = [ + ./firefox + ./packages.nix + ./gtk.nix + ./foot.nix + ./kitty.nix + ./xdg.nix + ./ranger.nix + ./fonts.nix + ./qt.nix + ]; } diff --git a/config/users/kat/gui/firefox/tst.sass b/config/users/kat/gui/firefox/tst.sass index 83a02a15..27ebbc9f 100644 --- a/config/users/kat/gui/firefox/tst.sass +++ b/config/users/kat/gui/firefox/tst.sass @@ -1,5 +1,6 @@ * font-family: $font !important + font-size: $font_size !important #tabbar margin-top: calc(var(--pinned-tabs-area-size) - .15em) @@ -29,7 +30,7 @@ display: none &.pinned - background-color: $base0C + background-color: $base0E color: $base07 !important .twisty diff --git a/config/users/kat/gui/firefox/userChrome.sass b/config/users/kat/gui/firefox/userChrome.sass index 4052c3f8..09e5427b 100644 --- a/config/users/kat/gui/firefox/userChrome.sass +++ b/config/users/kat/gui/firefox/userChrome.sass @@ -16,6 +16,7 @@ $extendables: ".urlbar-icon", "#userContext-indicator", "#userContext-label" * font-family: $font !important + font-size: $font_size !important #TabsToolbar visibility: collapse diff --git a/config/users/kat/gui/foot.nix b/config/users/kat/gui/foot.nix index 1e09725f..f984c6fc 100644 --- a/config/users/kat/gui/foot.nix +++ b/config/users/kat/gui/foot.nix @@ -9,10 +9,10 @@ with lib; main = { term = "foot"; locked-title = false; - font = "${config.kw.theme.font.name}:size=${toString config.kw.theme.font.size}, Twitter Color Emoji:size=8"; - font-bold = "${config.kw.theme.font.name}:size=${toString config.kw.theme.font.size}:style=Bold"; - font-italic = "${config.kw.theme.font.name}:size=${toString config.kw.theme.font.size}:style=Italic"; - font-bold-italic = "${config.kw.theme.font.name}:size=${toString config.kw.theme.font.size}:style=Bold Italic"; + font = "${config.kw.theme.font.termName}:size=${toString config.kw.theme.font.size}, Twitter Color Emoji:size=8"; + font-bold = "${config.kw.theme.font.termName}:size=${toString config.kw.theme.font.size}:style=Bold"; + font-italic = "${config.kw.theme.font.termName}:size=${toString config.kw.theme.font.size}:style=Italic"; + font-bold-italic = "${config.kw.theme.font.termName}:size=${toString config.kw.theme.font.size}:style=Bold Italic"; dpi-aware = "no"; }; cursor = { diff --git a/config/users/kat/gui/kitty.nix b/config/users/kat/gui/kitty.nix new file mode 100644 index 00000000..a70b7524 --- /dev/null +++ b/config/users/kat/gui/kitty.nix @@ -0,0 +1,16 @@ +{ config, ... }: + +{ + wayland.windowManager.sway.extraSessionCommands = '' + export KITTY_CACHE_DIRECTORY="/tmp/kitty"; + ''; + programs.kitty = { + enable = true; + font.name = config.kw.theme.font.termName; + settings = { + font_size = toString config.kw.theme.font.size; + background_opacity = "0.9"; + disable_ligatures = "cursor"; + }; + }; +} diff --git a/config/users/kat/gui/ranger.nix b/config/users/kat/gui/ranger.nix index e6447f5c..f00726f0 100644 --- a/config/users/kat/gui/ranger.nix +++ b/config/users/kat/gui/ranger.nix @@ -7,5 +7,6 @@ xdg.configFile."ranger/rc.conf".text = '' set preview_images true + set preview_images_method kitty ''; } diff --git a/config/users/kat/sway/sway.nix b/config/users/kat/sway/sway.nix index 8890886d..b4e33498 100644 --- a/config/users/kat/sway/sway.nix +++ b/config/users/kat/sway/sway.nix @@ -1,9 +1,6 @@ { config, pkgs, lib, witch, ... }: let - footwrap = pkgs.writeShellScriptBin "footwrap" '' - exec foot "$2" - ''; lockCommand = let base16 = lib.mapAttrs' (k: v: lib.nameValuePair k (lib.removePrefix "#" v)) config.kw.theme.base16; @@ -18,7 +15,7 @@ let --indicator-radius 110 \ --indicator-thickness 8 \ --font ${config.kw.theme.font.name} \ - --font-size ${toString config.kw.theme.font.size} \ + --font-size ${config.kw.theme.font.size_css} \ --clock --timestr '%H:%M:%S' --datestr '%Y-%m-%d' \ --effect-blur 5x2 \ --fade-in 0.2 \ @@ -137,7 +134,7 @@ in config = let pactl = "${config.home.nixosConfig.hardware.pulseaudio.package or pkgs.pulseaudio}/bin/pactl"; - dmenu = "${pkgs.wofi}/bin/wofi -idbt ${footwrap}/bin/footwrap -s ~/.config/wofi/wofi.css -p '' -W 25%"; + dmenu = "${pkgs.wofi}/bin/wofi -idbt ${pkgs.kitty}/bin/kitty -s ~/.config/wofi/wofi.css -p '' -W 25%"; in { @@ -164,11 +161,11 @@ in }; fonts = { names = [ config.kw.theme.font.name ]; - style = "Medium"; + style = "Regular"; size = config.kw.theme.font.size; }; - terminal = "${pkgs.foot}/bin/foot"; - menu = "${pkgs.j4-dmenu-desktop}/bin/j4-dmenu-desktop --no-generic --dmenu=\"${dmenu}\" --term='${footwrap}/bin/footwrap'"; + terminal = "${pkgs.kitty}/bin/kitty"; + menu = "${pkgs.j4-dmenu-desktop}/bin/j4-dmenu-desktop --no-generic --dmenu=\"${dmenu}\" --term='${pkgs.kitty}/bin/kitty'"; modifier = "Mod4"; assigns = { "12:F2" = [{ class = "screenstub"; }]; }; diff --git a/config/users/kat/sway/waybar/default.nix b/config/users/kat/sway/waybar/default.nix index ad4a98fe..c20f8c4e 100644 --- a/config/users/kat/sway/waybar/default.nix +++ b/config/users/kat/sway/waybar/default.nix @@ -103,19 +103,19 @@ interval = 1; }; "clock#arc" = { - format = "♥-{:%H}"; + format = "-{:%H}"; tooltip = true; timezone = "America/Vancouver"; tooltip-format = "{:%A, %F %R %z (%Z)}"; }; "clock#miku" = { - format = "♥+{:%H}"; + format = "+{:%H}"; tooltip = true; timezone = "Pacific/Auckland"; tooltip-format = "{:%A, %F %R %z (%Z)}"; }; "clock#hex" = { - format = "♥+{:%H}"; + format = "+{:%H}"; tooltip = true; timezone = "Europe/Berlin"; tooltip-format = "{:%A, %F %R %z (%Z)}"; diff --git a/config/users/kat/sway/waybar/waybar.sass b/config/users/kat/sway/waybar/waybar.sass index bc6fbe5f..8f9a5c74 100644 --- a/config/users/kat/sway/waybar/waybar.sass +++ b/config/users/kat/sway/waybar/waybar.sass @@ -7,7 +7,7 @@ border: none border-radius: 0 background: none - font-family: $font + font-family: $font, "Font Awesome 5 Free Solid", "Font Awesome 5 Brands" font-size: $font_size min-height: 12px text-shadow: none diff --git a/overlays/katpkgs/public/swaylock-effects/default.nix b/overlays/katpkgs/public/swaylock-effects/default.nix index 25a320ea..0018e0ce 100644 --- a/overlays/katpkgs/public/swaylock-effects/default.nix +++ b/overlays/katpkgs/public/swaylock-effects/default.nix @@ -5,6 +5,7 @@ , ninja , pkg-config , scdoc +, fetchpatch , wayland , wayland-protocols , libxkbcommon @@ -31,6 +32,13 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ meson ninja pkg-config scdoc ]; buildInputs = [ wayland wayland-protocols libxkbcommon cairo gdk-pixbuf pam ]; + patches = [ + (fetchpatch { + name = "use-font-size-for-date-if-present"; + url = "https://patch-diff.githubusercontent.com/raw/gavinbeatty/swaylock-effects/pull/1.patch"; + sha256 = "1m42mb2gawkjf9svbhbdh7r1mfnyy8rxaaw19qns6i428aa4ykzx"; + }) + ]; mesonFlags = [ "-Dpam=enabled" "-Dgdk-pixbuf=enabled"