diff --git a/config/hypr/configs/Execs.conf b/config/hypr/configs/Execs.conf index 76ec382..098db4b 100644 --- a/config/hypr/configs/Execs.conf +++ b/config/hypr/configs/Execs.conf @@ -22,7 +22,8 @@ exec-once = $scriptsDir/Polkit.sh # starup apps exec-once = waybar & -exec-once = dunst & +# exec-once = dunst & +exec-once swaync & #exec-once = blueman-applet & exec-once = nm-applet --indicator & #exec-once = rog-control-center & diff --git a/config/hypr/configs/Keybinds.conf b/config/hypr/configs/Keybinds.conf index da27c53..4e6a753 100644 --- a/config/hypr/configs/Keybinds.conf +++ b/config/hypr/configs/Keybinds.conf @@ -179,3 +179,6 @@ bind = $mainMod SHIFT, S, exec, grim -g "$(slurp)" - | swappy -f - # to unbind #bind = $mainMod ALT, P, submap, reset #submap = reset + +#Swaync notification panel +bind = $mainMod, N, exec, swaync-client -t -sw \ No newline at end of file diff --git a/config/hypr/scripts/AirplaneMode.sh b/config/hypr/scripts/AirplaneMode.sh index 428a09b..6e2eecf 100755 --- a/config/hypr/scripts/AirplaneMode.sh +++ b/config/hypr/scripts/AirplaneMode.sh @@ -5,8 +5,8 @@ dunst_notif="$HOME/.config/dunst/images/bell.png" wifi="$(nmcli r wifi | awk 'FNR = 2 {print $1}')" if [ "$wifi" == "enabled" ]; then rfkill block all & - dunstify -u normal -i "$dunst_notif" -t 1000 'airplane mode: active' + notify-send -e -u normal -i "$dunst_notif" -t 1000 'airplane mode: active' else rfkill unblock all & - dunstify -u normal -i "$dunst_notif" -t 1000 'airplane mode: inactive' + notify-send -e -u normal -i "$dunst_notif" -t 1000 'airplane mode: inactive' fi diff --git a/config/hypr/scripts/Brightness.sh b/config/hypr/scripts/Brightness.sh index c5c0b80..1c68ec5 100755 --- a/config/hypr/scripts/Brightness.sh +++ b/config/hypr/scripts/Brightness.sh @@ -26,7 +26,7 @@ get_icon() { # Notify notify_user() { - dunstify -h string:x-dunst-stack-tag:brightness_notif -h int:value:$current -u low -i "$icon" "Brightness : $current%" + notify-send -e -h string:x-canonical-private-synchronous:brightness_notif -h int:value:$current -u low -i "$icon" "Brightness : $current%" } # Change brightness diff --git a/config/hypr/scripts/BrightnessKbd.sh b/config/hypr/scripts/BrightnessKbd.sh index c6d6afd..3ea9e49 100755 --- a/config/hypr/scripts/BrightnessKbd.sh +++ b/config/hypr/scripts/BrightnessKbd.sh @@ -24,7 +24,7 @@ get_icon() { } # Notify notify_user() { - dunstify -h string:x-dunst-stack-tag:brightness_notif -h int:value:$current -u low -i "$icon" "Keyboard Brightness : $current%" + notify-send -e -h string:x-canonical-private-synchronous:brightness_notif -h int:value:$current -u low -i "$icon" "Keyboard Brightness : $current%" } # Change brightness diff --git a/config/hypr/scripts/ChangeBlur.sh b/config/hypr/scripts/ChangeBlur.sh index 891e22e..76e5ed8 100755 --- a/config/hypr/scripts/ChangeBlur.sh +++ b/config/hypr/scripts/ChangeBlur.sh @@ -7,9 +7,9 @@ STATE=$(hyprctl -j getoption decoration:blur:passes | jq ".int") if [ "${STATE}" == "2" ]; then hyprctl keyword decoration:blur:size 2 hyprctl keyword decoration:blur:passes 1 - dunstify -u low -i "$dunst_notif" "Less blur" + notify-send -e -u low -i "$dunst_notif" "Less blur" else hyprctl keyword decoration:blur:size 5 hyprctl keyword decoration:blur:passes 2 - dunstify -u low -i "$dunst_notif" "Normal blur" + notify-send -e -u low -i "$dunst_notif" "Normal blur" fi diff --git a/config/hypr/scripts/ChangeLayout.sh b/config/hypr/scripts/ChangeLayout.sh index 28b7203..69ded6c 100755 --- a/config/hypr/scripts/ChangeLayout.sh +++ b/config/hypr/scripts/ChangeLayout.sh @@ -12,7 +12,7 @@ case $LAYOUT in hyprctl keyword bind SUPER,J,cyclenext hyprctl keyword bind SUPER,K,cyclenext,prev hyprctl keyword bind SUPER,O,togglesplit - dunstify -u low -i "$dunst_notif" "Dwindle Layout" + notify-send -e -u low -i "$dunst_notif" "Dwindle Layout" ;; "dwindle") hyprctl keyword general:layout master @@ -21,7 +21,7 @@ case $LAYOUT in hyprctl keyword unbind SUPER,O hyprctl keyword bind SUPER,J,layoutmsg,cyclenext hyprctl keyword bind SUPER,K,layoutmsg,cycleprev - dunstify -u low -i "$dunst_notif" "Master Layout" + notify-send -e -u low -i "$dunst_notif" "Master Layout" ;; *) ;; diff --git a/config/hypr/scripts/GameMode.sh b/config/hypr/scripts/GameMode.sh index 0e6f83a..678d282 100755 --- a/config/hypr/scripts/GameMode.sh +++ b/config/hypr/scripts/GameMode.sh @@ -15,7 +15,7 @@ if [ "$HYPRGAMEMODE" = 1 ] ; then keyword general:border_size 1;\ keyword decoration:rounding 0" swww kill - dunstify -u low -i "$dunst_notif" "gamemode enabled. All animations off" + notify-send -e -u low -i "$dunst_notif" "gamemode enabled. All animations off" exit else swww init && swww img "$HOME/.config/rofi/.current_wallpaper" @@ -23,7 +23,7 @@ else ${SCRIPTSDIR}/PywalSwww.sh sleep 0.5 ${SCRIPTSDIR}/Refresh.sh - dunstify -u normal -i "$dunst_notif" "gamemode disabled. All animations normal" + notify-send -e -u normal -i "$dunst_notif" "gamemode disabled. All animations normal" exit fi hyprctl reload diff --git a/config/hypr/scripts/PywalSwaync.sh b/config/hypr/scripts/PywalSwaync.sh new file mode 100755 index 0000000..aad1acb --- /dev/null +++ b/config/hypr/scripts/PywalSwaync.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +pkill swaync + +sleep 0.3 +swaync > /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 0d91de8..dd773ef 100755 --- a/config/hypr/scripts/Refresh.sh +++ b/config/hypr/scripts/Refresh.sh @@ -16,7 +16,10 @@ waybar & sleep 0.1 # Relaunch dunst with pywal-borders -${SCRIPTSDIR}/PywalDunst.sh & +# ${SCRIPTSDIR}/PywalDunst.sh & + +# Relaunch swaync with pywal-borders +${SCRIPTSDIR}/PywalSwaync.sh # Relaunching rainbow borders sleep 1 diff --git a/config/hypr/scripts/RofiBeats.sh b/config/hypr/scripts/RofiBeats.sh index e0cc6f7..c8e8e43 100755 --- a/config/hypr/scripts/RofiBeats.sh +++ b/config/hypr/scripts/RofiBeats.sh @@ -21,7 +21,7 @@ declare -A menu_options=( # Function for displaying notifications notification() { - dunstify -u normal -i "$iDIR/music.png" "Playing now: $@" + notify-send -u normal -i "$iDIR/music.png" "Playing now: $@" } # Main function @@ -45,4 +45,4 @@ main() { } # Check if an online music process is running and send a notification, otherwise run the main function -pkill -f http && dunstify -u low -i "$iDIR/music.png" "Online Music stopped" || main +pkill -f http && notify-send -u low -i "$iDIR/music.png" "Online Music stopped" || main diff --git a/config/hypr/scripts/ScreenShot.sh b/config/hypr/scripts/ScreenShot.sh index 29fe776..0682627 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="dunstify -h string:x-canonical-private-synchronous:shot-notify -u low -i ${iDIR}/picture.png" +notify_cmd_shot="notify-send -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 - dunstify -h string:x-canonical-private-synchronous:shot-notify -t 1000 -i "$iDIR"/timer.png "Taking shot in : $sec" + notify-send -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/Volume.sh b/config/hypr/scripts/Volume.sh index d0eb0b6..9aaf8a8 100755 --- a/config/hypr/scripts/Volume.sh +++ b/config/hypr/scripts/Volume.sh @@ -29,9 +29,9 @@ get_icon() { # Notify notify_user() { if [[ "$(get_volume)" == "Muted" ]]; then - dunstify -h string:x-dunst-stack-tag:volume_notif -u low -i "$(get_icon)" "Volume: Muted" + notify-send -e -h string:x-canonical-private-synchronous:volume_notif -u low -i "$(get_icon)" "Volume: Muted" else - dunstify -h int:value:"$(get_volume | sed 's/%//')" -h string:x-dunst-stack-tag:volume_notif -u low -i "$(get_icon)" "Volume: $(get_volume)" + notify-send -e -h int:value:"$(get_volume | sed 's/%//')" -h string:x-canonical-private-synchronous:volume_notif -u low -i "$(get_icon)" "Volume: $(get_volume)" fi } @@ -54,18 +54,18 @@ dec_volume() { # Toggle Mute toggle_mute() { if [ "$(pamixer --get-mute)" == "false" ]; then - pamixer -m && dunstify -u low -i "$iDIR/volume-mute.png" "Volume Switched OFF" + pamixer -m && notify-send -e -u low -i "$iDIR/volume-mute.png" "Volume Switched OFF" elif [ "$(pamixer --get-mute)" == "true" ]; then - pamixer -u && dunstify -u low -i "$(get_icon)" "Volume Switched ON" + pamixer -u && notify-send -e -u low -i "$(get_icon)" "Volume Switched ON" fi } # Toggle Mic toggle_mic() { if [ "$(pamixer --default-source --get-mute)" == "false" ]; then - pamixer --default-source -m && dunstify -u low -i "$iDIR/microphone-mute.png" "Microphone Switched OFF" + pamixer --default-source -m && notify-send -e -u low -i "$iDIR/microphone-mute.png" "Microphone Switched OFF" elif [ "$(pamixer --default-source --get-mute)" == "true" ]; then - pamixer -u --default-source u && dunstify -u low -i "$iDIR/microphone.png" "Microphone Switched ON" + pamixer -u --default-source u && notify-send -e -u low -i "$iDIR/microphone.png" "Microphone Switched ON" fi } # Get Mic Icon @@ -92,7 +92,7 @@ get_mic_volume() { notify_mic_user() { volume=$(get_mic_volume) icon=$(get_mic_icon) - dunstify -h int:value:"$volume" -h "string:x-dunst-stack-tag:volume_notif" -u low -i "$icon" "Mic-Level: $volume" + notify-send -e -h int:value:"$volume" -h "string:x-canonical-private-synchronous:volume_notif" -u low -i "$icon" "Mic-Level: $volume" } # Increase MIC Volume diff --git a/config/swaync/config.json b/config/swaync/config.json new file mode 100644 index 0000000..1f9de0e --- /dev/null +++ b/config/swaync/config.json @@ -0,0 +1,78 @@ +{ + "$schema": "/etc/xdg/swaync/configSchema.json", + "positionX": "right", + "positionY": "top", + "layer": "overlay", + "control-center-layer": "top", + "layer-shell": true, + "cssPriority": "application", + "control-center-margin-top": 0, + "control-center-margin-bottom": 0, + "control-center-margin-right": 0, + "control-center-margin-left": 0, + "notification-2fa-action": true, + "notification-inline-replies": false, + "notification-icon-size": 64, + "notification-body-image-height": 100, + "notification-body-image-width": 200, + "timeout": 10, + "timeout-low": 5, + "timeout-critical": 0, + "fit-to-screen": true, + "control-center-width": 500, + "control-center-height": 600, + "notification-window-width": 500, + "keyboard-shortcuts": true, + "image-visibility": "when-available", + "transition-time": 200, + "hide-on-clear": false, + "hide-on-action": true, + "script-fail-notify": true, + // "scripts": { + // "example-script": { + // "exec": "echo 'Do something...'", + // "urgency": "Normal" + // }, + // "example-action-script": { + // "exec": "echo 'Do something actionable!'", + // "urgency": "Normal", + // "run-on": "action" + // } + // }, + "notification-visibility": { + "example-name": { + "state": "muted", + "urgency": "Low", + "app-name": "mpv" + } + }, + "widgets": [ + "inhibitors", + "title", + "dnd", + "notifications" + ], + "widget-config": { + "inhibitors": { + "text": "Inhibitors", + "button-text": "Clear All", + "clear-all-button": true + }, + "title": { + "text": "Notifications", + "clear-all-button": true, + "button-text": "Clear All" + }, + "dnd": { + "text": "Do Not Disturb" + }, + "label": { + "max-lines": 5, + "text": "Label Text" + }, + "mpris": { + "image-size": 96, + "image-radius": 12 + } + } +} diff --git a/config/swaync/style.css b/config/swaync/style.css new file mode 100644 index 0000000..13d8c0b --- /dev/null +++ b/config/swaync/style.css @@ -0,0 +1,296 @@ +@import '../../.cache/wal/colors-waybar.css'; + +@define-color foreground rgb(248, 248, 242); +@define-color background @color1; +/* @define-color background rgb(40, 42, 54); */ +@define-color background-alpha rgba(40, 42, 54, 0.8); +@define-color accent @color2; +/* @define-color accent rgba(189, 147, 249, 0.8); */ +@define-color current-line rgb(68, 71, 90); +@define-color comment rgb(98, 114, 164); + +* { + all: unset; + font-size: 18px; + /* font-family: "JetBrainsMono Nerd Font"; */ + transition: 200ms; +} + +.floating-notifications.background .notification-row .notification-background { + box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.8), inset 0 0 0 1px #313244; + border-radius: 12.6px; + margin: 18px; + /* background-color: #1e1e2e; */ + background-color: rgba(30, 30, 46, 0.9); + color: #cdd6f4; + padding: 3; + border: 1px solid @accent; +} + +.floating-notifications.background .notification-row .notification-background .notification { + padding: 7px; + border-radius: 12.6px; +} + +.floating-notifications.background .notification-row .notification-background .notification.critical { + box-shadow: inset 0 0 7px 0 #f38ba8; +} + +.floating-notifications.background .notification-row .notification-background .notification .notification-content { + margin: 7px; +} + +.floating-notifications.background .notification-row .notification-background .notification .notification-content .summary { + color: #cdd6f4; +} + +.floating-notifications.background .notification-row .notification-background .notification .notification-content .time { + color: #a6adc8; +} + +.floating-notifications.background .notification-row .notification-background .notification .notification-content .body { + color: #cdd6f4; +} + +.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * { + min-height: 3.4em; +} + +.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * .notification-action { + border-radius: 7px; + color: #cdd6f4; + background-color: #313244; + box-shadow: inset 0 0 0 1px #45475a; + margin: 7px; +} + +.notification-action { + border-radius: 5px; + background: linear-gradient( + 45deg, + rgba(164, 89, 235, 0.8), + @accent + ); + border: 1px; + margin: 5px; +} + +.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * .notification-action:hover { + box-shadow: inset 0 0 0 1px #45475a; + background-color: #313244; + color: #cdd6f4; +} + +.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * .notification-action:active { + box-shadow: inset 0 0 0 1px #45475a; + background-color: #74c7ec; + color: #cdd6f4; +} + +.floating-notifications.background .notification-row .notification-background .close-button { + margin: 7px; + padding: 2px; + border-radius: 6.3px; + color: #1e1e2e; + background-color: #f38ba8; +} + +.floating-notifications.background .notification-row .notification-background .close-button:hover { + background-color: #eba0ac; + color: #1e1e2e; +} + +.floating-notifications.background .notification-row .notification-background .close-button:active { + background-color: #f38ba8; + color: #1e1e2e; +} + +.control-center { + box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.8), inset 0 0 0 1px #313244; + border-radius: 12.6px; + margin: 18px; + /* background-color: #1e1e2e; */ + background-color: rgba(49, 50, 68, 0.9); + color: #cdd6f4; + padding: 14px; + border: 1px solid @accent; +} + +.control-center .widget-title { + color: #cdd6f4; + font-size: 1.3em; +} + +.control-center .widget-title button { + border-radius: 7px; + color: #cdd6f4; + background-color: #313244; + box-shadow: inset 0 0 0 1px #45475a; + padding: 8px; +} + +.control-center .widget-title button:hover { + box-shadow: inset 0 0 0 1px #45475a; + background-color: #585b70; + color: #cdd6f4; +} + +.control-center .widget-title button:active { + box-shadow: inset 0 0 0 1px #45475a; + background-color: #74c7ec; + color: #1e1e2e; +} + +.control-center .notification-row .notification-background { + border-radius: 7px; + color: #cdd6f4; + background-color: #313244; + box-shadow: inset 0 0 0 1px #45475a; + margin-top: 14px; +} + +.control-center .notification-row .notification-background .notification { + padding: 7px; + border-radius: 7px; +} + +.control-center .notification-row .notification-background .notification.critical { + box-shadow: inset 0 0 7px 0 #f38ba8; +} + +.control-center .notification-row .notification-background .notification .notification-content { + margin: 7px; +} + +.control-center .notification-row .notification-background .notification .notification-content .summary { + color: #cdd6f4; +} + +.control-center .notification-row .notification-background .notification .notification-content .time { + color: #a6adc8; +} + +.control-center .notification-row .notification-background .notification .notification-content .body { + color: #cdd6f4; +} + +.control-center .notification-row .notification-background .notification > *:last-child > * { + min-height: 3.4em; +} + +.control-center .notification-row .notification-background .notification > *:last-child > * .notification-action { + border-radius: 7px; + color: #cdd6f4; + background-color: #11111b; + box-shadow: inset 0 0 0 1px #45475a; + margin: 7px; +} + +.control-center .notification-row .notification-background .notification > *:last-child > * .notification-action:hover { + box-shadow: inset 0 0 0 1px #45475a; + background-color: #313244; + color: #cdd6f4; +} + +.control-center .notification-row .notification-background .notification > *:last-child > * .notification-action:active { + box-shadow: inset 0 0 0 1px #45475a; + background-color: #74c7ec; + color: #cdd6f4; +} + +.control-center .notification-row .notification-background .close-button { + margin: 7px; + padding: 2px; + border-radius: 6.3px; + color: #1e1e2e; + background-color: #eba0ac; +} + +.control-center .notification-row .notification-background .close-button:hover { + background-color: #f38ba8; + color: #1e1e2e; +} + +.control-center .notification-row .notification-background .close-button:active { + background-color: #f38ba8; + color: #1e1e2e; +} + +.control-center .notification-row .notification-background:hover { + box-shadow: inset 0 0 0 1px #45475a; + background-color: #7f849c; + color: #cdd6f4; +} + +.control-center .notification-row .notification-background:active { + box-shadow: inset 0 0 0 1px #45475a; + background-color: #74c7ec; + color: #cdd6f4; +} + +progressbar, +progress, +trough { + border-radius: 12.6px; +} + +progressbar { + box-shadow: inset 0 0 0 1px #45475a; +} + +.notification.critical progress { + background-color: #f38ba8; +} + +.notification.low progress, +.notification.normal progress { + background-color: #89b4fa; +} + +trough { + background-color: #313244; +} + +.control-center trough { + background-color: #45475a; +} + +.control-center-dnd { + margin-top: 5px; + border-radius: 8px; + background: #313244; + border: 1px solid #45475a; + box-shadow: none; +} + +.control-center-dnd:checked { + background: #313244; +} + +.control-center-dnd slider { + background: #45475a; + border-radius: 8px; +} + +.widget-dnd { + margin: 0px; + font-size: 1.1rem; +} + +.widget-dnd > switch { + font-size: initial; + border-radius: 8px; + background: #313244; + border: 1px solid #45475a; + box-shadow: none; +} + +.widget-dnd > switch:checked { + background: #313244; +} + +.widget-dnd > switch slider { + background: #45475a; + border-radius: 8px; + border: 1px solid #6c7086; +}