remove qs, fixes to waybar
This commit is contained in:
@@ -6,252 +6,37 @@
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.home.programs.waybar;
|
||||
uwsm = lib.getExe pkgs.uwsm;
|
||||
waybar = lib.getExe pkgs.waybar;
|
||||
|
||||
waybarAssets = pkgs.runCommand "waybar-config-assets" {} ''
|
||||
mkdir -p $out/assets
|
||||
cp ${./assets/button.svg} $out/assets/button.svg
|
||||
cp ${./config/style.css} $out/style.css
|
||||
cp ${./config/config.jsonc} $out/config.jsonc
|
||||
'';
|
||||
in {
|
||||
options = {
|
||||
home.programs.waybar.enable = mkEnableOption "Enables waybar";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
systemd.user.services.waybar = {
|
||||
Unit.StartLimitBurst = 30;
|
||||
};
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
package = pkgs.waybar;
|
||||
systemd.enable = true;
|
||||
# style = ./style.css;
|
||||
Unit = {
|
||||
After = ["graphical-session.target"];
|
||||
ConditionEnvironment = "WAYLAND_DISPLAY";
|
||||
Description = "waybar";
|
||||
};
|
||||
|
||||
settings = [
|
||||
{
|
||||
height = 25;
|
||||
output = ["DP-3" "eDP-1"];
|
||||
Service = {
|
||||
ExecStart = "${uwsm} app -- ${waybar} -c ${waybarAssets}/config.jsonc -s ${waybarAssets}/style.css";
|
||||
Slice = "app-graphical.slice";
|
||||
Restart = "always";
|
||||
RestartSec = 10;
|
||||
};
|
||||
|
||||
modules-left = [
|
||||
"group/system"
|
||||
];
|
||||
|
||||
modules-center = [
|
||||
"hyprland/workspaces"
|
||||
];
|
||||
|
||||
modules-right = [
|
||||
"custom/progress"
|
||||
"custom/systemd"
|
||||
# "custom/mail"
|
||||
"group/tray"
|
||||
"pulseaudio"
|
||||
"backlight"
|
||||
"battery"
|
||||
"clock"
|
||||
"custom/dunst"
|
||||
];
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
"default" = "";
|
||||
"active" = "";
|
||||
"empty" = "";
|
||||
"persistent" = "";
|
||||
"4" = "";
|
||||
};
|
||||
disable-scroll = true;
|
||||
rotate = 0;
|
||||
all-outputs = false;
|
||||
active-only = false;
|
||||
on-click = "activate";
|
||||
persistent-workspaces = {
|
||||
"*" = 3;
|
||||
};
|
||||
};
|
||||
|
||||
"group/tray" = {
|
||||
orientation = "inherit";
|
||||
drawer = {
|
||||
transition-left-to-right = false;
|
||||
transistion-duration = 250;
|
||||
click-to-reveal = true;
|
||||
};
|
||||
modules = [
|
||||
"custom/trayicon"
|
||||
"tray"
|
||||
];
|
||||
};
|
||||
|
||||
"group/system" = {
|
||||
orientation = "inherit";
|
||||
drawer = {
|
||||
transistion-left-to-right = true;
|
||||
transition-duration = 250;
|
||||
click-to-reveal = true;
|
||||
};
|
||||
modules = [
|
||||
"custom/logo"
|
||||
"cpu"
|
||||
"memory"
|
||||
"disk"
|
||||
"network"
|
||||
];
|
||||
};
|
||||
|
||||
"custom/trayicon" = {
|
||||
format = "";
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"custom/logo" = {
|
||||
format = " ";
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"custom/mako" = {
|
||||
exec = "mako.sh";
|
||||
on-click = "mako-toggle.sh";
|
||||
restart-interval = 1;
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"custom/progress" = {
|
||||
exec = "waybar-progress.sh";
|
||||
return-type = "json";
|
||||
interval = 1;
|
||||
};
|
||||
|
||||
"custom/systemd" = {
|
||||
exec = "waybar-systemd.sh";
|
||||
return-type = "json";
|
||||
interval = 10;
|
||||
};
|
||||
|
||||
"custom/dunst" = {
|
||||
exec = "dunst.sh";
|
||||
on-click = "dunstctl set-paused toggle";
|
||||
restart-interval = 1;
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"custom/swaync" = {
|
||||
tooltip = false;
|
||||
format = "{} {icon} ";
|
||||
format-icons = {
|
||||
"notification" = "<span foreground='red'><sup></sup></span>";
|
||||
"none" = "";
|
||||
"dnd-notification" = "<span foreground='red'><sup></sup></span>";
|
||||
"dnd-none" = "";
|
||||
"inhibited-notification" = "<span foreground='red'><sup></sup></span>";
|
||||
"inhibited-none" = "";
|
||||
"dnd-inhibited-notification" = "<span foreground='red'><sup></sup></span>";
|
||||
"dnd-inhibited-none" = "";
|
||||
};
|
||||
return-type = "json";
|
||||
exec-if = "which swaync-client";
|
||||
exec = "swaync-client -swb";
|
||||
on-click = "sleep 0.1 && swaync-client -t -sw";
|
||||
on-click-right = "swaync-client -d -sw";
|
||||
escape = true;
|
||||
};
|
||||
|
||||
# "custom/mail" = {
|
||||
# format-icons = {
|
||||
# icon = "<span foreground='#928374'> </span>";
|
||||
# };
|
||||
# format = "{icon}{}";
|
||||
# exec = "${app}/bin/waybar-mail";
|
||||
# return-type = "json";
|
||||
# };
|
||||
|
||||
# "custom/recording" = {
|
||||
# exec = "${app}/bin/waybar-recording";
|
||||
# return-type = "json";
|
||||
# signal = 3;
|
||||
# interval = "once";
|
||||
# };
|
||||
|
||||
tray = {
|
||||
icon-size = 12;
|
||||
rotate = 0;
|
||||
spacing = 5;
|
||||
};
|
||||
|
||||
clock = {
|
||||
format = "<span foreground='#928374'></span> {:%a, %d %b <span foreground='#928374'></span> %H:%M}";
|
||||
rotate = 0;
|
||||
on-click = "calcurse-toggle.sh";
|
||||
on-click-right = "calsync.sh";
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
cpu = {
|
||||
format = "<span foreground='#928374'></span> {usage}%";
|
||||
states = {
|
||||
warning = 70;
|
||||
critical = 90;
|
||||
};
|
||||
};
|
||||
|
||||
disk = {
|
||||
format = "<span foreground='#928374'></span> {percentage_free}%";
|
||||
states = {
|
||||
warning = 70;
|
||||
critical = 90;
|
||||
};
|
||||
};
|
||||
|
||||
memory = {
|
||||
format = "<span foreground='#928374'></span> {}%";
|
||||
states = {
|
||||
warning = 70;
|
||||
critical = 90;
|
||||
};
|
||||
};
|
||||
|
||||
backlight = {
|
||||
format = "<span foreground='#928374'>{icon}</span> {percent}%";
|
||||
format-icons = [""];
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
battery = {
|
||||
states = {
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
format = "<span foreground='#928374'>{icon}</span> {capacity}%";
|
||||
format-charging = "<span foreground='#928374'></span> {capacity}%";
|
||||
format-icons = ["" "" "" "" ""];
|
||||
};
|
||||
|
||||
network = {
|
||||
interval = 2;
|
||||
format-wifi = "<span foreground='#928374'></span> {essid}";
|
||||
format-ethernet = "<span foreground='#928374'></span> {ifname}";
|
||||
format-linked = "<span foreground='#928374'></span> {ifname}";
|
||||
format-disconnected = " <span foreground='#928374'></span> ";
|
||||
tooltip-format = "{ifname}: {ipaddr}/{cidr}\n {bandwidthDownBits}\n {bandwidthUpBits}";
|
||||
};
|
||||
|
||||
pulseaudio = {
|
||||
format = "<span foreground='#928374'>{icon}</span> {volume}% {format_source}";
|
||||
on-scroll-up = "volume-control.sh --inc";
|
||||
on-scroll-down = "volume-control.sh --dec";
|
||||
format-bluetooth = "<span foreground='#928374'>{icon}</span> {volume}% {format_source}";
|
||||
format-bluetooth-muted = "<span foreground='#928374'> {icon}</span> {format_source}";
|
||||
format-muted = "<span foreground='#928374'></span> {format_source}";
|
||||
format-source = "<span foreground='#928374'></span> {volume}%";
|
||||
format-source-muted = "<span foreground='#928374'></span>";
|
||||
format-icons = {
|
||||
headphone = "";
|
||||
hands-free = "";
|
||||
headset = "";
|
||||
phone = "";
|
||||
portable = "";
|
||||
car = "";
|
||||
default = ["" "" ""];
|
||||
};
|
||||
on-click = lib.getExe pkgs.pavucontrol;
|
||||
on-click-middle = lib.getExe pkgs.helvum;
|
||||
};
|
||||
}
|
||||
];
|
||||
Install = {
|
||||
WantedBy = ["graphical-session.target"];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user