blob: ba86ecdd0bc7b693d8991ee1d854fc695ccc4915 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
#!/bin/bash
set_wallpaper() {
if [[ "$(loginctl show-session "$XDG_SESSION_ID" -p Type --value)" != wayland ]]; then
if [[ -x /usr/bin/feh ]] ; then # x11
/usr/bin/feh --bg-scale /usr/share/backgrounds/redcore-community/0.png & disown
fi
else
if [[ -x /usr/bin/swaybg ]] ; then # wayland
/usr/bin/swaybg --image /usr/share/backgrounds/redcore-community/0.png & disown
fi
fi
}
start_polkit_agent() {
if [[ -x /usr/libexec/polkit-kde-authentication-agent-1 ]] ; then
pkill -f /usr/libexec/polkit-kde-authentication-agent-1
/usr/libexec/polkit-kde-authentication-agent-1 & disown
elif [[ -x /usr/libexec/polkit-gnome-authentication-agent-1 ]] ; then
pkill -f /usr/libexec/polkit-gnome-authentication-agent-1
/usr/libexec/polkit-gnome-authentication-agent-1 & disown
fi
}
start_notification_daemon() {
if [[ -x /usr/bin/dunst ]] ; then
pkill -f dunst
/usr/bin/dunst & disown
fi
}
start_compositor() {
if [[ "$(loginctl show-session "$XDG_SESSION_ID" -p Type --value)" != wayland ]]; then
if [[ -x /usr/bin/picom ]] ; then # x11
pkill -f picom
/usr/bin/picom --vsync & disown
fi
fi
}
start_nm-applet() {
if [[ -x /usr/bin/nm-applet ]] ; then
pkill -f nm-applet
/usr/bin/nm-applet & disown
fi
}
start_pipewire() {
if [[ -x /usr/bin/gentoo-pipewire-launcher ]] ; then
/usr/bin/gentoo-pipewire-launcher restart & disown
fi
}
start_xdg-desktop-portal() {
if [[ -x /usr/libexec/xdg-desktop-portal-wlr ]] ; then
pkill -f xdg-desktop-portal-wlr
/usr/libexec/xdg-desktop-portal-wlr & disown
fi
}
main() {
set_wallpaper
start_polkit_agent
start_notification_daemon
start_compositor
start_nm-applet
start_pipewire
start_xdg-desktop-portal
}
main
|