Connecting to NAS

This commit is contained in:
Christian Colglazier 2019-07-21 16:30:30 -04:00
parent 4c031c7dec
commit 34cea0c7c8
4 changed files with 15 additions and 2 deletions

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
i3/config i3/config
i3/settings.conf settings.conf

View File

@ -1,6 +1,6 @@
#! /bin/bash #! /bin/bash
# Load user settings from config file. # Load user settings from config file.
. ~/.config/i3/settings.conf . ~/.config/settings.conf
cat ~/.config/i3/shared.conf ~/.config/i3/${computer}.conf > ~/.config/i3/config cat ~/.config/i3/shared.conf ~/.config/i3/${computer}.conf > ~/.config/i3/config

View File

@ -147,6 +147,9 @@ bindsym $mod+r mode "resize"
# Start bar # Start bar
exec --no-startup-id polybar aqua exec --no-startup-id polybar aqua
# Startup scripts
ecec --no-startup-id sh ~/.config/scripts/connect-nas.sh
# class border backgr. text indicator child_border # class border backgr. text indicator child_border
client.focused #0288D1 #0288D1 #B3E5FC #000000 #000000 client.focused #0288D1 #0288D1 #B3E5FC #000000 #000000
client.focused_inactive #212121 #212121 #ffffff #000000 #000000 client.focused_inactive #212121 #212121 #ffffff #000000 #000000

10
scripts/connect-nas.sh Normal file
View File

@ -0,0 +1,10 @@
#! /bin/bash
# Load user settings from config file.
. ~/.config/settings.conf
if nc -z $nasip 80 2>/dev/null; then
mount /mnt/share/nas
else
echo "$nasip is unreachable"
fi