aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts/RofiCalc.sh
blob: ff96b3a81019478332eb6ee42dc451d110ce4c08 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */
# /* Calculator (using qalculate) and rofi */
# /* Submitted by: https://github.com/JosephArmas */

rofi_config="$HOME/.config/rofi/config-calc.rasi"


while true; do
    result=$(
        rofi -i -dmenu \
            -config "$rofi_config" \
            -mesg "$result      =    $calc_result"
    )

    if [ $? -ne 0 ]; then
        exit
    fi

    if [ -n "$result" ]; then
        calc_result=$(qalc -t "$result")
        echo "$calc_result" | wl-copy
    fi
done
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage