home: i3bar: make temp display configurable
This commit is contained in:
parent
cbd98189e2
commit
be1e31bb78
|
@ -2,8 +2,21 @@
|
|||
let
|
||||
isEnabled = config.my.home.x.enable;
|
||||
i3BarTheme = config.my.theme.i3BarTheme;
|
||||
cfg = config.my.home.x.i3bar;
|
||||
in
|
||||
{
|
||||
options.my.home.x.i3bar = with lib; {
|
||||
temperature.chip = mkOption {
|
||||
type = types.str;
|
||||
example = "coretemp-isa-*";
|
||||
default = "";
|
||||
};
|
||||
temperature.inputs = mkOption {
|
||||
type = types.listOf types.str;
|
||||
example = ["Core 0" "Core 1" "Core 2" "Core 3"];
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf isEnabled {
|
||||
home.packages = with pkgs; [
|
||||
|
@ -57,10 +70,8 @@ in
|
|||
collapsed = false;
|
||||
interval = 10;
|
||||
format = "{max}";
|
||||
# FIXME: specific to my AMD Ryzen CPU. Make this depend on
|
||||
# hostname or something else
|
||||
chip = "k10temp-pci-*";
|
||||
inputs = [ "Tccd1" ];
|
||||
chip = cfg.temperature.chip;
|
||||
inputs = cfg.temperature.inputs;
|
||||
}
|
||||
{
|
||||
block = "networkmanager";
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
home-manager.users.alarsyo = {
|
||||
# Keyboard settings & i3 settings
|
||||
my.home.x.enable = true;
|
||||
my.home.x.i3bar.temperature.chip = "k10temp-pci-*";
|
||||
my.home.x.i3bar.temperature.inputs = [ "Tccd1" ];
|
||||
my.home.x.cursor.enable = true;
|
||||
my.home.alacritty.enable = true;
|
||||
my.home.emacs.enable = true;
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
home-manager.users.alarsyo = {
|
||||
# Keyboard settings & i3 settings
|
||||
my.home.x.enable = true;
|
||||
my.home.x.i3bar.temperature.chip = "coretemp-isa-*";
|
||||
my.home.x.i3bar.temperature.inputs = ["Core 0" "Core 1" "Core 2" "Core 3"];
|
||||
my.home.x.cursor.enable = true;
|
||||
my.home.alacritty.enable = true;
|
||||
my.home.emacs.enable = true;
|
||||
|
|
Loading…
Reference in a new issue