Big update

This commit is contained in:
ant 2024-08-24 17:49:02 +02:00
parent 739f3d97f2
commit 62d4de0360
10 changed files with 328 additions and 103 deletions

42
bar.nix
View file

@ -1,4 +1,4 @@
{ lib, config, pkgs, ... }: {
{ lib, config, pkgs, variant, username, ... }: {
home.packages = with pkgs; [
material-design-icons
@ -7,6 +7,20 @@
playerctl
];
systemd.user.services.loopback = {
Unit = {
Description = "Simple audio loopback";
};
Install = {
WantedBy = [ ];
};
Service = {
ExecStart = "${pkgs.writeShellScript "start loopback" ''
${pkgs.pipewire}/bin/pw-loopback
''}";
};
};
programs.waybar = {
enable = true;
# systemd.enable = true;
@ -26,6 +40,8 @@
"modules-center" = [ "hyprland/window" ];
"modules-right" = [
"network"
"custom/nvidia-load"
"custom/nvidia-mem"
"group/disks"
"group/hardware"
"tray"
@ -38,6 +54,7 @@
"hyprland/workspaces"
"pulseaudio#speaker"
"pulseaudio#microphone"
"custom/loopback"
"idle_inhibitor"
"bluetooth"
"backlight"
@ -100,18 +117,19 @@
"on-click" = "$TERMINAL --class floating -e ${pkgs.ncdu}/bin/ncdu -x /";
};
"disk#2" = {
"disk#2" = lib.attrsets.optionalAttrs (variant == "default") {
interval = 1;
format = "󰋊 {free}";
path = "/home/ant/disk1";
"on-click" = "$TERMINAL --class floating -e ${pkgs.ncdu}/bin/ncdu -x /home/ant/disk1";
"on-click" = "$TERMINAL --class floating -e ${pkgs.ncdu}/bin/ncdu -x /home/${username}/disk1";
};
"disk#3" = {
"disk#3" = lib.attrsets.optionalAttrs (variant == "default") {
interval = 1;
format = "󰋊 {free}";
path = "/home/ant/disk2";
"on-click" = "$TERMINAL --class floating -e ${pkgs.ncdu}/bin/ncdu -x /home/ant/disk2";
"on-click" = "$TERMINAL --class floating -e ${pkgs.ncdu}/bin/ncdu -x /home/${username}/disk2";
};
memory = {
@ -168,6 +186,10 @@
"on-click" = "$TERMINAL --class floating -e htop";
};
temperature = {
hwmon-path = "/sys/class/hwmon/hwmon1/temp1_input";
};
battery = {
interval = 30;
states = {
@ -233,12 +255,16 @@
"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";
"on-scroll-down" = "pamixer --default-source -d 5";
"scroll-step" = 5;
};
"custom/loopback" = lib.attrsets.optionalAttrs (variant == "default") {
exec = "if systemctl --user is-active --quiet loopback; then echo oui; else echo non; fi";
on-click = "if systemctl --user is-active --quiet loopback; then systemctl --user stop loopback; else systemctl --user start loopback; fi";
format = "TEST {}";
};
"hyprland/submap" = {
format = "(l)ock, (e)xit, (s)uspend, (h)ibernate, (r)eboot, (S)hutdown";
};