mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 20:39:18 -08:00
swaylock-effects patch, moved to kitty + fira code
This commit is contained in:
parent
d10f9d6292
commit
3247d303ed
15 changed files with 67 additions and 21 deletions
|
|
@ -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;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
users.arc
|
||||
users.hexchen
|
||||
./system.nix
|
||||
./kitty.nix
|
||||
./home.nix
|
||||
./profiles.nix
|
||||
./shell.nix
|
||||
|
|
|
|||
5
config/profiles/base/kitty.nix
Normal file
5
config/profiles/base/kitty.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = [ pkgs.kitty.terminfo ];
|
||||
}
|
||||
|
|
@ -16,7 +16,8 @@
|
|||
};
|
||||
|
||||
fonts.fonts = with pkgs; [
|
||||
emacs-all-the-icons-fonts
|
||||
fira-code
|
||||
font-awesome
|
||||
cozette
|
||||
twitter-color-emoji
|
||||
];
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ $extendables: ".urlbar-icon", "#userContext-indicator", "#userContext-label"
|
|||
|
||||
*
|
||||
font-family: $font !important
|
||||
font-size: $font_size !important
|
||||
|
||||
#TabsToolbar
|
||||
visibility: collapse
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
16
config/users/kat/gui/kitty.nix
Normal file
16
config/users/kat/gui/kitty.nix
Normal file
|
|
@ -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";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -7,5 +7,6 @@
|
|||
|
||||
xdg.configFile."ranger/rc.conf".text = ''
|
||||
set preview_images true
|
||||
set preview_images_method kitty
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"; }]; };
|
||||
|
|
|
|||
|
|
@ -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)}";
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue