mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
Running `free` without any modifications will result in the output being localized into the current system-language (i.e. German if you're running a German install of Linux). The parsing of the `memory` script however relies on the output being in english (US). As an easy fix we just set the system locale tempoararily to 'C' (which is the _default_ language, i.e. english in case of `free`).
13 lines
373 B
Bash
Executable File
13 lines
373 B
Bash
Executable File
#!/bin/sh
|
|
|
|
case $BLOCK_BUTTON in
|
|
1) notify-send "🧠 Memory hogs" "$(ps axch -o cmd:15,%mem --sort=-%mem | head)" ;;
|
|
3) notify-send "🧠 Memory module" "\- Shows Memory Used/Total.
|
|
- Click to show memory hogs." ;;
|
|
esac
|
|
|
|
# Set language to international or otherwise 'free' will output in the current
|
|
# system language
|
|
LC_ALL=C free -h | awk '/^Mem:/ {print $3 "/" $2}'
|
|
|