updated lines mode for rofi, also adjusted compile script to allow install of specific app

This commit is contained in:
Paul Wilde 2023-02-17 11:53:32 +00:00
parent 21a424f3e6
commit 535cc5e6b9
2 changed files with 19 additions and 9 deletions

View file

@ -1,16 +1,26 @@
#!/bin/bash #!/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 for dir in ./*; do
if [ -d "$dir" ]; then if [ -d "$dir" ]; then
if [[ "$dir" == "./" ]]; then if [[ "$dir" == "./" ]]; then
continue continue
fi fi
cd "$dir" || exit build "$dir" "$1"
f=$(echo "$dir" | sed 's/\.\///')
nimble install -y
if [[ $1 == "install" ]]; then
sudo cp -v "$f" "/usr/local/bin/$f"
fi
cd ../
fi fi
done done

View file

@ -198,7 +198,7 @@ proc genMenuCmd*(data: Info, opts: varargs[string], rofi: bool = false): string
cmd = cmd & text & "\n" cmd = cmd & text & "\n"
cmd.removeSuffix("\n") cmd.removeSuffix("\n")
var x_lines = len(opts) var x_lines = len(opts) + 1
if x_lines > MAX_LINES: if x_lines > MAX_LINES:
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.command & " "
cmd = cmd & menu.extra_cmd & " " cmd = cmd & menu.extra_cmd & " "
cmd = cmd & menu.i_case & " " 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.prompt & quote(data.title)
cmd = cmd & menu.norm_bg & quote(data.unselected_bg) cmd = cmd & menu.norm_bg & quote(data.unselected_bg)
cmd = cmd & menu.norm_fg & quote(data.unselected_fg) cmd = cmd & menu.norm_fg & quote(data.unselected_fg)