while [ -z "$CHOICE" ]; do
if [ -z "$(ls)" ]; then
CHOICE="$(echo 'edit menu
-close' | instantmenu -bw 4 -C -l 7 -w 300)"
+close' | instantmenu -bw 4 -C -l 7 -w -1)"
else
- CHOICE="$(ls -p | sed -e '$aedit menu\nclose' | instantmenu -bw 4 -C -l 7 -w 300)"
+ CHOICE="$(ls -p | sed -e '$aedit menu\nclose' | instantmenu -bw 4 -C -l 7 -w -1)"
fi
if [ -e "$CHOICE" ]; then
if [ -d "$CHOICE" ]; then
edit entry
remove entry
rename entry
-new category' | instantmenu -bw 4 -C -l 7 -w 300)"
+new category' | instantmenu -bw 4 -C -l 7 -w -1)"
if [ -z "$ADDCHOICE" ]; then
echo "no addchoice"
exit
case "$ADDCHOICE" in
remove*)
echo "removing entry"
- REMOVECHOICE="$(ls -p | instantmenu -bw 4 -C -l 7 -w 300)"
+ REMOVECHOICE="$(ls -p | instantmenu -bw 4 -C -l 7 -w -1)"
if [ -d "$REMOVECHOICE" ] && [ -n "$(ls $REMOVECHOICE/)" ]; then
imenu -m "category is not empty"
exit
;;
edit*)
echo "editing existing entry"
- EDITCHOICE="$(ls -p | instantmenu -bw 4 -C -l 7 -w 300)"
+ EDITCHOICE="$(ls -p | instantmenu -bw 4 -C -l 7 -w -1)"
[ -z "$EDITCHOICE" ] && exit
if [ -d "$EDITCHOICE" ]; then
imenu -m "selection is not a script"
;;
rename*)
echo "renaming entry"
- EDITCHOICE="$(ls -p | instantmenu -bw 4 -C -l 7 -w 300)"
+ EDITCHOICE="$(ls -p | instantmenu -bw 4 -C -l 7 -w -1)"
[ -z "$EDITCHOICE" ] && exit
if ! [ -e "$EDITCHOICE" ]; then