dmenium

Unnamed repository; edit this file 'description' to name the repository.
git clone git://edryd.org/dmenium
Log | Files | Refs | LICENSE

commit 9b9714b024798f0963aef715e9e463c7ac4b96fa
parent d3fe0ff1f783e028f7be3e861d627bc9f12ef22e
Author: Ed van Bruggen <edvb54@gmail.com>
Date:   Sun, 26 Apr 2015 20:43:18 -0700

Add more comments to dmenu-calc.sh

Diffstat:
dmenu-calc.sh | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dmenu-calc.sh b/dmenu-calc.sh @@ -1,10 +1,11 @@ #!/usr/bin/env bash -# Caluctor using dmenu as interface +# Calculator using dmenu as interface # run dmenu calculator while the result is not empty while : ; do + # use contents of clipboard as option, pass into bc to be calculated result=$(xclip -o -sel clip | dmenu -p Calc | xargs echo | bc 2>&1) - if [[ $result ]]; then # if result is not empty (the last one), copy to clipboard + if [[ $result ]]; then # if result is empty (the last one), don't copy it to clipboard echo $result | xclip -sel clip fi [[ $result ]] || break # if result is empty, break from while loop