diff options
| author | JaKooLit <jimmielovejay@gmail.com> | 2024-05-10 02:03:31 +0900 |
|---|---|---|
| committer | JaKooLit <jimmielovejay@gmail.com> | 2024-05-10 02:03:31 +0900 |
| commit | d7ff1c1dea16619a38f35536a5c00685d848abce (patch) | |
| tree | f5c9ea6aeca1fb713d31a1d2d3069c5b9830ddc0 /config/hypr/scripts/DarkLight.sh | |
| parent | a3994cc8edd41fa42dfe1a6f22754dcdcc3d1e51 (diff) | |
Initial Push - Moving to Wallust from Pywal
Diffstat (limited to 'config/hypr/scripts/DarkLight.sh')
| -rwxr-xr-x | config/hypr/scripts/DarkLight.sh | 31 |
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 |
