aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts
diff options
context:
space:
mode:
authorJaKooLit <jimmielovejay@gmail.com>2024-05-10 02:03:31 +0900
committerJaKooLit <jimmielovejay@gmail.com>2024-05-10 02:03:31 +0900
commitd7ff1c1dea16619a38f35536a5c00685d848abce (patch)
treef5c9ea6aeca1fb713d31a1d2d3069c5b9830ddc0 /config/hypr/scripts
parenta3994cc8edd41fa42dfe1a6f22754dcdcc3d1e51 (diff)
Initial Push - Moving to Wallust from Pywal
Diffstat (limited to 'config/hypr/scripts')
-rwxr-xr-xconfig/hypr/scripts/DarkLight.sh31
-rwxr-xr-xconfig/hypr/scripts/GameMode.sh2
-rwxr-xr-xconfig/hypr/scripts/Refresh.sh4
-rwxr-xr-xconfig/hypr/scripts/RefreshNoWaybar.sh8
-rwxr-xr-xconfig/hypr/scripts/WallustSwww.sh (renamed from config/hypr/scripts/PywalSwww.sh)11
5 files changed, 35 insertions, 21 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
diff --git a/config/hypr/scripts/GameMode.sh b/config/hypr/scripts/GameMode.sh
index 37afe066..5ad268ca 100755
--- a/config/hypr/scripts/GameMode.sh
+++ b/config/hypr/scripts/GameMode.sh
@@ -22,7 +22,7 @@ if [ "$HYPRGAMEMODE" = 1 ] ; then
else
swww-daemon && swww img "$HOME/.config/rofi/.current_wallpaper" &
sleep 0.1
- ${SCRIPTSDIR}/PywalSwww.sh
+ ${SCRIPTSDIR}/WallustSwww.sh
sleep 0.5
${SCRIPTSDIR}/Refresh.sh
notify-send -e -u normal -i "$notif" "gamemode disabled. All animations normal"
diff --git a/config/hypr/scripts/Refresh.sh b/config/hypr/scripts/Refresh.sh
index aeae77d1..42e70896 100755
--- a/config/hypr/scripts/Refresh.sh
+++ b/config/hypr/scripts/Refresh.sh
@@ -1,6 +1,6 @@
#!/bin/bash
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
-# Scripts for refreshing ags waybar, rofi, swaync, pywal colors
+# Scripts for refreshing ags waybar, rofi, swaync, wallust
SCRIPTSDIR=$HOME/.config/hypr/scripts
UserScripts=$HOME/.config/hypr/UserScripts
@@ -42,7 +42,5 @@ if file_exists "${UserScripts}/RainbowBorders.sh"; then
${UserScripts}/RainbowBorders.sh &
fi
-# for cava-pywal (note, need to manually restart cava once wallpaper changes)
-ln -sf "$HOME/.cache/wal/cava-colors" "$HOME/.config/cava/config" || true
exit 0 \ No newline at end of file
diff --git a/config/hypr/scripts/RefreshNoWaybar.sh b/config/hypr/scripts/RefreshNoWaybar.sh
index 42d67adc..70a4aeb3 100755
--- a/config/hypr/scripts/RefreshNoWaybar.sh
+++ b/config/hypr/scripts/RefreshNoWaybar.sh
@@ -3,7 +3,7 @@
# Modified version of Refresh but no waybar refresh
# Used by automatic wallpaper change
-# Modified inorder to refresh rofi background, Pywal, SwayNC
+# Modified inorder to refresh rofi background, Wallust, SwayNC
SCRIPTSDIR=$HOME/.config/hypr/scripts
UserScripts=$HOME/.config/hypr/UserScripts
@@ -28,8 +28,8 @@ done
# quit ags
ags -q
-# Pywal refresh
-${SCRIPTSDIR}/PywalSwww.sh &
+# Wallust refresh
+${SCRIPTSDIR}/WallustSwww.sh &
# Relaunching rainbow borders if the script exists
sleep 1
@@ -37,7 +37,5 @@ if file_exists "${UserScripts}/RainbowBorders.sh"; then
${UserScripts}/RainbowBorders.sh &
fi
-# for cava-pywal (note, need to manually restart cava once wallpaper changes)
-ln -sf "$HOME/.cache/wal/cava-colors" "$HOME/.config/cava/config" || true
exit 0 \ No newline at end of file
diff --git a/config/hypr/scripts/PywalSwww.sh b/config/hypr/scripts/WallustSwww.sh
index 9f7b15b5..2a711028 100755
--- a/config/hypr/scripts/PywalSwww.sh
+++ b/config/hypr/scripts/WallustSwww.sh
@@ -1,6 +1,6 @@
#!/bin/bash
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
-# Pywal Colors for current wallpaper
+# Wallust Colors for current wallpaper
# Define the path to the swww cache directory
cache_dir="$HOME/.cache/swww/"
@@ -30,9 +30,8 @@ fi
# Check the flag before executing further commands
if [ "$ln_success" = true ]; then
- # execute pywal
- # wal -i "$wallpaper_path"
- echo 'about to execute wal'
- # execute pywal skipping tty and terminal changes
- wal -i "$wallpaper_path" -s -t -n -e &
+ # execute wallust
+ echo 'about to execute wallust'
+ # execute wallust skipping tty and terminal changes
+ wallust run "$wallpaper_path" -s &
fi
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage