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

View file

@ -17,7 +17,7 @@
]; ];
modules-left = [ "hyprland/workspaces" "tray" "custom/pronouns" "custom/spotify" ]; modules-left = [ "hyprland/workspaces" "tray" "custom/pronouns" "custom/spotify" ];
modules-center = [ "hyprland/window" "clock" ]; 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" = { "clock" = {
tooltip-format = "<big>{:%Y %B}</big>\n\n<small>{calendar}</small>"; tooltip-format = "<big>{:%Y %B}</big>\n\n<small>{calendar}</small>";
interval = 1; interval = 1;
@ -50,12 +50,26 @@
return-type = "json"; return-type = "json";
interval = 5; 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" = { "custom/poweroff" = {
# TODO fix format format = "";
format = "P";
on-click = "wofi-power"; on-click = "wofi-power";
on-click-right = "swaylock"; 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" = { "custom/pronouns" = {
format = "{}"; format = "{}";
exec = "${config.xdg.configHome}/waybar/pronouns"; 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; [ home.packages = with pkgs; [
(writeShellScriptBin "wofi-launch" '' (writeShellScriptBin "wofi-launch" ''
${wofi}/bin/wofi --show drun ${wofi}/bin/wofi --show drun
@ -53,7 +56,7 @@
#window { #window {
margin: 10px; margin: 10px;
border: none; border: none;
background-color: #030035; background-color: #${config.colorScheme.palette.base0E};
border-radius: 10px; border-radius: 10px;
font-family: font-family:
JetBrains Mono NF, JetBrains Mono NF,
@ -64,7 +67,7 @@
#outer-box { #outer-box {
margin: 10px; margin: 10px;
border: 2px @lavender; border: 2px #${config.colorScheme.palette.base07};
border-radius: 10px; border-radius: 10px;
background-color: transparent; background-color: transparent;
} }
@ -73,17 +76,17 @@
border: none; border: none;
border-radius: 10px; border-radius: 10px;
margin-left: 2px; margin-left: 2px;
color: @text; color: #${config.colorScheme.palette.base05};
outline-style: none; outline-style: none;
background-color: @base; background-color: #${config.colorScheme.palette.base00};
} }
#scroll { #scroll {
border: 10px solid @mantle; border: 10px solid #${config.colorScheme.palette.base06};
border-radius: 10px; border-radius: 10px;
/*padding-right: 10px;*/ /*padding-right: 10px;*/
outline: none; outline: none;
background-color: @base; background-color: #${config.colorScheme.palette.base00};
} }
#inner-box { #inner-box {
@ -99,17 +102,17 @@
margin-left: 15px;*/ margin-left: 15px;*/
padding-right: 10px; padding-right: 10px;
padding-left: 10px; padding-left: 10px;
color: @subtext0; color: #${config.colorScheme.palette.base02};
background-color: @base; background-color: #${config.colorScheme.palette.base00};
} }
#entry:selected { #entry:selected {
border: none; border: none;
background-color: @green; background-color: #${config.colorScheme.palette.base0B};
} }
#text:selected { #text:selected {
border: none; border: none;
color: @crust; color: #${config.colorScheme.palette.base03};
} }
#img { #img {

51
flake.lock generated
View file

@ -1,5 +1,21 @@
{ {
"nodes": { "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": { "devshell": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
@ -172,6 +188,25 @@
"type": "github" "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": { "nix-darwin": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -209,6 +244,21 @@
"type": "github" "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": { "nixvim": {
"inputs": { "inputs": {
"devshell": "devshell", "devshell": "devshell",
@ -266,6 +316,7 @@
"root": { "root": {
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"nix-colors": "nix-colors",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixvim": "nixvim" "nixvim": "nixvim"
} }

View file

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

View file

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

View file

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