mirror of
https://git.disroot.org/FollieHiyuki/dotfiles.git
synced 2024-12-04 21:28:21 -05:00
28 lines
458 B
Plaintext
28 lines
458 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
case $1 in
|
||
|
--bemenu)
|
||
|
menu="bemenu -p calculate -l 5"
|
||
|
clip="wl-copy -p"
|
||
|
;;
|
||
|
--dmenu)
|
||
|
menu="dmenu -p calculate -l 5"
|
||
|
clip="xsel -i -l $HOME/.cache/xsel.log"
|
||
|
;;
|
||
|
--wofi)
|
||
|
menu="wofi -d -p calculate -O default"
|
||
|
clip="wl-copy -p"
|
||
|
;;
|
||
|
*)
|
||
|
exit
|
||
|
;;
|
||
|
esac
|
||
|
|
||
|
while inp=$(echo -e "$oup" | ${menu} )
|
||
|
do
|
||
|
if oup2=$(calc -pd "$inp"); then
|
||
|
echo -n "$oup2" | ${clip}
|
||
|
oup="$oup2\n$oup"
|
||
|
fi
|
||
|
done
|