| 1 | #!/bin/bash |
| 2 | # gar session wrapper - sets up environment before starting gar |
| 3 | |
| 4 | GAR_DIR="$(cd "$(dirname "$0")" && pwd)" |
| 5 | |
| 6 | # Optional: configure monitor layout |
| 7 | # Uncomment and customize for your setup: |
| 8 | # xrandr --output eDP-1 --mode 2880x1800 --pos 0x0 |
| 9 | # xrandr --output DP-1 --mode 1920x1080 --pos 0x0 \ |
| 10 | # --output HDMI-1 --mode 2560x1440 --pos 1920x0 |
| 11 | |
| 12 | # Ensure gar config directory exists |
| 13 | mkdir -p ~/.config/gar |
| 14 | |
| 15 | # Launch compositor before WM (for proper screen repainting) |
| 16 | # gar generates picom.conf on startup and signals picom to reload |
| 17 | if command -v picom &> /dev/null; then |
| 18 | if [[ -f ~/.config/gar/picom.conf ]]; then |
| 19 | picom -b --config ~/.config/gar/picom.conf & |
| 20 | else |
| 21 | # First run: start with GLX backend, gar will generate config and signal reload |
| 22 | picom -b --backend glx & |
| 23 | fi |
| 24 | sleep 0.1 |
| 25 | fi |
| 26 | |
| 27 | # Set log level |
| 28 | export GAR_LOG=info |
| 29 | |
| 30 | # Launch polybar after gar starts (needs i3 IPC socket) |
| 31 | (sleep 0.5 && ~/.config/polybar/launch.sh) & |
| 32 | |
| 33 | # Start gar |
| 34 | exec /home/mfwolffe/GithubOrgs/tenseleyFlow/gar/target/release/gar |