add waybar icons (needs fonts)

This commit is contained in:
Noa Aarts 2024-03-04 16:47:35 +01:00
parent d546a7ed36
commit b6a6cf44e0
8 changed files with 110 additions and 22 deletions

10
common/colors.nix Normal file
View file

@ -0,0 +1,10 @@
{ config, pkgs, nix-colors, ... }:
{
imports = [
nix-colors.homeManagerModules.default
];
colorScheme = nix-colors.colorSchemes.catppuccin-macchiato;
}

View file

@ -25,7 +25,7 @@
"DP-2,1920x1080@60,0x0,1"
];
windowrulev2 = [
"opacity 0.8 0.8,class:^(kitty)$"
"opacity 1.0 0.6,class:^(kitty)$"
"stayfocused,class:^(wofi)$"
];
env = [
@ -43,8 +43,8 @@
gaps_in = "2";
gaps_out = "3";
border_size = "3";
"col.active_border"="0xff7c94bf";
"col.inactive_border"="0x00ffffff";
"col.active_border"="0xff950fad";
"col.inactive_border"="0xff26052e";
};
decoration = {
rounding = "6";

View file

@ -17,7 +17,7 @@
];
modules-left = [ "hyprland/workspaces" "tray" "custom/pronouns" "custom/spotify" ];
modules-center = [ "hyprland/window" "clock" ];
modules-right = [ "custom/vpn" "wireplumber" "network" "cpu" "memory" "keyboard-state" "custom/poweroff" ];
modules-right = [ "custom/vpn" "wireplumber" "network" "cpu" "memory" "temperature" "custom/poweroff" ];
"clock" = {
tooltip-format = "<big>{:%Y %B}</big>\n\n<small>{calendar}</small>";
interval = 1;
@ -49,13 +49,27 @@
exec-if = "test -d /proc/sys/net/ipv4/conf/tun0";
return-type = "json";
interval = 5;
};
"temperature" = {
thermal-zone = 2;
hwmon-path = "/sys/class/hwmon/hwmon2/temp1_input";
critical-threshold = 80;
format = "{temperatureC}°C {icon}";
format-icons = ["" "" ""];
};
"custom/poweroff" = {
# TODO fix format
format = "P";
format = "";
on-click = "wofi-power";
on-click-right = "swaylock";
};
"network" = {
format-wifi = "{essid} ({signalStrength}%) 󰖩";
format-ethernet = "{ipaddr}/{cidr} 󰛳";
tooltip-format = "{ifname} via {gwaddr} 󰛳";
format-linked = "{ifname} (No IP) 󰛳";
format-disconnected = "Disconnected ";
format-alt = "{ifname}: {ipaddr}/{cidr}";
};
"custom/pronouns" = {
format = "{}";
exec = "${config.xdg.configHome}/waybar/pronouns";

View file

@ -1,6 +1,9 @@
{ config, pkgs, inputs, ... }:
{ config, pkgs, inputs, nix-colors, ... }:
{
imports = [
./colors.nix
];
home.packages = with pkgs; [
(writeShellScriptBin "wofi-launch" ''
${wofi}/bin/wofi --show drun
@ -53,7 +56,7 @@
#window {
margin: 10px;
border: none;
background-color: #030035;
background-color: #${config.colorScheme.palette.base0E};
border-radius: 10px;
font-family:
JetBrains Mono NF,
@ -64,7 +67,7 @@
#outer-box {
margin: 10px;
border: 2px @lavender;
border: 2px #${config.colorScheme.palette.base07};
border-radius: 10px;
background-color: transparent;
}
@ -73,17 +76,17 @@
border: none;
border-radius: 10px;
margin-left: 2px;
color: @text;
color: #${config.colorScheme.palette.base05};
outline-style: none;
background-color: @base;
background-color: #${config.colorScheme.palette.base00};
}
#scroll {
border: 10px solid @mantle;
border: 10px solid #${config.colorScheme.palette.base06};
border-radius: 10px;
/*padding-right: 10px;*/
outline: none;
background-color: @base;
background-color: #${config.colorScheme.palette.base00};
}
#inner-box {
@ -99,17 +102,17 @@
margin-left: 15px;*/
padding-right: 10px;
padding-left: 10px;
color: @subtext0;
background-color: @base;
color: #${config.colorScheme.palette.base02};
background-color: #${config.colorScheme.palette.base00};
}
#entry:selected {
border: none;
background-color: @green;
background-color: #${config.colorScheme.palette.base0B};
}
#text:selected {
border: none;
color: @crust;
color: #${config.colorScheme.palette.base03};
}
#img {

51
flake.lock generated
View file

@ -1,5 +1,21 @@
{
"nodes": {
"base16-schemes": {
"flake": false,
"locked": {
"lastModified": 1696158499,
"narHash": "sha256-5yIHgDTPjoX/3oDEfLSQ0eJZdFL1SaCfb9d6M0RmOTM=",
"owner": "tinted-theming",
"repo": "base16-schemes",
"rev": "a9112eaae86d9dd8ee6bb9445b664fba2f94037a",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-schemes",
"type": "github"
}
},
"devshell": {
"inputs": {
"flake-utils": "flake-utils",
@ -172,6 +188,25 @@
"type": "github"
}
},
"nix-colors": {
"inputs": {
"base16-schemes": "base16-schemes",
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1707825078,
"narHash": "sha256-hTfge2J2W+42SZ7VHXkf4kjU+qzFqPeC9k66jAUBMHk=",
"owner": "misterio77",
"repo": "nix-colors",
"rev": "b01f024090d2c4fc3152cd0cf12027a7b8453ba1",
"type": "github"
},
"original": {
"owner": "misterio77",
"repo": "nix-colors",
"type": "github"
}
},
"nix-darwin": {
"inputs": {
"nixpkgs": [
@ -209,6 +244,21 @@
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1697935651,
"narHash": "sha256-qOfWjQ2JQSQL15KLh6D7xQhx0qgZlYZTYlcEiRuAMMw=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "e1e11fdbb01113d85c7f41cada9d2847660e3902",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixvim": {
"inputs": {
"devshell": "devshell",
@ -266,6 +316,7 @@
"root": {
"inputs": {
"home-manager": "home-manager",
"nix-colors": "nix-colors",
"nixpkgs": "nixpkgs",
"nixvim": "nixvim"
}

View file

@ -6,6 +6,10 @@
# nixpkgs.url = "github:NixOS/nixpkgs/d8e0944e6d2ce0f326040e654c07a410e2617d47";
nix-colors = {
url = "github:misterio77/nix-colors";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
@ -18,7 +22,7 @@
};
outputs = { self, nixpkgs, ... }@inputs:
outputs = { self, nixpkgs, nix-colors, ... }@inputs:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
@ -27,7 +31,10 @@
nixosConfigurations = {
default = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;};
specialArgs = {
inherit inputs;
inherit nix-colors;
};
modules = [
./hosts/default/configuration.nix
inputs.home-manager.nixosModules.default

View file

@ -2,7 +2,7 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, inputs, ... }:
{ config, pkgs, inputs, nix-colors, ... }:
{
imports =
@ -81,7 +81,10 @@
};
home-manager = {
extraSpecialArgs = { inherit inputs; };
extraSpecialArgs = {
inherit inputs;
inherit nix-colors;
};
users = {
"noa" = import ./home.nix;
"root" = import ./root.nix;

View file

@ -6,7 +6,7 @@
driSupport32Bit = true;
};
services.xserver.videoDriver = "nvidia";
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = {