aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts/DarkLight.sh
diff options
context:
space:
mode:
authorJa.KooLit <jimmielovejay@gmail.com>2024-05-13 02:36:43 +0900
committerGitHub <noreply@github.com>2024-05-13 02:36:43 +0900
commit683e801de6ee2fe01513311e2bc13f695cd96486 (patch)
tree64df94cb64f5ba161761bfd64ae93658ca163f9c /config/hypr/scripts/DarkLight.sh
parent35327b2814b228253464f0358f58c553ec98002b (diff)
parentea93a71cf6ac92041f00168e040cdc22882047b7 (diff)
Merge branch 'development' into main
Diffstat (limited to 'config/hypr/scripts/DarkLight.sh')
-rwxr-xr-xconfig/hypr/scripts/DarkLight.sh28
1 files changed, 21 insertions, 7 deletions
diff --git a/config/hypr/scripts/DarkLight.sh b/config/hypr/scripts/DarkLight.sh
index f9d2a933..e6f212f6 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,13 @@ notify_user() {
notify-send -u low -i "$notif" "Switching to $1 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
+
# Function to set Waybar style
set_waybar_style() {
theme="$1"
@@ -108,17 +119,19 @@ else
qt6ct_color_scheme="$HOME/.config/qt6ct/colors/Catppuccin-Latte.conf"
fi
-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"
+kvantummanager --set "$kvantum_theme"
-# 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,10 +214,11 @@ update_theme_mode
sleep 0.5
# Run remaining scripts
-${SCRIPTSDIR}/PywalSwww.sh
+${SCRIPTSDIR}/WallustSwww.sh
sleep 1
${SCRIPTSDIR}/Refresh.sh
+sleep 0.3
# Display notifications for theme and icon changes
notify-send -u normal -i "$notif" "Themes in $next_mode Mode"
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage