From 23cfe1068be5c40c27f6b01649ed25325423c265 Mon Sep 17 00:00:00 2001 From: pagedmov Date: Fri, 1 Nov 2024 01:42:39 -0400 Subject: [PATCH] tweaked btop config; made window slightly larger, removed root dir from disks shown, hard coded color scheme to nord instead of using stylix, fixed redundancy in the way toolbelt was calling the command --- modules/home/environment/stylix.nix | 1 + modules/home/programs/btop.nix | 5 ++++- modules/home/scripts/commands/toolbelt.nix | 9 ++++----- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/modules/home/environment/stylix.nix b/modules/home/environment/stylix.nix index 3f892c7..dbae785 100644 --- a/modules/home/environment/stylix.nix +++ b/modules/home/environment/stylix.nix @@ -12,6 +12,7 @@ # kitty.enable = true; # vesktop.enable = true; waybar.enable = false; + btop.enable = false; }; }; } diff --git a/modules/home/programs/btop.nix b/modules/home/programs/btop.nix index 49e71d2..8bb94ff 100644 --- a/modules/home/programs/btop.nix +++ b/modules/home/programs/btop.nix @@ -5,8 +5,11 @@ settings = { update_ms = 500; vim_keys = true; + color_theme = "nord"; + theme_background = true; temp_scale = "fahrenheit"; - disks_filter = "exclude=/boot"; + graph_symbol = "block"; + disks_filter = "exclude=/boot /"; show_swap = false; swap_disk = false; }; diff --git a/modules/home/scripts/commands/toolbelt.nix b/modules/home/scripts/commands/toolbelt.nix index b08de1d..47c40a1 100644 --- a/modules/home/scripts/commands/toolbelt.nix +++ b/modules/home/scripts/commands/toolbelt.nix @@ -1,7 +1,5 @@ {pkgs, ...}: pkgs.writeShellScriptBin "toolbelt" '' - hostname=$(cat /etc/hostname) - cliphistory() { selection=$(cliphist list | fzf --preview=" index=\$(echo {} | awk '{print \$1}'); \ @@ -15,8 +13,9 @@ pkgs.writeShellScriptBin "toolbelt" '' cliphist decode "$selection" | wl-copy } btop_cmd() { - if [ "$hostname" = 'oganesson' ]; then - hyprctl dispatch resizeactive 20% 140% && + local hostname=$(cat /etc/hostname) + if [ "$hostname" = "oganesson" ]; then + hyprctl dispatch resizeactive 20% 155% && moveonscreen --center && btop && hyprctl dispatch resizeactive exact 40% 25% && @@ -35,7 +34,7 @@ pkgs.writeShellScriptBin "toolbelt" '' declare -A commands=( ["Change Wallpaper"]="moveonscreen --center && if chpaper; then running=false; else moveonscreen; fi" ["Change System Color Scheme"]="hyprctl dispatch resizeactive 10% 80% && moveonscreen --center && if chscheme; then running=false; else hyprctl dispatch resizeactive exact 40% 25% && moveonscreen; fi" - ["Open System Monitor"]="hyprctl dispatch resizeactive 20% 140% && moveonscreen --center && btop_cmd && hyprctl dispatch resizeactive exact 40% 25% && moveonscreen" + ["Open System Monitor"]="btop_cmd" ["Open Volume Controls"]="hyprctl dispatch resizeactive 10% 80% && moveonscreen --center && alsamixer && hyprctl dispatch resizeactive exact 40% 25% && moveonscreen" ["Open Keyring"]="hyprctl dispatch resizeactive -300 0 && moveonscreen && if keyring; then running=false; else hyprctl dispatch resizeactive exact 40% 25% && moveonscreen; fi" ["View Clipboard History"]="hyprctl dispatch resizeactive 45% 120% && moveonscreen --center && if cliphistory;then running=false; else hyprctl dispatch resizeactive exact 40% 25% && moveonscreen; fi"