Bläddra i källkod

dev: automated commit - 2025-12-27 16:02:14

Mariano Z. 1 månad sedan
förälder
incheckning
75866f02ca
4 ändrade filer med 71 tillägg och 66 borttagningar
  1. 1 1
      git/.config/git/config
  2. 61 61
      local-bin/.local/bin/vmrss
  3. 9 4
      noctalia/.config/noctalia/settings.json
  4. BIN
      ssh/.ssh/config

+ 1 - 1
git/.config/git/config

@@ -1,7 +1,7 @@
 [user]
 	email = marianoz@posteo.net
 	name = Mariano Z.
-	signingkey = E54F23DDA33256B4BC82B7184C73BAD25156DACE
+	signingkey = 13E1E2F67C2AB282
 
 [core]
         autocrlf = input

+ 61 - 61
local-bin/.local/bin/vmrss

@@ -1,62 +1,62 @@
+# #!/usr/bin/env bash
+#
+# # Check if PID is provided
+# if [ -z "$1" ]; then
+#     echo "Usage: $0 <PID>"
+#     exit 1
+# fi
+#
+# PID=$1
+#
+# # Verify if PID exists
+# if ! ps -p "$PID" >/dev/null; then
+#     echo "Error: Process with PID $PID does not exist."
+#     exit 1
+# fi
+#
+# # Get VmRSS from /proc/<PID>/status
+# VMRSS=$(grep VmRSS /proc/"$PID"/status | awk '{print $2}')
+#
+# # Check if VmRSS was found
+# if [ -z "$VMRSS" ]; then
+#     echo "Error: Could not retrieve VmRSS for PID $PID."
+#     exit 1
+# fi
+#
+# # Convert to human-readable format (MB)
+# VMRSS_MB=$(echo "scale=2; $VMRSS / 1024" | bc)
+#
+# echo "Process $PID VmRSS: $VMRSS kB ($VMRSS_MB MB)"
+
 #!/usr/bin/env bash
-if [ $# -eq 0 ]; then
-    echo "Usage: $0 <pid>"
-    exit 1
-fi
-
-function print_vmrss() {
-    declare -a arr
-    arr=("$1" 0)
-    total=0
-
-    while [ ${#arr[@]} -gt 0 ]; do
-
-        # remove last element
-        space=${arr[${#arr[@]}-1]}
-        unset arr[${#arr[@]}-1]
-        pid=${arr[${#arr[@]}-1]}
-        unset arr[${#arr[@]}-1]
-
-        [ -d "/proc/$pid" ] || continue
-
-        GREP_OPTS=${GREP_OPTS:-"
-          --color=auto
-          --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox}
-          "}
-        mem=$(grep $GREP_OPTS VmRSS /proc/$pid/status \
-          | grep $GREP_OPTS -o '[0-9]\+' \
-          | awk '{print $1/1024}')
-        #Add decimals to total
-        total=$(echo $mem+$total | bc)
-
-        # name of process
-        name=$(ps -p $pid -o comm=)
-
-        printf "%${space}s%s($pid): $mem MB\n" '' "$name"
-
-        # get children
-        children=$(pgrep -P $pid)
-
-        # add children to array
-        for child in $children; do
-            arr+=("$child" $((space+2)))
-        done
-    done
-    printf "Total: $total MB\n"
-}
-
-# check VMRSS_MONITOR = 1
-if [ ! -z "$VMRSS_MONITOR" ]; then
-    while true; do
-        if ps -p $1 > /dev/null
-        then
-            print_vmrss $1
-            sleep 0.5
-        else
-            break
-        fi
-    done
-    print_vmrss $1
-else
-    print_vmrss $1
-fi
+
+INTERVAL="${1:-1}"
+
+printf "%-8s %-6s %-6s %-10s %s\n" \
+  "TIME" "PID" "RT" "RSS(MB)" "CMD"
+
+while true; do
+  TS=$(date +%H:%M:%S)
+
+  ps ax -o pid=,comm=,cmd= | awk '$2 ~ /^(node|nodejs|bun)$/ { print }' | \
+  while read -r PID COMM CMD; do
+    STATUS="/proc/$PID/status"
+    [ ! -r "$STATUS" ] && continue
+
+    RSS_KB=$(awk '/VmRSS/ {print $2}' "$STATUS")
+    [ -z "$RSS_KB" ] && continue
+
+    RSS_MB=$(awk "BEGIN { printf \"%.1f\", $RSS_KB/1024 }")
+
+    RT=$(case "$COMM" in
+      bun*) echo "bun" ;;
+      node*) echo "node" ;;
+      *) echo "js" ;;
+    esac)
+
+    printf "%-8s %-6s %-6s %-10s %s\n" \
+      "$TS" "$PID" "$RT" "$RSS_MB" "$CMD"
+  done
+
+  sleep "$INTERVAL"
+done

+ 9 - 4
noctalia/.config/noctalia/settings.json

@@ -83,6 +83,7 @@
                 {
                     "deviceNativePath": "",
                     "displayMode": "alwaysShow",
+                    "hideIfNotDetected": true,
                     "id": "Battery",
                     "showNoctaliaPerformance": false,
                     "showPowerProfiles": false,
@@ -220,7 +221,6 @@
         }
     },
     "desktopWidgets": {
-        "editMode": false,
         "enabled": false,
         "gridSnap": false,
         "monitorWidgets": [
@@ -386,7 +386,7 @@
         ],
         "showHeader": true
     },
-    "settingsVersion": 31,
+    "settingsVersion": 32,
     "systemMonitor": {
         "cpuCriticalThreshold": 90,
         "cpuPollingInterval": 3000,
@@ -395,7 +395,7 @@
         "diskCriticalThreshold": 90,
         "diskPollingInterval": 3000,
         "diskWarningThreshold": 80,
-        "enableNvidiaGpu": false,
+        "enableDgpuMonitoring": false,
         "gpuCriticalThreshold": 90,
         "gpuPollingInterval": 3000,
         "gpuWarningThreshold": 80,
@@ -420,6 +420,8 @@
         "fuzzel": true,
         "ghostty": true,
         "gtk": true,
+        "helix": false,
+        "hyprland": false,
         "kcolorscheme": true,
         "kitty": false,
         "mango": false,
@@ -435,6 +437,8 @@
         "zed": false
     },
     "ui": {
+        "bluetoothDetailsViewMode": "grid",
+        "bluetoothHideUnnamedDevices": false,
         "fontDefault": "Roboto",
         "fontDefaultScale": 1,
         "fontFixed": "DejaVu Sans Mono",
@@ -442,7 +446,8 @@
         "panelBackgroundOpacity": 0.4,
         "panelsAttachedToBar": true,
         "settingsPanelMode": "attached",
-        "tooltipsEnabled": false
+        "tooltipsEnabled": false,
+        "wifiDetailsViewMode": "grid"
     },
     "wallpaper": {
         "directory": "/home/mzunino/Pictures",

BIN
ssh/.ssh/config