aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts/DarkLight.sh
diff options
context:
space:
mode:
authorJa.KooLit <jimmielovejay@gmail.com>2023-11-07 13:49:12 +0900
committerGitHub <noreply@github.com>2023-11-07 13:49:12 +0900
commitfd4c2c3f7566b46eb22c693ea97f25baadf292e2 (patch)
tree13f6698c9430bf4ea3ad9ba8d33e09f7f9c7512c /config/hypr/scripts/DarkLight.sh
parent3fa5c6a5973d0cec5801f5b46da87e8ff2b7ee90 (diff)
parent56f61f9d90095eb5464bd6f38f606e03f8fd9c33 (diff)
Merge pull request #10 from JaKooLit/Beta-v0.4
Hyprland-Dots V2
Diffstat (limited to 'config/hypr/scripts/DarkLight.sh')
-rwxr-xr-xconfig/hypr/scripts/DarkLight.sh26
1 files changed, 18 insertions, 8 deletions
diff --git a/config/hypr/scripts/DarkLight.sh b/config/hypr/scripts/DarkLight.sh
index 86c1f111..f20dc337 100755
--- a/config/hypr/scripts/DarkLight.sh
+++ b/config/hypr/scripts/DarkLight.sh
@@ -5,7 +5,10 @@ wallpaper_path="$HOME/Pictures/wallpapers/Dynamic-Wallpapers"
hypr_config_path="$HOME/.config/hypr"
waybar_config="$HOME/.config/waybar"
dunst_config="$HOME/.config/dunst"
-wofi_config="$HOME/.config/wofi"
+
+dark_rofi_pywal="$HOME/.cache/wal/colors-rofi-dark.rasi"
+light_rofi_pywal="$HOME/.cache/wal/colors-rofi-light.rasi"
+
# Tokyo Night
light_gtk_theme="Tokyonight-Light-B"
@@ -28,7 +31,7 @@ notify_user() {
}
# Determine the current wallpaper mode by checking a configuration file
-if [ "$(cat ~/.wallpaper_mode)" = "light" ]; then
+if [ "$(cat ~/.cache/.wallpaper_mode)" = "light" ]; then
current_mode="light"
next_mode="dark"
else
@@ -38,9 +41,15 @@ fi
path_param=$(echo $next_mode | sed 's/.*/\u&/')
notify_user "$next_mode"
-ln -sf "${waybar_config}/style/style-${next_mode}.css" "${waybar_config}/style.css"
-ln -sf "${dunst_config}/styles/dunstrc-${next_mode}" "${dunst_config}/dunstrc"
-ln -sf "${wofi_config}/styles/style-${next_mode}.css" "${wofi_config}/style.css"
+ln -sf "${waybar_config}/style/style-pywal.css" "${waybar_config}/style.css"
+ln -sf "${dunst_config}/styles/dunstrc-${next_mode}" "${dunst_config}/styles/dunstrc"
+
+# Symlink for rofi theme
+if [ "$next_mode" = "dark" ]; then
+ ln -sf $dark_rofi_pywal "$HOME/.config/rofi/pywal-color/pywal-theme.rasi"
+else
+ ln -sf $light_rofi_pywal "$HOME/.config/rofi/pywal-color/pywal-theme.rasi"
+fi
gtk_theme="${next_mode}_gtk_theme"
icon_theme="${next_mode}_icon_theme"
@@ -49,7 +58,7 @@ gsettings set org.gnome.desktop.interface gtk-theme "${!gtk_theme}"
gsettings set org.gnome.desktop.interface icon-theme "${!icon_theme}"
# Find the next wallpaper if one exists
-current_wallpaper="$(cat ~/.current_wallpaper)"
+current_wallpaper="$(cat ~/.cache/.current_wallpaper)"
next_wallpaper="${current_wallpaper/_"$current_mode"/_"$next_mode"}"
if ! [ -f "$next_wallpaper" ]; then
@@ -59,8 +68,9 @@ fi
$swww "${next_wallpaper}" $effect
# Update the configuration file to reflect the new wallpaper mode and current wallpaper
-echo "$next_mode" > ~/.wallpaper_mode
-echo "$next_wallpaper" > ~/.current_wallpaper
+echo "$next_mode" > ~/.cache/.wallpaper_mode
+echo "$next_wallpaper" > ~/.cache/.current_wallpaper
+exec ~/.config/hypr/scripts/PywalSwww.sh &
sleep 2
exec ~/.config/hypr/scripts/Refresh.sh & \ No newline at end of file
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage