-
Notifications
You must be signed in to change notification settings - Fork 1
/
07-greetd.sh
54 lines (40 loc) · 1.29 KB
/
07-greetd.sh
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
#!/usr/bin/env sh
pacman -S --noconfirm gtk-layer-shell > /dev/null 2>&1
pacman -S --noconfirm rust > /dev/null 2>&1
git clone https://git.sr.ht/~kennylevinsen/greetd /usr/local/src/greetd > /dev/null 2>&1
cd /usr/local/src/greetd/
git checkout 0.8.0 > /dev/null 2>&1
cargo build --release
cp target/release/greetd /usr/local/bin/
cp greetd.service /etc/systemd/system/
mkdir /etc/greetd
useradd -r -G video -s /usr/bin/nologin greeter
chown -R greeter:greeter /etc/greetd/
git clone https://git.sr.ht/~kennylevinsen/gtkgreet /usr/local/src/gtkgreet > /dev/null 2>&1
cd /usr/local/src/gtkgreet/
git checkout 0.7 > /dev/null 2>&1
meson -Dlayershell=true build
ninja -C build
ninja -C build install
cat << EOF > /etc/greetd/config.toml
[terminal]
vt = 1
[default_session]
command = "sway --config /etc/greetd/gtkgreet-sway-config"
user = "greeter"
EOF
cat << EOF > /etc/greetd/gtkgreet-sway-config
# '-l' activates layer-shell mode. Notice that 'swaymsg exit' will run after gtkgreet.
exec "gtkgreet -l; swaymsg exit"
bindsym Mod1+shift+e exec swaynag \
-t warning \
-m 'What do you want to do?' \
-b 'Poweroff' 'systemctl poweroff' \
-b 'Reboot' 'systemctl reboot'
include /etc/sway/config.d/*
EOF
cat << EOF > /etc/greetd/environments
sway
fish
EOF
systemctl enable greetd > /dev/null 2>&1