Commit 80999e0

chasinglightning  ·  2025-06-19 14:33:08 -0400 EDT
parent dd2c26f
more
3 files changed,  +28, -2
+1, -1
......@@ -16,4 +16,4 @@
1616 "distro": null,
1717 "pride_month_shown": [],
1818 "pride_month_disable": false
19-}
19+}
+1, -1
......@@ -25,7 +25,7 @@ font_family JetBrainsMono NF
2525 #: <https://sw.kovidgoyal.net/kitty/kittens/choose-fonts/#font-spec-
2626 #: syntax>.
2727
28-font_size 16.0
28+font_size 14.0
2929
3030 #: Font size (in pts).
3131
+26, -0
......@@ -0,0 +1,26 @@
1+#!/bin/bash
2+
3+f_to_c() {
4+ fah="$(gum input --placeholder 'enter temp in fahrenheit')"
5+ cel=$(bc <<< "scale=2; ($fah - 32) * 5/9")
6+ result="$fah°F is equal to $cel°C"
7+ notify-send "$result" && echo "$result"
8+}
9+
10+c_to_f() {
11+ cel="$(gum input --placeholder 'enter temp in celsius')"
12+ fah=$(bc <<< "scale=2; ($cel * 9/5) + 32")
13+ result="$cel°C is equal to $fah°F"
14+ notify-send "$result" && echo "$result"
15+}
16+
17+choice() {
18+ choose=$(gum choose "fahrenheit to celsius" "celsius to fahrenheit")
19+ case "$choose" in
20+ *celsius) f_to_c ;;
21+ *fahrenheit) c_to_f ;;
22+ *) exit;;
23+ esac
24+}
25+
26+choice