forked from Job79/devcontainer
Fix :)
This commit is contained in:
11
devc.sh
11
devc.sh
@@ -36,9 +36,6 @@ default_args() {
|
||||
# restarts. Use copy to keep the files from the image.
|
||||
arg "-v $name:/home/user:copy"
|
||||
|
||||
# Mount dev folder
|
||||
arg "-v $HOME/dev:/home/user/dev"
|
||||
|
||||
# If there is custom configuration for the container, load
|
||||
# it here.
|
||||
config_file="$(dirname "$(realpath "$0")")/containers/$name/config.sh"
|
||||
@@ -63,6 +60,14 @@ param_args() {
|
||||
-net) # Enable network dev-<container name>
|
||||
arg "--network dev-$name"
|
||||
;;
|
||||
-mnt) # Mount directory.
|
||||
shift
|
||||
arg "-w /workdir/"
|
||||
arg "-v $1:/workdir/$([ ! -d "$1" ] && echo $1)"
|
||||
;;
|
||||
-mdf) # Mount dev folder
|
||||
arg "-v $HOME/dev:/home/user/dev"
|
||||
;;
|
||||
-x11) # Enable X11 support.
|
||||
arg "-v /tmp/.X11-unix:/tmp/.X11-unix"
|
||||
arg "-v $XAUTHORITY:/run/user/1000/.Xauthority:ro"
|
||||
|
||||
28
example-bashrc
Normal file
28
example-bashrc
Normal file
@@ -0,0 +1,28 @@
|
||||
# Tools
|
||||
pbcopy() { curl -sF "content=<-" "https://paste.plabble.org/$2?lang=$1" && echo; }
|
||||
alias code="flatpak run com.visualstudio.code"
|
||||
alias random="cat /dev/urandom | tr -dc '[:alpha:]' | fold -w ${1:-20} | head -n 1"
|
||||
|
||||
# Dev containers
|
||||
export DEVC_REGISTRY="git.plabble.org/maurice"
|
||||
|
||||
function devc() {
|
||||
"$HOME/dev/devcontainer/devc.sh" "$@" -mdf
|
||||
}
|
||||
|
||||
alias rider="DEVC_COMMAND=/home/user/Rider/bin/rider devc rider -x11 -host-spawn -net"
|
||||
alias flutter="devc flutter -x11 -host-spawn -kvm -usb -gpu"
|
||||
alias androidstudio="DEVC_COMMAND=/home/user/AndroidStudio/bin/studio devc android -x11 -host-spawn -kvm -usb -gpu"
|
||||
|
||||
function hx() {
|
||||
arg="${1:-.}"
|
||||
DEVC_COMMAND="hx $arg" devc fedora -mnt $arg
|
||||
}
|
||||
|
||||
# Git aliases
|
||||
alias gc="git commit -m"
|
||||
alias ga="git add -A"
|
||||
alias gf="git fetch"
|
||||
alias gp="git pull"
|
||||
alias gpp="git push"
|
||||
alias gs="git status"
|
||||
Reference in New Issue
Block a user