power menu, redshift, polybar

This commit is contained in:
azpsen
2024-01-28 16:37:10 -06:00
parent 89516a6ce1
commit 319b44ecbd
307 changed files with 7642 additions and 5 deletions

View File

@@ -0,0 +1,20 @@
# Script: info-ssh-sessions
A script that displays the count of current ssh sessions as well as the public IP address of the fist session.
![info-ssh-sessions](screenshots/1.png)
## Dependencies
* `lsof`
## Module
```ini
[module/info-ssh-sessions]
type = custom/script
exec = ~/polybar-scripts/info-ssh-sessions.sh
interval = 5
```

View File

@@ -0,0 +1,10 @@
#!/bin/sh
sessions="$(lsof -Pi | grep ":22")"
if [ -n "$sessions" ]; then
count=$(echo "$sessions" | wc -l)
echo "# ($count): $(echo "$sessions" | cut -d ">" -f 2 | cut -d " " -f 1 | cut -d ":" -f 1 | tail -n 1)"
else
echo "# (0)"
fi

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB