Big update
This commit is contained in:
parent
17dc67816a
commit
4be1762868
17 changed files with 1238 additions and 1338 deletions
266
bar.nix
Normal file
266
bar.nix
Normal file
|
|
@ -0,0 +1,266 @@
|
|||
{ lib, config, pkgs, ... }: {
|
||||
|
||||
home.packages = with pkgs; [
|
||||
material-design-icons
|
||||
jost
|
||||
ncdu
|
||||
];
|
||||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
# systemd.enable = true;
|
||||
settings = {
|
||||
bar = {
|
||||
"reload_style_on_change" = true;
|
||||
layer = "top";
|
||||
position = "bottom";
|
||||
exclusive = true;
|
||||
# height = 0;
|
||||
"on-scroll-up" = "hyprctl dispatch workspace e+1";
|
||||
"on-scroll-down" = "hyprctl dispatch workspace e-1";
|
||||
"modules-left" = [
|
||||
"group/controls"
|
||||
"hyprland/submap"
|
||||
];
|
||||
"modules-center" = [ "hyprland/window" ];
|
||||
"modules-right" = [
|
||||
"network"
|
||||
"group/disks"
|
||||
"group/hardware"
|
||||
"tray"
|
||||
"clock"
|
||||
];
|
||||
|
||||
"group/controls" = {
|
||||
orientation = "inherit";
|
||||
modules = [
|
||||
"hyprland/workspaces"
|
||||
"pulseaudio#speaker"
|
||||
"pulseaudio#microphone"
|
||||
"idle_inhibitor"
|
||||
"bluetooth"
|
||||
"backlight"
|
||||
"mpris"
|
||||
];
|
||||
};
|
||||
|
||||
"group/hardware" = {
|
||||
orientation = "inherit";
|
||||
modules = [ "cpu" "temperature" "memory" "battery" ];
|
||||
};
|
||||
|
||||
"group/disks" = {
|
||||
orientation = "inherit";
|
||||
modules = [ "disk" "disk#2" "disk#3" ];
|
||||
};
|
||||
|
||||
backlight = {
|
||||
device = "intel_backlight";
|
||||
format = "{icon}";
|
||||
"on-click" = "${pkgs.light}/bin/light -S 100";
|
||||
"on-click-right" = "${pkgs.light}/bin/light -S 1";
|
||||
"tooltip-format" = "{percent}%";
|
||||
"format-icons" = [ "" "" "" "" "" "" "" "" "" "" "" ];
|
||||
};
|
||||
|
||||
idle_inhibitor = {
|
||||
format = "{icon}";
|
||||
"format-icons" = {
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
};
|
||||
};
|
||||
|
||||
bluetooth = {
|
||||
format = "";
|
||||
"format-disabled" = "";
|
||||
"on-click" = "${pkgs.util-linux}/bin/rfkill toggle bluetooth";
|
||||
"on-click-right" = "$TERMINAL --class floating -e bluetuith";
|
||||
"tooltip-format" = "{}";
|
||||
};
|
||||
|
||||
mpris = {
|
||||
format = "{player_icon} {title}";
|
||||
"format-paused" = "{status_icon} <i>{title}</i>";
|
||||
"player-icons" = {
|
||||
default = "";
|
||||
mpv = "";
|
||||
spotify = "";
|
||||
};
|
||||
"status-icons" = {
|
||||
paused = "";
|
||||
};
|
||||
};
|
||||
|
||||
disk = {
|
||||
interval = 1;
|
||||
format = " {free}";
|
||||
path = "/";
|
||||
"on-click" = "$TERMINAL --class floating -e ${pkgs.ncdu}/bin/ncdu -x /";
|
||||
};
|
||||
|
||||
"disk#2" = {
|
||||
interval = 1;
|
||||
format = " {free}";
|
||||
path = "/home/ant/disk1";
|
||||
"on-click" = "$TERMINAL --class floating -e ${pkgs.ncdu}/bin/ncdu -x /home/ant/disk1";
|
||||
};
|
||||
|
||||
"disk#3" = {
|
||||
interval = 1;
|
||||
format = " {free}";
|
||||
path = "/home/ant/disk2";
|
||||
"on-click" = "$TERMINAL --class floating -e ${pkgs.ncdu}/bin/ncdu -x /home/ant/disk2";
|
||||
};
|
||||
|
||||
memory = {
|
||||
interval = 1;
|
||||
format = " {percentage:2}%";
|
||||
"tooltip-format" = "{used:0.1f}G/{total:0.1f}G";
|
||||
states = { low = 70; };
|
||||
"on-click" = "notify-send \"$(printf \"%-20s %10s\\n\" \"COMMAND\" \"MEMORY USAGE\"; ps axo comm,rss | awk '{mem[$1]+=$2} END {for (cmd in mem) printf \"%-20s %5.2f MiB\\n\", cmd, mem[cmd]/1024}' | sort -k2nr | head -n10)\"";
|
||||
};
|
||||
|
||||
network = {
|
||||
interval = 1;
|
||||
format = "";
|
||||
"format-disconnected" = "";
|
||||
"format-linked" = "";
|
||||
"format-ethernet" = " {bandwidthDownBytes:>} {bandwidthUpBytes:>}";
|
||||
"format-wifi" = " {bandwidthDownBytes:>} {bandwidthUpBytes:>}";
|
||||
"on-click" = "wifi-toggle";
|
||||
"on-right-click" = "$TERMINAL --class floating -e nmtui";
|
||||
"tooltip-format-ethernet" = "{ipaddr}";
|
||||
"tooltip-format-wifi" = "{ipaddr}\n{essid}\n{signalStrength}";
|
||||
};
|
||||
|
||||
"hyprland/window" = {
|
||||
format = "{}";
|
||||
"on-scroll-up" = "hyprctl dispatch workspace e+1";
|
||||
"on-scroll-down" = "hyprctl dispatch workspace e-1";
|
||||
};
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
"on-scroll-up" = "hyprctl dispatch workspace e+1";
|
||||
"on-scroll-down" = "hyprctl dispatch workspace e-1";
|
||||
"all-outputs" = true;
|
||||
"on-click" = "activate";
|
||||
format = "{icon}";
|
||||
"format-icons" = {
|
||||
"1" = "0";
|
||||
"2" = "1";
|
||||
"3" = "2";
|
||||
"4" = "3";
|
||||
"5" = "4";
|
||||
"6" = "5";
|
||||
"7" = "6";
|
||||
"8" = "7";
|
||||
"9" = "8";
|
||||
"10" = "9";
|
||||
};
|
||||
};
|
||||
|
||||
cpu = {
|
||||
interval = 1;
|
||||
format = " {usage:2}%";
|
||||
"max-length" = 10;
|
||||
"on-click" = "$TERMINAL --class floating -e htop";
|
||||
};
|
||||
|
||||
battery = {
|
||||
interval = 30;
|
||||
states = {
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
"format-charging" = " {capacity:2}%";
|
||||
format = "{icon} {capacity:2}%";
|
||||
"format-icons" = [ "" "" "" "" "" "" "" "" "" "" "" ];
|
||||
tooltip = true;
|
||||
};
|
||||
|
||||
"custom/weather" = {
|
||||
tooltip = true;
|
||||
format = "{}";
|
||||
"restart-interval" = 300;
|
||||
exec = "~/.config/waybar/scripts/waybar-wttr.py";
|
||||
"return-type" = "json";
|
||||
};
|
||||
|
||||
tray = {
|
||||
"icon-size" = 17;
|
||||
# tooltip = false;
|
||||
# spacing = 10;
|
||||
};
|
||||
|
||||
clock = {
|
||||
"min-length" = 10;
|
||||
interval = 1;
|
||||
format = "{:%d/%m %H:%M:%S}";
|
||||
timezones = [ "Europe/Paris" ];
|
||||
"tooltip-format" = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
|
||||
actions = {
|
||||
"on-scroll-up" = "tz_up";
|
||||
"on-scroll-down" = "tz_down";
|
||||
};
|
||||
};
|
||||
|
||||
"pulseaudio#speaker" = {
|
||||
format = "{icon} {volume}%";
|
||||
tooltip = false;
|
||||
"format-muted" = "";
|
||||
"on-click" = "pamixer -t";
|
||||
# "on-click-right" = "pamixer -t";
|
||||
"on-scroll-up" = "pamixer -i 5";
|
||||
"on-scroll-down" = "pamixer -d 5";
|
||||
"scroll-step" = 5;
|
||||
"format-icons" = {
|
||||
headphone = "";
|
||||
"hands-free" = "";
|
||||
headset = "";
|
||||
phone = "";
|
||||
portable = "";
|
||||
car = "";
|
||||
default = [ "" "" "" ];
|
||||
};
|
||||
};
|
||||
|
||||
"pulseaudio#microphone" = {
|
||||
format = "{format_source}";
|
||||
tooltip = false;
|
||||
"format-source" = " {volume}%";
|
||||
"format-source-muted" = "";
|
||||
"on-click" = "pamixer --default-source -t";
|
||||
"on-scroll-up" = "pamixer --default-source -i 5";
|
||||
"on-scroll-down" =
|
||||
|
||||
"pamixer --default-source -d 5";
|
||||
"scroll-step" = 5;
|
||||
};
|
||||
|
||||
"hyprland/submap" = {
|
||||
format = "(l)ock, (e)xit, (s)uspend, (h)ibernate, (r)eboot, (S)hutdown";
|
||||
};
|
||||
|
||||
"custom/nvidia-load" = {
|
||||
exec = ".config/waybar/scripts/nvidia-load.py";
|
||||
interval = 5;
|
||||
"return-type" = "json";
|
||||
format = "{}";
|
||||
tooltip = "{tooltip}";
|
||||
"on-click" = "$TERMINAL --class floating -e nvtop";
|
||||
};
|
||||
|
||||
"custom/nvidia-mem" = {
|
||||
exec = ".config/waybar/scripts/nvidia-mem.py";
|
||||
interval = 5;
|
||||
"return-type" = "json";
|
||||
format = "{}";
|
||||
tooltip = "{tooltip}";
|
||||
"on-click" = "$TERMINAL --class floating -e nvtop";
|
||||
};
|
||||
};
|
||||
};
|
||||
style = ./waybar.css;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue