Skip to content
This repository has been archived by the owner on Jun 19, 2021. It is now read-only.

Commit

Permalink
🚸 Add st-app
Browse files Browse the repository at this point in the history
  • Loading branch information
NNBnh committed May 18, 2021
1 parent 6e701fa commit f057832
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 26 deletions.
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
PREFIX ?= /usr/local
MANDIR ?= $(PREFIX)/share/man

BIN ?= bt


install:
@mkdir -p $(PREFIX)/bin
@mkdir -p $(MANDIR)/man1

@cp -p bin/$(BIN) $(PREFIX)/bin/
@cp -p man/$(BIN).1 $(MANDIR)/man1/
@cp -p bin/bt $(PREFIX)/bin/
@cp -p bin/bt-app $(PREFIX)/bin/
@cp -p man/bt.1 $(MANDIR)/man1/

@chmod 755 $(PREFIX)/bin/$(BIN)
@chmod 755 $(PREFIX)/bin/bt
@chmod 755 $(PREFIX)/bin/bt-app


uninstall:
@rm -rf $(PREFIX)/bin/$(BIN)
@rm -rf $(MANDIR)/man1/$(BIN).1*
@rm -rf $(PREFIX)/bin/bt
@rm -rf $(MANDIR)/man1/bt.1*
19 changes: 18 additions & 1 deletion bin/bt
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,25 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.


# Values
FONT_FAMILY="${BUI_FONT_MONO_FAMILY:-Monospace}"
FONT_SIZE="${BUI_FONT_MONO_SIZE:-10.0}"

OPACITY="${BUI_OPACITY:-1.0}"

case "$BUI_FONT_ANTIALIAS" in
'true'|'') FONT_ANTIALIAS='true' ;;
*) FONT_ANTIALIAS='false' ;;
esac

case "$BUI_HINT_STYLE" in
'slight'|'medium'|'full'|'') FONT_HINT='true' ;;
*) FONT_HINT='false' ;;
esac


# Start
"$(getent passwd "$LOGNAME" | cut -d: -f7)" -c "real-bt \"$@\""
st -f "$FONT_FAMILY:size=$FONT_SIZE:antialias=$FONT_ANTIALIAS:autohint=$FONT_HINT" -A "$OPACITY" "$@"


exit 0
21 changes: 3 additions & 18 deletions bin/real-bt → bin/bt-app
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
# / /_/ // /
# /_____//_/

# File: real-bt
# File: bt-app
# Description: BUI for ST terminal
# Author: NNB
# └─ https://github.com/NNBnh
# URL: https://github.com/NNBnh/real-bt
# URL: https://github.com/NNBnh/bt-app
# License: GPLv3

# This program is free software: you can redistribute it and/or modify
Expand All @@ -27,23 +27,8 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.


# Values
FONT_FAMILY="${BUI_FONT_MONO_FAMILY:-Monospace}"
FONT_SIZE="${BUI_FONT_MONO_SIZE:-10.0}"

case "$BUI_FONT_ANTIALIAS" in
'true'|'') FONT_ANTIALIAS='true' ;;
*) FONT_ANTIALIAS='false' ;;
esac

case "$BUI_HINT_STYLE" in
'slight'|'medium'|'full'|'') FONT_HINT='true' ;;
*) FONT_HINT='false' ;;
esac


# Start
st -f "$FONT_FAMILY:size=$FONT_SIZE:antialias=$FONT_ANTIALIAS:autohint=$FONT_HINT" -A "$BUI_OPACITY" "$@"
"$(getent passwd "$LOGNAME" | cut -d ':' -f '7')" -c "bt"


exit 0

0 comments on commit f057832

Please sign in to comment.