[scripts/copy-env-var] Script to copy envvars.

This commit is contained in:
Keanu Timmermans 2021-01-30 14:17:07 +01:00
parent 7f3dfb96be
commit a659106248
Signed by: keanucode
GPG Key ID: A7431C0D513CA93B
1 changed files with 11 additions and 0 deletions

11
scripts/copy-env-var Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -euo pipefail
if variable="$(set -euo pipefail; {
awk 'BEGIN{for(v in ENVIRON) print v}'
} | rofi -dmenu)" && [[ -n $variable ]]; then
variable="${variable%% *}"
echo ${!variable} | xclip -sel clip
fi