mirror of
https://github.com/frebib/dotfiles.git
synced 2024-06-14 12:57:23 +00:00
scripts/fontawesome: simplify subshell calls
This commit is contained in:
parent
7017703cab
commit
90fc09e1a9
@ -57,9 +57,8 @@ function notify() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function display() {
|
function display() {
|
||||||
fontawesome=$(cat "$FONTAWESOME_FILE" | grep -v '#' | grep -v '^[[:space:]]*$')
|
update=$'\tUpdate Font Awesome cache'
|
||||||
update=""$'\t'"Update Font Awesome cache"
|
fontawesome=$(grep -v '#\|^[[:space:]]*$' "$FONTAWESOME_FILE"; printf "$update\n")
|
||||||
fontawesome=$(printf "$fontawesome\n$update")
|
|
||||||
line=$(echo "$fontawesome" | rofi -dmenu -i -p fontawesome -normal-window -kb-custom-1 Ctrl+c -kb-row-tab '' -kb-row-select Tab $@)
|
line=$(echo "$fontawesome" | rofi -dmenu -i -p fontawesome -normal-window -kb-custom-1 Ctrl+c -kb-row-tab '' -kb-row-select Tab $@)
|
||||||
exit_code=$?
|
exit_code=$?
|
||||||
|
|
||||||
@ -69,7 +68,6 @@ function display() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#IFS=$'\t'
|
|
||||||
line=($line)
|
line=($line)
|
||||||
last=${line[${#line[@]}-1]}
|
last=${line[${#line[@]}-1]}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user