aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorBardofSprites <bard>2025-10-04 15:09:35 -0400
committerBardofSprites <bard>2025-10-04 15:09:35 -0400
commita2014ed3d7fd1b3f53e4330e57338d42d7d9fe59 (patch)
tree2cafe67fda26852ea7a1fbca47e53b70d66ea196 /bin
parentbfb04fb18f66f4dcf6f4d84c96b6889f8bfa4ab5 (diff)
modernized i3
Diffstat (limited to 'bin')
-rwxr-xr-xbin/.local/bin/scripts/generic-theme-switch66
-rwxr-xr-xbin/.local/bin/scripts/image-editing/center-image-bg8
2 files changed, 74 insertions, 0 deletions
diff --git a/bin/.local/bin/scripts/generic-theme-switch b/bin/.local/bin/scripts/generic-theme-switch
new file mode 100755
index 0000000..9374153
--- /dev/null
+++ b/bin/.local/bin/scripts/generic-theme-switch
@@ -0,0 +1,66 @@
+#!/usr/bin/env bash
+
+WALLPAPER_DIR="$HOME/Pictures/wallpaper/Landscape"
+IMAGE="vertical-your-name-cafe.jpg"
+
+if [[ ! -e "$WALLPAPER_DIR/$IMAGE" ]]; then
+ echo $WALLPAPER_DIR/$IMAGE
+ echo "Wallpaper file doesn't exist"
+ exit 1
+fi
+
+
+themes=("Gruber Darker"
+ "Modus Vivendi"
+ "Modus Operandi Tinted")
+
+if [ $# -eq 0 ]; then
+ selected_theme=$(printf "%s\n" "${themes[@]}" | dmenu -i -p "Select a theme:")
+else
+ selected_theme=$1
+fi
+
+# Exit if no theme is selected
+if [ -z "$selected_theme" ]; then
+ exit 1
+fi
+
+apply_emacs_theme() {
+ emacsclient -e "(bard/select-theme '$1)"
+}
+
+apply_generic_theme() {
+ case $selected_theme in
+ "Gruber Darker")
+ BG_COLOR="#181818"
+ FG_COLOR="#e4e4e4"
+ IMAGE_BG="#282828"
+ apply_emacs_theme "gruber-darker"
+ xrdb -merge ~/.Xresources.d/Xresources.gruber
+ ;;
+ "Modus Vivendi" | "dark")
+ BG_COLOR="#000000"
+ FG_COLOR="#ffffff"
+ IMAGE_BG="#535353"
+ apply_emacs_theme "modus-vivendi"
+ xrdb -merge ~/.Xresources.d/Xresources.vivendi
+ ;;
+ "Modus Operandi Tinted" | "light")
+ BG_COLOR="#fbf7f0"
+ FG_COLOR="#000000"
+ IMAGE_BG="#efe9dd"
+ apply_emacs_theme "modus-operandi-tinted"
+ xrdb -merge ~/.Xresources.d/Xresources.operandi-tinted
+ ;;
+
+ esac
+}
+
+create_set_wallpaper () {
+ magick $WALLPAPER_DIR/$IMAGE -gravity center -resize x900 -background $IMAGE_BG -extent 1920x1080 $HOME/.cache/$IMAGE-edit.png
+ feh --no-fehbg --bg-fill "$HOME/.cache/$IMAGE-edit.png"
+ echo "feh --no-fehbg --bg-fill '$HOME/.cache/$IMAGE-edit.png'" >> ~/.cache/wallpaper
+}
+
+apply_generic_theme
+create_set_wallpaper
diff --git a/bin/.local/bin/scripts/image-editing/center-image-bg b/bin/.local/bin/scripts/image-editing/center-image-bg
new file mode 100755
index 0000000..3d379c0
--- /dev/null
+++ b/bin/.local/bin/scripts/image-editing/center-image-bg
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+
+if [ -z "$1" ]; then
+ echo "Required input (image file) not found. Try again."
+ exit 1
+fi
+
+magick $1 -gravity center -background "#282828" -extent 1920x1080 $1-edit.png