diff options
| author | JaKooLit <jimmielovejay@gmail.com> | 2023-11-28 01:38:38 +0900 |
|---|---|---|
| committer | JaKooLit <jimmielovejay@gmail.com> | 2023-11-28 01:38:38 +0900 |
| commit | 6adf09409e23931689be999c91a2cdeb96c571f6 (patch) | |
| tree | d5a1dc1f6343df1a029e1f6c4068b85590f7ed81 /config/hypr/scripts | |
| parent | abdc29f5f38edb33443c1173924df94986032e46 (diff) | |
updates
Diffstat (limited to 'config/hypr/scripts')
| -rwxr-xr-x | config/hypr/scripts/DarkLight.sh | 11 | ||||
| -rwxr-xr-x | config/hypr/scripts/PywalDunst.sh | 23 | ||||
| -rwxr-xr-x | config/hypr/scripts/Refresh.sh | 6 |
3 files changed, 37 insertions, 3 deletions
diff --git a/config/hypr/scripts/DarkLight.sh b/config/hypr/scripts/DarkLight.sh index 7d371a14..fc75bf74 100755 --- a/config/hypr/scripts/DarkLight.sh +++ b/config/hypr/scripts/DarkLight.sh @@ -11,6 +11,8 @@ dunst_notif="$HOME/.config/dunst/images/bell.png" 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" dark_gtk_theme="Tokyonight-Dark-B" @@ -42,7 +44,14 @@ path_param=$(echo $next_mode | sed 's/.*/\u&/') notify_user "$next_mode" -ln -sf "${dunst_config}/styles/dunstrc-${next_mode}" "${dunst_config}/dunstrc" +# Change background for dunst +if [ "$next_mode" = "dark" ]; then + sed -i '/background = /s/.*/ background = "#00000080"/' "${dunst_config}/dunstrc" + sed -i '/foreground = /s/.*/ foreground = "#FFFFFF90"/' "${dunst_config}/dunstrc" +else + sed -i '/background = /s/.*/ background = "#FFFFFF80"/' "${dunst_config}/dunstrc" + sed -i '/foreground = /s/.*/ foreground = "#00000090"/' "${dunst_config}/dunstrc" +fi # Symlink for rofi theme if [ "$next_mode" = "dark" ]; then diff --git a/config/hypr/scripts/PywalDunst.sh b/config/hypr/scripts/PywalDunst.sh new file mode 100755 index 00000000..2a66aec6 --- /dev/null +++ b/config/hypr/scripts/PywalDunst.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +# -lf/nf/cf color +# Defines the foreground color for low, normal and critical notifications respectively. +# +# -lb/nb/cb color +# Defines the background color for low, normal and critical notifications respectively. +# +# -lfr/nfr/cfr color +# Defines the frame color for low, normal and critical notifications respectively. + +[ -f "$HOME/.cache/wal/colors.sh" ] && . "$HOME/.cache/wal/colors.sh" + +pidof dunst && pkill dunst + +DUNST_FILE=~/.config/dunst/dunstrc + +# update dunst based on pywal colors. +#sed -i '/background = /s/.*/ background = "$color0"/' $DUNST_FILE +#sed -i '/foreground = /s/.*/ foreground = "'$color7'"/' $DUNST_FILE +sed -i '/frame_color = /s/.*/ frame_color = "'$color2'"/' $DUNST_FILE + +dunst -config ~/.config/dunst/dunstrc > /dev/null 2>&1 &
\ No newline at end of file diff --git a/config/hypr/scripts/Refresh.sh b/config/hypr/scripts/Refresh.sh index 460f11f0..b5e705d3 100755 --- a/config/hypr/scripts/Refresh.sh +++ b/config/hypr/scripts/Refresh.sh @@ -3,7 +3,7 @@ SCRIPTSDIR=$HOME/.config/hypr/scripts # Kill already running processes -_ps=(waybar dunst rofi) +_ps=(waybar rofi) for _prs in "${_ps[@]}"; do if pidof "${_prs}" >/dev/null; then pkill "${_prs}" @@ -12,7 +12,9 @@ done # Relaunch waybar waybar & -dunst & + +# Relaunch dunst with pywal-borders +${SCRIPTSDIR}/PywalDunst.sh ## trying to figure out how to restart Rainbow borders #sleep 1 |
