From 2fec0ab6cd3287327609383c194b80a6ac47da0f Mon Sep 17 00:00:00 2001 From: kRHYME7 Date: Thu, 28 Nov 2024 23:09:05 +0800 Subject: [PATCH] clean up --- Configs/.local/lib/hyde/swwwallbash.sh | 56 +--------------------- Configs/.local/lib/hyde/wallbash.hypr.sh | 60 ++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 54 deletions(-) create mode 100755 Configs/.local/lib/hyde/wallbash.hypr.sh diff --git a/Configs/.local/lib/hyde/swwwallbash.sh b/Configs/.local/lib/hyde/swwwallbash.sh index ba25038..4e7f603 100755 --- a/Configs/.local/lib/hyde/swwwallbash.sh +++ b/Configs/.local/lib/hyde/swwwallbash.sh @@ -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 @@ -353,59 +353,7 @@ find "${walbashDirs[@]}" -type f -path "*/always*" -name "*.dcol" 2>/dev/null | #? Post deployment -# Validate the theme configuration file -cat <"${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 diff --git a/Configs/.local/lib/hyde/wallbash.hypr.sh b/Configs/.local/lib/hyde/wallbash.hypr.sh new file mode 100755 index 0000000..afc46a8 --- /dev/null +++ b/Configs/.local/lib/hyde/wallbash.hypr.sh @@ -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 <"${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 \ No newline at end of file