Moves from i3 to hypr
This commit is contained in:
parent
6f069d32e1
commit
a186edca69
380 changed files with 23450 additions and 27796 deletions
30
.config/hypr/UserScripts/RofiCalc.sh
Executable file
30
.config/hypr/UserScripts/RofiCalc.sh
Executable file
|
|
@ -0,0 +1,30 @@
|
|||
#!/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"
|
||||
|
||||
# Kill Rofi if already running before execution
|
||||
if pgrep -x "rofi" >/dev/null; then
|
||||
pkill rofi
|
||||
fi
|
||||
|
||||
# main function
|
||||
|
||||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue