dotfiles/rofi/show-calculator.sh

11 lines
278 B
Bash
Raw Normal View History

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