fonts & waybar

This commit is contained in:
Sam 2024-05-31 00:17:16 +01:00
parent f5094f4749
commit afc6ef3e56
8 changed files with 247 additions and 28 deletions

View File

@ -3,10 +3,20 @@
imports = [
./zsh.nix
./nixvim.nix
./fonts.nix
] ;
home.packages = [
pkgs.ripgrep
];
# Global home packages without config go here (for all hosts and users)
home.packages = builtins.attrValues {
inherit (pkgs)
ripgrep
fzf
eza
pciutils
tree
jq
coreutils
;};
home.stateVersion = "23.11";
}

View File

@ -0,0 +1,10 @@
{ pkgs, ... }:
{
fonts.fontconfig.enable = true;
home.packages = [
pkgs.noto-fonts
pkgs.nerdfonts # loads the complete collection. look into overide for FiraMono or potentially mononoki
pkgs.meslo-lgs-nf
];
}

View File

@ -10,7 +10,211 @@
};
programs.waybar = {
enable = true;
#package = "";
systemd.enable = true;
};
settings = {
primary = {
mode = "dock";
height = 30;
margin = "6";
spacing = 5;
modules-left = [
"custom/menu"
"wlr/workspaces"];
modules-center = [
"clock"
];
modules-right = [
"cpu"
"memory"
"network"
"pulseaudio"
"battery"
"tray"
"custom/exit"
"custom/hostname"
];
"wlr/workspaces" = {
"format" = "{icon}";
"on-click" = "activate";
"format-icons"= {
"1" = "";
"2" = "";
"3" = "";
"4" = "";
"5" = "";
"urgent" = "";
"active" = "";
"default" = "";
};
};
"clock" = {
"format" = "<span> </span>{:%m/%d %H:%M}";
"tooltip-format" = "<big>{:%B %Y}</big>\n<tt><small>{calendar}</small></tt>";
"on-click" = "calendar";
};
"cpu"= {
"interval" = 10;
"format" = " {}%";
"max-length" = 10;
"on-click" = "";
};
"memory" = {
"interval" = 30;
"format" = " {}%";
"format-alt" = " {used:0.1f}G";
"max-length" = 10;
};
"network" = {
"format-wifi" = " {signalStrength}%";
"format-ethernet" = " wired";
"format-disconnected" = "";
"on-click" = "bash ~/.config/waybar/scripts/rofi-wifi-menu.sh";
};
"battery" = {
"bat" = "BAT0";
"adapter" = "ADP0";
"interval" = 60;
"states" = {
"warning" = 30;
"critical" = 15;
};
"max-length" = 20;
"format" = "{icon} {capacity}%";
"format-warning" = "{icon} {capacity}%";
"format-critical" = "{icon} {capacity}%";
"format-charging" = "<span font-family='Font Awesome 6 Free'></span> {capacity}%";
"format-plugged" = " {capacity}%";
"format-alt" = "{icon} {time}";
"format-full" = " {capacity}%";
"format-icons" = [" " " " " " " " " "];
};
"tray" = {
"spacing" = 10;
};
"custom/menu" = {
"format" = "";
"on-click" = "rofi -show drun";
};
"custom/hostname" = {
"exec" = "echo $USER@$(hostname)";
"on-click" = "alacritty";
};
"custom/exit" = {
"format" = "";
"on-click" = "wlogout";
};
"pulseaudio" = {
"format" = "{icon} {volume}%";
"format-muted" = " 0%";
"format-icons" = {
"headphone" = "";
"headset" = "";
"portable" = "";
"default" = [ "" "" "" ];
};
"on-click" = "pavucontrol";
};
};
};
style = ''
* {
font-family: JetBrainsMono Nerd Font;
font-size: 12pt;
padding: 0 8px;
}
.modules-right {
margin-right: -15px;
}
.modules-left {
margin-left: -15px;
}
window#waybar {
color: white;
background-color: #002635;
opacity: 0.95;
padding: 0;
border-radius: 10px;
}
window#waybar.bottom {
opacity: 0.90;
background-color: #002635;
border: 2px solid #14747e;
border-radius: 10px;
}
#workspaces button {
padding: 0 5px;
color: #7984A4;
background-color: transparent;
box-shadow: inset 0 -3px transparent;
border: none;
border-radius: 0;
}
#workspaces button.hidden {
background-color: #002635;
color: #869696;
}
#workspaces button.focused {
color: #bf616a;
}
#workspaces button.active {
color: #6a92d7;
}
#workspaces button.urgent {
background-color: #eb4d4b;
}
#clock {
padding-left: 15px;
padding-right: 15px;
margin-top: 0;
margin-bottom: 0;
border-radius: 10px;
}
#tray {
color: #a1a19a;
}
#custom-hostname {
background-color: white;
color: #002635;
padding-left: 15px;
padding-right: 18px;
margin-right: 0;
margin-top: 0;
margin-bottom: 0;
border-radius: 10px;
}
#custom-menu {
font-size: 16pt;
background-color: white;
color: #002635;
padding-left: 15px;
padding-right: 22px;
margin-left: 0;
margin-right: 10px;
margin-top: 0;
margin-bottom: 0;
border-radius: 10px;
}
'';
};
}

View File

@ -19,7 +19,14 @@
./common/optional/desktop/waybar.nix
];
monitors = [
home.packages = [
pkgs.kitty
pkgs.zathura
pkgs.xfce.thunar
];
monitors = [
{
name = "Virtual-1";
width = 2048;
@ -35,5 +42,5 @@ monitors = [
refreshRate = 60;
x = 2048;
}
];
];
}

View File

@ -8,12 +8,6 @@
imports = [
] ++ (builtins.attrValues outputs.homeManagerModules); # import all homeManagerModules?
home.packages = [
pkgs.kitty
pkgs.zathura
pkgs.xfce.thunar
];
home.file = {
".icons/bibata".source = "${pkgs.bibata-cursors}/share/icons/Bibata-Modern-Classic";
};
@ -56,4 +50,3 @@
};
}

View File

@ -5,12 +5,13 @@ let
dev = "/dev/vda"; # depends on target hardware
encrypted = true; # currrently only applies to btrfs
btrfsMountDevice = if encrypted then "/dev/mapper/crypted" else "/dev/root_vg/root";
user = "sam";
in
{
imports =
[
# Create users for this host
../common/users/sam
../common/users/${user}
# Disk configuration
inputs.disko.nixosModules.disko
@ -43,7 +44,7 @@ in
environment.persistence."/persist" = {
hideMounts = true;
users.sam= {
users.${user} = {
directories = [
"Sync"
"Keep"

View File

@ -1,10 +1,4 @@
{
#fonts = import ./fonts.nix;
monitors = import ./monitors.nix;
# pass-secret-service = import ./pass-secret-service.nix;
# rgbdaemon = import ./rgbdaemon.nix;
# shellcolor = import ./shellcolor.nix;
# wallpaper = import ./wallpaper.nix;
# xpo = import ./xpo.nix;
# colors = import ./colors.nix;
}