fix bat pct and cpu overheating; add vim line numbers and cli themes to
Some checks failed
Activate Homelab Configuration / rebuild (push) Failing after 2m18s

default
This commit is contained in:
Satria 2026-04-07 17:14:16 +07:00
commit 16bba9d9f3
5 changed files with 4 additions and 3 deletions

View file

@ -17,7 +17,7 @@
BAT_PCT=`${pkgs.acpi}/bin/acpi -b | ${pkgs.gnugrep}/bin/grep -P -o '[0-9]+(?=%)'` BAT_PCT=`${pkgs.acpi}/bin/acpi -b | ${pkgs.gnugrep}/bin/grep -P -o '[0-9]+(?=%)'`
BAT_STA=`${pkgs.acpi}/bin/acpi -b | ${pkgs.gnugrep}/bin/grep -P -o '\w+(?=,)'` BAT_STA=`${pkgs.acpi}/bin/acpi -b | ${pkgs.gnugrep}/bin/grep -P -o '\w+(?=,)'`
echo "`date` battery status:$BAT_STA percentage:$BAT_PCT" echo "`date` battery status:$BAT_STA percentage:$BAT_PCT"
test $BAT_PCT -le 30 && test $BAT_PCT -gt 15 && test $BAT_STA = "Discharging" && DISPLAY=:0.0 ${pkgs.libnotify}/bin/notify-send -c device -u normal "Low Battery" "\$\{BAT_PCT}% remaining." test $BAT_PCT -le 30 && test $BAT_PCT -gt 15 && test $BAT_STA = "Discharging" && DISPLAY=:0.0 ${pkgs.libnotify}/bin/notify-send -c device -u normal "Low Battery" "Battery remaining: $BAT_PCT%."
test $BAT_PCT -le 15 && test $BAT_STA = "Discharging" && DISPLAY=:0.0 ${pkgs.libnotify}/bin/notify-send -c device -u critical "Low Battery" "Shutdown at 10%." test $BAT_PCT -le 15 && test $BAT_STA = "Discharging" && DISPLAY=:0.0 ${pkgs.libnotify}/bin/notify-send -c device -u critical "Low Battery" "Shutdown at 10%."
''} > /tmp/cron.batt.log 2>&1" ''} > /tmp/cron.batt.log 2>&1"
]; ];

View file

@ -51,7 +51,7 @@
enable = true; # wait for fix: https://github.com/AdnanHodzic/auto-cpufreq/issues/906 enable = true; # wait for fix: https://github.com/AdnanHodzic/auto-cpufreq/issues/906
settings = { settings = {
charger = { charger = {
governor = "performance"; governor = "powersave"; # "performance";
energy_performance_preference = "performance"; energy_performance_preference = "performance";
turbo = "always"; turbo = "always";
platform_profile = "performance"; platform_profile = "performance";

View file

@ -51,6 +51,7 @@
vim.api.nvim_create_autocmd("VimEnter", { vim.api.nvim_create_autocmd("VimEnter", {
callback = function() callback = function()
-- vim.cmd("NvimTreeOpen") -- vim.cmd("NvimTreeOpen")
vim.cmd("set nu")
vim.cmd.wincmd 'p' vim.cmd.wincmd 'p'
end, end,
}) })

View file

@ -1,5 +1,6 @@
{ username, ... }: { { username, ... }: {
imports = [ imports = [
./rice/theme.nix
./core/shell.nix ./core/shell.nix
./core/cli.nix ./core/cli.nix
]; ];

View file

@ -6,7 +6,6 @@
./rice/logout.nix ./rice/logout.nix
./rice/notifs.nix ./rice/notifs.nix
./rice/cursor.nix ./rice/cursor.nix
./rice/theme.nix
./rice/menu.nix ./rice/menu.nix
./rice/idle.nix ./rice/idle.nix
./rice/bar.nix ./rice/bar.nix