From ff0ac3b1cd63f4da4c4b88e14ac1f76a9545ff3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaroslav=20de=20la=20Pe=C3=B1a=20Smirnov?= Date: Tue, 21 Mar 2023 17:01:28 +0300 Subject: "Use" KDE oxygen sound effects --- dotfiles/.config/foot/foot.ini | 4 ++-- dotfiles/.config/sway/config | 6 ++++-- dotfiles/.local/bin/swaysession | 12 ++++++++---- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/dotfiles/.config/foot/foot.ini b/dotfiles/.config/foot/foot.ini index 458d386..be2f5d1 100644 --- a/dotfiles/.config/foot/foot.ini +++ b/dotfiles/.config/foot/foot.ini @@ -5,7 +5,7 @@ term = foot-extra [colors] -alpha = 0.92 +#alpha = 0.92 foreground = fcf8e2 #white background = 151517 #black @@ -36,5 +36,5 @@ osc8-underline = always [bell] urgent = yes -command = ffplay -nodisp -loglevel 8 -autoexit -i /home/yaroslav/.local/share/soundalerts/ding.ogg +command = canberra-gtk-play -i Oxygen-Sys-App-Message command-focused = yes diff --git a/dotfiles/.config/sway/config b/dotfiles/.config/sway/config index f609f89..36b89b9 100644 --- a/dotfiles/.config/sway/config +++ b/dotfiles/.config/sway/config @@ -52,10 +52,10 @@ exec_always { } ##### Startup scripts and programs ##### -# Waybar -exec waybar_launch # Audio exec pipewire-restart +# Waybar +exec waybar_launch # playerctl daemon for better MPRIS support exec playerctld daemon # Music daemon @@ -68,6 +68,8 @@ exec mako exec_always setsessionenv # xdg-desktop-portal screen sharing crap exec dbus-update-activation-environment DISPLAY I3SOCK SWAYSOCK WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway +# log in sound +exec sleep 2 && canberra-gtk-play -i Oxygen-Sys-App-Positive # Workspace names # to display names or symbols instead of plain workspace numbers you can use diff --git a/dotfiles/.local/bin/swaysession b/dotfiles/.local/bin/swaysession index 221ba0e..4dccbb7 100755 --- a/dotfiles/.local/bin/swaysession +++ b/dotfiles/.local/bin/swaysession @@ -7,6 +7,7 @@ case "$1" in lock-color ;; logout) + canberra-gtk-play -i Oxygen-Sys-Log-Out & sleep 1 swaymsg exit clear if [ ! -e ~/.cache/dont-kill ]; then @@ -23,14 +24,17 @@ case "$1" in lock-color & sleep 1 && $logind hibernate ;; reboot) - swaymsg exit + canberra-gtk-play -i Oxygen-Sys-Log-Out & sleep 1 clear - $logind reboot + swaymsg exit + sudo reboot now ;; poweroff) - swaymsg exit + canberra-gtk-play -i Oxygen-Sys-Log-Out & sleep 1 clear - $logind poweroff + swaymsg exit + # Having problems with logind poweroff and reboot after sway exit + sudo poweroff now ;; *) if [ "$SWAYSESSION_GUI" = 1 ]; then -- cgit v1.2.3