aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-01-03 19:46:06 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-01-03 19:46:59 +1300
commit34b331ddbc98d2969e4984977b80827557d31c4a (patch)
tree74307fc9b2e05acfbde654cf235fab71fec75062
parentAdd another issue (diff)
downloaddotfiles-34b331ddbc98d2969e4984977b80827557d31c4a.tar.gz
dotfiles-34b331ddbc98d2969e4984977b80827557d31c4a.zip
Add bcq(1df), tiny shut-up bc(1) wrapper for X11
-rw-r--r--README.markdown1
-rw-r--r--X/xbindkeysrc2
-rwxr-xr-xbin/bcq4
-rw-r--r--man/man1/bcq.1df13
4 files changed, 19 insertions, 1 deletions
diff --git a/README.markdown b/README.markdown
index 39bc3666..971e764b 100644
--- a/README.markdown
+++ b/README.markdown
@@ -415,6 +415,7 @@ Installed by the `install-bin` target:
intended as a framework for shell wrappers or functions.
* `ax(1df)` evaluates an awk expression given on the command line; this is
intended as a quick way to test how Awk would interpret a given expression.
+* `bcq(1df)` runs `bc(1)`, quieting it down if need be.
* `bel(1df)` prints a terminal bell character.
* `bl(1df)` generates a given number of blank lines.
* `bp(1df)` runs `br(1df)` after prompting for an URL
diff --git a/X/xbindkeysrc b/X/xbindkeysrc
index 22f1ce98..00855b09 100644
--- a/X/xbindkeysrc
+++ b/X/xbindkeysrc
@@ -28,5 +28,5 @@
"exec amixer -q sset Master 5%- unmute"
XF86AudioLowerVolume
-"exec urxvtcd -e bc"
+"exec urxvtcd -e bcq"
XF86Calculator
diff --git a/bin/bcq b/bin/bcq
new file mode 100755
index 00000000..7b950b56
--- /dev/null
+++ b/bin/bcq
@@ -0,0 +1,4 @@
+#!/bin/sh
+# Fire up bc(1), hushing it if it looks like GNU
+[ -e "$HOME"/.cache/bc/quiet ] && set -- --quiet "$@"
+exec bc "$@"
diff --git a/man/man1/bcq.1df b/man/man1/bcq.1df
new file mode 100644
index 00000000..1e67c4e2
--- /dev/null
+++ b/man/man1/bcq.1df
@@ -0,0 +1,13 @@
+.TH CALC 1df "January 2017" "Manual page for bcq"
+.SH NAME
+.B bcq
+\- run bc(1), quieting it if need be
+.SH SYNOPSIS
+.B bcq
+.SH DESCRIPTION
+.B bcq
+starts bc(1), checking ~/.cache/bc/quiet to see if a --quiet option is
+available, adding it if so to elide the annoying GNU boilerplate for an
+interactive session.
+.SH AUTHOR
+Tom Ryder <tom@sanctum.geek.nz>