2024-04-21 09:46:33 +00:00
|
|
|
{ pkgs, lib, ... }:
|
|
|
|
let
|
|
|
|
flakestat = pkgs.writeShellApplication {
|
|
|
|
name = "flakestat";
|
|
|
|
runtimeInputs = with pkgs; [
|
|
|
|
git
|
|
|
|
jq
|
|
|
|
];
|
|
|
|
text = builtins.readFile ./flakestat.sh;
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
2024-03-06 08:23:51 +00:00
|
|
|
xdg.configFile."waybar/macchiato.css" = {
|
|
|
|
source = pkgs.fetchFromGitHub
|
|
|
|
{
|
|
|
|
owner = "catppuccin";
|
|
|
|
repo = "waybar";
|
|
|
|
rev = "f74ab1eecf2dcaf22569b396eed53b2b2fbe8aff";
|
|
|
|
sha256 = "WLJMA2X20E5PCPg0ZPtSop0bfmu+pLImP9t8A8V4QK8=";
|
|
|
|
} + "/themes/machiatto.css";
|
|
|
|
};
|
|
|
|
|
2024-02-27 20:13:42 +00:00
|
|
|
programs.waybar = {
|
|
|
|
enable = true;
|
|
|
|
systemd = {
|
|
|
|
enable = false; # disable it,autostart it in hyprland conf
|
|
|
|
target = "graphical-session.target";
|
|
|
|
};
|
|
|
|
style = ''
|
|
|
|
* {
|
2024-03-02 21:20:09 +00:00
|
|
|
font-family: "FiraCodeNerdFont-Regular";
|
2024-02-27 20:13:42 +00:00
|
|
|
font-size: 14px;
|
|
|
|
font-weight: bold;
|
|
|
|
border-radius: 0px;
|
|
|
|
transition-property: background-color;
|
|
|
|
transition-duration: 0.5s;
|
|
|
|
}
|
|
|
|
@keyframes blink_red {
|
|
|
|
to {
|
|
|
|
background-color: rgb(242, 143, 173);
|
|
|
|
color: rgb(26, 24, 38);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.warning,
|
|
|
|
.critical,
|
|
|
|
.urgent {
|
|
|
|
animation-name: blink_red;
|
|
|
|
animation-duration: 1s;
|
|
|
|
animation-timing-function: linear;
|
|
|
|
animation-iteration-count: infinite;
|
|
|
|
animation-direction: alternate;
|
|
|
|
}
|
|
|
|
window#waybar {
|
|
|
|
background-color: transparent;
|
|
|
|
}
|
|
|
|
window > box {
|
|
|
|
margin-left: 0px;
|
|
|
|
margin-right: 0px;
|
|
|
|
margin-top: 0px;
|
|
|
|
border-bottom: 2px solid @color1;
|
|
|
|
background-color: @background;
|
|
|
|
}
|
|
|
|
#workspaces {
|
|
|
|
padding-left: 0px;
|
|
|
|
padding-right: 4px;
|
|
|
|
}
|
|
|
|
#workspaces button {
|
|
|
|
padding-top: 5px;
|
|
|
|
padding-bottom: 5px;
|
|
|
|
padding-left: 6px;
|
|
|
|
padding-right: 6px;
|
|
|
|
color: @color1;
|
|
|
|
}
|
|
|
|
#workspaces button.active {
|
|
|
|
background-color: @color1;
|
|
|
|
color: rgb(26, 24, 38);
|
|
|
|
}
|
|
|
|
#workspaces button.urgent {
|
|
|
|
color: rgb(26, 24, 38);
|
|
|
|
}
|
|
|
|
#workspaces button:hover {
|
|
|
|
background-color: #b38dac;
|
|
|
|
color: rgb(26, 24, 38);
|
|
|
|
}
|
|
|
|
tooltip {
|
|
|
|
background: #3b4253;
|
|
|
|
}
|
|
|
|
tooltip label {
|
|
|
|
color: #e4e8ef;
|
|
|
|
}
|
|
|
|
#custom-launcher {
|
|
|
|
font-size: 20px;
|
|
|
|
padding-left: 8px;
|
|
|
|
padding-right: 6px;
|
|
|
|
color: #7ebae4;
|
|
|
|
}
|
|
|
|
#mode,
|
|
|
|
#clock,
|
|
|
|
#memory,
|
|
|
|
#temperature,
|
|
|
|
#cpu,
|
|
|
|
#mpd,
|
|
|
|
#custom-wall,
|
|
|
|
#temperature,
|
|
|
|
#backlight,
|
|
|
|
#pulseaudio,
|
|
|
|
#network,
|
|
|
|
#battery,
|
|
|
|
#custom-powermenu,
|
2024-04-21 09:46:33 +00:00
|
|
|
#custom-flakestat,
|
2024-02-27 20:13:42 +00:00
|
|
|
#custom-cava-internal {
|
|
|
|
padding-left: 10px;
|
|
|
|
padding-right: 10px;
|
|
|
|
color: @color1;
|
|
|
|
}
|
|
|
|
#network.disconnected {
|
|
|
|
color: #cccccc;
|
|
|
|
}
|
|
|
|
#battery.charging,
|
|
|
|
#battery.full,
|
|
|
|
#battery.discharging {
|
|
|
|
color: #cf876f;
|
|
|
|
}
|
|
|
|
#battery.critical:not(.charging) {
|
|
|
|
color: #d6dce7;
|
|
|
|
}
|
|
|
|
#custom-powermenu {
|
|
|
|
color: #bd6069;
|
|
|
|
}
|
|
|
|
#tray {
|
|
|
|
padding-right: 8px;
|
|
|
|
padding-left: 10px;
|
|
|
|
}
|
|
|
|
#tray menu {
|
|
|
|
background: #3b4252;
|
|
|
|
color: #dee2ea;
|
|
|
|
}
|
|
|
|
#mpd.paused {
|
|
|
|
color: rgb(192, 202, 245);
|
|
|
|
font-style: italic;
|
|
|
|
}
|
|
|
|
#mpd.stopped {
|
|
|
|
background: transparent;
|
|
|
|
}
|
|
|
|
#mpd {
|
|
|
|
color: #e4e8ef;
|
|
|
|
}
|
|
|
|
#custom-cava-internal {
|
|
|
|
font-family: "Hack Nerd Font";
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
settings = [{
|
|
|
|
"layer" = "top";
|
|
|
|
"position" = "top";
|
2024-02-27 21:20:00 +00:00
|
|
|
modules-left = [ "custom/launcher" "hyprland/workspaces" ];
|
2024-02-27 20:13:42 +00:00
|
|
|
modules-center = [ "clock" ];
|
|
|
|
modules-right =
|
2024-04-21 09:46:33 +00:00
|
|
|
[ "custom/flakestat" "pulseaudio" "pulseaudio#microphone" "memory" "cpu" "tray" "battery" ];
|
2024-02-27 20:13:42 +00:00
|
|
|
"custom/launcher" = {
|
|
|
|
"format" = " ";
|
|
|
|
"on-click" = "pkill rofi || ~/.config/rofi/launcher.sh";
|
|
|
|
"tooltip" = false;
|
|
|
|
};
|
|
|
|
"hyprland/workspaces" = {
|
|
|
|
"format" = "{name}";
|
|
|
|
"on-click" = "activate";
|
|
|
|
"on-scroll-up" = "hyprctl dispatch workspace e+1";
|
|
|
|
"on-scroll-down" = "hyprctl dispatch workspace e-1";
|
|
|
|
};
|
|
|
|
"pulseaudio" = {
|
|
|
|
"scroll-step" = 5;
|
|
|
|
"format" = "{icon} {volume}%";
|
|
|
|
"format-muted" = "";
|
|
|
|
"format-icons" = { "default" = [ "" "" "" ]; };
|
|
|
|
"on-click" = "pamixer -t";
|
|
|
|
};
|
|
|
|
"pulseaudio#microphone" = {
|
|
|
|
"format" = "{format_source}";
|
|
|
|
"format-source" = " {volume}%";
|
|
|
|
"format-source-muted" = "";
|
|
|
|
"on-click" = "pamixer --default-source -t";
|
|
|
|
"on-scroll-up" = "pamixer --default-source -i 5";
|
|
|
|
"on-scroll-down" = "pamixer --default-source -d 5";
|
|
|
|
"scroll-step" = 5;
|
|
|
|
"on-click-right" = "pavucontrol";
|
|
|
|
};
|
|
|
|
"clock" = {
|
|
|
|
"interval" = 1;
|
2024-03-02 21:20:09 +00:00
|
|
|
"format" = "{:%H:%M %A %b %d}";
|
2024-02-27 20:13:42 +00:00
|
|
|
"tooltip" = true;
|
|
|
|
};
|
|
|
|
"memory" = {
|
|
|
|
"interval" = 3;
|
|
|
|
"format" = " {percentage}%";
|
|
|
|
"states" = { "warning" = 85; };
|
|
|
|
};
|
|
|
|
"cpu" = {
|
|
|
|
"interval" = 3;
|
|
|
|
"format" = " {usage}%";
|
|
|
|
};
|
|
|
|
"tray" = {
|
|
|
|
"icon-size" = 15;
|
|
|
|
"spacing" = 6;
|
|
|
|
};
|
2024-04-21 09:46:33 +00:00
|
|
|
"battery" = {
|
|
|
|
"interval" = 60;
|
|
|
|
"states" = {
|
|
|
|
"warning" = 20;
|
|
|
|
"critical" = 5;
|
|
|
|
};
|
|
|
|
"format" = "{icon} {capacity}%";
|
|
|
|
"format-icons" = [
|
|
|
|
""
|
|
|
|
""
|
|
|
|
""
|
|
|
|
""
|
|
|
|
""
|
|
|
|
];
|
|
|
|
};
|
|
|
|
"custom/flakestat" = {
|
|
|
|
"exec" = "${flakestat}/bin/flakestat";
|
|
|
|
"interval" = 600;
|
|
|
|
};
|
2024-02-27 20:13:42 +00:00
|
|
|
}];
|
|
|
|
};
|
|
|
|
}
|