summaryrefslogtreecommitdiff
path: root/scriptlets/ct_file_handler.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scriptlets/ct_file_handler.sh')
-rwxr-xr-xscriptlets/ct_file_handler.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/scriptlets/ct_file_handler.sh b/scriptlets/ct_file_handler.sh
new file mode 100755
index 0000000..2e34b1c
--- /dev/null
+++ b/scriptlets/ct_file_handler.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+if [[ $1 == *.sh ]]
+then
+ chmod +x "$1" && xfce4-terminal --hold --geometry=80x24 -e "/bin/bash -c $1" && chmod -x "$1"
+
+elif [[ $1 == *.py ]]
+then
+ xfce4-terminal --hold --geometry=80x24 -e "/bin/python3 $1" &
+else
+ xdg-open "$1" &
+fi \ No newline at end of file