bin: screenshot
This commit is contained in:
parent
82b2e53d1d
commit
0a1e5b5ec4
2 changed files with 9 additions and 8 deletions
9
bin/screenshot
Executable file
9
bin/screenshot
Executable file
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
ts="$(date "+%Y-%m-%d_%H-%M-%S")"
|
||||||
|
f="${HOME}/images/screenshots/${ts}.png"
|
||||||
|
|
||||||
|
grim -g "$(slurp)" "$f"
|
||||||
|
|
||||||
|
echo "$f" >&2
|
||||||
|
echo "$f"
|
||||||
|
|
@ -14,14 +14,6 @@ alias rg='rg -S'
|
||||||
alias timestamp='date "+%Y-%m-%d_%H-%M-%S"'
|
alias timestamp='date "+%Y-%m-%d_%H-%M-%S"'
|
||||||
alias humantime='date "+%Y-%m-%d %H:%M %z"'
|
alias humantime='date "+%Y-%m-%d %H:%M %z"'
|
||||||
|
|
||||||
screenshot() {
|
|
||||||
local ts="$(timestamp)"
|
|
||||||
local f="${HOME}/images/screenshots/${ts}.png"
|
|
||||||
import "$@" "$f"
|
|
||||||
echo "$f" >&2
|
|
||||||
echo "$f"
|
|
||||||
}
|
|
||||||
|
|
||||||
docker-ip() {
|
docker-ip() {
|
||||||
docker inspect "$1" --format='{{.NetworkSettings.Networks.bridge.IPAddress}}'
|
docker inspect "$1" --format='{{.NetworkSettings.Networks.bridge.IPAddress}}'
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue