pinwheel: Extract waybar module
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
./modules/vim
|
./modules/vim
|
||||||
./modules/foot
|
./modules/foot
|
||||||
./modules/hyprland
|
./modules/hyprland
|
||||||
|
./modules/waybar
|
||||||
./modules/swaylock
|
./modules/swaylock
|
||||||
./modules/syncthing
|
./modules/syncthing
|
||||||
./modules/firefox
|
./modules/firefox
|
||||||
|
|||||||
@@ -12,35 +12,6 @@
|
|||||||
bemenu
|
bemenu
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.waybar = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
mainBar = {
|
|
||||||
layer = "top";
|
|
||||||
position = "top";
|
|
||||||
height = 30;
|
|
||||||
output = [
|
|
||||||
"eDP-1"
|
|
||||||
"HDMI-A-1"
|
|
||||||
];
|
|
||||||
modules-left = [ "hyprland/workspaces" ];
|
|
||||||
modules-center = [ "custom/hello-from-waybar" ];
|
|
||||||
modules-right = [ ];
|
|
||||||
|
|
||||||
"custom/hello-from-waybar" = {
|
|
||||||
format = "hello {}";
|
|
||||||
max-length = 40;
|
|
||||||
interval = "once";
|
|
||||||
exec = pkgs.writeShellScript "hello-from-waybar" ''
|
|
||||||
echo "from within waybar"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
style = '''';
|
|
||||||
|
|
||||||
services.dunst.enable = true;
|
services.dunst.enable = true;
|
||||||
|
|
||||||
home.stateVersion = "23.05";
|
home.stateVersion = "23.05";
|
||||||
|
|||||||
56
hosts/pinwheel/modules/waybar/default.nix
Normal file
56
hosts/pinwheel/modules/waybar/default.nix
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
{ home-manager, pkgs, ... }:
|
||||||
|
{
|
||||||
|
home-manager.users.alex = {
|
||||||
|
programs.waybar = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
bar1 = {
|
||||||
|
name = "bar1";
|
||||||
|
layer = "top";
|
||||||
|
position = "top";
|
||||||
|
height = 30;
|
||||||
|
output = [
|
||||||
|
"eDP-1"
|
||||||
|
"HDMI-A-1"
|
||||||
|
];
|
||||||
|
|
||||||
|
modules-left = [ "hyprland/workspaces" ];
|
||||||
|
modules-center = [ "custom/hello" ];
|
||||||
|
modules-right = [ "tray" "wireplumber" "battery" "clock" ];
|
||||||
|
|
||||||
|
"custom/hello" = {
|
||||||
|
format = "hello {}";
|
||||||
|
max-length = 40;
|
||||||
|
interval = "once";
|
||||||
|
exec = pkgs.writeShellScript "hello-from-waybar" ''
|
||||||
|
echo "from within waybar"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
wireplumber = {
|
||||||
|
format = "{volume}%";
|
||||||
|
format-muted = "";
|
||||||
|
on-click = "pavucontrol";
|
||||||
|
max-volume = 150;
|
||||||
|
scroll-step = 0.2;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
style = ''
|
||||||
|
#workspaces button.active {
|
||||||
|
background: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background-color: blue;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-hello {
|
||||||
|
background-color: yellow;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user