Skip to content

Commit e6e9031

Browse files
committedAug 24, 2018
wifi: use injected properties
See vivien#132
1 parent 50b2b6e commit e6e9031

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed
 

‎wifi/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ If no instance is specified, wlan0 is used.
1111
[wifi]
1212
command=$SCRIPT_DIR/wifi
1313
label=wifi:
14-
#instance=wlp3s0
14+
#INTERFACE=wlan0
1515
interval=60
1616
```

‎wifi/i3blocks.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[wifi]
22
command=$SCRIPT_DIR/wifi
33
label=wifi:
4-
#instance=wlp3s0
4+
#INTERFACE=wlan0
55
interval=60

‎wifi/wifi

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1616

1717
#------------------------------------------------------------------------
18-
19-
INTERFACE="${BLOCK_INSTANCE:-wlan0}"
20-
18+
if [[ -z "$INTERFACE" ]] ; then
19+
INTERFACE="${BLOCK_INSTANCE:-wlan0}"
20+
fi
2121
#------------------------------------------------------------------------
2222

2323
# As per #36 -- It is transparent: e.g. if the machine has no battery or wireless

0 commit comments

Comments
 (0)
Please sign in to comment.