diff options
| author | subh <subh@subh.space> | 2026-03-30 00:26:56 +0530 |
|---|---|---|
| committer | subh <subh@subh.space> | 2026-03-30 00:26:56 +0530 |
| commit | 4d209f7c9208b5ee3ec4fe642084d523d0ea5a7e (patch) | |
| tree | b09ea1ad33d5fc738a4ce20f752235e336820b04 /scripts | |
| parent | 759e0c0677c55e99361538054ed87bf7060c654f (diff) | |
Lots of changes
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/emoji.sh | 8 | ||||
| -rwxr-xr-x | scripts/netspeed.sh | 2 | ||||
| -rwxr-xr-x | scripts/pid2ps | 22 |
3 files changed, 31 insertions, 1 deletions
diff --git a/scripts/emoji.sh b/scripts/emoji.sh new file mode 100755 index 0000000..7780d0f --- /dev/null +++ b/scripts/emoji.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +chosen=$(cat ~/.local/share/larbs/emoji | rofi -dmenu | sed "s/ .*//") + +[ -z "$chosen" ] && exit + +printf "%s" "$chosen" | wl-copy +notify-send "'$chosen' copied to clipboard." diff --git a/scripts/netspeed.sh b/scripts/netspeed.sh index 24f8cfa..ad33271 100755 --- a/scripts/netspeed.sh +++ b/scripts/netspeed.sh @@ -15,5 +15,5 @@ while true; do RX=$(( (NEW_RX - OLD_RX) / 1024 )) TX=$(( (NEW_TX - OLD_TX) / 1024 )) - echo "↓ ${RX} KB/s ↑ ${TX} KB/s" + echo "⬇️ ${RX} KB/s ⬆️ ${TX} KB/s" done diff --git a/scripts/pid2ps b/scripts/pid2ps new file mode 100755 index 0000000..25cb6e5 --- /dev/null +++ b/scripts/pid2ps @@ -0,0 +1,22 @@ +#!/bin/bash + +# Simple PID to PS resolver + +pid=$1 +if [[ -z $pid ]]; then + echo "[*] Usage: pid2ps <PID>" + exit 1 +fi + +if [[ $pid =~ ^[0-9]+$ ]]; then + if name=$(/bin/cat /proc/$pid/comm 2>/dev/null); then + echo $name + else + echo "[!] No such process" + exit 1 + fi +else + echo "[!] Invalid PID" + exit 1 +fi + |
