2023-02-19 19:09:38 +07:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
{
|
|
|
|
services.playerctld.enable = config.wayland.windowManager.sway.enable;
|
|
|
|
programs.waybar = {
|
|
|
|
enable = config.wayland.windowManager.sway.enable;
|
2023-06-11 21:48:35 +07:00
|
|
|
package = pkgs.waybar.override {
|
2023-02-19 19:09:38 +07:00
|
|
|
withMediaPlayer = true;
|
2023-06-11 21:48:35 +07:00
|
|
|
};
|
|
|
|
/*).overrideAttrs (old: {
|
2023-02-19 19:09:38 +07:00
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "chayleaf";
|
|
|
|
repo = "Waybar";
|
2023-02-21 03:54:31 +07:00
|
|
|
rev = "3091cf4a009e92665325c0dd61adf5ab367786a3";
|
|
|
|
sha256 = "sha256-zH4hbQ8+9TYRVW/XYqmAVsi0vsSPn1LPqXxr0gi0j1E=";
|
2023-02-19 19:09:38 +07:00
|
|
|
};
|
2023-06-11 21:48:35 +07:00
|
|
|
});*/
|
2023-02-19 19:09:38 +07:00
|
|
|
settings = [{
|
|
|
|
layer = "bottom";
|
|
|
|
# position = "bottom";
|
|
|
|
ipc = true;
|
|
|
|
height = 40;
|
2023-06-11 18:02:38 +07:00
|
|
|
modules-left = [ "sway/workspaces" "sway/mode" "idle_inhibitor" "mpris" ];
|
|
|
|
idle_inhibitor = {
|
|
|
|
format = "{icon}";
|
|
|
|
format-icons = {
|
|
|
|
activated = "";
|
|
|
|
deactivated = "";
|
|
|
|
};
|
|
|
|
};
|
2023-02-19 19:09:38 +07:00
|
|
|
mpris = {
|
|
|
|
tooltip = true;
|
|
|
|
format = "{player_icon} {dynamic}";
|
|
|
|
format-paused = "{status_icon} {dynamic}";
|
2023-02-21 03:19:39 +07:00
|
|
|
interval = 1;
|
2023-02-21 03:54:31 +07:00
|
|
|
ellipsis = "…";
|
2023-02-19 19:09:38 +07:00
|
|
|
# tooltip-format = "{dynamic}";
|
2023-02-21 03:54:31 +07:00
|
|
|
album-len = 44;
|
|
|
|
artist-len = 44;
|
|
|
|
title-len = 44;
|
|
|
|
dynamic-len = 44;
|
2023-02-19 19:09:38 +07:00
|
|
|
player-icons = {
|
2023-02-21 03:54:31 +07:00
|
|
|
default = "";
|
|
|
|
mpd = "";
|
2023-02-19 19:09:38 +07:00
|
|
|
};
|
2023-02-21 03:54:31 +07:00
|
|
|
status-icons.paused = "";
|
2023-02-19 19:09:38 +07:00
|
|
|
};
|
|
|
|
"sway/workspaces" = {
|
|
|
|
disable-scroll = true;
|
|
|
|
format = "{value}{icon}";
|
|
|
|
format-icons = {
|
|
|
|
default = "";
|
|
|
|
urgent = " ";
|
|
|
|
"2" = " ";
|
|
|
|
"3" = " ";
|
|
|
|
"4" = " ";
|
|
|
|
"5" = " ";
|
|
|
|
};
|
|
|
|
persistent-workspaces = {
|
2023-12-02 09:34:25 +07:00
|
|
|
"1" = [ ]; "2" = [ ]; "3" = [ ];
|
2023-02-19 19:09:38 +07:00
|
|
|
};
|
|
|
|
};
|
|
|
|
"sway/mode" = {
|
|
|
|
tooltip = false;
|
|
|
|
};
|
|
|
|
modules-center = [ "sway/window" ];
|
|
|
|
#fixed-center = false;
|
|
|
|
"sway/window" = {
|
|
|
|
format = "{title}";
|
|
|
|
max-length = 50;
|
|
|
|
# tooltip = false;
|
|
|
|
icon = true;
|
|
|
|
rewrite = {
|
|
|
|
kitty = "";
|
|
|
|
zsh = "";
|
|
|
|
nheko = "";
|
|
|
|
Nextcloud = "";
|
|
|
|
"(.*) — LibreWolf" = "$1";
|
|
|
|
"(.*) - KeePassXC" = "$1";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
modules-right = [ "memory" "cpu" "tray" "wireplumber" "clock" "sway/language" ];
|
|
|
|
cpu = {
|
|
|
|
# format = "{usage}% ";
|
2023-02-21 03:19:39 +07:00
|
|
|
format = "{icon0}{icon1}{icon2}{icon3}{icon4}{icon5}{icon6}{icon7}{icon8}{icon9}{icon10}{icon11}{icon12}{icon13}{icon14}{icon15}";
|
2023-02-19 19:09:38 +07:00
|
|
|
format-icons = ["▁" "▂" "▃" "▄" "▅" "▆" "▇" "█"];
|
|
|
|
};
|
|
|
|
memory = {
|
2023-02-21 03:19:39 +07:00
|
|
|
format = "{used}G";
|
2023-02-19 19:09:38 +07:00
|
|
|
};
|
|
|
|
tray = {
|
|
|
|
icon-size = 26;
|
|
|
|
spacing = 5;
|
|
|
|
};
|
|
|
|
wireplumber = {
|
2023-02-21 03:19:39 +07:00
|
|
|
format = "{volume}%";
|
2023-02-19 19:09:38 +07:00
|
|
|
format-muted = "ﱝ";
|
|
|
|
tooltip = false;
|
|
|
|
};
|
|
|
|
clock = {
|
|
|
|
interval = 5;
|
|
|
|
format = "{:%Y-%m-%d %H:%M:%S}";
|
2023-02-21 05:20:19 +07:00
|
|
|
tooltip-format = "<tt><small>{calendar}</small></tt>";
|
|
|
|
calendar = {
|
|
|
|
mode = "year";
|
|
|
|
# TODO: make this work
|
|
|
|
mode-mon-col = 3;
|
|
|
|
on-scroll = 1;
|
|
|
|
on-click-right = "mode";
|
|
|
|
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>";
|
|
|
|
};
|
|
|
|
};
|
2023-02-19 19:09:38 +07:00
|
|
|
};
|
|
|
|
"sway/language" = {
|
|
|
|
tooltip = false;
|
2023-02-21 03:19:39 +07:00
|
|
|
# make sure it isn't pushed away when other modules get too big
|
|
|
|
min-length = 2;
|
2023-02-19 19:09:38 +07:00
|
|
|
};
|
|
|
|
}];
|
|
|
|
style = ./waybar.css;
|
|
|
|
};
|
2023-03-15 16:41:44 +07:00
|
|
|
home.packages = with pkgs; [
|
|
|
|
playerctl
|
|
|
|
];
|
2023-02-19 19:09:38 +07:00
|
|
|
}
|