Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
kRHYME7 committed Nov 28, 2024
1 parent f67f353 commit 2fec0ab
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 54 deletions.
56 changes: 2 additions & 54 deletions Configs/.local/lib/hyde/swwwallbash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ fi
[ -n "$HYPRLAND_INSTANCE_SIGNATURE" ] && hyprctl keyword misc:disable_autoreload 1 -q && trap 'print_log -sec "[wallbash]" -stat "reload" "Hyprland" && hyprctl reload -q' EXIT

# Print to terminal the colors
[ -t 1 ] && wallbash.print.colors.sh
[ -t 1 ] && "${scrDir}}/wallbash.print.colors.sh"

#// switch theme <//> wall based colors

Expand Down Expand Up @@ -353,59 +353,7 @@ find "${walbashDirs[@]}" -type f -path "*/always*" -name "*.dcol" 2>/dev/null |

#? Post deployment

# Validate the theme configuration file
cat <<WALLBASH >"${confDir}/hypr/themes/wallbash.conf"
# Auto-generated by HyDE // Read-only
# // ----------------------------
# HyDE Theme: ${hydeTheme}
# Configuration File: "${hydeThemeDir}/hypr.theme"
# Wallbash Mode : $(sed -e 's/^0$/theme/' -e 's/^1$/auto/' -e 's/^2$/dark/' -e 's/^3$/light/' <<<"${enableWallDcol}")
# // ----------------------------
\$HYDE_THEME=${hydeTheme}
\$GTK_THEME=$(get_hyprConf 'GTK_THEME')
\$ICON_THEME=$(get_hyprConf 'ICON_THEME')
\$COLOR-SCHEME=$(get_hyprConf 'COLOR_SCHEME')
\$CURSOR_THEME=$(get_hyprConf 'CURSOR_THEME')
\$CURSOR_SIZE=$(get_hyprConf 'CURSOR_SIZE')
\$FONT=$(get_hyprConf 'FONT')
\$FONT_SIZE=$(get_hyprConf 'FONT_SIZE')
\$DOCUMENT_FONT=$(get_hyprConf 'DOCUMENT_FONT')
\$DOCUMENT_FONT_SIZE=$(get_hyprConf 'DOCUMENT_FONT_SIZE')
\$MONOSPACE_FONT=$(get_hyprConf 'MONOSPACE_FONT')
\$MONOSPACE_FONT_SIZE=$(get_hyprConf 'MONOSPACE_FONT_SIZE')
\$CODE_THEME=$(get_hyprConf 'CODE_THEME')
\$SDDM_THEME=$(get_hyprConf 'SDDM_THEME')
# // ----------------------------
# README:
# Values above are derived and sanitized from the Configuration File,
# This is to ensure themes won't have any 'exec' or 'source'
# commands that could potentially harm the system
# or undesired behavior.
#
# Dear Theme Owner:
# You can still add your own custom 'exec' or 'source' commands
# by adding it as variable, examples (you can name the variable anything):
# Note that you should indicate it in your README.md
#
#
# -- ⌨️ theme.conf --
# \$RUN_CMD="some_command"
# \$SOURCE_FILE="/some/files"
#
#
# -- ⌨️ hyprland.conf --
# exec = \${RUN_CMD}"
# source = \${SOURCE_FILE}
# exec = Hyde code theme \$CODE_THEME # Setting the code theme
# // ----------------------------
WALLBASH
"${scrDir}/wallbash.hypr.sh"

#// cleanup
# Define an array of patterns to remove
Expand Down
60 changes: 60 additions & 0 deletions Configs/.local/lib/hyde/wallbash.hypr.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/bin/env bash

scrDir="$(dirname "$(realpath "$0")")"
export scrDir
# shellcheck disable=SC1091
source "${scrDir}/globalcontrol.sh"

# Validate the theme configuration file
cat <<WALLBASH >"${confDir}/hypr/themes/wallbash.conf"
# Auto-generated by HyDE // Read-only
# // ----------------------------
# HyDE Theme: ${hydeTheme}
# Configuration File: "${hydeThemeDir}/hypr.theme"
# Wallbash Mode : $(sed -e 's/^0$/theme/' -e 's/^1$/auto/' -e 's/^2$/dark/' -e 's/^3$/light/' <<<"${enableWallDcol}")
# // ----------------------------
\$HYDE_THEME=${hydeTheme}
\$GTK_THEME=$(get_hyprConf 'GTK_THEME')
\$ICON_THEME=$(get_hyprConf 'ICON_THEME')
\$COLOR-SCHEME=$(get_hyprConf 'COLOR_SCHEME')
\$CURSOR_THEME=$(get_hyprConf 'CURSOR_THEME')
\$CURSOR_SIZE=$(get_hyprConf 'CURSOR_SIZE')
\$FONT=$(get_hyprConf 'FONT')
\$FONT_SIZE=$(get_hyprConf 'FONT_SIZE')
\$DOCUMENT_FONT=$(get_hyprConf 'DOCUMENT_FONT')
\$DOCUMENT_FONT_SIZE=$(get_hyprConf 'DOCUMENT_FONT_SIZE')
\$MONOSPACE_FONT=$(get_hyprConf 'MONOSPACE_FONT')
\$MONOSPACE_FONT_SIZE=$(get_hyprConf 'MONOSPACE_FONT_SIZE')
\$CODE_THEME=$(get_hyprConf 'CODE_THEME')
\$SDDM_THEME=$(get_hyprConf 'SDDM_THEME')
# // ----------------------------
# README:
# Values above are derived and sanitized from the Configuration File,
# This is to ensure themes won't have any 'exec' or 'source'
# commands that could potentially harm the system
# or undesired behavior.
#
# Dear Theme Owner:
# You can still add your own custom 'exec' or 'source' commands
# by adding it as variable, examples (you can name the variable anything):
# Note that you should indicate it in your README.md
#
#
# -- ⌨️ theme.conf --
# \$RUN_CMD="some_command"
# \$SOURCE_FILE="/some/files"
#
#
# -- ⌨️ hyprland.conf --
# exec = \${RUN_CMD}"
# source = \${SOURCE_FILE}
# exec = Hyde code theme \$CODE_THEME # Setting the code theme
# // ----------------------------
WALLBASH

0 comments on commit 2fec0ab

Please sign in to comment.