disable stylix for waybar
This commit is contained in:
parent
fd457e247a
commit
afd916e93c
1 changed files with 169 additions and 164 deletions
|
|
@ -13,177 +13,182 @@ in
|
||||||
enable = lib.mkEnableOption "waybar";
|
enable = lib.mkEnableOption "waybar";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkMerge [
|
||||||
programs.waybar = {
|
(lib.mkIf cfg.enable {
|
||||||
enable = true;
|
programs.waybar = {
|
||||||
systemd.enable = false;
|
enable = true;
|
||||||
settings = [
|
systemd.enable = false;
|
||||||
{
|
settings = [
|
||||||
layer = "top";
|
{
|
||||||
position = "top";
|
layer = "top";
|
||||||
modules-left = [
|
position = "top";
|
||||||
"niri/workspaces"
|
modules-left = [
|
||||||
"wlr/taskbar"
|
"niri/workspaces"
|
||||||
];
|
"wlr/taskbar"
|
||||||
modules-center = [ "clock" ];
|
];
|
||||||
modules-right = [
|
modules-center = [ "clock" ];
|
||||||
"tray"
|
modules-right = [
|
||||||
"idle_inhibitor"
|
"tray"
|
||||||
"memory"
|
"idle_inhibitor"
|
||||||
"backlight"
|
"memory"
|
||||||
"pulseaudio"
|
"backlight"
|
||||||
"battery"
|
"pulseaudio"
|
||||||
"custom/notification"
|
"battery"
|
||||||
];
|
"custom/notification"
|
||||||
|
|
||||||
"niri/worksapces" = { };
|
|
||||||
"niri/taskbar" = {
|
|
||||||
icon-size = 15;
|
|
||||||
on-click = "activate";
|
|
||||||
on-click-middle = "close";
|
|
||||||
};
|
|
||||||
"tray" = {
|
|
||||||
icon-size = 15;
|
|
||||||
spacing = 10;
|
|
||||||
};
|
|
||||||
|
|
||||||
idle_inhibitor = {
|
|
||||||
format = "{icon}";
|
|
||||||
format-icons = {
|
|
||||||
activated = " ";
|
|
||||||
deactivated = " ";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
memory = {
|
|
||||||
format = " {percentage}%";
|
|
||||||
on-click = lib.getExe pkgs.resources;
|
|
||||||
};
|
|
||||||
backlight = {
|
|
||||||
format = "{icon}{percent}%";
|
|
||||||
format-icons = " ";
|
|
||||||
on-scroll-up = "${lib.getExe pkgs.brightnessctl} set +1%";
|
|
||||||
on-scroll-down = "${lib.getExe pkgs.brightnessctl} set 1%-";
|
|
||||||
};
|
|
||||||
|
|
||||||
pulseaudio = {
|
|
||||||
format = "{icon}{volume}%";
|
|
||||||
format-bluetooth = " {volume}%";
|
|
||||||
format-muted = " -%";
|
|
||||||
format-source = " {volume}%";
|
|
||||||
format-source-muted = " ";
|
|
||||||
format-icons = {
|
|
||||||
default = [
|
|
||||||
" "
|
|
||||||
" "
|
|
||||||
" "
|
|
||||||
];
|
|
||||||
headphone = " ";
|
|
||||||
headset = " ";
|
|
||||||
hands-free = " ";
|
|
||||||
};
|
|
||||||
on-click = "${lib.getExe' pkgs.wireplumber "wpctl"} set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
|
||||||
on-click-right = lib.getExe pkgs.pwvucontrol;
|
|
||||||
tooltip-format = "{icon}{desc} {volume}%";
|
|
||||||
};
|
|
||||||
|
|
||||||
battery = {
|
|
||||||
states = {
|
|
||||||
warning = 30;
|
|
||||||
critical = 15;
|
|
||||||
};
|
|
||||||
format = "{icon}{capacity}%";
|
|
||||||
format-charging = " {capacity}%";
|
|
||||||
format-icons = [
|
|
||||||
" "
|
|
||||||
" "
|
|
||||||
" "
|
|
||||||
" "
|
|
||||||
" "
|
|
||||||
];
|
];
|
||||||
tooltip-format = ''
|
|
||||||
{power}W
|
|
||||||
{timeTo}'';
|
|
||||||
};
|
|
||||||
|
|
||||||
clock = {
|
"niri/worksapces" = { };
|
||||||
format = "{:%a %b %d %R}";
|
"niri/taskbar" = {
|
||||||
calendar.format = {
|
icon-size = 15;
|
||||||
months = "<span color='#ff7b63'>{}</span>";
|
on-click = "activate";
|
||||||
days = "<span color='#ffffff'>{}</span>";
|
on-click-middle = "close";
|
||||||
weeks = "<span color='#8ff0a4'>W{}</span>";
|
|
||||||
weekdays = "<span color='#f8e45c'>{}</span>";
|
|
||||||
today = "<span color='#78aeed'><u>{}</u></span>";
|
|
||||||
};
|
};
|
||||||
actions = {
|
"tray" = {
|
||||||
on-scroll-up = "shift_up";
|
icon-size = 15;
|
||||||
on-scroll-down = "shift_down";
|
spacing = 10;
|
||||||
};
|
};
|
||||||
tooltip-format = "{calendar}";
|
|
||||||
};
|
idle_inhibitor = {
|
||||||
"custom/notification" = {
|
format = "{icon}";
|
||||||
"tooltip" = false;
|
format-icons = {
|
||||||
"format" = "{icon}";
|
activated = " ";
|
||||||
"format-icons" = {
|
deactivated = " ";
|
||||||
"notification" = "<span foreground='red'><sup></sup></span>";
|
};
|
||||||
"none" = "";
|
|
||||||
"dnd-notification" = "<span foreground='red'><sup></sup></span>";
|
|
||||||
"dnd-none" = "";
|
|
||||||
};
|
};
|
||||||
"return-type" = "json";
|
|
||||||
"exec" = "swaync-client -swb";
|
|
||||||
"on-click" = "swaync-client -t -sw";
|
|
||||||
"on-click-right" = "swaync-client -d -sw";
|
|
||||||
"escape" = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
style = ''
|
|
||||||
* {
|
|
||||||
font-family: LXGW Wenkai, FiraCode Nerd Font;
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
window#waybar {
|
memory = {
|
||||||
background: alpha(@theme_base_color, 0.9);
|
format = " {percentage}%";
|
||||||
color: @theme_text_color;
|
on-click = lib.getExe pkgs.resources;
|
||||||
}
|
};
|
||||||
|
backlight = {
|
||||||
|
format = "{icon}{percent}%";
|
||||||
|
format-icons = " ";
|
||||||
|
on-scroll-up = "${lib.getExe pkgs.brightnessctl} set +1%";
|
||||||
|
on-scroll-down = "${lib.getExe pkgs.brightnessctl} set 1%-";
|
||||||
|
};
|
||||||
|
|
||||||
#custom-notification,
|
pulseaudio = {
|
||||||
#workspaces,
|
format = "{icon}{volume}%";
|
||||||
#taskbar button,
|
format-bluetooth = " {volume}%";
|
||||||
#mode,
|
format-muted = " -%";
|
||||||
#clock,
|
format-source = " {volume}%";
|
||||||
#tray,
|
format-source-muted = " ";
|
||||||
#mpris,
|
format-icons = {
|
||||||
#idle_inhibitor,
|
default = [
|
||||||
#backlight,
|
" "
|
||||||
#cpu,
|
" "
|
||||||
#memory,
|
" "
|
||||||
#pulseaudio,
|
];
|
||||||
#battery {
|
headphone = " ";
|
||||||
padding: 0 6px;
|
headset = " ";
|
||||||
}
|
hands-free = " ";
|
||||||
|
};
|
||||||
|
on-click = "${lib.getExe' pkgs.wireplumber "wpctl"} set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||||
|
on-click-right = lib.getExe pkgs.pwvucontrol;
|
||||||
|
tooltip-format = "{icon}{desc} {volume}%";
|
||||||
|
};
|
||||||
|
|
||||||
#workspaces button {
|
battery = {
|
||||||
padding: 3px 6px;
|
states = {
|
||||||
}
|
warning = 30;
|
||||||
#workspaces button.focused,
|
critical = 15;
|
||||||
#workspaces button.active {
|
};
|
||||||
color: #78aeed;
|
format = "{icon}{capacity}%";
|
||||||
}
|
format-charging = " {capacity}%";
|
||||||
|
format-icons = [
|
||||||
|
" "
|
||||||
|
" "
|
||||||
|
" "
|
||||||
|
" "
|
||||||
|
" "
|
||||||
|
];
|
||||||
|
tooltip-format = ''
|
||||||
|
{power}W
|
||||||
|
{timeTo}'';
|
||||||
|
};
|
||||||
|
|
||||||
#battery.warning {
|
clock = {
|
||||||
color: #f8e45c;
|
format = "{:%a %b %d %R}";
|
||||||
}
|
calendar.format = {
|
||||||
#battery.critical {
|
months = "<span color='#ff7b63'>{}</span>";
|
||||||
color: #ff7b63;
|
days = "<span color='#ffffff'>{}</span>";
|
||||||
}
|
weeks = "<span color='#8ff0a4'>W{}</span>";
|
||||||
#battery.charging {
|
weekdays = "<span color='#f8e45c'>{}</span>";
|
||||||
color: #8ff0a4;
|
today = "<span color='#78aeed'><u>{}</u></span>";
|
||||||
}
|
};
|
||||||
'';
|
actions = {
|
||||||
};
|
on-scroll-up = "shift_up";
|
||||||
};
|
on-scroll-down = "shift_down";
|
||||||
|
};
|
||||||
|
tooltip-format = "{calendar}";
|
||||||
|
};
|
||||||
|
"custom/notification" = {
|
||||||
|
"tooltip" = false;
|
||||||
|
"format" = "{icon}";
|
||||||
|
"format-icons" = {
|
||||||
|
"notification" = "<span foreground='red'><sup></sup></span>";
|
||||||
|
"none" = "";
|
||||||
|
"dnd-notification" = "<span foreground='red'><sup></sup></span>";
|
||||||
|
"dnd-none" = "";
|
||||||
|
};
|
||||||
|
"return-type" = "json";
|
||||||
|
"exec" = "swaync-client -swb";
|
||||||
|
"on-click" = "swaync-client -t -sw";
|
||||||
|
"on-click-right" = "swaync-client -d -sw";
|
||||||
|
"escape" = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
style = ''
|
||||||
|
* {
|
||||||
|
font-family: LXGW Wenkai, FiraCode Nerd Font;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background: alpha(@theme_base_color, 0.9);
|
||||||
|
color: @theme_text_color;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-notification,
|
||||||
|
#workspaces,
|
||||||
|
#taskbar button,
|
||||||
|
#mode,
|
||||||
|
#clock,
|
||||||
|
#tray,
|
||||||
|
#mpris,
|
||||||
|
#idle_inhibitor,
|
||||||
|
#backlight,
|
||||||
|
#cpu,
|
||||||
|
#memory,
|
||||||
|
#pulseaudio,
|
||||||
|
#battery {
|
||||||
|
padding: 0 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
padding: 3px 6px;
|
||||||
|
}
|
||||||
|
#workspaces button.focused,
|
||||||
|
#workspaces button.active {
|
||||||
|
color: #78aeed;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.warning {
|
||||||
|
color: #f8e45c;
|
||||||
|
}
|
||||||
|
#battery.critical {
|
||||||
|
color: #ff7b63;
|
||||||
|
}
|
||||||
|
#battery.charging {
|
||||||
|
color: #8ff0a4;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
})
|
||||||
|
(lib.mkIf (cfg.enable && config.stylix.enable) {
|
||||||
|
stylix.targets.waybar.enable = false;
|
||||||
|
})
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue