2021-11-12 14:14:13 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [[ -z "$1" ]]; then
|
2021-11-12 15:14:13 +01:00
|
|
|
echo "Calc Mode"
|
2021-11-12 14:14:13 +01:00
|
|
|
|
|
|
|
else
|
|
|
|
killall rofi
|
|
|
|
# so rofi doesn't complain "can't launch rofi inside rofi"
|
|
|
|
# rofi -show calc -modi calc -no-show-match -no-sort -calc-command "echo -n '{result}' | xclip -selection clipboard"
|
|
|
|
rofi -show calc -modi calc -no-show-match -no-sort -calc-command "echo -n '{result}' | xclip -selection clipboard"
|
|
|
|
fi
|