mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
feat(color): use papercolor
This commit is contained in:
43
.bin/dummy-alert
Executable file
43
.bin/dummy-alert
Executable file
@@ -0,0 +1,43 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
name=$RANDOM
|
||||||
|
url='http://localhost:9093/api/v1/alerts'
|
||||||
|
|
||||||
|
echo "firing up alert $name"
|
||||||
|
|
||||||
|
# change url o
|
||||||
|
curl -XPOST $url -d "[{
|
||||||
|
\"status\": \"firing\",
|
||||||
|
\"labels\": {
|
||||||
|
\"alertname\": \"$name\",
|
||||||
|
\"service\": \"my-service\",
|
||||||
|
\"severity\":\"warning\",
|
||||||
|
\"instance\": \"$name.example.net\"
|
||||||
|
},
|
||||||
|
\"annotations\": {
|
||||||
|
\"summary\": \"High latency is high!\"
|
||||||
|
},
|
||||||
|
\"generatorURL\": \"http://prometheus.int.example.net/<generating_expression>\"
|
||||||
|
}]"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
echo "press enter to resolve alert"
|
||||||
|
read
|
||||||
|
|
||||||
|
echo "sending resolve"
|
||||||
|
curl -XPOST $url -d "[{
|
||||||
|
\"status\": \"resolved\",
|
||||||
|
\"labels\": {
|
||||||
|
\"alertname\": \"$name\",
|
||||||
|
\"service\": \"my-service\",
|
||||||
|
\"severity\":\"warning\",
|
||||||
|
\"instance\": \"$name.example.net\"
|
||||||
|
},
|
||||||
|
\"annotations\": {
|
||||||
|
\"summary\": \"High latency is high!\"
|
||||||
|
},
|
||||||
|
\"generatorURL\": \"http://prometheus.int.example.net/<generating_expression>\"
|
||||||
|
}]"
|
||||||
|
|
||||||
|
echo ""
|
||||||
@@ -57,7 +57,7 @@ in {
|
|||||||
];
|
];
|
||||||
|
|
||||||
environment.etc = {
|
environment.etc = {
|
||||||
"themes/dark/alacritty.yml".source = alacritty-cfg (import <niveum/lib/colours/owickstrom-dark.nix>);
|
"themes/dark/alacritty.yml".source = alacritty-cfg (import <niveum/lib/colours/papercolor-dark.nix>);
|
||||||
"themes/light/alacritty.yml".source = alacritty-cfg (import <niveum/lib/colours/owickstrom-light.nix>);
|
"themes/light/alacritty.yml".source = alacritty-cfg (import <niveum/lib/colours/papercolor-light.nix>);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
37
lib/colours/papercolor-dark.nix
Normal file
37
lib/colours/papercolor-dark.nix
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
rec {
|
||||||
|
black = {
|
||||||
|
dark = "#1c1c1c";
|
||||||
|
bright = "#585858";
|
||||||
|
};
|
||||||
|
red = {
|
||||||
|
dark = "#af005f";
|
||||||
|
bright = "#5faf5f";
|
||||||
|
};
|
||||||
|
green = {
|
||||||
|
bright = "#afd700";
|
||||||
|
dark = "#5faf00";
|
||||||
|
};
|
||||||
|
yellow = {
|
||||||
|
bright = "#af87d7";
|
||||||
|
dark = "#d7af5f";
|
||||||
|
};
|
||||||
|
blue = {
|
||||||
|
dark = "#5fafd7";
|
||||||
|
bright = "#ffaf00";
|
||||||
|
};
|
||||||
|
magenta = {
|
||||||
|
bright = "#ff5faf";
|
||||||
|
dark = "#808080";
|
||||||
|
};
|
||||||
|
cyan = {
|
||||||
|
dark = "#d7875f";
|
||||||
|
bright = "#00afaf";
|
||||||
|
};
|
||||||
|
white = {
|
||||||
|
dark = "#d0d0d0";
|
||||||
|
bright = "#5f8787";
|
||||||
|
};
|
||||||
|
background = black.dark;
|
||||||
|
foreground = white.dark;
|
||||||
|
cursor = blue.bright;
|
||||||
|
}
|
||||||
37
lib/colours/papercolor-light.nix
Normal file
37
lib/colours/papercolor-light.nix
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
rec {
|
||||||
|
black = {
|
||||||
|
dark = "#eeeeee";
|
||||||
|
bright = "#bcbcbc";
|
||||||
|
};
|
||||||
|
red = {
|
||||||
|
dark = "#af0000";
|
||||||
|
bright = "#d70000";
|
||||||
|
};
|
||||||
|
green = {
|
||||||
|
dark = "#008700";
|
||||||
|
bright = "#d70087";
|
||||||
|
};
|
||||||
|
yellow = {
|
||||||
|
dark = "#5f8700";
|
||||||
|
bright = "#8700af";
|
||||||
|
};
|
||||||
|
blue = {
|
||||||
|
dark = "#0087af";
|
||||||
|
bright = "#d75f00";
|
||||||
|
};
|
||||||
|
magenta = {
|
||||||
|
bright = "#878787";
|
||||||
|
dark = "#d75f00";
|
||||||
|
};
|
||||||
|
cyan = {
|
||||||
|
dark = "#005f87";
|
||||||
|
bright = "#005faf";
|
||||||
|
};
|
||||||
|
white = {
|
||||||
|
dark = "#444444";
|
||||||
|
bright = "#005f87";
|
||||||
|
};
|
||||||
|
background = black.dark;
|
||||||
|
foreground = white.dark;
|
||||||
|
cursor = blue.bright;
|
||||||
|
}
|
||||||
@@ -40,7 +40,7 @@ rec {
|
|||||||
|
|
||||||
sshPort = 22022;
|
sshPort = 22022;
|
||||||
|
|
||||||
colours = import ./colours/ibm-3270.nix;
|
colours = import ./colours/papercolor-dark.nix;
|
||||||
|
|
||||||
theme = pkgs: {
|
theme = pkgs: {
|
||||||
gtk = {
|
gtk = {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ in {
|
|||||||
warning_fg = colours.yellow.bright;
|
warning_fg = colours.yellow.bright;
|
||||||
warning_bg = colours.background;
|
warning_bg = colours.background;
|
||||||
alternating_tint_bg = colours.background;
|
alternating_tint_bg = colours.background;
|
||||||
alternating_tint_fg = colours.background;
|
alternating_tint_fg = colours.foreground;
|
||||||
critical_bg = colours.background;
|
critical_bg = colours.background;
|
||||||
good_bg = colours.background;
|
good_bg = colours.background;
|
||||||
idle_bg = colours.background;
|
idle_bg = colours.background;
|
||||||
|
|||||||
Reference in New Issue
Block a user