summary refs log tree commit diff
path: root/vm/app/catgirl/etc/s6-rc/catgirl/run
blob: 41ae0aa21c2045b8d5c6d3e0f1681b1dfb097b50 (plain) (blame)
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
#!/bin/execlineb -P
# SPDX-License-Identifier: EUPL-1.2+
# SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is>

export TERM foot
export TERMINFO_DIRS /usr/share/terminfo
export TMPDIR /run

backtick USER { id -un }
backtick HOME {
  importas -i user USER
  homeof $user
}

importas -i home HOME
cd $home

redirfd -u 0 /dev/hvc0
fdmove -c 1 0
fdmove -c 2 0

foreground { clear }
unexport ?

# Run catgirl, then a login shell to allow for debugging.
foreground { printf "IRC nick (to join #spectrum): " }
foreground {
  backtick -E nick { head -1 }
  catgirl -h irc.libera.chat -j "#spectrum" -n $nick
}
exec -l sh