2023-06-25 17:22:13 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2023-06-25 18:07:08 +00:00
|
|
|
open_term() {
|
|
|
|
foot -e distrobox enter "$1" --additional-flags "--env TERM=xterm-256color"
|
|
|
|
}
|
|
|
|
|
|
|
|
if [ "$1" ]; then
|
|
|
|
open_term "$1"
|
2023-06-25 17:22:13 +00:00
|
|
|
else
|
2023-06-25 18:07:08 +00:00
|
|
|
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
|
|
|
|
|
2023-06-25 17:22:13 +00:00
|
|
|
fi
|