mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-08-21 10:45:49 +02:00
Compare commits
4 Commits
f56bf4402c
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 445829e365 | |||
| bb054e7e8d | |||
| eb7cea567c | |||
| 8654da046c |
@@ -2,6 +2,8 @@
|
||||
c = config.lib.stylix.colors;
|
||||
in {
|
||||
home.file.".config/ilovetui/config.yaml".text = ''
|
||||
nerd_fonts: true
|
||||
border: rounded
|
||||
colors:
|
||||
base00: "#${c.base00}" # Background
|
||||
base01: "#${c.base01}" # Lighter Background / Status Bars
|
||||
|
||||
@@ -1,5 +1,65 @@
|
||||
{config, ...}: let
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
c = config.lib.stylix.colors;
|
||||
font = config.stylix.fonts.monospace.name;
|
||||
|
||||
fontSize = 16;
|
||||
em = fontSize * 4.0 / 3.0;
|
||||
charW = em * 0.6;
|
||||
lineH = em * 1.32;
|
||||
|
||||
round = x: builtins.floor (x + 0.5);
|
||||
px = x: toString (round x);
|
||||
|
||||
paint = color: t: ''<span foreground="#${color}">${t}</span>'';
|
||||
fromFile = name: text: ''cmd[update:0] cat ${pkgs.writeText name text}'';
|
||||
|
||||
inner = 42;
|
||||
width = inner + 2;
|
||||
valueCol = 13;
|
||||
|
||||
spaces = n: lib.concatStrings (lib.genList (_: " ") n);
|
||||
|
||||
border = paint c.base0D;
|
||||
hbar = lib.concatStrings (lib.genList (_: "─") inner);
|
||||
|
||||
row = content: border "│" + content + border "│";
|
||||
|
||||
blank = row (spaces inner);
|
||||
|
||||
entry = name: value: let
|
||||
prompt = " ${name}:";
|
||||
gap = spaces (valueCol - builtins.stringLength prompt);
|
||||
tail = spaces (inner - valueCol - builtins.stringLength value);
|
||||
in
|
||||
row (border prompt + gap + paint c.base05 value + tail);
|
||||
|
||||
lines = [
|
||||
(border "┌${hbar}┐")
|
||||
blank
|
||||
(entry "Session" "Hyprland")
|
||||
(entry "Username" config.home.username)
|
||||
(entry "Password" "")
|
||||
blank
|
||||
(border "└${hbar}┘")
|
||||
];
|
||||
|
||||
rowY = i: -((i + 0.5) - (builtins.length lines) / 2.0) * lineH;
|
||||
colX = i: (i - width / 2.0) * charW;
|
||||
|
||||
frameHalfH = (builtins.length lines) * lineH / 2.0;
|
||||
outsideY = frameHalfH + 1.5 * lineH;
|
||||
|
||||
inputH = fontSize / 0.8;
|
||||
inputW = 27 * charW;
|
||||
dotPad = (inputH - lineH) / 2.0;
|
||||
inputX = colX (valueCol + 1) - dotPad;
|
||||
passwordRow = 4;
|
||||
hidden = "<span> </span>";
|
||||
in {
|
||||
stylix.targets.hyprlock.enable = false;
|
||||
|
||||
@@ -16,65 +76,87 @@ in {
|
||||
label = [
|
||||
{
|
||||
monitor = "";
|
||||
text = ''cmd[update:0] echo "[$USER@$(hostname) ~]"'';
|
||||
color = "rgb(${c.base0D})";
|
||||
font_size = 13;
|
||||
font_family = config.stylix.fonts.monospace.name;
|
||||
position = "48, -48";
|
||||
halign = "left";
|
||||
valign = "top";
|
||||
}
|
||||
{
|
||||
monitor = "";
|
||||
text = ''cmd[update:1000] echo "$(date +'%H:%M:%S')"'';
|
||||
text = ''cmd[update:1000] date +"%H:%M %A %d %B"'';
|
||||
color = "rgb(${c.base05})";
|
||||
font_size = 13;
|
||||
font_family = config.stylix.fonts.monospace.name;
|
||||
position = "48, -70";
|
||||
halign = "left";
|
||||
font_size = fontSize;
|
||||
font_family = font;
|
||||
position = "0, -64";
|
||||
halign = "center";
|
||||
valign = "top";
|
||||
}
|
||||
{
|
||||
monitor = "";
|
||||
text = ''cmd[update:60000] echo "$(date +'%A %d %B %Y')"'';
|
||||
text = "Welcome";
|
||||
color = "rgb(${c.base05})";
|
||||
font_size = fontSize;
|
||||
font_family = font;
|
||||
position = "0, ${px outsideY}";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
{
|
||||
monitor = "";
|
||||
text = fromFile "hyprlock-frame" (lib.concatStringsSep "\n" lines);
|
||||
color = "rgb(${c.base05})";
|
||||
font_size = fontSize;
|
||||
font_family = font;
|
||||
text_align = "left";
|
||||
position = "0, 0";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
{
|
||||
monitor = "";
|
||||
text = "<span> </span>$FAIL<span> </span>";
|
||||
color = "rgb(${c.base08})";
|
||||
font_size = fontSize;
|
||||
font_family = font;
|
||||
position = "0, ${px (-outsideY)}";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
{
|
||||
monitor = "";
|
||||
text =
|
||||
fromFile "hyprlock-hints"
|
||||
"${paint c.base0D "Enter"} ${paint c.base04 "unlock"} ${paint c.base0D "Esc"} ${paint c.base04 "clear"}";
|
||||
color = "rgb(${c.base04})";
|
||||
font_size = 13;
|
||||
font_family = config.stylix.fonts.monospace.name;
|
||||
position = "48, -92";
|
||||
halign = "left";
|
||||
valign = "top";
|
||||
}
|
||||
{
|
||||
monitor = "";
|
||||
text = "passwd:";
|
||||
color = "rgb(${c.base0D})";
|
||||
font_size = 13;
|
||||
font_family = config.stylix.fonts.monospace.name;
|
||||
position = "48, -141";
|
||||
halign = "left";
|
||||
valign = "top";
|
||||
font_size = fontSize;
|
||||
font_family = font;
|
||||
position = "0, 40";
|
||||
halign = "center";
|
||||
valign = "bottom";
|
||||
}
|
||||
];
|
||||
|
||||
"input-field" = [
|
||||
{
|
||||
monitor = "";
|
||||
size = "200, 20";
|
||||
size = "${px inputW}, ${px inputH}";
|
||||
position = "${px (inputX + inputW / 2.0)}, ${px (rowY passwordRow)}";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
|
||||
outline_thickness = 0;
|
||||
outer_color = "rgba(00000000)";
|
||||
inner_color = "rgba(00000000)";
|
||||
font_color = "rgb(${c.base05})";
|
||||
fade_on_empty = false;
|
||||
placeholder_text = "";
|
||||
hide_input = true;
|
||||
rounding = 0;
|
||||
check_color = "rgb(${c.base0B})";
|
||||
fade_on_empty = false;
|
||||
|
||||
font_family = font;
|
||||
font_color = "rgb(${c.base05})";
|
||||
|
||||
dots_text_format = "*";
|
||||
dots_size = 0.8;
|
||||
dots_spacing = 0.0;
|
||||
dots_center = false;
|
||||
|
||||
swap_font_color = true;
|
||||
placeholder_text = hidden;
|
||||
fail_text = hidden;
|
||||
check_color = "rgb(${c.base0C})";
|
||||
fail_color = "rgb(${c.base08})";
|
||||
fail_text = ''<span font_desc="${config.stylix.fonts.monospace.name} 13">auth failed</span>'';
|
||||
capslock_color = "rgb(${c.base0A})";
|
||||
position = "116, -138";
|
||||
halign = "left";
|
||||
valign = "top";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
disk = {
|
||||
main = {
|
||||
type = "disk";
|
||||
device = "/dev/disk/by-id/nvme-WD_PC_SN740_SDDQNQD-256G-1201_24175M800511";
|
||||
device = "/dev/disk/by-id/nvme-SK_hynix_PVC10_HFS512GEM9X173N_5MF4N00141310464Q";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
"root"
|
||||
];
|
||||
rules = ''
|
||||
allow id 1d6b:0002 serial "0000:00:14.0" name "xHCI Host Controller" hash "jEP/6WzviqdJ5VSeTUY8PatCNBKeaREvo2OqdplND/o=" parent-hash "rV9bfLq7c2eA4tYjVjwO4bxhm+y6GgZpl9J60L0fBkY=" with-interface 09:00:00 with-connect-type ""
|
||||
allow id 1d6b:0003 serial "0000:00:14.0" name "xHCI Host Controller" hash "prM+Jby/bFHCn2lNjQdAMbgc6tse3xVx+hZwjOPHSdQ=" parent-hash "rV9bfLq7c2eA4tYjVjwO4bxhm+y6GgZpl9J60L0fBkY=" with-interface 09:00:00 with-connect-type ""
|
||||
allow id 17ef:6190 serial "" name "Lenovo Calliope USB Keyboard G2" hash "CfZ9R/aoXGm7BN/ojVEzKQwVoxCUtRWMuACrE7BL/5Y=" parent-hash "jEP/6WzviqdJ5VSeTUY8PatCNBKeaREvo2OqdplND/o=" via-port "1-10" with-interface { 03:01:01 03:00:00 } with-connect-type "hotplug"
|
||||
allow id 0781:5581 name " SanDisk 3.2Gen1"
|
||||
allow id 1d6b:0002 name "xHCI Host Controller"
|
||||
allow id 0951:1666 name "DataTraveler 3.0"
|
||||
allow id 1d6b:0003 name "xHCI Host Controller"
|
||||
allow id 17ef:6190 name "Lenovo Calliope USB Keyboard G2"
|
||||
allow id 17ef:608d name "Lenovo USB Optical Mouse"
|
||||
'';
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user