dotfiles/scripts/telegram-desktop

26 lines
761 B
Plaintext
Raw Normal View History

2023-10-03 23:52:45 +05:00
#!/bin/bash
2023-10-04 02:18:48 +05:00
SOCKET_ID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | head -c 8)
# Start socat in the background
socat UNIX-LISTEN:/tmp/xdg-open$SOCKET_ID.socket,fork EXEC:"xargs -n 1 xdg-open" &
# Run the Podman container
2023-10-03 23:52:45 +05:00
podman run --rm \
--name 64gram \
--hostname 64gram \
-e DISPLAY \
--device /dev/snd:/dev/snd \
--device /dev/video0:/dev/video0 \
-v $HOME/.local/share/64Gram:/root/.local/share/64Gram \
-v $HOME/Downloads:/root/Downloads \
-v $HOME/Pictures:/root/Pictures \
-v $HOME/Documents:/root/Documents \
-v /usr/share/icons:/usr/share/icons \
-v /tmp/.X11-unix:/tmp/.X11-unix \
2023-10-04 02:18:48 +05:00
-v /tmp/xdg-open$SOCKET_ID.socket:/tmp/xdg-open.socket \
2023-10-03 23:52:45 +05:00
git.shihaam.dev/dockerfiles/64gram
2023-10-04 02:18:48 +05:00
# Wait for all background processes to finish
wait