-
Notifications
You must be signed in to change notification settings - Fork 0
/
bashrc_linux
32 lines (26 loc) · 1.15 KB
/
bashrc_linux
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
alias open='xdg-open '
# apt show fzf
# → /usr/share/doc/fzf/README.Debian
source /usr/share/doc/fzf/examples/key-bindings.bash
# https://github.com/sharkdp/vivid/releases
#export LS_COLORS=$(vivid generate solarized-dark)
export LS_COLORS=$(cat $HOME/dotfiles/vivid_colors-solarized_dark)
if [[ ! -z "${WSL_DISTRO_NAME}" ]]; then
#echo "WSL detected. Setting up X Server ..."
# https://nickymeuleman.netlify.app/blog/gui-on-wsl2-cypress
# Summary:
# Instal https://sourceforge.net/projects/vcxsrv/ on windows and run
# with 'Disable access control'
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0
# add following to /etc/sudoers.d/dbus
# <whoami user name> ALL = (root) NOPASSWD: /etc/init.d/dbus
sudo /etc/init.d/dbus start &> /dev/null
wsl-proxy() {
# Proxy required for WSL2 so that windows based web browser can use the VPN clients
# started in WSL.
# Use FoxyProxy to route to localhost:8888 for required internal sites.
echo 'starting proxy on localhost:8888 for internal access'
tinyproxy -c "$HOME/dotfiles/tinyproxy.conf"
echo 'pkill tinyproxy to stop'
}
fi