mirror of
https://git.disroot.org/FollieHiyuki/dotfiles.git
synced 2024-12-01 11:48:41 -05:00
28 lines
458 B
Bash
Executable File
28 lines
458 B
Bash
Executable File
#!/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
|