summaryrefslogtreecommitdiff
path: root/cfg/fastfetch/?.sh
diff options
context:
space:
mode:
authorczjstmax <jstmaxlol@disroot.org>2026-01-30 00:20:03 +0100
committerczjstmax <jstmaxlol@disroot.org>2026-01-30 00:20:03 +0100
commit2a8f7a6a66d620e46779d73ba788d1071239ff2a (patch)
tree7791de28567388c16870fdad47711fdc57a17dd8 /cfg/fastfetch/?.sh
parent718f8b25c19759e171d3c49da3979e8a8b2b0f33 (diff)
lots of updates i guess... also, `fastfetch` stuff now got its folder
too Signed-off-by: czjstmax <jstmaxlol@disroot.org>
Diffstat (limited to 'cfg/fastfetch/?.sh')
-rwxr-xr-xcfg/fastfetch/?.sh39
1 files changed, 39 insertions, 0 deletions
diff --git a/cfg/fastfetch/?.sh b/cfg/fastfetch/?.sh
new file mode 100755
index 0000000..311df29
--- /dev/null
+++ b/cfg/fastfetch/?.sh
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+# folder with ascii files
+ascii_folder="/home/max/ii"
+# a file to keep track of last used logo index
+state_file="/tmp/fastfetch_logo_index"
+
+# array of ascii logo files
+ascii_files=(
+ "$ascii_folder/maoscii.txt"
+ "$ascii_folder/enriscii.txt"
+ "$ascii_folder/marscii.txt"
+ "$ascii_folder/cafiscii1.txt"
+ "$ascii_folder/bakiscii.txt"
+ "$ascii_folder/cafiscii2.txt"
+)
+
+# number of ascii files
+count=${#ascii_files[@]}
+
+# read last index from file or start at -1
+if [[ -f "$state_file" ]]; then
+ last_index=$(cat "$state_file")
+else
+ last_index=-1
+fi
+
+# calculate next index in rotation
+next_index=$(( (last_index + 1) % count ))
+
+# save next index for next run
+echo "$next_index" > "$state_file"
+
+# pick ascii file for this run
+selected_ascii="${ascii_files[$next_index]}"
+
+# run fastfetch with selected ascii file
+fastfetch --logo "$selected_ascii"
+