diff options
| author | JaKooLit <jimmielovejay@gmail.com> | 2023-11-27 15:37:18 +0900 |
|---|---|---|
| committer | JaKooLit <jimmielovejay@gmail.com> | 2023-11-27 15:37:18 +0900 |
| commit | bfb3594b4a32edc4dfb9de609f4cdb763bafa8f8 (patch) | |
| tree | 635c6fa472d1b47312f17666f7587e5026ba7996 /config/hypr/scripts | |
| parent | 8eeed24b9579cf4cc76cc67dc4b5c73b2ef34573 (diff) | |
REVERTED BACK TO OLD DUNST STYLE AS PYWAL_DUNST LOOKS like crap
Diffstat (limited to 'config/hypr/scripts')
| -rwxr-xr-x | config/hypr/scripts/AirplaneMode.sh | 4 | ||||
| -rwxr-xr-x | config/hypr/scripts/BrightnessKbd.sh | 2 | ||||
| -rwxr-xr-x | config/hypr/scripts/DarkLight.sh | 9 | ||||
| -rwxr-xr-x | config/hypr/scripts/PywalDunst.sh | 24 | ||||
| -rwxr-xr-x | config/hypr/scripts/Refresh.sh | 3 | ||||
| -rwxr-xr-x | config/hypr/scripts/RofiBeats.sh | 2 | ||||
| -rwxr-xr-x | config/hypr/scripts/RofiPower.sh | 2 | ||||
| -rwxr-xr-x | config/hypr/scripts/ScreenShot.sh | 4 | ||||
| -rwxr-xr-x | config/hypr/scripts/Wallpaper.sh | 4 | ||||
| -rwxr-xr-x | config/hypr/scripts/WallpaperRandom.sh | 3 | ||||
| -rwxr-xr-x | config/hypr/scripts/WallpaperSelect.sh | 4 |
11 files changed, 16 insertions, 45 deletions
diff --git a/config/hypr/scripts/AirplaneMode.sh b/config/hypr/scripts/AirplaneMode.sh index 823dce72..35fe5db5 100755 --- a/config/hypr/scripts/AirplaneMode.sh +++ b/config/hypr/scripts/AirplaneMode.sh @@ -2,8 +2,8 @@ wifi="$(nmcli r wifi | awk 'FNR = 2 {print $1}')" if [ "$wifi" == "enabled" ]; then rfkill block all & - notify-send -t 1000 'airplane mode: active' + dunstify -t 1000 'airplane mode: active' else rfkill unblock all & - notify-send -t 1000 'airplane mode: inactive' + dunstify -t 1000 'airplane mode: inactive' fi diff --git a/config/hypr/scripts/BrightnessKbd.sh b/config/hypr/scripts/BrightnessKbd.sh index c69ad6a7..c6d6afd3 100755 --- a/config/hypr/scripts/BrightnessKbd.sh +++ b/config/hypr/scripts/BrightnessKbd.sh @@ -24,7 +24,7 @@ get_icon() { } # Notify notify_user() { - notify-send -h string:x-dunst-stack-tag:brightness_notif -h int:value:$current -u low -i "$icon" "Keyboard Brightness : $current%" + dunstify -h string:x-dunst-stack-tag:brightness_notif -h int:value:$current -u low -i "$icon" "Keyboard Brightness : $current%" } # Change brightness diff --git a/config/hypr/scripts/DarkLight.sh b/config/hypr/scripts/DarkLight.sh index 3c32778d..7d371a14 100755 --- a/config/hypr/scripts/DarkLight.sh +++ b/config/hypr/scripts/DarkLight.sh @@ -4,10 +4,10 @@ set -x wallpaper_path="$HOME/Pictures/wallpapers/Dynamic-Wallpapers" hypr_config_path="$HOME/.config/hypr" waybar_config="$HOME/.config/waybar" +dunst_config="$HOME/.config/dunst" SCRIPTSDIR="$HOME/.config/hypr/scripts" 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" @@ -26,7 +26,6 @@ swww query || swww init swww="swww img" effect="--transition-bezier .43,1.19,1,.4 --transition-fps 60 --transition-type grow --transition-pos 0.925,0.977 --transition-duration 2" - notify_user() { dunstify -u normal -i "$dunst_notif" "Switching to $1 mode" } @@ -43,6 +42,8 @@ path_param=$(echo $next_mode | sed 's/.*/\u&/') notify_user "$next_mode" +ln -sf "${dunst_config}/styles/dunstrc-${next_mode}" "${dunst_config}/dunstrc" + # Symlink for rofi theme if [ "$next_mode" = "dark" ]; then ln -sf $dark_rofi_pywal "$HOME/.config/rofi/pywal-color/pywal-theme.rasi" @@ -72,6 +73,4 @@ echo "$next_wallpaper" > ~/.cache/.current_wallpaper ${SCRIPTSDIR}/PywalSwww.sh & sleep 2 -${SCRIPTSDIR}/Refresh.sh & -sleep 1 -${SCRIPTSDIR}/PywalDunst.sh
\ No newline at end of file +${SCRIPTSDIR}/Refresh.sh
\ No newline at end of file diff --git a/config/hypr/scripts/PywalDunst.sh b/config/hypr/scripts/PywalDunst.sh deleted file mode 100755 index 410c55b8..00000000 --- a/config/hypr/scripts/PywalDunst.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/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=$HOME/.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 -conf $HOME/.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 d1b8592e..460f11f0 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 rofi) +_ps=(waybar dunst rofi) for _prs in "${_ps[@]}"; do if pidof "${_prs}" >/dev/null; then pkill "${_prs}" @@ -12,6 +12,7 @@ done # Relaunch waybar waybar & +dunst & ## trying to figure out how to restart Rainbow borders #sleep 1 diff --git a/config/hypr/scripts/RofiBeats.sh b/config/hypr/scripts/RofiBeats.sh index a55fc274..3a874f5f 100755 --- a/config/hypr/scripts/RofiBeats.sh +++ b/config/hypr/scripts/RofiBeats.sh @@ -4,7 +4,7 @@ iDIR="$HOME/.config/dunst/icons" notification(){ - notify-send -h string:x-canonical-private-synchronous:sys-notify -u normal -i "$iDIR/music.png" "Playing now: " "$@" + dunstify -h string:x-canonical-private-synchronous:sys-notify -u normal -i "$iDIR/music.png" "Playing now: " "$@" } menu(){ diff --git a/config/hypr/scripts/RofiPower.sh b/config/hypr/scripts/RofiPower.sh index b8ca76b4..7217a14a 100755 --- a/config/hypr/scripts/RofiPower.sh +++ b/config/hypr/scripts/RofiPower.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/bash SwayLock=$HOME/.config/hypr/scripts/LockScreen.sh diff --git a/config/hypr/scripts/ScreenShot.sh b/config/hypr/scripts/ScreenShot.sh index 06826275..29fe776a 100755 --- a/config/hypr/scripts/ScreenShot.sh +++ b/config/hypr/scripts/ScreenShot.sh @@ -7,7 +7,7 @@ dir="$(xdg-user-dir)/Pictures/Screenshots" file="Screenshot_${time}_${RANDOM}.png" # notify and view screenshot -notify_cmd_shot="notify-send -h string:x-canonical-private-synchronous:shot-notify -u low -i ${iDIR}/picture.png" +notify_cmd_shot="dunstify -h string:x-canonical-private-synchronous:shot-notify -u low -i ${iDIR}/picture.png" notify_view() { ${notify_cmd_shot} "Copied to clipboard." ## viewnior ${dir}/"$file" @@ -21,7 +21,7 @@ notify_view() { # countdown countdown() { for sec in $(seq $1 -1 1); do - notify-send -h string:x-canonical-private-synchronous:shot-notify -t 1000 -i "$iDIR"/timer.png "Taking shot in : $sec" + dunstify -h string:x-canonical-private-synchronous:shot-notify -t 1000 -i "$iDIR"/timer.png "Taking shot in : $sec" sleep 1 done } diff --git a/config/hypr/scripts/Wallpaper.sh b/config/hypr/scripts/Wallpaper.sh index 52502642..8fdfcbb1 100755 --- a/config/hypr/scripts/Wallpaper.sh +++ b/config/hypr/scripts/Wallpaper.sh @@ -13,6 +13,4 @@ swww img ${RANDOMPICS} --transition-fps 30 --transition-type any --transition-du ${SCRIPTSDIR}/PywalSwww.sh & sleep 1 -${SCRIPTSDIR}/Refresh.sh & -sleep 1 -${SCRIPTSDIR}/PywalDunst.sh
\ No newline at end of file +${SCRIPTSDIR}/Refresh.sh diff --git a/config/hypr/scripts/WallpaperRandom.sh b/config/hypr/scripts/WallpaperRandom.sh index 910093ad..4184fca6 100755 --- a/config/hypr/scripts/WallpaperRandom.sh +++ b/config/hypr/scripts/WallpaperRandom.sh @@ -7,7 +7,6 @@ pywal_script=$HOME/.config/hypr/scripts/PywalSwww.sh pywal_refresh=$HOME/.config/hypr/scripts/Refresh.sh -pywal_dunst=$HOME/.config/hypr/scripts/PywalDunst.sh if [[ $# -lt 1 ]] || [[ ! -d $1 ]]; then echo "Usage: @@ -30,7 +29,7 @@ while true; do done \ | sort -n | cut -d':' -f2- \ | while read -r img; do - swww img "$img" && $pywal_script && $pywal_refresh && $pywal_dunst + swww img "$img" && $pywal_script && $pywal_refresh sleep $INTERVAL done diff --git a/config/hypr/scripts/WallpaperSelect.sh b/config/hypr/scripts/WallpaperSelect.sh index 0d899a10..398fafb1 100755 --- a/config/hypr/scripts/WallpaperSelect.sh +++ b/config/hypr/scripts/WallpaperSelect.sh @@ -67,6 +67,4 @@ fi main ${SCRIPTSDIR}/PywalSwww.sh & -${SCRIPTSDIR}/Refresh.sh & -sleep 1 -${SCRIPTSDIR}/PywalDunst.sh +${SCRIPTSDIR}/Refresh.sh |
