mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-24 00:29:43 -04:00
Added
This commit is contained in:
parent
4a57608f45
commit
f745eb4736
1 changed files with 61 additions and 28 deletions
|
|
@ -42,31 +42,64 @@ fi
|
||||||
# Alias List
|
# Alias List
|
||||||
alias ls='lsd'
|
alias ls='lsd'
|
||||||
|
|
||||||
# penpot {run|stop|update|help} alias function
|
# penpot {run|stop|update|help} alias function
|
||||||
penpot() {
|
penpot() {
|
||||||
case "$1" in
|
case "$1" in
|
||||||
run)
|
run)
|
||||||
sudo docker compose -p penpot -f ~/Documents/tools/penpot/docker-compose.yaml up -d >/dev/null 2>&1
|
sudo docker compose -p penpot -f ~/Documents/tools/penpot/docker-compose.yaml up -d >/dev/null 2>&1
|
||||||
nohup bash -c '(sleep 10 && if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
nohup bash -c '(sleep 10 && if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||||
xdg-open "http://localhost:9001"
|
xdg-open "http://localhost:9001"
|
||||||
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
open "http://localhost:9001"
|
open "http://localhost:9001"
|
||||||
fi)' >/dev/null 2>&1 &
|
fi)' >/dev/null 2>&1 &
|
||||||
echo "Started penpot on http://localhost:9001"
|
echo "Started penpot on http://localhost:9001"
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
echo "Stopping penpot"
|
echo "Stopping penpot"
|
||||||
sudo docker compose -p penpot -f ~/Documents/tools/penpot/docker-compose.yaml down >/dev/null 2>&1
|
sudo docker compose -p penpot -f ~/Documents/tools/penpot/docker-compose.yaml down >/dev/null 2>&1
|
||||||
;;
|
;;
|
||||||
update)
|
update)
|
||||||
sudo docker compose -f ~/Documents/tools/penpot/docker-compose.yaml pull
|
sudo docker compose -f ~/Documents/tools/penpot/docker-compose.yaml pull
|
||||||
echo "Updated penpot!"
|
echo "Updated penpot!"
|
||||||
;;
|
;;
|
||||||
help)
|
help)
|
||||||
xdg-open "https://help.penpot.app/"
|
xdg-open "https://help.penpot.app/"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: penpot {run|stop|update|help}"
|
echo "Usage: penpot {run|stop|update|help}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Developer Environment Functions
|
||||||
|
function dev() {
|
||||||
|
echo "Select an environment:"
|
||||||
|
echo "1. Web"
|
||||||
|
echo "2. Elixir"
|
||||||
|
echo "3. Haskell"
|
||||||
|
# Add more options here...
|
||||||
|
|
||||||
|
read -p "Enter the number of your choice: " choice
|
||||||
|
|
||||||
|
case $choice in
|
||||||
|
1)
|
||||||
|
pushd ~/Documents/developerEnvs/webDev > /dev/null
|
||||||
|
nix develop
|
||||||
|
popd > /dev/null
|
||||||
|
;;
|
||||||
|
2)
|
||||||
|
pushd ~/Documents/developerEnvs/elixirDev > /dev/null
|
||||||
|
nix develop
|
||||||
|
popd > /dev/null
|
||||||
|
;;
|
||||||
|
3)
|
||||||
|
pushd ~/Documents/developerEnvs/haskellDev > /dev/null
|
||||||
|
nix develop
|
||||||
|
popd > /dev/null
|
||||||
|
;;
|
||||||
|
# Add more cases here...
|
||||||
|
*)
|
||||||
|
echo "Invalid choice"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue