mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-10 04:49:19 -08:00
feat: fix tewi, ...
This commit is contained in:
parent
6457b97513
commit
e4bd7ee5e6
21 changed files with 425 additions and 224 deletions
174
1
Normal file
174
1
Normal file
|
|
@ -0,0 +1,174 @@
|
|||
{ config, lib, pkgs, nixfiles, ... }:
|
||||
|
||||
{
|
||||
xdg.configFile."waybar/style.css" = { inherit (nixfiles.sassTemplate { name = "waybar-style"; src = ./waybar.sass; }) source; };
|
||||
|
||||
#systemd.user.services.waybar.Service.Environment = lib.singleton "NOTMUCH_CONFIG=${config.home.sessionVariables.NOTMUCH_CONFIG}";
|
||||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
settings = [{
|
||||
height = 10;
|
||||
modules-left = [
|
||||
"sway/workspaces"
|
||||
"sway/mode"
|
||||
"sway/window"
|
||||
];
|
||||
modules-center = [
|
||||
];
|
||||
modules-right = [
|
||||
"pulseaudio#icon"
|
||||
"pulseaudio"
|
||||
"custom/headset-icon"
|
||||
"custom/headset"
|
||||
"custom/cpu-icon"
|
||||
"cpu"
|
||||
"custom/memory-icon"
|
||||
"memory"
|
||||
"temperature#icon"
|
||||
"temperature"
|
||||
"battery#icon"
|
||||
"battery"
|
||||
"backlight#icon"
|
||||
"backlight"
|
||||
"network#icon"
|
||||
"network"
|
||||
"idle_inhibitor"
|
||||
"custom/konawall"
|
||||
"custom/gpg-status"
|
||||
"custom/clock"
|
||||
"tray"
|
||||
];
|
||||
|
||||
modules = {
|
||||
"sway/workspaces" = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
"1" = "1:";
|
||||
"2" = "2:";
|
||||
"3" = "3:";
|
||||
};
|
||||
};
|
||||
"sway/window" = {
|
||||
icon = true;
|
||||
icon-size = 12;
|
||||
format = "{}";
|
||||
};
|
||||
tray = {
|
||||
icon-size = 12;
|
||||
spacing = 2;
|
||||
};
|
||||
"backlight#icon" = {
|
||||
format = "{icon}";
|
||||
format-icons = ["" ""];
|
||||
};
|
||||
backlight = {
|
||||
format = "{percent}%";
|
||||
};
|
||||
"custom/gpg-status" = {
|
||||
format = "{text} {alt}";
|
||||
interval = 300;
|
||||
return-type = "json";
|
||||
exec = "${pkgs.waybar-gpg}/bin/kat-gpg-status";
|
||||
};
|
||||
"custom/headset-icon" = {
|
||||
format = "";
|
||||
interval = 60;
|
||||
exec-if = "${pkgs.headsetcontrol}/bin/headsetcontrol -c";
|
||||
exec = "echo 'mew'";
|
||||
};
|
||||
"custom/headset" = {
|
||||
format = "{}";
|
||||
interval = 60;
|
||||
exec-if = "${pkgs.headsetcontrol}/bin/headsetcontrol -c";
|
||||
exec = "${pkgs.headsetcontrol}/bin/headsetcontrol -b | ${pkgs.gnugrep}/bin/grep Battery | ${pkgs.coreutils}/bin/cut -d ' ' -f2";
|
||||
};
|
||||
"custom/konawall" = {
|
||||
format = "{}";
|
||||
interval = "once";
|
||||
return-type = "json";
|
||||
exec = "${pkgs.waybar-konawall}/bin/konawall-status";
|
||||
on-click = "${pkgs.waybar-konawall}/bin/konawall-toggle";
|
||||
on-click-right = "systemctl --user restart konawall";
|
||||
signal = 8;
|
||||
};
|
||||
"custom/cpu-icon".format = "";
|
||||
cpu.format = "{usage}%";
|
||||
"custom/memory-icon".format = "";
|
||||
memory.format = "{percentage}%";
|
||||
"temperature#icon" = {
|
||||
format = "{icon}";
|
||||
format-icons = ["" "" ""];
|
||||
critical-threshold = 80;
|
||||
};
|
||||
temperature = {
|
||||
format = "{temperatureC}°C";
|
||||
critical-threshold = 80;
|
||||
};
|
||||
idle_inhibitor = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
};
|
||||
};
|
||||
"battery#icon" = {
|
||||
states = {
|
||||
good = 90;
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
format = "{icon}";
|
||||
format-charging = "";
|
||||
format-plugged = "";
|
||||
format-icons = [ "" "" "" "" "" ];
|
||||
};
|
||||
battery = {
|
||||
states = {
|
||||
good = 90;
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
format = "{capacity}%";
|
||||
format-charging = "{capacity}%";
|
||||
format-plugged = "{capacity}%";
|
||||
format-alt = "{time}";
|
||||
};
|
||||
"pulseaudio#icon" = {
|
||||
format = "{icon}";
|
||||
format-muted = "婢";
|
||||
on-click = "foot pulsemixer";
|
||||
format-icons = {
|
||||
default = [
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
};
|
||||
pulseaudio = {
|
||||
format = "{volume}%";
|
||||
on-click = "foot pulsemixer";
|
||||
};
|
||||
"network#icon" = {
|
||||
format-wifi = "直";
|
||||
format-ethernet = "";
|
||||
format-linked = " ";
|
||||
format-disconnected = "";
|
||||
};
|
||||
network = {
|
||||
format-wifi = "{essid} ({signalStrength}%)";
|
||||
format-ethernet = "{ipaddr}/{cidr}";
|
||||
format-linked = "No IP";
|
||||
format-disconnected = "Disconnected";
|
||||
format-alt = "{ifname}: {ipaddr}/{cidr}";
|
||||
};
|
||||
"custom/clock" = {
|
||||
exec = ''${pkgs.coreutils}/bin/date +"%a, %F %T %Z"'';
|
||||
interval = 1;
|
||||
};
|
||||
};
|
||||
}];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue