-
-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from jldeen/wsl-dev
Wsl dev branch merge to master wsl
- Loading branch information
Showing
16 changed files
with
319 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,47 @@ | ||
#!/bin/bash | ||
|
||
#IP=$(ipconfig getifaddr wifi0) | ||
# Internal IP | ||
IP=$(hostname -I | awk {'print $1}') | ||
|
||
# # Public IP | ||
PUB_IP=$(dig +short myip.opendns.com @resolver1.opendns.com) | ||
# Packet loss check | ||
timeout 7s ping -c 5 google.com | grep 'loss' | awk '{print $6}' > /dev/null 2>&1 | ||
if [[ $? -eq 0 ]] | ||
then | ||
PL=$(ping -c 5 google.com | grep 'loss' | awk '{print $6}') | ||
PL+=" p/l" | ||
else | ||
PL="" | ||
fi | ||
|
||
# Speedtest | ||
DL=$(speedtest-cli --simple | awk 'NR==2{print $2}') | ||
UP=$(speedtest-cli --simple | awk 'NR==3{print $2}') | ||
|
||
# Public IP | ||
PUB_IP=$(speedtest-cli --json | jq -r .client.ip) | ||
|
||
if [[ "$PUB_IP" = ";; connection timed out; no servers could be reached" ]]; then | ||
PUB_IP="Not Available" | ||
elif [[ "$PUB_IP" = "" ]]; then | ||
PUB_IP="No external access" | ||
else | ||
PUB_IP=$(dig +short myip.opendns.com @resolver1.opendns.com) | ||
PUB_IP=$(speedtest-cli --json | jq -r .client.ip) | ||
fi | ||
|
||
INTERNET='' | ||
|
||
if [[ $internet_info -lt 20 ]]; then | ||
echo -n '#[fg=colour150]' | ||
elif [[ $internet_info -lt 30 ]]; then | ||
echo -n '#[fg=colour155]' | ||
elif [[ $internet_info -lt 40 ]]; then | ||
echo -n '#[fg=colour160]' | ||
elif [[ $internet_info -lt 50 ]]; then | ||
echo -n '#[fg=colour163]' | ||
else | ||
echo -n '#[fg=colour150]' | ||
fi | ||
#internet_info=`iwconfig eth0 | grep "Signal level" | awk '{print $2}' | sed 's/-//g'` | ||
|
||
# if [[ $internet_info -lt 20 ]]; then | ||
# echo -n '#[fg=colour150]' | ||
# elif [[ $internet_info -lt 30 ]]; then | ||
# echo -n '#[fg=colour155]' | ||
# elif [[ $internet_info -lt 40 ]]; then | ||
# echo -n '#[fg=colour160]' | ||
# elif [[ $internet_info -lt 50 ]]; then | ||
# echo -n '#[fg=colour163]' | ||
# else | ||
# echo -n '#[fg=colour150]' | ||
# fi | ||
|
||
echo -n "#[fg=colour60]$INTERNET #[fg=colour60]$IP | $PUB_IP" | ||
echo -n "#[fg=colour150]$INTERNET #[fg=colour81]$PL #[fg=colour86]$DL Mbit/s $UP Mbit/s #[fg=colour197]$IP | $PUB_IP" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
// word wrap settings | ||
"editor.wordWrap": "on", | ||
//-------- Remote VSCode configuration -------- | ||
|
||
// Port number to use for connection. | ||
"remote.port": 52698, | ||
|
||
// Launch the server on start up. | ||
"remote.onstartup": true, | ||
|
||
// Controls the font family. | ||
"editor.fontFamily": "'SourceCodePro Nerd Font Mono'", | ||
"terminal.integrated.fontFamily": "'SourceCodePro Nerd Font Mono'", | ||
"terminal.integrated.fontSize": 11, | ||
"workbench.startupEditor": "newUntitledFile", | ||
"typescript.check.npmIsInstalled": false, | ||
"window.zoomLevel": 1, | ||
"git.autofetch": true, | ||
// "workbench.colorTheme": "Visual Studio Dark" | ||
// "window.zoomLevel": 0, | ||
// "workbench.startupEditor": "newUntitledFile", | ||
//PowerShell | ||
// "terminal.integrated.shell.osx": "/usr/local/bin/powershell", | ||
// Color Override for terminal | ||
"workbench.colorCustomizations": { | ||
"terminal.foreground": "#839496", | ||
"terminal.background": "#002833", | ||
"terminal.ansiBlack": "#003541", | ||
"terminal.ansiBlue": "#268bd2", | ||
"terminal.ansiCyan": "#2aa198", | ||
"terminal.ansiGreen": "#859901", | ||
"terminal.ansiMagenta": "#d33682", | ||
"terminal.ansiRed": "#dc322f", | ||
"terminal.ansiWhite": "#eee8d5", | ||
"terminal.ansiYellow": "#b58901", | ||
"terminal.ansiBrightBlack": "#586e75", | ||
"terminal.ansiBrightBlue": "#839496", | ||
"terminal.ansiBrightCyan": "#93a1a1", | ||
"terminal.ansiBrightGreen": "#586e75", | ||
"terminal.ansiBrightMagenta": "#6c6ec6", | ||
"terminal.ansiBrightRed": "#cb4b16", | ||
"terminal.ansiBrightWhite": "#fdf6e3", | ||
"terminal.ansiBrightYellow": "#657b83", | ||
"terminalCursor.foreground": "#839496", | ||
"terminalCursor.background": "#003541" | ||
}, | ||
"workbench.colorTheme": "Visual Studio Dark", | ||
"azure.resourceFilter": [ | ||
"72f988bf-86f1-41af-91ab-2d7cd011db47/dfb5d696-98d8-447c-a14d-56f131f3c4a5", | ||
"72f988bf-86f1-41af-91ab-2d7cd011db47/998e0f50-cedb-4e50-a461-52ef20a0478b" | ||
], | ||
"workbench.activityBar.visible": true, | ||
"workbench.sideBar.location": "left" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/bin/bash | ||
#======================================================================================================================= | ||
# Export and import Gnome Terminal profiles | ||
# https://github.com/yktoo/yktools/blob/master/gnome-terminal-profile | ||
#======================================================================================================================= | ||
|
||
# Displays usage info and exits | ||
# Parameters: | ||
# 1 - error message (if any) | ||
usage() { | ||
[ -z "$1" ] || echo "ERROR: $1" >&2 | ||
echo "Usage: $0 import|export <filename>" >&2 | ||
exit 1 | ||
} | ||
|
||
# Prints a failure message and exits | ||
# Parameters: | ||
# 1 - message | ||
err() { | ||
echo "ERROR: $1" >&2 | ||
exit 2 | ||
} | ||
|
||
#----------------------------------------------------------------------------------------------------------------------- | ||
|
||
# Check variables | ||
mode="$1" | ||
filename="$2" | ||
[[ -z "$mode" ]] && usage "No mode specified" | ||
[[ -z "$filename" ]] && usage "No filename specified" | ||
|
||
# Get default profile ID | ||
profile="$(gsettings get org.gnome.Terminal.ProfilesList default)" | ||
profile="${profile:1:-1}" # remove leading and trailing single quotes | ||
|
||
case "$mode" in | ||
# Export profile | ||
export) | ||
dconf dump "/org/gnome/terminal/legacy/profiles:/:$profile/" > "$filename" | ||
echo "Saved the default profile $profile in $filename" | ||
;; | ||
|
||
# Import profile | ||
import) | ||
[[ ! -r "$filename" ]] && err "Failed to read from file $filename" | ||
dconf load "/org/gnome/terminal/legacy/profiles:/:$profile/" < "$filename" | ||
echo "Loaded $filename into the default profile $profile" | ||
;; | ||
|
||
*) | ||
usage "Incorrect mode: $mode" | ||
;; | ||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[/] | ||
background-color='rgb(53,52,52)' | ||
visible-name='jldeen' | ||
use-theme-colors=false | ||
palette=['rgb(7,54,66)', 'rgb(220,50,47)', 'rgb(133,153,0)', 'rgb(181,137,0)', 'rgb(38,139,210)', 'rgb(211,54,130)', 'rgb(42,161,152)', 'rgb(238,232,213)', 'rgb(209,164,231)', 'rgb(203,75,22)', 'rgb(88,110,117)', 'rgb(101,123,131)', 'rgb(131,148,150)', 'rgb(108,113,196)', 'rgb(147,161,161)', 'rgb(253,246,227)'] | ||
use-theme-transparency=false | ||
foreground-color='rgb(201,201,201)' | ||
use-system-font=false | ||
font='SourceCodePro Nerd Font Mono 12' |
Oops, something went wrong.