mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
Compare commits
2 commits
b45d969f0c
...
482828639e
Author | SHA1 | Date | |
---|---|---|---|
482828639e | |||
a659106248 |
1 changed files with 11 additions and 0 deletions
11
scripts/copy-env-var
Executable file
11
scripts/copy-env-var
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue