diff --git a/.config/polybar/nvidia.sh b/.config/polybar/nvidia.sh new file mode 100755 index 0000000..f6ce33f --- /dev/null +++ b/.config/polybar/nvidia.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +nvidia-smi --query-gpu=utilization.gpu,temperature.gpu --format=csv,noheader | xargs -I {} echo "GPU: {}°C" diff --git a/.config/polybar/temperature.sh b/.config/polybar/temperature.sh new file mode 100755 index 0000000..1b86114 --- /dev/null +++ b/.config/polybar/temperature.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +sensors | grep "Tccd2" | tr -d '+' | awk '{print $2}' diff --git a/home-manager/i3.nix b/home-manager/i3.nix index 77eb88f..36b4a55 100644 --- a/home-manager/i3.nix +++ b/home-manager/i3.nix @@ -19,6 +19,13 @@ source = ../.config/wallpapers; target = ".config/wallpapers"; }; + + home.file.".config/polybar" = { + enable = true; + recursive = true; + source = ../.config/polybar; + target = ".config/polybar"; + }; services.polybar = { enable = true; package = pkgs.polybar.override { @@ -52,7 +59,7 @@ module-margin = 1; modules-left = "i3"; modules-center = "xwindow"; - modules-right = "network memory cpu pulseaudio date tray"; + modules-right = "network memory cpu cpu-temp gpu pulseaudio date tray"; cursor-click = "pointer"; cursor-scroll = "ns-resize"; enable-ipc = true; @@ -161,18 +168,29 @@ # }; "module/memory" = { type = "internal/memory"; - interval = 2; + interval = 3; format-prefix = "RAM "; format-prefix-foreground = config.stylix.base16Scheme.base0C; label = "%percentage_used:2%%"; }; "module/cpu" = { type = "internal/cpu"; - interval = 2; + interval = 3; format-prefix = "CPU "; format-prefix-foreground = config.stylix.base16Scheme.base0D; label = "%percentage:2%%"; }; + "module/cpu-temp" = { + type = "custom/script"; + exec = "~/.config/polybar/temperature.sh"; + interval = 3; + }; + + "module/gpu" = { + type = "custom/script"; + exec = "~/.config/polybar/nvidia.sh"; + interval = 3; + }; # "network-base" = { # type = "internal/network"; # interval = 5; diff --git a/home-manager/nixvim/lsp.nix b/home-manager/nixvim/lsp.nix index b756734..ca39703 100644 --- a/home-manager/nixvim/lsp.nix +++ b/home-manager/nixvim/lsp.nix @@ -9,6 +9,8 @@ gopls.enable = true; nixd.enable = true; html.enable = true; + tsserver.enable = true; + pylsp.enable = true; csharp-ls = { enable = true; package = pkgs.stable.csharp-ls; diff --git a/modules/graphical/i3.nix b/modules/graphical/i3.nix index 19086f8..ec3d5ad 100644 --- a/modules/graphical/i3.nix +++ b/modules/graphical/i3.nix @@ -45,6 +45,7 @@ in { brightnessctl i3blocks autotiling + lm_sensors # for cpu in polybar feh # sets the wallpaper nm-tray # NetworkManager tray icon ]; diff --git a/systems/pc/configuration.nix b/systems/pc/configuration.nix index 3ccd703..9d2f96d 100644 --- a/systems/pc/configuration.nix +++ b/systems/pc/configuration.nix @@ -12,17 +12,6 @@ ../../modules/support/ntfs.nix ]; - #systemd.services.failtest = { - # enable = true; - # description = "Fail Test Service"; - # wantedBy = [ "multi-user.target" ]; - - # serviceConfig = { - # Type = "simple"; - # ExecStart = "${pkgs.coreutils}/bin/false"; - # }; - #}; - custom = { tmpfs.enable = true; wireshark.enable = true;