aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts
diff options
context:
space:
mode:
authorJosephArmas <armas.joseph98@gmail.com>2024-05-22 13:41:48 -0700
committerJosephArmas <armas.joseph98@gmail.com>2024-05-22 13:41:48 -0700
commit40fb30c13b3e0e80174066b7ccf2dd88fe2a9666 (patch)
tree6f913590ffd0ff7fc16a6b5bf58ffdd6dd916eb4 /config/hypr/scripts
parent0054b0b766d62112c4b096b61f8777a402bff08a (diff)
feat: Add rofi calculator using qalc command. Result of expression is automatically saved to clipboard. Default keybinding set to mod + alt + c.
Diffstat (limited to 'config/hypr/scripts')
-rwxr-xr-xconfig/hypr/scripts/RofiCalc.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/config/hypr/scripts/RofiCalc.sh b/config/hypr/scripts/RofiCalc.sh
new file mode 100755
index 00000000..3589525f
--- /dev/null
+++ b/config/hypr/scripts/RofiCalc.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+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