tightened up Sway support. There shouldn't be any bugs, but with something like this you never know. I3 users should certainly not encounter any bugs from these changes, please yell if something weird happens.
Oh, and finally pushed the ai.py script I have been using for some time without pushing. I guess several months of testing should be fine. lol
This commit is contained in:
54
i38.sh
54
i38.sh
@@ -883,20 +883,36 @@ $(if [[ $sounds -eq 0 ]]; then
|
||||
echo "exec_always --no-startup-id ${i3Path}/scripts/sound.py"
|
||||
fi
|
||||
fi
|
||||
if [[ $brlapi -eq 0 ]]; then
|
||||
# xbrlapi is X11-only, skip on Sway/Wayland
|
||||
if [[ $brlapi -eq 0 ]] && [[ $usingSway -ne 0 ]]; then
|
||||
echo 'exec --no-startup-id xbrlapi --quiet'
|
||||
fi
|
||||
if [[ $udiskie -eq 0 ]]; then
|
||||
echo 'exec --no-startup-id udiskie'
|
||||
fi
|
||||
if [[ -x "/usr/lib/xfce4/notifyd/xfce4-notifyd" ]]; then
|
||||
echo 'exec_always --no-startup-id /usr/lib/xfce4/notifyd/xfce4-notifyd'
|
||||
elif [[ -x "/usr/lib/notification-daemon-1.0/notification-daemon" ]]; then
|
||||
echo 'exec_always --no-startup-id /usr/lib/notification-daemon-1.0/notification-daemon -r'
|
||||
fi
|
||||
# Work around for weird Void Linux stuff.
|
||||
if [[ -x "/usr/libexec/notification-daemon" ]]; then
|
||||
echo 'exec_always --no-startup-id /usr/libexec/notification-daemon -r'
|
||||
# Notification daemon
|
||||
if [[ $usingSway -eq 0 ]]; then
|
||||
# Sway: prefer Wayland-native notification daemons
|
||||
if command -v mako &> /dev/null; then
|
||||
echo 'exec_always --no-startup-id mako'
|
||||
elif [[ -x "/usr/lib/xfce4/notifyd/xfce4-notifyd" ]]; then
|
||||
# Fallback to X11 variant via XWayland
|
||||
echo 'exec_always --no-startup-id /usr/lib/xfce4/notifyd/xfce4-notifyd'
|
||||
elif [[ -x "/usr/lib/notification-daemon-1.0/notification-daemon" ]]; then
|
||||
echo 'exec_always --no-startup-id /usr/lib/notification-daemon-1.0/notification-daemon -r'
|
||||
elif [[ -x "/usr/libexec/notification-daemon" ]]; then
|
||||
echo 'exec_always --no-startup-id /usr/libexec/notification-daemon -r'
|
||||
fi
|
||||
else
|
||||
# i3: use X11 notification daemons
|
||||
if [[ -x "/usr/lib/xfce4/notifyd/xfce4-notifyd" ]]; then
|
||||
echo 'exec_always --no-startup-id /usr/lib/xfce4/notifyd/xfce4-notifyd'
|
||||
elif [[ -x "/usr/lib/notification-daemon-1.0/notification-daemon" ]]; then
|
||||
echo 'exec_always --no-startup-id /usr/lib/notification-daemon-1.0/notification-daemon -r'
|
||||
elif [[ -x "/usr/libexec/notification-daemon" ]]; then
|
||||
# Work around for weird Void Linux stuff
|
||||
echo 'exec_always --no-startup-id /usr/libexec/notification-daemon -r'
|
||||
fi
|
||||
fi
|
||||
if command -v remind &> /dev/null && command -v notify-send &> /dev/null ; then
|
||||
echo "exec_always --no-startup-id ${i3Path}/scripts/launch_remind.sh"
|
||||
@@ -908,13 +924,27 @@ fi
|
||||
if [[ $dex -eq 0 ]]; then
|
||||
echo '# Start XDG autostart .desktop files using dex. See also'
|
||||
echo '# https://wiki.archlinux.org/index.php/XDG_Autostart'
|
||||
echo 'exec --no-startup-id dex --autostart --environment i3'
|
||||
if [[ $usingSway -eq 0 ]]; then
|
||||
echo 'exec --no-startup-id dex --autostart --environment sway'
|
||||
else
|
||||
echo 'exec --no-startup-id dex --autostart --environment i3'
|
||||
fi
|
||||
else
|
||||
echo '# Startup applications'
|
||||
if command -v x11bell &> /dev/null ; then
|
||||
# x11bell is X11-only, skip on Sway/Wayland
|
||||
if command -v x11bell &> /dev/null && [[ $usingSway -ne 0 ]]; then
|
||||
echo 'exec --no-startup-id x11bell play -nqV0 synth .1 sq norm -12'
|
||||
fi
|
||||
echo 'exec --no-startup-id clipster -d'
|
||||
# Clipboard manager
|
||||
if [[ $usingSway -eq 0 ]]; then
|
||||
# Sway: use Wayland clipboard manager
|
||||
if command -v wl-paste &> /dev/null && command -v clipman &> /dev/null; then
|
||||
echo 'exec wl-paste -t text --watch clipman store'
|
||||
fi
|
||||
else
|
||||
# i3: use X11 clipboard manager
|
||||
echo 'exec --no-startup-id clipster -d'
|
||||
fi
|
||||
echo "exec $screenReader"
|
||||
echo "exec_always --no-startup-id ${i3Path}/scripts/desktop.sh"
|
||||
fi)
|
||||
|
||||
Reference in New Issue
Block a user