From 35dfcaa2fa9f0fb330b0c2047648b3adf59b0121 Mon Sep 17 00:00:00 2001 From: DarthMooMancer Date: Fri, 7 Nov 2025 23:38:44 -0500 Subject: [PATCH] mfetch --- .config/nvim/init.lua | 6 +++--- .config/sway/config | 2 +- .local/bin/myfetch.sh | 20 ++------------------ 3 files changed, 6 insertions(+), 22 deletions(-) diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index a71ed87..e33cdeb 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -27,9 +27,9 @@ require("lazy").setup({ }) require('mini.pairs').setup({ - mappings = { - ['<'] = { action = 'open', pair = '<>', neigh_pattern = '[^\\].' }, - } + -- mappings = { + -- ['<'] = { action = 'open', pair = '<>', neigh_pattern = '[^\\].' }, + -- } }) require("fzf-lua").setup({ diff --git a/.config/sway/config b/.config/sway/config index 0e93203..d50dc61 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -29,7 +29,7 @@ bindsym $mod+Shift+s exec steam bindsym $mod+f exec librewolf bindsym $mod+g exec gimp bindsym $mod+p exec prismlauncher -bindsym $mod+q kill +bindsym $mod+k kill bindsym $mod+Shift+c reload bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit' bindsym $mod+1 workspace number 1 diff --git a/.local/bin/myfetch.sh b/.local/bin/myfetch.sh index 7901465..cea1aa7 100755 --- a/.local/bin/myfetch.sh +++ b/.local/bin/myfetch.sh @@ -15,20 +15,6 @@ fi # Strip ANSI escapes strip_colors() { printf '%s' "$1" | sed -r 's/\x1B\[[0-9;]*[mK]//g'; } -# --- Collect stats --- -# CPU (cores/threads) -if command -v lscpu >/dev/null; then - sockets=$(lscpu | awk -F: '/Socket\(s\)/{gsub(/ /,"");print $2;exit}') - cores_per=$(lscpu | awk -F: '/Core\(s\) per socket/{gsub(/ /,"");print $2;exit}') - physical_cores=$((sockets * cores_per)) -else - physical_cores=$(grep -E 'cpu cores' /proc/cpuinfo | head -1 | awk '{print $4}') -fi -logical_threads=$(nproc --all) - -# Memory -mem_usage=$(free -h | awk '/Mem:/ {print $3 "/" $2}') - # System age sys_age=$(( ( $(date +%s) - $(stat -c %W / 2>/dev/null || echo 0) ) / 86400 )) @@ -37,10 +23,8 @@ pkg_count=$(find /var/db/pkg -mindepth 2 -maxdepth 2 -type d 2>/dev/null | wc -l # --- Define lines (easy to add new ones) --- lines=( - "${cyan}CPU${reset}: ${physical_cores}c/${logical_threads}t" - "${green}Memory${reset}: ${mem_usage}" - "${red}Age${reset}: ${sys_age} days" - "${blue}Pkgs${reset}: ${pkg_count}" + "${green}Age${reset}: ${sys_age} days" + "${magenta}Pkgs${reset}: ${pkg_count}" ) # --- Compute max width ---