You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
632 B
23 lines
632 B
#!/bin/sh
|
|
|
|
DATA_DIR="$HOME/.config/chromium/Twitch"
|
|
CHANNEL="ianmethyst"
|
|
|
|
WINDOW_WIDTH="400"
|
|
WINDOW_HEIGHT="600"
|
|
WINDOW_GEOMETRY="$WINDOW_WIDTH,$WINDOW_HEIGHT"
|
|
|
|
RESOLUTION=$(xrandr |awk '$0 ~ "*" {print $1}')
|
|
SCREEN_WIDTH=$(echo $RESOLUTION | cut -d "x" -f 1)
|
|
SCREEN_HEIGHT=$(echo $RESOLUTION | cut -d "x" -f 2)
|
|
WINDOW_X=$(($SCREEN_WIDTH / 2 - WINDOW_WIDTH / 2))
|
|
WINDOW_Y=$(($SCREEN_HEIGHT / 2 - WINDOW_HEIGHT / 2))
|
|
WINDOW_POSITION="$WINDOW_X,$WINDOW_Y"
|
|
|
|
chromium \
|
|
--user-data-dir="$DATA_DIR" \
|
|
--window-position="$WINDOW_POSITION" \
|
|
--window-size="$WINDOW_GEOMETRY" \
|
|
--app="https://www.twitch.tv/popout/$CHANNEL/chat" \
|
|
|