summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorKleidi Bujari <mail@4kb.net>2024-10-03 15:36:24 -0400
committerKleidi Bujari <mail@4kb.net>2024-10-03 15:36:24 -0400
commita8d741816ce8fd86fd985e772ee2103a559fbdae (patch)
tree27fbe7d63c7c17d7c810b54425a3d2200c041174 /scripts
downloaduni-a8d741816ce8fd86fd985e772ee2103a559fbdae.tar.gz
uni-a8d741816ce8fd86fd985e772ee2103a559fbdae.tar.bz2
uni-a8d741816ce8fd86fd985e772ee2103a559fbdae.zip
init
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/semcode14
-rwxr-xr-xscripts/switch-course8
2 files changed, 22 insertions, 0 deletions
diff --git a/scripts/semcode b/scripts/semcode
new file mode 100755
index 0000000..a1b73b2
--- /dev/null
+++ b/scripts/semcode
@@ -0,0 +1,14 @@
+#!/bin/bash
+#
+# Build {season}{year} tuple for other programs
+#
+# Example:
+#   July 2024 -> S2024
+
+case "$((($(date +%m) - 1) / 4))" in
+0) season="W" ;;
+1) season="S" ;;
+2) season="F" ;;
+esac
+
+echo "${season}$(date +%Y)"
diff --git a/scripts/switch-course b/scripts/switch-course
new file mode 100755
index 0000000..5f0bec8
--- /dev/null
+++ b/scripts/switch-course
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+select=$(
+  find ~/projects/university/ -type d -name '*20*' | \
+    fuzzel --dmenu
+)
+
+echo "$select"