Skip to content

Commit

Permalink
fix unfound ./config file
Browse files Browse the repository at this point in the history
  • Loading branch information
sinetoami committed Mar 8, 2019
1 parent ff7bcea commit bb89f8b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions config
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Config for rofi-wifi-menu
NMCLI_ROFI_SOURCE=$HOME/config

# position values:
# 1 2 3
Expand Down
4 changes: 2 additions & 2 deletions nmcli-rofi
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function rofi_menu () {

function get_ssid () {
# get fields in order
eval FIELDSARR=( $(cat ./config | awk 'BEGIN { FS=","; OFS="\n" } /^FIELDS/ \
eval FIELDSARR=( $(cat $NMCLI_ROFI_SOURCE | awk 'BEGIN { FS=","; OFS="\n" } /^FIELDS/ \
{ $1 = substr($1, 8); print $0; }') )

# get position of SSID field
Expand All @@ -130,7 +130,7 @@ function cleanup_networks () {

function main () {
if [ -r "$DIR/config" ]; then
source $DIR/config
source "$DIR/config"
elif [ -r "$HOME/.config/rofi/wifi" ]; then
source "$HOME/.config/rofi/wifi"
else
Expand Down

0 comments on commit bb89f8b

Please sign in to comment.