mirror of
https://git.disroot.org/FollieHiyuki/dotfiles.git
synced 2024-11-28 18:28:35 -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
|