tree-wide: Add support for formatting of Markdown and CSS with prettier

Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
Christoph Heiss 2023-04-24 21:19:08 +02:00
parent c3784c3ad5
commit 4f6b09a153
Signed by: c8h4
GPG key ID: 6817E9C75C0785D7
6 changed files with 75 additions and 60 deletions

View file

@ -5,11 +5,8 @@ end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
[*.{nix,yml}]
indent_size = 2
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false

3
.prettierrc.json Normal file
View file

@ -0,0 +1,3 @@
{
"singleQuote": true
}

View file

@ -2,25 +2,25 @@
## Structure
* `common`: Contains configuration that should be applied on every machine.
- `common`: Contains configuration that should be applied on every machine.
* `extra`: Non-Nix files, e.g. configuration files for other applications.
- `extra`: Non-Nix files, e.g. configuration files for other applications.
* `machines`: Host-specific configuration.
- `machines`: Host-specific configuration.
* `name`: LXC container running unbound + blocky.
- `name`: LXC container running unbound + blocky.
* `srht`: LXC container running sourcehut.
- `srht`: LXC container running sourcehut.
* `trek`: Framework laptop.
- `trek`: Framework laptop.
* `pkgs`: Custom packages.
- `pkgs`: Custom packages.
* `secrets`: Secrects encrypted using [git-crypt](https://github.com/AGWA/git-crypt).
- `secrets`: Secrects encrypted using [git-crypt](https://github.com/AGWA/git-crypt).
* `services`: Configuration for bigger service deployments, e.g. nginx.
- `services`: Configuration for bigger service deployments, e.g. nginx.
* `system`: Configurations describing "classes" of machines, like servers or desktops.
- `system`: Configurations describing "classes" of machines, like servers or desktops.
## Hacking
@ -32,4 +32,4 @@ The code is released into the public domain.
Other conditions apply to the following files:
- extra/sway/background.png: [Photo](https://unsplash.com/photos/wQLAGv4_OYs) by [Lucas Kapla](https://unsplash.com/@aznbokchoy), [Unsplash License](https://unsplash.com/license)
- extra/sway/background.png: [Photo](https://unsplash.com/photos/wQLAGv4_OYs) by [Lucas Kapla](https://unsplash.com/@aznbokchoy), [Unsplash License](https://unsplash.com/license)

View file

@ -1,61 +1,69 @@
* {
border: none;
border-radius: 0;
font-family: "Jetbrains Mono", "Font Awesome 6 Free Solid";
font-size: 15px;
box-shadow: none;
text-shadow: none;
transition-duration: 0s;
border: none;
border-radius: 0;
font-family: 'Jetbrains Mono', 'Font Awesome 6 Free Solid';
font-size: 15px;
box-shadow: none;
text-shadow: none;
transition-duration: 0s;
}
window {
color: rgba(217, 216, 216, 1);
background: rgba(35, 31, 32, 0.8);
color: rgba(217, 216, 216, 1);
background: rgba(35, 31, 32, 0.8);
}
#workspaces {
margin: 0 5px;
margin: 0 5px;
}
#workspaces button {
padding: 0 5px;
color: rgba(217, 216, 216, 0.4);
padding: 0 5px;
color: rgba(217, 216, 216, 0.4);
}
#workspaces button.visible {
color: rgba(217, 216, 216, 1);
border-top: 1px solid rgba(0, 0, 0, 0);
border-bottom: 1px solid rgba(0, 0, 0, 0);
color: rgba(217, 216, 216, 1);
border-top: 1px solid rgba(0, 0, 0, 0);
border-bottom: 1px solid rgba(0, 0, 0, 0);
}
#workspaces button.focused {
border-top: 2px solid rgba(217, 216, 216, 1);
border-bottom: unset;
border-top: 2px solid rgba(217, 216, 216, 1);
border-bottom: unset;
}
#workspaces button:hover {
background: rgba(167, 171, 176, 0.6);
color: rgba(255, 255, 255, 1);
background: rgba(167, 171, 176, 0.6);
color: rgba(255, 255, 255, 1);
}
#workspaces button.urgent {
color: rgba(238, 46, 36, 1);
color: rgba(238, 46, 36, 1);
}
#mode, #battery, #cpu, #memory, #network, #pulseaudio, #idle_inhibitor, #backlight, #custom-spotify {
margin: 0px 6px 0px 10px;
min-width: 25px;
#mode,
#battery,
#cpu,
#memory,
#network,
#pulseaudio,
#idle_inhibitor,
#backlight,
#custom-spotify {
margin: 0px 6px 0px 10px;
min-width: 25px;
}
#clock {
margin: 0px 16px 0px 10px;
min-width: 140px;
margin: 0px 16px 0px 10px;
min-width: 140px;
}
#battery.warning {
color: rgba(255, 210, 4, 1);
color: rgba(255, 210, 4, 1);
}
#battery.critical {
color: rgba(238, 46, 36, 1);
color: rgba(238, 46, 36, 1);
}

View file

@ -1,39 +1,39 @@
* {
font-family: monospace;
font-family: monospace;
}
window {
background-color: #7c818c;
background-color: #7c818c;
}
#input {
margin: 5px;
border-radius: 0px;
border: none;
border-bottom: 3px solid black;
background-color: #383c4a;
color: white;
margin: 5px;
border-radius: 0px;
border: none;
border-bottom: 3px solid black;
background-color: #383c4a;
color: white;
}
#inner-box {
background-color: #383C4A;
background-color: #383c4a;
}
#outer-box {
margin: 5px;
padding:20px;
background-color: #383C4A;
margin: 5px;
padding: 20px;
background-color: #383c4a;
}
#text {
padding: 5px;
color: white;
padding: 5px;
color: white;
}
#entry:nth-child(even){
background-color: #404552;
#entry:nth-child(even) {
background-color: #404552;
}
#entry:selected {
background-color: #5291e2;
background-color: #5291e2;
}

View file

@ -1,5 +1,12 @@
{ pkgs ? import <nixpkgs> { } }:
pkgs.mkShell {
nativeBuildInputs = with pkgs; [ statix deadnix stylua nixfmt gnumake ];
nativeBuildInputs = with pkgs; [
deadnix
gnumake
nixfmt
nodePackages.prettier
statix
stylua
];
}