feat(btop): autostart btop on misc monitor
note: may not work on very small monitor. needs to auto change to `btm` if conditions are met.
This commit is contained in:
+15
-2
@@ -1,8 +1,12 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
{
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
myConfig,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
programs.btop = {
|
programs.btop = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.btop.override { rocmSupport = true; };
|
package = pkgs.btop.override {rocmSupport = true;};
|
||||||
settings = {
|
settings = {
|
||||||
vim_keys = true;
|
vim_keys = true;
|
||||||
color_theme = "TTY";
|
color_theme = "TTY";
|
||||||
@@ -10,4 +14,13 @@
|
|||||||
presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:default cpu:0:block,net:0:tty cpu:0:default,mem:0:default,net:0:default,gpu0:0:default";
|
presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:default cpu:0:block,net:0:tty cpu:0:default,mem:0:default,net:0:default,gpu0:0:default";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
wayland.windowManager.hyprland.settings = lib.mkIf (myConfig.btop.autostart) {
|
||||||
|
exec-once = [
|
||||||
|
"uwsm app -- xdg-terminal-exec -e btop -p 2"
|
||||||
|
];
|
||||||
|
windowrulev2 = [
|
||||||
|
"monitor ${myConfig.btop.monitor}, title:^(btop)$"
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,10 @@
|
|||||||
update = "sudo nixos-rebuild switch --flake ~/.config/nixos/#hakase";
|
update = "sudo nixos-rebuild switch --flake ~/.config/nixos/#hakase";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
btop = {
|
||||||
|
autostart = true;
|
||||||
|
monitor = "DP-1";
|
||||||
|
};
|
||||||
hyprland = {
|
hyprland = {
|
||||||
monitors = [
|
monitors = [
|
||||||
"DP-1,highres@165,0x1080,1,vrr,0,bitdepth,10,cm,hdr,sdrbrightness,1.3"
|
"DP-1,highres@165,0x1080,1,vrr,0,bitdepth,10,cm,hdr,sdrbrightness,1.3"
|
||||||
@@ -88,6 +92,10 @@
|
|||||||
update = "sudo nixos-rebuild switch --flake ~/.config/nixos/#macbook";
|
update = "sudo nixos-rebuild switch --flake ~/.config/nixos/#macbook";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
btop = {
|
||||||
|
autostart = false;
|
||||||
|
monitor = "eDP-1";
|
||||||
|
};
|
||||||
hyprland = {
|
hyprland = {
|
||||||
# M1 Pro/Max/Air screens are usually built-in eDP-1.
|
# M1 Pro/Max/Air screens are usually built-in eDP-1.
|
||||||
# HiDPI scale 2.0 is safe for Retina.
|
# HiDPI scale 2.0 is safe for Retina.
|
||||||
|
|||||||
Reference in New Issue
Block a user