feat: switch to waybar
This commit is contained in:
parent
19e72eedb7
commit
b2d8783e83
8 changed files with 319 additions and 233 deletions
|
@ -3,5 +3,6 @@
|
|||
imports = [
|
||||
./swaync.nix
|
||||
./mpd.nix
|
||||
./waybar.nix
|
||||
];
|
||||
}
|
||||
|
|
121
home-manager/stvnliu/services/waybar.nix
Normal file
121
home-manager/stvnliu/services/waybar.nix
Normal file
|
@ -0,0 +1,121 @@
|
|||
{ ... }: {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd = { enable = true; };
|
||||
style = ''
|
||||
* {
|
||||
font-family: JetBrainsMono Nerd Font;
|
||||
}
|
||||
'';
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
position = "bottom";
|
||||
height = 30;
|
||||
output = [ "eDP-2" "HDMI-A-1" ];
|
||||
modules-left = [ "hyprland/workspaces" "hyprland/submap" ];
|
||||
modules-center = [ "mpd" ];
|
||||
modules-right = [
|
||||
"tray"
|
||||
"clock"
|
||||
"battery"
|
||||
"cpu"
|
||||
"memory"
|
||||
"wireplumber"
|
||||
"temperature"
|
||||
];
|
||||
"battery" = {
|
||||
"bat" = "BAT1";
|
||||
"format" = "BAT {capacity}% @ {power}W";
|
||||
};
|
||||
"hyprland/workspaces" = {
|
||||
disable-scroll = true;
|
||||
all-outputs = true;
|
||||
};
|
||||
"tray" = {
|
||||
"icon-size" = 18;
|
||||
"spacing" = 10;
|
||||
};
|
||||
"mpd" = {
|
||||
"max-length" = 50;
|
||||
"format" =
|
||||
"{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ";
|
||||
"format-disconnected" = "Disconnected ";
|
||||
"format-stopped" =
|
||||
"{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ";
|
||||
"interval" = 10;
|
||||
"consume-icons" = {
|
||||
"on" = " "; # Icon shows only when "consume" is on
|
||||
};
|
||||
"random-icons" = {
|
||||
"off" = ''
|
||||
<span color="#f53c3c"></span> ''; # Icon grayed out when "random" is off
|
||||
"on" = " ";
|
||||
};
|
||||
"repeat-icons" = { "on" = " "; };
|
||||
"single-icons" = { "on" = " 1 "; };
|
||||
"state-icons" = {
|
||||
"paused" = "";
|
||||
"playing" = "";
|
||||
};
|
||||
"tooltip-format" = "MPD (connected)";
|
||||
"tooltip-format-disconnected" = "MPD (disconnected)";
|
||||
};
|
||||
"wireplumber" = {
|
||||
"format" = "{volume}% {icon}";
|
||||
"format-muted" = "";
|
||||
"format-icons" = [ "" "" "" ];
|
||||
};
|
||||
"cpu" = {
|
||||
"format" = "CPU {icon}";
|
||||
"format-icons" = [
|
||||
"<span color='#69ff94'>▁</span>" # green
|
||||
"<span color='#2aa9ff'>▂</span>" # blue
|
||||
"<span color='#f8f8f2'>▃</span>" # white
|
||||
"<span color='#f8f8f2'>▄</span>" # white
|
||||
"<span color='#ffffa5'>▅</span>" # yellow
|
||||
"<span color='#ffffa5'>▆</span>" # yellow
|
||||
"<span color='#ff9977'>▇</span>" # orange
|
||||
"<span color='#dd532e'>█</span>" # red
|
||||
];
|
||||
"memory" = { "format" = "MEM {percentage}%"; };
|
||||
};
|
||||
"clock" = {
|
||||
"format" = "{:%H:%M} ";
|
||||
"format-alt" = "{:%A, %B %d, %Y (%R)}";
|
||||
"tooltip-format" = "<tt><small>{calendar}</small></tt>";
|
||||
"calendar" = {
|
||||
"mode" = "year";
|
||||
"mode-mon-col" = 3;
|
||||
"weeks-pos" = "right";
|
||||
"on-scroll" = 1;
|
||||
"format" = {
|
||||
"months" = "<span color='#ffead3'><b>{}</b></span>";
|
||||
"days" = "<span color='#ecc6d9'><b>{}</b></span>";
|
||||
"weeks" = "<span color='#99ffdd'><b>W{}</b></span>";
|
||||
"weekdays" = "<span color='#ffcc66'><b>{}</b></span>";
|
||||
"today" = "<span color='#ff6699'><b><u>{}</u></b></span>";
|
||||
};
|
||||
};
|
||||
/* "actions" = {
|
||||
"on-click-right" = "mode";
|
||||
"on-scroll-up" = "tz_up";
|
||||
"on-scroll-down" = "tz_down";
|
||||
"on-scroll-up" = "shift_up";
|
||||
"on-scroll-down" = "shift_down";
|
||||
};
|
||||
*/
|
||||
};
|
||||
/* "custom/hello-from-waybar" = {
|
||||
format = "hello {}";
|
||||
max-length = 40;
|
||||
interval = "once";
|
||||
exec = pkgs.writeShellScript "hello-from-waybar" ''
|
||||
echo "from within waybar"
|
||||
'';
|
||||
};
|
||||
*/
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue