aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts/DarkLight.sh
diff options
context:
space:
mode:
Diffstat (limited to 'config/hypr/scripts/DarkLight.sh')
-rwxr-xr-xconfig/hypr/scripts/DarkLight.sh31
1 files changed, 25 insertions, 6 deletions
diff --git a/config/hypr/scripts/DarkLight.sh b/config/hypr/scripts/DarkLight.sh
index f9d2a933..60f75d42 100755
--- a/config/hypr/scripts/DarkLight.sh
+++ b/config/hypr/scripts/DarkLight.sh
@@ -12,9 +12,13 @@ swaync_style="$HOME/.config/swaync/style.css"
ags_style="$HOME/.config/ags/user/style.css"
SCRIPTSDIR="$HOME/.config/hypr/scripts"
notif="$HOME/.config/swaync/images/bell.png"
-dark_rofi_pywal="$HOME/.cache/wal/colors-rofi-dark.rasi"
-light_rofi_pywal="$HOME/.cache/wal/colors-rofi-light.rasi"
+wallust_rofi="$HOME/.config/wallust/templates/colors-rofi.rasi"
+wallust_config="$HOME/.config/wallust/wallust.toml"
+pallete_dark="dark16"
+pallete_light="light16"
+
+# kill swaybg if running
pkill swaybg
# Initialize swww if needed
@@ -45,6 +49,19 @@ notify_user() {
notify-send -u low -i "$notif" "Switching to $1 mode"
}
+# Print a message indicating the mode change
+echo "Changing palette mode to $next_mode..."
+
+# Use sed to replace the palette setting in the wallust config file
+if [ "$next_mode" = "Dark" ]; then
+ sed -i 's/^palette = .*/palette = "'"$pallete_dark"'"/' "$wallust_config"
+else
+ sed -i 's/^palette = .*/palette = "'"$pallete_light"'"/' "$wallust_config"
+fi
+
+
+# Print a message indicating the completion of the operation
+echo "Palette mode updated."
# Function to set Waybar style
set_waybar_style() {
theme="$1"
@@ -112,13 +129,15 @@ kvantummanager --set "$kvantum_theme"
sed -i "s|^color_scheme_path=.*$|color_scheme_path=$qt5ct_color_scheme|" "$HOME/.config/qt5ct/qt5ct.conf"
sed -i "s|^color_scheme_path=.*$|color_scheme_path=$qt6ct_color_scheme|" "$HOME/.config/qt6ct/qt6ct.conf"
-# Set Rofi Themes
+
+# set the rofi color for background
if [ "$next_mode" = "Dark" ]; then
- ln -sf "$dark_rofi_pywal" "$HOME/.config/rofi/pywal-color/pywal-theme.rasi"
+ sed -i '24s/.*/background: rgba(0,0,0,0.7);/' $wallust_rofi
else
- ln -sf "$light_rofi_pywal" "$HOME/.config/rofi/pywal-color/pywal-theme.rasi"
+ sed -i '24s/.*/background: rgba(255,255,255,0.9);/' $wallust_rofi
fi
+
# GTK themes and icons switching
set_custom_gtk_theme() {
mode=$1
@@ -201,7 +220,7 @@ update_theme_mode
sleep 0.5
# Run remaining scripts
-${SCRIPTSDIR}/PywalSwww.sh
+${SCRIPTSDIR}/WallustSwww.sh
sleep 1
${SCRIPTSDIR}/Refresh.sh
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage