added waybar
This commit is contained in:
parent
a4795879cb
commit
fc6703d853
3 changed files with 154 additions and 4 deletions
|
@ -4,5 +4,6 @@
|
||||||
imports = [
|
imports = [
|
||||||
./niri.nix
|
./niri.nix
|
||||||
./river.nix
|
./river.nix
|
||||||
|
./waybar.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,6 @@ lib.mkIf config.desktop.wm.niri.enable {
|
||||||
|
|
||||||
home.packages = [
|
home.packages = [
|
||||||
pkgs.xwayland-satellite
|
pkgs.xwayland-satellite
|
||||||
pkgs.ewwbar
|
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.niri.settings = {
|
programs.niri.settings = {
|
||||||
|
@ -22,9 +21,6 @@ lib.mkIf config.desktop.wm.niri.enable {
|
||||||
{
|
{
|
||||||
command = [ "xwayland-satellite" ":0" ];
|
command = [ "xwayland-satellite" ":0" ];
|
||||||
}
|
}
|
||||||
{
|
|
||||||
command = [ "ewwbar" ];
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
|
||||||
hotkey-overlay.skip-at-startup = true;
|
hotkey-overlay.skip-at-startup = true;
|
||||||
|
|
153
modules/default/home-manager/desktop/compositors/waybar.nix
Normal file
153
modules/default/home-manager/desktop/compositors/waybar.nix
Normal file
|
@ -0,0 +1,153 @@
|
||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
icons = fetchTarball {
|
||||||
|
url = "https://files.huwe.mooo.com/waybar.tar.gz";
|
||||||
|
sha256 = "0h5r8r7vscm6yv25kgyzx5y325n5ri78n28vmdvgmysp351drm57";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
lib.mkIf config.desktop.wm.niri.enable {
|
||||||
|
home-manager.users.willifan = {
|
||||||
|
programs.waybar = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
mainBar = {
|
||||||
|
layer = "top";
|
||||||
|
position = "top";
|
||||||
|
height = 25;
|
||||||
|
output = [
|
||||||
|
"eDP-1"
|
||||||
|
];
|
||||||
|
modules-left = [ "clock" "mpris" ];
|
||||||
|
modules-center = [ "niri/workspaces" ];
|
||||||
|
modules-right = [ "tray" "group/ressources" "group/peripherals" "group/wireless" "group/power" ];
|
||||||
|
|
||||||
|
"group/ressources" = {
|
||||||
|
orientation = "inherit";
|
||||||
|
modules = [ "group/cpu" "group/memory" ];
|
||||||
|
};
|
||||||
|
"group/peripherals" = {
|
||||||
|
orientation = "inherit";
|
||||||
|
modules = [ "group/volume" "group/backlight" ];
|
||||||
|
};
|
||||||
|
"group/wireless" = {
|
||||||
|
orientation = "inherit";
|
||||||
|
modules = [ "group/networking" "group/bluetooth" ];
|
||||||
|
};
|
||||||
|
"group/power" = {
|
||||||
|
orientation = "inherit";
|
||||||
|
modules = [ "group/battery" "image#power" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
"clock" = {
|
||||||
|
interval = 1;
|
||||||
|
format = "{:%H:%M:%S}";
|
||||||
|
};
|
||||||
|
"mpris" = {
|
||||||
|
format = "";
|
||||||
|
format-playing = "{dynamic}";
|
||||||
|
dynamic-order = [ "title" "artist" "album" "position" "length" ];
|
||||||
|
dynamic-len = 30;
|
||||||
|
};
|
||||||
|
"niri/workspaces" = {
|
||||||
|
all-outputs = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
"group/cpu" = {
|
||||||
|
orientation = "inherit";
|
||||||
|
modules = [ "image#cpu" "cpu" ];
|
||||||
|
};
|
||||||
|
"image#cpu" = {
|
||||||
|
path = "${icons}/cpu.png";
|
||||||
|
size = 16;
|
||||||
|
};
|
||||||
|
"cpu" = {
|
||||||
|
format = "{usage}%";
|
||||||
|
};
|
||||||
|
|
||||||
|
"group/memory" = {
|
||||||
|
orientation = "inherit";
|
||||||
|
modules = [ "image#memory" "memory" ];
|
||||||
|
};
|
||||||
|
"image#memory" = {
|
||||||
|
path = "${icons}/ram.png";
|
||||||
|
size = 16;
|
||||||
|
};
|
||||||
|
"memory" = {
|
||||||
|
format = "{percentage}%";
|
||||||
|
};
|
||||||
|
|
||||||
|
"group/volume" = {
|
||||||
|
orientation = "inherit";
|
||||||
|
modules = [ "image#volume" "wireplumber" ];
|
||||||
|
};
|
||||||
|
"image#volume" = {
|
||||||
|
path = "${icons}/volume.png";
|
||||||
|
size = 16;
|
||||||
|
};
|
||||||
|
"wireplumber" = {
|
||||||
|
format = "{volume}%";
|
||||||
|
};
|
||||||
|
|
||||||
|
"group/backlight" = {
|
||||||
|
orientation = "inherit";
|
||||||
|
modules = [ "image#backlight" "backlight" ];
|
||||||
|
};
|
||||||
|
"image#backlight" = {
|
||||||
|
path = "${icons}/brightness.png";
|
||||||
|
size = 16;
|
||||||
|
};
|
||||||
|
"backlight" = {
|
||||||
|
format = "{percent}%";
|
||||||
|
};
|
||||||
|
|
||||||
|
"group/networking" = {
|
||||||
|
orientation = "inherit";
|
||||||
|
modules = [ "image#networking" "network" ];
|
||||||
|
};
|
||||||
|
"image#networking" = {
|
||||||
|
path = "${icons}/wifiHigh.png";
|
||||||
|
size = 16;
|
||||||
|
};
|
||||||
|
"network" = {
|
||||||
|
format = "{signalStrength}%";
|
||||||
|
};
|
||||||
|
|
||||||
|
"group/bluetooth" = {
|
||||||
|
orientation = "inherit";
|
||||||
|
modules = [ "image#bluetooth" "bluetooth" ];
|
||||||
|
};
|
||||||
|
"image#bluetooth" = {
|
||||||
|
path = "${icons}/bluetooth.png";
|
||||||
|
size = 16;
|
||||||
|
};
|
||||||
|
"bluetooth" = {
|
||||||
|
format = "{status}";
|
||||||
|
};
|
||||||
|
|
||||||
|
"group/battery" = {
|
||||||
|
orientation = "inherit";
|
||||||
|
modules = [ "image#battery" "battery" ];
|
||||||
|
};
|
||||||
|
"image#battery" = {
|
||||||
|
path = "${icons}/battery.png";
|
||||||
|
size = 16;
|
||||||
|
};
|
||||||
|
"battery" = {
|
||||||
|
format = "{capacity}%";
|
||||||
|
};
|
||||||
|
|
||||||
|
"image#power" = {
|
||||||
|
path = "${icons}/power.png";
|
||||||
|
size = 16;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue