updated lines mode for rofi, also adjusted compile script to allow install of specific app
This commit is contained in:
parent
21a424f3e6
commit
535cc5e6b9
2 changed files with 19 additions and 9 deletions
|
@ -1,16 +1,26 @@
|
|||
#!/bin/bash
|
||||
|
||||
build () {
|
||||
dir="$1"
|
||||
i="$2"
|
||||
cd "./$dir" || exit
|
||||
f=$(echo "$dir" | sed 's/\.\///')
|
||||
nimble install -y
|
||||
if [[ $i == "install" ]]; then
|
||||
sudo cp -v "$f" "/usr/local/bin/$f"
|
||||
fi
|
||||
cd ../
|
||||
}
|
||||
|
||||
if [[ $2 != "" ]]; then
|
||||
build "$2" "$1"
|
||||
exit
|
||||
fi
|
||||
for dir in ./*; do
|
||||
if [ -d "$dir" ]; then
|
||||
if [[ "$dir" == "./" ]]; then
|
||||
continue
|
||||
fi
|
||||
cd "$dir" || exit
|
||||
f=$(echo "$dir" | sed 's/\.\///')
|
||||
nimble install -y
|
||||
if [[ $1 == "install" ]]; then
|
||||
sudo cp -v "$f" "/usr/local/bin/$f"
|
||||
fi
|
||||
cd ../
|
||||
build "$dir" "$1"
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -198,7 +198,7 @@ proc genMenuCmd*(data: Info, opts: varargs[string], rofi: bool = false): string
|
|||
cmd = cmd & text & "\n"
|
||||
cmd.removeSuffix("\n")
|
||||
|
||||
var x_lines = len(opts)
|
||||
var x_lines = len(opts) + 1
|
||||
if x_lines > MAX_LINES:
|
||||
x_lines = MAX_LINES
|
||||
|
||||
|
@ -208,7 +208,7 @@ proc genMenuCmd*(data: Info, opts: varargs[string], rofi: bool = false): string
|
|||
cmd = cmd & menu.command & " "
|
||||
cmd = cmd & menu.extra_cmd & " "
|
||||
cmd = cmd & menu.i_case & " "
|
||||
cmd = cmd & menu.lines_shown & " " & $MAX_LINES & " "
|
||||
cmd = cmd & menu.lines_shown & " " & $x_lines & " "
|
||||
cmd = cmd & menu.prompt & quote(data.title)
|
||||
cmd = cmd & menu.norm_bg & quote(data.unselected_bg)
|
||||
cmd = cmd & menu.norm_fg & quote(data.unselected_fg)
|
||||
|
|
Loading…
Reference in a new issue