Intorduce noctalia bar
This commit is contained in:
Generated
+21
@@ -1114,6 +1114,26 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"noctalia": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"unstable"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1783093735,
|
||||||
|
"narHash": "sha256-f12Pu8LAOTE8wTqbHNGl1B8X+Auvg8zuPCENC2rBa68=",
|
||||||
|
"owner": "noctalia-dev",
|
||||||
|
"repo": "noctalia",
|
||||||
|
"rev": "a0d8efc30ead165a6a56349fdda3c722309c0745",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "noctalia-dev",
|
||||||
|
"repo": "noctalia",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": [
|
"flake-parts": [
|
||||||
@@ -1226,6 +1246,7 @@
|
|||||||
"nixos-generators": "nixos-generators",
|
"nixos-generators": "nixos-generators",
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs": "nixpkgs_8",
|
"nixpkgs": "nixpkgs_8",
|
||||||
|
"noctalia": "noctalia",
|
||||||
"sops-nix": "sops-nix",
|
"sops-nix": "sops-nix",
|
||||||
"split-monitor-workspaces": "split-monitor-workspaces",
|
"split-monitor-workspaces": "split-monitor-workspaces",
|
||||||
"stylix": "stylix",
|
"stylix": "stylix",
|
||||||
|
|||||||
@@ -71,6 +71,11 @@
|
|||||||
thefuck.url = "github:LichHunter/thefuck";
|
thefuck.url = "github:LichHunter/thefuck";
|
||||||
|
|
||||||
backlog.url = "github:LichHunter/backlog";
|
backlog.url = "github:LichHunter/backlog";
|
||||||
|
|
||||||
|
noctalia = {
|
||||||
|
url = "github:noctalia-dev/noctalia";
|
||||||
|
inputs.nixpkgs.follows = "unstable";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
|
|||||||
@@ -3,5 +3,6 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./waybar
|
./waybar
|
||||||
|
./noctalia
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,143 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.dov.bar.noctalia;
|
||||||
|
c = config.lib.stylix.colors.withHashtag;
|
||||||
|
|
||||||
|
# Build a noctalia palette from the active stylix base16 scheme.
|
||||||
|
# Both dark/light keys carry the same values so the palette works
|
||||||
|
# regardless of which theme.mode noctalia picks.
|
||||||
|
mkPalette = variant: {
|
||||||
|
mPrimary = c.base0D;
|
||||||
|
mOnPrimary = c.base00;
|
||||||
|
mSecondary = c.base0E;
|
||||||
|
mOnSecondary = c.base00;
|
||||||
|
mTertiary = c.base0C;
|
||||||
|
mOnTertiary = c.base00;
|
||||||
|
mError = c.base08;
|
||||||
|
mOnError = c.base00;
|
||||||
|
mSurface = if variant == "dark" then c.base00 else c.base07;
|
||||||
|
mOnSurface = if variant == "dark" then c.base05 else c.base01;
|
||||||
|
mSurfaceVariant = if variant == "dark" then c.base01 else c.base06;
|
||||||
|
mOnSurfaceVariant = if variant == "dark" then c.base04 else c.base02;
|
||||||
|
mHover = if variant == "dark" then c.base02 else c.base06;
|
||||||
|
mOnHover = if variant == "dark" then c.base06 else c.base01;
|
||||||
|
mOutline = c.base03;
|
||||||
|
mShadow = c.base00;
|
||||||
|
terminal = {
|
||||||
|
background = if variant == "dark" then c.base00 else c.base07;
|
||||||
|
foreground = if variant == "dark" then c.base05 else c.base01;
|
||||||
|
cursor = if variant == "dark" then c.base05 else c.base01;
|
||||||
|
cursorText = if variant == "dark" then c.base00 else c.base07;
|
||||||
|
selectionBg = c.base02;
|
||||||
|
selectionFg = if variant == "dark" then c.base05 else c.base01;
|
||||||
|
normal = {
|
||||||
|
black = c.base00;
|
||||||
|
red = c.base08;
|
||||||
|
green = c.base0B;
|
||||||
|
yellow = c.base0A;
|
||||||
|
blue = c.base0D;
|
||||||
|
magenta = c.base0E;
|
||||||
|
cyan = c.base0C;
|
||||||
|
white = c.base05;
|
||||||
|
};
|
||||||
|
bright = {
|
||||||
|
black = c.base03;
|
||||||
|
red = c.base08;
|
||||||
|
green = c.base0B;
|
||||||
|
yellow = c.base0A;
|
||||||
|
blue = c.base0D;
|
||||||
|
magenta = c.base0E;
|
||||||
|
cyan = c.base0C;
|
||||||
|
white = c.base07;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
themeMode = if config.stylix.polarity == "dark" then "dark" else "light";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.dov.bar.noctalia.enable = mkEnableOption "noctalia bar";
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
programs.noctalia = {
|
||||||
|
enable = true;
|
||||||
|
package = inputs.noctalia.packages.${pkgs.system}.default;
|
||||||
|
systemd.enable = true;
|
||||||
|
|
||||||
|
customPalettes.stylix = {
|
||||||
|
dark = mkPalette "dark";
|
||||||
|
light = mkPalette "light";
|
||||||
|
};
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
theme = {
|
||||||
|
mode = themeMode;
|
||||||
|
source = "custom";
|
||||||
|
custom_palette = "stylix";
|
||||||
|
};
|
||||||
|
|
||||||
|
location.address = "Marseille, France";
|
||||||
|
|
||||||
|
bar.main = {
|
||||||
|
position = "top";
|
||||||
|
thickness = 34;
|
||||||
|
radius = 12;
|
||||||
|
margin_h = 0;
|
||||||
|
margin_v = 6;
|
||||||
|
padding = 14;
|
||||||
|
widget_spacing = 6;
|
||||||
|
capsule = true;
|
||||||
|
capsule_fill = "surface_variant";
|
||||||
|
capsule_radius = 20.0;
|
||||||
|
reserve_space = true;
|
||||||
|
|
||||||
|
start = [ "workspaces" "media" "active_window" ];
|
||||||
|
center = [ "clock" ];
|
||||||
|
end = [ "tray" "caffeine" "keyboard_layout" "cpu" "ram" "brightness" "volume" "mic" "network" "battery" "session" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
widget = {
|
||||||
|
clock = {
|
||||||
|
format = "{:%H:%M}";
|
||||||
|
tooltip_format = "{:%A, %B %d, %Y}";
|
||||||
|
};
|
||||||
|
|
||||||
|
workspaces.display = "id";
|
||||||
|
|
||||||
|
# Named sysmon instances — type field overrides the widget id
|
||||||
|
cpu = {
|
||||||
|
type = "sysmon";
|
||||||
|
stat = "cpu_usage";
|
||||||
|
};
|
||||||
|
|
||||||
|
ram = {
|
||||||
|
type = "sysmon";
|
||||||
|
stat = "memory_usage";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Microphone — named volume widget with input device
|
||||||
|
mic = {
|
||||||
|
type = "volume";
|
||||||
|
device = "input";
|
||||||
|
};
|
||||||
|
|
||||||
|
battery.warning_threshold = 30;
|
||||||
|
|
||||||
|
keyboard_layout = {
|
||||||
|
display = "short";
|
||||||
|
hide_when_single_layout = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -134,7 +134,10 @@
|
|||||||
# Stylix is handled entirely at the Home Manager level (see
|
# Stylix is handled entirely at the Home Manager level (see
|
||||||
# hm-modules/theme). Load the stylix HM module here so the `stylix`
|
# hm-modules/theme). Load the stylix HM module here so the `stylix`
|
||||||
# option exists for fujin's home configuration.
|
# option exists for fujin's home configuration.
|
||||||
sharedModules = [ inputs.stylix.homeModules.stylix ];
|
sharedModules = [
|
||||||
|
inputs.stylix.homeModules.stylix
|
||||||
|
inputs.noctalia.homeModules.default
|
||||||
|
];
|
||||||
|
|
||||||
users."${username}" = { imports = [ ./home.nix ] ++ extraHomeModules; };
|
users."${username}" = { imports = [ ./home.nix ] ++ extraHomeModules; };
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -47,9 +47,10 @@
|
|||||||
|
|
||||||
browser.zen.enable = true;
|
browser.zen.enable = true;
|
||||||
|
|
||||||
#window-manager.hypr.enable = true;
|
bar = {
|
||||||
|
waybar.enable = false;
|
||||||
bar.waybar.enable = true;
|
noctalia.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
launcher.wofi.enable = true;
|
launcher.wofi.enable = true;
|
||||||
|
|
||||||
|
|||||||
@@ -243,6 +243,9 @@ in {
|
|||||||
hl.exec_cmd("waybar")
|
hl.exec_cmd("waybar")
|
||||||
hl.exec_cmd("mako")
|
hl.exec_cmd("mako")
|
||||||
''
|
''
|
||||||
|
+ lib.optionalString hm-cfg.bar.noctalia.enable ''
|
||||||
|
hl.exec_cmd("noctalia")
|
||||||
|
''
|
||||||
+ ''
|
+ ''
|
||||||
end)
|
end)
|
||||||
'';
|
'';
|
||||||
|
|||||||
Reference in New Issue
Block a user