2022-08-06 18:32:34 -03:00
|
|
|
{ config, pkgs, lib, font, ... }:
|
2023-01-24 11:42:49 -03:00
|
|
|
let
|
|
|
|
inherit (pkgs.uservars) key theme accent font;
|
|
|
|
inherit (theme) color;
|
|
|
|
in
|
|
|
|
{
|
2022-08-04 23:46:59 -03:00
|
|
|
config = {
|
|
|
|
programs.waybar = {
|
|
|
|
enable = true;
|
|
|
|
systemd.enable = true;
|
|
|
|
systemd.target = "sway-session.target";
|
|
|
|
settings = [{
|
|
|
|
layer = "top";
|
2022-08-12 20:58:53 -03:00
|
|
|
modules-left = [ "sway/workspaces" "sway/mode" "sway/window" ];
|
2022-08-04 23:46:59 -03:00
|
|
|
modules-center = [ "clock" ];
|
2022-08-12 20:58:53 -03:00
|
|
|
modules-right = [
|
|
|
|
"sway/language"
|
|
|
|
"mpd"
|
2023-02-06 14:28:39 -03:00
|
|
|
"custom/playerctl"
|
2022-12-09 20:37:56 -03:00
|
|
|
"tray"
|
2022-08-12 20:58:53 -03:00
|
|
|
"custom/caffeine"
|
|
|
|
"pulseaudio"
|
2023-04-23 23:37:00 -03:00
|
|
|
"custom/vpn"
|
2022-08-12 20:58:53 -03:00
|
|
|
"network"
|
|
|
|
"battery"
|
|
|
|
];
|
|
|
|
battery = {
|
|
|
|
tooltip = true;
|
|
|
|
states = {
|
|
|
|
full = 100;
|
|
|
|
good = 95;
|
|
|
|
warning = 25;
|
|
|
|
};
|
|
|
|
format = "{icon} ";
|
|
|
|
format-charging = "";
|
|
|
|
format-plugged = "";
|
|
|
|
format-full = "";
|
|
|
|
format-warning = "{icon} {time}";
|
|
|
|
format-icons = [ "" "" "" "" "" "" ];
|
|
|
|
};
|
2022-08-04 23:46:59 -03:00
|
|
|
network = {
|
|
|
|
interval = 5;
|
|
|
|
tooltip = false;
|
2022-12-06 20:29:38 -03:00
|
|
|
on-click = "terminal -e iwd";
|
2022-08-04 23:46:59 -03:00
|
|
|
format-wifi = "{icon}";
|
|
|
|
format-icons = [ "" "" "" "" "" ];
|
|
|
|
format-ethernet = "";
|
|
|
|
format-linked = "";
|
|
|
|
format-disconnected = "";
|
|
|
|
};
|
|
|
|
"sway/workspaces" = {
|
|
|
|
enable-bar-scroll = true;
|
|
|
|
format = "{icon}";
|
|
|
|
format-icons = {
|
|
|
|
"1" = "";
|
|
|
|
"2" = "";
|
|
|
|
"3" = "";
|
|
|
|
"4" = "";
|
|
|
|
"5" = "";
|
|
|
|
"6" = "";
|
|
|
|
"7" = "";
|
|
|
|
"8" = "";
|
|
|
|
"9" = "";
|
|
|
|
"10" = "";
|
|
|
|
urgent = "";
|
|
|
|
focused = "";
|
|
|
|
default = "";
|
|
|
|
};
|
|
|
|
};
|
2022-08-12 20:58:53 -03:00
|
|
|
"sway/window" = { max-length = 40; };
|
2022-08-12 23:35:42 -03:00
|
|
|
"tray" = {
|
|
|
|
"spacing" = 7;
|
|
|
|
"icon-size" = 19;
|
|
|
|
};
|
2022-08-04 23:46:59 -03:00
|
|
|
clock = {
|
|
|
|
interval = 60;
|
|
|
|
format = "<b>{:%H:%M %a %d/%m}</b>";
|
|
|
|
tooltip = false;
|
|
|
|
};
|
2023-01-22 18:12:04 -03:00
|
|
|
mpd =
|
|
|
|
let
|
|
|
|
mpc = "${pkgs.mpc-cli}/bin/mpc";
|
|
|
|
in
|
|
|
|
{
|
|
|
|
format = "{stateIcon} {title} - {artist}";
|
|
|
|
format-paused = "{stateIcon}";
|
|
|
|
format-stopped = "";
|
|
|
|
state-icons = {
|
2023-02-06 14:28:39 -03:00
|
|
|
stopped = "";
|
2023-01-22 18:12:04 -03:00
|
|
|
paused = "";
|
|
|
|
playing = "";
|
|
|
|
};
|
|
|
|
tooltip = false;
|
|
|
|
on-click = "${mpc} toggle";
|
|
|
|
on-scroll-up = "${mpc} vol +10";
|
|
|
|
on-scroll-down = "${mpc} vol -10";
|
2022-08-12 20:58:53 -03:00
|
|
|
};
|
2023-02-08 17:12:54 -03:00
|
|
|
"custom/playerctl" = {
|
|
|
|
format = "{}";
|
|
|
|
exec = "${pkgs.playerctl-status}/bin/playerctl-status";
|
|
|
|
on-click = "${pkgs.playerctl}/bin/playerctl --ignore-player=mpd play-pause";
|
|
|
|
interval = 1;
|
|
|
|
tooltip = false;
|
|
|
|
};
|
2022-08-12 20:58:53 -03:00
|
|
|
"sway/language" = { format = "{short} {variant}"; };
|
2022-08-04 23:46:59 -03:00
|
|
|
"custom/caffeine" = {
|
|
|
|
format = "{}";
|
2022-12-05 12:49:30 -03:00
|
|
|
exec = "systemctl --user status swayidle > /dev/null && echo 鈴 || echo ";
|
2023-05-04 19:32:12 -03:00
|
|
|
on-click = "${pkgs._sway_idle_toggle}/bin/_sway_idle_toggle";
|
2022-08-04 23:46:59 -03:00
|
|
|
interval = 1;
|
|
|
|
tooltip = false;
|
|
|
|
};
|
2023-04-23 23:37:00 -03:00
|
|
|
"custom/vpn" = {
|
|
|
|
format = "{}";
|
|
|
|
exec = ''
|
2023-04-24 12:39:28 -03:00
|
|
|
mullvad status | grep "^Connected" > /dev/null \
|
2023-04-23 23:37:00 -03:00
|
|
|
&& echo "" \
|
|
|
|
|| echo ""
|
|
|
|
'';
|
|
|
|
on-click = "mullvad connect";
|
|
|
|
interval = 1;
|
|
|
|
tooltip = false;
|
|
|
|
};
|
2022-08-04 23:46:59 -03:00
|
|
|
pulseaudio = {
|
|
|
|
interval = 5;
|
|
|
|
tooltip = false;
|
|
|
|
scroll-step = 10;
|
|
|
|
format = "{icon}";
|
|
|
|
format-bluetooth = "";
|
|
|
|
format-bluetooth-muted = "";
|
|
|
|
format-muted = "ﱝ";
|
|
|
|
format-icons = {
|
2022-11-07 11:24:40 -03:00
|
|
|
"alsa_output.pci-0000_09_00.4.analog-stereo" =
|
|
|
|
[ " 奄" " 奔" " 墳" ];
|
2022-10-31 13:30:15 -03:00
|
|
|
|
2022-08-04 23:46:59 -03:00
|
|
|
headphone = [ " 奄" " 奔" " 墳" ];
|
|
|
|
handsfree = "";
|
|
|
|
headset = "";
|
|
|
|
phone = "";
|
|
|
|
portable = "";
|
|
|
|
car = "";
|
|
|
|
default = [ "奄" "奔" "墳" ];
|
|
|
|
};
|
|
|
|
on-click = "pavucontrol";
|
2023-02-14 17:50:28 -03:00
|
|
|
on-click-right = "${pkgs.pulse_sink}/bin/pulse_sink";
|
2022-08-04 23:46:59 -03:00
|
|
|
};
|
|
|
|
}];
|
2023-05-04 23:57:36 -03:00
|
|
|
style = builtins.readFile (pkgs.substituteAll {
|
|
|
|
src = ./style.css;
|
|
|
|
|
|
|
|
accent_color = accent.color;
|
|
|
|
|
|
|
|
color_bg = color.bg;
|
|
|
|
color_bg_dark = color.bg_dark;
|
|
|
|
color_bg_light = color.bg_light;
|
|
|
|
color_txt = color.txt;
|
|
|
|
|
|
|
|
font_interface = font.interface;
|
|
|
|
|
|
|
|
font_size_big = "${toString font.size.big}px";
|
|
|
|
font_size_medium = "${toString font.size.medium}px";
|
|
|
|
});
|
2022-08-04 23:46:59 -03:00
|
|
|
};
|
2022-08-30 22:01:06 -03:00
|
|
|
home.packages = with pkgs; [ waybar ];
|
2022-08-04 23:46:59 -03:00
|
|
|
};
|
|
|
|
}
|