add option to pass container to open as first arg to open-terminal.sh

master
Alex 2023-06-25 13:07:08 -05:00
parent 09394cce23
commit 373cbb591a
1 changed files with 15 additions and 6 deletions

View File

@ -1,10 +1,19 @@
#!/bin/sh #!/bin/sh
SEL="$(distrobox list | awk '{if (NR>1) {print $3}}' | rofi -dmenu -p "Select Distrobox ")"
if [ "$SEL" ]; then open_term() {
echo "selected $SEL" foot -e distrobox enter "$1" --additional-flags "--env TERM=xterm-256color"
#distrobox enter "$SEL" }
foot -e distrobox enter $SEL --additional-flags "--env TERM=xterm-256color"
if [ "$1" ]; then
open_term "$1"
else else
foot SEL="$(distrobox list | awk '{if (NR>1) {print $3}}' | rofi -dmenu -p "Select Distrobox ")"
if [ "$SEL" ]; then
echo "selected $SEL"
#distrobox enter "$SEL"
open_term "$SEL"
else
foot
fi
fi fi