diff --git a/Configs/.config/dunst/dunst.conf b/Configs/.config/dunst/dunst.conf index 3e113c66ac..023d1798ba 100644 --- a/Configs/.config/dunst/dunst.conf +++ b/Configs/.config/dunst/dunst.conf @@ -19,6 +19,13 @@ # will be ignored. follow = mouse + # When set to true (recommended), you can use POSIX regular expressions for filtering rules. + # It uses the POSIX Extended Regular Expression syntax: https://en.m.wikibooks.org/wiki/Regular_Expressions/POSIX-Extended_Regular_Expressions. + # + # If this is set to false (not recommended), dunst will us fnmatch(3) for matching strings. + # Dunst doesn't pass any flags to fnmatch, so you cannot make use of extended patterns. + enable_posix_regex = true + ### Geometry ### # dynamic width from 0 to 300 @@ -198,10 +205,9 @@ # Recursive icon lookup. You can set a single theme, instead of having to # define all lookup paths. - #enable_recursive_icon_lookup = true + enable_recursive_icon_lookup = true # Set icon theme (only used for recursive icon lookup) - #icon_theme = Adwaita # You can also set multiple icon themes, with the leftmost one being used first. icon_theme = "Tela-circle-dracula" @@ -211,14 +217,11 @@ # Scale small icons up to this size, set to 0 to disable. Helpful # for e.g. small files or high-dpi screens. In case of conflict, # max_icon_size takes precedence over this. - min_icon_size = 32 + min_icon_size = 128 # Scale larger icons down to this size, set to 0 to disable max_icon_size = 128 - # Paths to default icons (only necessary when not using recursive icon lookup) - icon_path = $HOME/.icons/Tela-circle-dracula/16/actions:$HOME/.icons/Tela-circle-dracula/16/apps:$HOME/.icons/Tela-circle-dracula/16/devices:$HOME/.icons/Tela-circle-dracula/16/mimetypes:$HOME/.icons/Tela-circle-dracula/16/panel:$HOME/.icons/Tela-circle-dracula/16/places:$HOME/.icons/Tela-circle-dracula/16/status - ### History ### # Should a notification popped up from history be sticky or timeout @@ -447,3 +450,27 @@ frame_color = "#f38ba8" icon = "$HOME/.config/dunst/icons/critical.svg" timeout = 0 + +[slack] + desktop_entry = "^Slack$" + new_icon = slack + +[telegram] + desktop_entry = "^Telegram Desktop$" + new_icon = telegram-desktop + +[skype] + desktop_entry = "^Skype$" + new_icon = skype + +[discord] + desktop_entry = "^Discord$" + new_icon = discord + +[zapzap] + desktop_entry = "^ZapZap$" + new_icon = whatsapp + +[viber] + desktop_entry = "^Viber$" + new_icon = viber diff --git a/Configs/.config/dunst/dunstrc b/Configs/.config/dunst/dunstrc index 465c159f0d..8c0d699ea2 100644 --- a/Configs/.config/dunst/dunstrc +++ b/Configs/.config/dunst/dunstrc @@ -19,6 +19,13 @@ # will be ignored. follow = mouse + # When set to true (recommended), you can use POSIX regular expressions for filtering rules. + # It uses the POSIX Extended Regular Expression syntax: https://en.m.wikibooks.org/wiki/Regular_Expressions/POSIX-Extended_Regular_Expressions. + # + # If this is set to false (not recommended), dunst will us fnmatch(3) for matching strings. + # Dunst doesn't pass any flags to fnmatch, so you cannot make use of extended patterns. + enable_posix_regex = true + ### Geometry ### # dynamic width from 0 to 300 @@ -198,7 +205,7 @@ # Recursive icon lookup. You can set a single theme, instead of having to # define all lookup paths. - #enable_recursive_icon_lookup = true + enable_recursive_icon_lookup = true # Set icon theme (only used for recursive icon lookup) #icon_theme = Adwaita @@ -211,14 +218,11 @@ # Scale small icons up to this size, set to 0 to disable. Helpful # for e.g. small files or high-dpi screens. In case of conflict, # max_icon_size takes precedence over this. - min_icon_size = 32 + min_icon_size = 128 # Scale larger icons down to this size, set to 0 to disable max_icon_size = 128 - # Paths to default icons (only necessary when not using recursive icon lookup) - icon_path = $HOME/.icons/Tela-circle-dracula/16/actions:$HOME/.icons/Tela-circle-dracula/16/apps:$HOME/.icons/Tela-circle-dracula/16/devices:$HOME/.icons/Tela-circle-dracula/16/mimetypes:$HOME/.icons/Tela-circle-dracula/16/panel:$HOME/.icons/Tela-circle-dracula/16/places:$HOME/.icons/Tela-circle-dracula/16/status - ### History ### # Should a notification popped up from history be sticky or timeout diff --git a/Configs/.local/share/bin/themeswitch.sh b/Configs/.local/share/bin/themeswitch.sh index 52c203ad9b..dce79be99b 100755 --- a/Configs/.local/share/bin/themeswitch.sh +++ b/Configs/.local/share/bin/themeswitch.sh @@ -27,6 +27,26 @@ Theme_Change() done } +get_gtk_theme() +{ + local themeDir=$1 + echo "$({ grep -q "^[[:space:]]*\$GTK[-_]THEME\s*=" "${themeDir}/hypr.theme" && grep "^[[:space:]]*\$GTK[-_]THEME\s*=" "${themeDir}/hypr.theme" | cut -d '=' -f2 | sed 's/^[[:space:]]*//;s/[[:space:]]*$//' ;} || + grep 'gsettings set org.gnome.desktop.interface gtk-theme' "${themeDir}/hypr.theme" | awk -F "'" '{print $((NF - 1))}')" +} + +get_icon_theme() +{ + local themeDir=$1 + echo "$({ grep -q "^[[:space:]]*\$ICON[-_]THEME\s*=" "${themeDir}/hypr.theme" && grep "^[[:space:]]*\$ICON[-_]THEME\s*=" "${themeDir}/hypr.theme" | cut -d '=' -f2 | sed 's/^[[:space:]]*//;s/[[:space:]]*$//' ;} || + grep 'gsettings set org.gnome.desktop.interface icon-theme' "${themeDir}/hypr.theme" | awk -F "'" '{print $(NF - 1)}')" +} + +join_array() +{ + local IFS="$1" + shift + echo "$*" +} #// evaluate options @@ -70,15 +90,10 @@ source "${scrDir}/globalcontrol.sh" #// hypr [ -n "$HYPRLAND_INSTANCE_SIGNATURE" ] && hyprctl keyword misc:disable_autoreload 1 -q sed '1d' "${hydeThemeDir}/hypr.theme" > "${confDir}/hypr/themes/theme.conf" # Useless and already handled by swwwallbash.sh but kept for robustness -gtkTheme="$( -{ grep -q "^[[:space:]]*\$GTK[-_]THEME\s*=" "${hydeThemeDir}/hypr.theme" && grep "^[[:space:]]*\$GTK[-_]THEME\s*=" "${hydeThemeDir}/hypr.theme" | cut -d '=' -f2 | sed 's/^[[:space:]]*//;s/[[:space:]]*$//' ;} || -grep 'gsettings set org.gnome.desktop.interface gtk-theme' "${hydeThemeDir}/hypr.theme" | awk -F "'" '{print $((NF - 1))}' -)" -gtkIcon="$( -{ grep -q "^[[:space:]]*\$ICON[-_]THEME\s*=" "${hydeThemeDir}/hypr.theme" && grep "^[[:space:]]*\$ICON[-_]THEME\s*=" "${hydeThemeDir}/hypr.theme" | cut -d '=' -f2 | sed 's/^[[:space:]]*//;s/[[:space:]]*$//' ;} || -grep 'gsettings set org.gnome.desktop.interface icon-theme' "${hydeThemeDir}/hypr.theme" | awk -F "'" '{print $(NF - 1)}' -)" +gtkTheme=$(get_gtk_theme "$hydeThemeDir") +gtkIcon=$(get_icon_theme "$hydeThemeDir") + #// qtct @@ -115,6 +130,22 @@ if pkg_installed flatpak ; then fi fi + +#// dunst + +unset iconThemes +while read thmDir ; do + if [ "$(basename "${thmDir}")" == "${hydeTheme}" ] ; then + continue + fi + iconThemes+=($(get_icon_theme "$thmDir")) +done < <(find "${hydeConfDir}/themes" -mindepth 1 -maxdepth 1 -type d) +iconThemes=(${gtkIcon} "${iconThemes[*]}") +iconThemesConcat=$(join_array "," ${iconThemes[*]}) + +sed -i "/^ icon_theme =/c\ icon_theme = \"${iconThemesConcat}\"" "${confDir}/dunst/dunst.conf" + + #// wallpaper "${scrDir}/swwwallpaper.sh" -s "$(readlink "${hydeThemeDir}/wall.set")" diff --git a/Configs/.local/share/bin/wallbashdunst.sh b/Configs/.local/share/bin/wallbashdunst.sh index a070614c9b..1ff6857060 100755 --- a/Configs/.local/share/bin/wallbashdunst.sh +++ b/Configs/.local/share/bin/wallbashdunst.sh @@ -13,4 +13,3 @@ envsubst < "${dstDir}/dunst.conf" > "${dstDir}/dunstrc" envsubst < "${dstDir}/wallbash.conf" >> "${dstDir}/dunstrc" killall dunst dunst & -