dots


commit
dd2c26f
parent
7022f1f
author
xxwhirlpool
date
2025-06-19 14:27:52 -0400 EDT
new scripts; fastfetch & hyfetch configs
7 files changed,  +469, -2
A config/.config/fastfetch/config.jsonc
+40, -0
 1@@ -0,0 +1,40 @@
 2+{
 3+  "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
 4+  "logo": {
 5+    "source": "lubuntu"
 6+  },
 7+  "display": {
 8+    "color": "35"
 9+  },
10+  "modules": [
11+    "title",
12+    "separator",
13+    "os",
14+    "host",
15+    "kernel",
16+    "uptime",
17+    "packages",
18+    "shell",
19+    "display",
20+    "de",
21+    "wm",
22+    "wmtheme",
23+    "theme",
24+    "icons",
25+    "font",
26+    "cursor",
27+    "terminal",
28+    "terminalfont",
29+    "cpu",
30+    "gpu",
31+    "memory",
32+    "swap",
33+    "disk",
34+    "localip",
35+    "battery",
36+    "poweradapter",
37+    "locale",
38+    "break",
39+    "colors"
40+  ]
41+}
A config/.config/hyfetch.json
+19, -0
 1@@ -0,0 +1,19 @@
 2+{
 3+    "preset": "lesbian",
 4+    "mode": "rgb",
 5+    "light_dark": "dark",
 6+    "lightness": 0.5,
 7+    "color_align": {
 8+        "mode": "horizontal",
 9+        "custom_colors": [],
10+        "fore_back": [
11+            2,
12+            1
13+        ]
14+    },
15+    "backend": "fastfetch",
16+    "args": null,
17+    "distro": null,
18+    "pride_month_shown": [],
19+    "pride_month_disable": false
20+}
A config/.local/bin/batnotif
+14, -0
 1@@ -0,0 +1,14 @@
 2+#!/bin/bash
 3+
 4+battery=$(upower -i $(upower -e | grep 'BAT') | awk '/percentage/ {print $NF}' | sed 's/%//g')
 5+batteryint=$((battery))
 6+
 7+if (( "$batteryint" < "50" )); then
 8+	notify-send "battery is under 50%!"
 9+elif (( "$batteryint" < "20")); then
10+	notify-send "battery is under 20%!"
11+elif (( "$batteryint" < "10")); then
12+	notify-send "battery is under 10%!!! charge ur laptop!!!!"
13+elif (( "$batteryint" < "5")); then
14+	notify-send "battery is under 5%!!!!! CHARGE LAPTOP!!!!!!!!!"
15+fi
M config/.local/bin/mark
+1, -2
 1@@ -21,8 +21,7 @@ mark_create() {
 2 # search bookmarks
 3 mark_search() {
 4 	choice="$(cat $MARK_FILE | fzf)"
 5-	printf "$choice" | xclip -sel clip
 6-	echo "$choice"
 7+	printf '%s' "$choice" | tee >(xclip -sel clip)
 8 }
 9 
10 # clear bookmark file
A config/.local/bin/sys
+11, -0
 1@@ -0,0 +1,11 @@
 2+#!/usr/bin/env bash
 3+#
 4+# https://github.com/BreadOnPenguins/scripts/blob/master/dmenu_sys
 5+
 6+case "$(printf "kill\nzzz\nreboot\nshutdown" | dmenu -i -c -l 4)" in
 7+	kill) ps -u $USER -o pid,comm,%cpu,%mem | dmenu -i -c -l 10 -p Kill: | awk '{print $1}' | xargs -r kill ;;
 8+	zzz) systemctl suspend -i ;;
 9+	reboot) systemctl reboot -i ;;
10+	shutdown) shutdown now ;;
11+	*) exit 1 ;;
12+esac
A scripts/Scripts/gallery.sh
+297, -0
  1@@ -0,0 +1,297 @@
  2+#!/bin/bash
  3+
  4+# gallery.sh
  5+# Author: Nils Knieling - https://github.com/Cyclenerd/gallery_shell
  6+# Inspired by: Shapor Naghibzadeh - https://github.com/shapor/bashgal
  7+#
  8+#
  9+#
 10+# modified by kat @ girlonthemoon.xyz for personal use
 11+#
 12+#
 13+#
 14+
 15+#########################################################################################
 16+#### Configuration Section
 17+#########################################################################################
 18+
 19+MY_HEIGHT_SMALL=400
 20+MY_HEIGHT_LARGE=800
 21+MY_QUALITY=100
 22+MY_THUMBDIR="__thumbs"
 23+MY_INDEX_HTML_FILE="index.html"
 24+MY_TITLE=$(gum input --placeholder "title of document and header")
 25+MY_FOOTER='created with <a href="https://github.com/Cyclenerd/gallery_shell">gallery.sh</a>'
 26+
 27+# Use convert from ImageMagick
 28+MY_CONVERT_COMMAND="convert" 
 29+# Use JHead for EXIF Information
 30+MY_EXIF_COMMAND="jhead"
 31+
 32+MY_CSS="https://stash.4-walls.net/gallery/assets/md2html.css"
 33+
 34+# Debugging output
 35+# true=enable, false=disable 
 36+MY_DEBUG=true
 37+
 38+#########################################################################################
 39+#### End Configuration Section
 40+#########################################################################################
 41+
 42+
 43+MY_SCRIPT_NAME=$(basename "$0")
 44+MY_DATETIME=$(date -u "+%Y-%m-%d %H:%M:%S")
 45+MY_DATETIME+=" UTC"
 46+
 47+function usage {
 48+	MY_RETURN_CODE="$1"
 49+	echo -e "Usage: $MY_SCRIPT_NAME [-t <title>] [-d <thumbdir>] [-h]:
 50+	[-t <title>]\\t sets the title (default: $MY_TITLE)
 51+	[-d <thumbdir>]\\t sets the thumbdir (default: $MY_THUMBDIR)
 52+	[-h]\\t\\t displays help (this message)"
 53+	exit "$MY_RETURN_CODE"
 54+}
 55+
 56+function debugOutput(){
 57+	if [[ "$MY_DEBUG" == true ]]; then
 58+		echo "$1" # if debug variable is true, echo whatever's passed to the function
 59+	fi
 60+}
 61+
 62+function getFileSize(){
 63+	# Be aware that BSD stat doesn't support --version and -c
 64+	if stat --version &>/dev/null; then
 65+		# GNU
 66+		MY_FILE_SIZE=$(stat -c %s "$1" | awk '{$1/=1000000;printf "%.2fMB\n",$1}')
 67+	else
 68+		# BSD
 69+		MY_FILE_SIZE=$(stat -f %z "$1" | awk '{$1/=1000000;printf "%.2fMB\n",$1}')
 70+	fi
 71+	echo "$MY_FILE_SIZE"
 72+}
 73+
 74+while getopts ":t:d:h" opt; do
 75+	case $opt in
 76+	t)
 77+		MY_TITLE="$OPTARG"
 78+		;;
 79+	d)
 80+		MY_THUMBDIR="$OPTARG"
 81+		;;
 82+	h)
 83+		usage 0
 84+		;;
 85+	*)
 86+		echo "Invalid option: -$OPTARG"
 87+		usage 1
 88+		;;
 89+	esac
 90+done
 91+
 92+debugOutput "- $MY_SCRIPT_NAME : $MY_DATETIME"
 93+
 94+### Check Commands
 95+command -v $MY_CONVERT_COMMAND >/dev/null 2>&1 || { echo >&2 "!!! $MY_CONVERT_COMMAND it's not installed.  Aborting."; exit 1; }
 96+command -v $MY_EXIF_COMMAND >/dev/null 2>&1 || { echo >&2 "!!! $MY_EXIF_COMMAND it's not installed.  Aborting."; exit 1; }
 97+
 98+### Create Folders
 99+[[ -d "$MY_THUMBDIR" ]] || mkdir "$MY_THUMBDIR" || exit 2
100+
101+MY_HEIGHTS[0]=$MY_HEIGHT_SMALL
102+MY_HEIGHTS[1]=$MY_HEIGHT_LARGE
103+for MY_RES in "${MY_HEIGHTS[@]}"; do
104+	[[ -d "$MY_THUMBDIR/$MY_RES" ]] || mkdir -p "$MY_THUMBDIR/$MY_RES" || exit 3
105+done
106+
107+#### Create Startpage
108+debugOutput "$MY_INDEX_HTML_FILE"
109+cat > "$MY_INDEX_HTML_FILE" << EOF
110+<!DOCTYPE HTML>
111+<html lang="en">
112+<head>
113+	<meta charset="utf-8">
114+	<title>$MY_TITLE</title>
115+	<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
116+	<meta name="robots" content="noindex, nofollow">
117+	<link rel="stylesheet" href="$MY_CSS">
118+</head>
119+<body>
120+<header>
121+	<h1 class="title">$MY_TITLE</h1>
122+</header>
123+<main>
124+EOF
125+
126+### Photos (JPG)
127+if [[ $(find . -maxdepth 1 -type f -iname \*.jpg | wc -l) -gt 0 ]]; then
128+
129+MY_ROWS='3'
130+echo '<div class="row row-cols-sm-1 row-cols-md-'"$((MY_ROWS-2))"' row-cols-lg-'"$((MY_ROWS-1))"' row-cols-xl-'"$MY_ROWS"' py-5">' >> "$MY_INDEX_HTML_FILE"
131+## Generate Images
132+MY_NUM_FILES=0
133+for MY_FILENAME in *.[jJ][pP][gG]; do
134+	MY_FILELIST[$MY_NUM_FILES]=$MY_FILENAME
135+	(( MY_NUM_FILES++ ))
136+	for MY_RES in "${MY_HEIGHTS[@]}"; do
137+		if [[ ! -s $MY_THUMBDIR/$MY_RES/$MY_FILENAME ]]; then
138+			debugOutput "$MY_THUMBDIR/$MY_RES/$MY_FILENAME"
139+			$MY_CONVERT_COMMAND -auto-orient -strip -quality $MY_QUALITY -resize x$MY_RES "$MY_FILENAME" "$MY_THUMBDIR/$MY_RES/$MY_FILENAME"
140+		fi
141+	done
142+	cat >> "$MY_INDEX_HTML_FILE" << EOF
143+<div class="col">
144+	<p>
145+		<a href="$MY_THUMBDIR/$MY_FILENAME.html"><img src="$MY_THUMBDIR/$MY_HEIGHT_SMALL/$MY_FILENAME" alt="Thumbnail: $MY_FILENAME" class="rounded mx-auto d-block" height="$((MY_HEIGHT_SMALL/2))"></a>
146+	</p>
147+</div>
148+EOF
149+done
150+echo '</div>' >> "$MY_INDEX_HTML_FILE"
151+
152+## Generate the HTML Files for Images in thumbdir
153+MY_FILE=0
154+while [[ $MY_FILE -lt $MY_NUM_FILES ]]; do
155+	MY_FILENAME=${MY_FILELIST[$MY_FILE]}
156+	MY_PREV=""
157+	MY_NEXT=""
158+	[[ $MY_FILE -ne 0 ]] && MY_PREV=${MY_FILELIST[$((MY_FILE - 1))]}
159+	[[ $MY_FILE -ne $((MY_NUM_FILES - 1)) ]] && MY_NEXT=${MY_FILELIST[$((MY_FILE + 1))]}
160+	MY_IMAGE_HTML_FILE="$MY_THUMBDIR/$MY_FILENAME.html"
161+	MY_EXIF_INFO=$($MY_EXIF_COMMAND "$MY_FILENAME")
162+	MY_FILESIZE=$(getFileSize "$MY_FILENAME")
163+	debugOutput "$MY_IMAGE_HTML_FILE"
164+	cat > "$MY_IMAGE_HTML_FILE" << EOF
165+<!DOCTYPE HTML>
166+<html lang="en">
167+<head>
168+<meta charset="utf-8">
169+<title>$MY_FILENAME</title>
170+<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
171+<meta name="robots" content="noindex, nofollow">
172+<link rel="stylesheet" href="$MY_CSS">
173+</head>
174+<body>
175+<header>
176+	<h1 class="title">$MY_TITLE</h1>
177+</header>
178+<main>
179+EOF
180+
181+	# Pager
182+	echo '<div class="navigation-btns">' >> "$MY_IMAGE_HTML_FILE"
183+	if [[ $MY_PREV ]]; then
184+		echo '<a href="'"$MY_PREV"'.html" accesskey="p" title="⌨️ PC: [Alt]+[Shift]+[P] / MAC: [Control]+[Option]+[P]" class="btn btn-secondary " role="button">&laquo; previous</a>' >> "$MY_IMAGE_HTML_FILE"
185+	else
186+		echo '<a href="#" class="btn btn-secondary  disabled" role="button" aria-disabled="true">&laquo; previous</a>' >> "$MY_IMAGE_HTML_FILE"
187+	fi
188+	cat >> "$MY_IMAGE_HTML_FILE" << EOF
189+</div>
190+<header>
191+	<h3 class="title">$MY_FILENAME</h3>
192+</header>
193+EOF
194+	if [[ $MY_NEXT ]]; then
195+		echo '<a href="'"$MY_NEXT"'.html" accesskey="n" title="⌨️ PC: [Alt]+[Shift]+[N] / MAC: [Control]+[Option]+[N]" class="btn btn-secondary ">Next &raquo;</a>' >> "$MY_IMAGE_HTML_FILE"
196+	else
197+		echo '<a href="#" class="btn btn-secondary  disabled" role="button" aria-disabled="true">Next &raquo;</a>' >> "$MY_IMAGE_HTML_FILE"
198+	fi
199+	echo '</div></div>' >> "$MY_IMAGE_HTML_FILE"
200+
201+	cat >> "$MY_IMAGE_HTML_FILE" << EOF
202+<div class="row">
203+	<div class="col">
204+		<p><img src="$MY_HEIGHT_LARGE/$MY_FILENAME" class="img-fluid" alt="image: $MY_FILENAME"></p>
205+	</div>
206+</div>
207+<p><a class="btn btn-primary" href="../$MY_FILENAME">download original ($MY_FILESIZE)</a></p>
208+EOF
209+
210+	# EXIF
211+	if [[ $MY_EXIF_INFO ]]; then
212+		cat >> "$MY_IMAGE_HTML_FILE" << EOF
213+<div class="row">
214+<pre class="exif-info">
215+$MY_EXIF_INFO
216+</pre>
217+EOF
218+	fi
219+
220+	# Footer
221+	cat >> "$MY_IMAGE_HTML_FILE" << EOF
222+</main> <!-- // main container -->
223+<br>
224+<footer class="footer-gallery">
225+	<span>$MY_FOOTER - $MY_DATETIME</span>
226+</footer>
227+</body>
228+</html>
229+EOF
230+	(( MY_FILE++ ))
231+done
232+
233+fi
234+# 
235+# ### Movies (MOV or MP4)
236+# if [[ $(find . -maxdepth 1 -type f -iname \*.mov  -o -iname '*.mp4' | wc -l) -gt 0 ]]; then
237+# 	cat >> "$MY_INDEX_HTML_FILE" << EOF
238+# 	<div class="row">
239+# 		<div class="col">
240+# 			<div class="page-header"><h2>Movies</h2></div>
241+# 		</div>
242+# 	</div>
243+# 	<div class="row">
244+# 	<div class="col">
245+# EOF
246+# 	if [[ $(find . -maxdepth 1 -type f -iname \*.mov | wc -l) -gt 0 ]]; then
247+# 	for MY_FILENAME in *.[mM][oO][vV]; do
248+# 		MY_FILESIZE=$(getFileSize "$MY_FILENAME")
249+# 		cat >> "$MY_INDEX_HTML_FILE" << EOF
250+# <a href="$MY_FILENAME" class="btn btn-primary" role="button">$MY_FILENAME ($MY_FILESIZE)</a>
251+# EOF
252+# 	done
253+# 	fi
254+# 	if [[ $(find . -maxdepth 1 -type f -iname \*.mp4 | wc -l) -gt 0 ]]; then
255+# 	for MY_FILENAME in *.[mM][pP]4; do
256+# 		MY_FILESIZE=$(getFileSize "$MY_FILENAME")
257+# 		cat >> "$MY_INDEX_HTML_FILE" << EOF
258+# <a href="$MY_FILENAME" class="btn btn-primary" role="button">$MY_FILENAME ($MY_FILESIZE)</a>
259+# EOF
260+# 	done
261+# 	fi
262+# 	echo '</div></div>' >> "$MY_INDEX_HTML_FILE"
263+# fi
264+# 
265+# ### Downloads (ZIP)
266+# if [[ $(find . -maxdepth 1 -type f -iname \*.zip | wc -l) -gt 0 ]]; then
267+# 	cat >> "$MY_INDEX_HTML_FILE" << EOF
268+# 	<div class="row">
269+# 		<div class="col">
270+# 			<div class="page-header"><h2>Downloads</h2></div>
271+# 		</div>
272+# 	</div>
273+# 	<div class="row">
274+# 	<div class="col">
275+# EOF
276+# 	for MY_FILENAME in *.[zZ][iI][pP]; do
277+# 		MY_FILESIZE=$(getFileSize "$MY_FILENAME")
278+# 		cat >> "$MY_INDEX_HTML_FILE" << EOF
279+# <a href="$MY_FILENAME" class="btn btn-primary" role="button">$MY_FILENAME ($MY_FILESIZE)</a>
280+# EOF
281+# 	done
282+# 	echo '</div></div>' >> "$MY_INDEX_HTML_FILE"
283+# fi
284+# 
285+# ### Footer
286+# cat >> "$MY_INDEX_HTML_FILE" << EOF
287+# </main> <!-- // main container -->
288+# <br>
289+# <footer class="footer mt-auto py-3 bg-light">
290+# 	<div class="container">
291+# 		<span class="text-muted">$MY_FOOTER - $MY_DATETIME</span>
292+# 	</div>
293+# </footer>
294+# </body>
295+# </html>
296+# EOF
297+
298+debugOutput "= done"
A scripts/Scripts/md2html.html
+87, -0
 1@@ -0,0 +1,87 @@
 2+<!DOCTYPE html>
 3+<html lang="en">
 4+<head>
 5+  <meta charset="utf-8" />
 6+  <meta name="generator" content="pandoc" />
 7+  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
 8+$for(author-meta)$
 9+  <meta name="author" content="$author-meta$" />
10+$endfor$
11+$if(date-meta)$
12+  <meta name="dcterms.date" content="$date-meta$" />
13+$endif$
14+$if(keywords)$
15+  <meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" />
16+$endif$
17+$if(description-meta)$
18+  <meta name="description" content="$description-meta$" />
19+$endif$
20+  <title>$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$</title>
21+  
22+  <link rel="stylesheet" href="https://unpkg.com/@catppuccin/highlightjs@1.0.1/css/catppuccin-frappe.css">
23+  
24+  <link rel="stylesheet" href="../md2html.css">
25+  
26+  <script src="https://unpkg.com/@highlightjs/cdn-assets@11.9.0/highlight.min.js"></script>
27+  
28+  <script>
29+  document.getElementById("sourceCode").classList.add("language ");
30+  </script>
31+  
32+$for(header-includes)$
33+  $header-includes$
34+$endfor$
35+$if(math)$
36+  $math$
37+$endif$
38+</head>
39+<body>
40+<script>hljs.highlightAll();</script>
41+$for(include-before)$
42+$include-before$
43+$endfor$
44+$if(title)$
45+<header id="title-block-header">
46+<h1 class="title">$title$</h1>
47+$if(subtitle)$
48+<p class="subtitle">$subtitle$</p>
49+$endif$
50+<p>
51+$if(date)$
52+published <span class="date">$date$</span>
53+$endif$
54+</p>
55+<p>
56+$if(lastmodified)$
57+last edited <span class="date">$lastmodified$</span>
58+$endif$
59+</p>
60+<p>
61+$for(author)$
62+by <a href="https://girlonthemoon.xyz/"><span class="author">$author$</span></a>
63+$endfor$
64+</p>
65+$if(abstract)$
66+<div class="abstract">
67+<div class="abstract-title">$abstract-title$</div>
68+$abstract$
69+</div>
70+$endif$
71+</header>
72+$endif$
73+$if(toc)$
74+<nav id="$idprefix$TOC" role="doc-toc">
75+$if(toc-title)$
76+<h2 id="$idprefix$toc-title">$toc-title$</h2>
77+$endif$
78+$table-of-contents$
79+</nav>
80+$endif$
81+<article>
82+$body$
83+$for(include-after)$
84+$include-after$
85+$endfor$
86+</article>
87+</body>
88+</html>