From b69040fda091cb2a55e00c05e924cd0c0a42cb57 Mon Sep 17 00:00:00 2001 From: iceyrazor Date: Wed, 4 Jun 2025 10:16:12 -0500 Subject: fixed awesome autostart dir. added wallpaper setter script. made no extension be filetype sh in neovim. renamed some scripts. --- env/.local/bin/scripts/math | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 env/.local/bin/scripts/math (limited to 'env/.local/bin/scripts/math') diff --git a/env/.local/bin/scripts/math b/env/.local/bin/scripts/math new file mode 100755 index 0000000..26d4854 --- /dev/null +++ b/env/.local/bin/scripts/math @@ -0,0 +1,13 @@ +#!/bin/bash +expression=$1 +precision=$2 + +if [ "$precision" == "" ]; then + precision=1; +fi; + +# Perform arithmetic operation using awk +result=$(awk "BEGIN {printf \"%.${precision}f\n\", $expression}" | sed 's/\.0$//') + +# Print the result +echo "$result" -- cgit v1.3