mfetch
This commit is contained in:
@@ -27,9 +27,9 @@ require("lazy").setup({
|
|||||||
})
|
})
|
||||||
|
|
||||||
require('mini.pairs').setup({
|
require('mini.pairs').setup({
|
||||||
mappings = {
|
-- mappings = {
|
||||||
['<'] = { action = 'open', pair = '<>', neigh_pattern = '[^\\].' },
|
-- ['<'] = { action = 'open', pair = '<>', neigh_pattern = '[^\\].' },
|
||||||
}
|
-- }
|
||||||
})
|
})
|
||||||
|
|
||||||
require("fzf-lua").setup({
|
require("fzf-lua").setup({
|
||||||
|
|||||||
+1
-1
@@ -29,7 +29,7 @@ bindsym $mod+Shift+s exec steam
|
|||||||
bindsym $mod+f exec librewolf
|
bindsym $mod+f exec librewolf
|
||||||
bindsym $mod+g exec gimp
|
bindsym $mod+g exec gimp
|
||||||
bindsym $mod+p exec prismlauncher
|
bindsym $mod+p exec prismlauncher
|
||||||
bindsym $mod+q kill
|
bindsym $mod+k kill
|
||||||
bindsym $mod+Shift+c reload
|
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+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
|
bindsym $mod+1 workspace number 1
|
||||||
|
|||||||
+2
-18
@@ -15,20 +15,6 @@ fi
|
|||||||
# Strip ANSI escapes
|
# Strip ANSI escapes
|
||||||
strip_colors() { printf '%s' "$1" | sed -r 's/\x1B\[[0-9;]*[mK]//g'; }
|
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
|
# System age
|
||||||
sys_age=$(( ( $(date +%s) - $(stat -c %W / 2>/dev/null || echo 0) ) / 86400 ))
|
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) ---
|
# --- Define lines (easy to add new ones) ---
|
||||||
lines=(
|
lines=(
|
||||||
"${cyan}CPU${reset}: ${physical_cores}c/${logical_threads}t"
|
"${green}Age${reset}: ${sys_age} days"
|
||||||
"${green}Memory${reset}: ${mem_usage}"
|
"${magenta}Pkgs${reset}: ${pkg_count}"
|
||||||
"${red}Age${reset}: ${sys_age} days"
|
|
||||||
"${blue}Pkgs${reset}: ${pkg_count}"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# --- Compute max width ---
|
# --- Compute max width ---
|
||||||
|
|||||||
Reference in New Issue
Block a user