mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
feat: add temperature hwmon as module
This commit is contained in:
parent
414ff779b6
commit
e468436cce
8 changed files with 268 additions and 189 deletions
|
|
@ -1,4 +1,4 @@
|
|||
{ config, ... }:
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
programs.waybar = {
|
||||
|
||||
|
|
@ -14,6 +14,13 @@
|
|||
format = "<span style=\"italic\" font-weight=\"bold\">{}</span>";
|
||||
};
|
||||
|
||||
modules-right = config.swarselsystems.waybarModules;
|
||||
|
||||
"custom/pseudobat" = lib.mkIf (!config.swarselsystems.isLaptop) {
|
||||
format = "";
|
||||
on-click-right = "wlogout -p layer-shell";
|
||||
};
|
||||
|
||||
"custom/configwarn" = {
|
||||
exec = "bash ~/.dotfiles/scripts/checkconfigstatus.sh";
|
||||
interval = 60;
|
||||
|
|
@ -51,6 +58,9 @@
|
|||
};
|
||||
|
||||
temperature = {
|
||||
hwmon-path = lib.mkIf (!config.swarselsystems.temperatureHwmon.isAbsolutePath) config.swarselsystems.temperatureHwmon.path;
|
||||
hwmon-path-abs = lib.mkIf config.swarselsystems.temperatureHwmon.isAbsolutePath config.swarselsystems.temperatureHwmon.path;
|
||||
input-filename = lib.mkIf config.swarselsystems.temperatureHwmon.isAbsolutePath config.swarselsystems.temperatureHwmon.input-filename;
|
||||
critical-threshold = 80;
|
||||
format-critical = " {temperatureC}°C";
|
||||
format = " {temperatureC}°C";
|
||||
|
|
|
|||
|
|
@ -27,6 +27,11 @@
|
|||
home-manager.users.swarsel.swarselsystems = {
|
||||
isLaptop = true;
|
||||
isNixos = true;
|
||||
temperatureHwmon = {
|
||||
isAbsolutePath = true;
|
||||
path = "/sys/devices/platform/thinkpad_hwmon/hwmon/";
|
||||
input-filename = "temp1_input";
|
||||
};
|
||||
monitors = {
|
||||
main = {
|
||||
name = "California Institute of Technology 0x1407 Unknown";
|
||||
|
|
|
|||
|
|
@ -1,33 +1,6 @@
|
|||
{ config, pkgs, lib, ... }: with lib;
|
||||
{
|
||||
|
||||
# waybar config - TEMPLATE - update for cores and temp
|
||||
programs.waybar.settings.mainBar = {
|
||||
# temperature.hwmon-path = "/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon4/temp1_input";
|
||||
temperature.hwmon-path.abs = "/sys/devices/platform/thinkpad_hwmon/hwmon/";
|
||||
temperature.input-filename = "temp1_input";
|
||||
};
|
||||
|
||||
|
||||
programs.waybar.settings.mainBar.modules-right = [
|
||||
"custom/outer-left-arrow-dark"
|
||||
"mpris"
|
||||
"custom/left-arrow-light"
|
||||
"network"
|
||||
"custom/left-arrow-dark"
|
||||
"pulseaudio"
|
||||
"custom/left-arrow-light"
|
||||
"custom/pseudobat"
|
||||
"battery"
|
||||
"custom/left-arrow-dark"
|
||||
"group/hardware"
|
||||
"custom/left-arrow-light"
|
||||
"clock#2"
|
||||
"custom/left-arrow-dark"
|
||||
"clock#1"
|
||||
];
|
||||
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
config = rec {
|
||||
# update for actual inputs here,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue