/ de-omarchy / bin / omarchy-version-channel
swadhinbiswas Initial de-omarchy: Omarchy UI layer for Arch-based distros · 8/22/2026
9f393b2
28 lines · 664 Bytes
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
#!/bin/bash

# omarchy:summary=Print the active Omarchy mirror and package channel

if grep -q "https://stable-mirror.omarchy.org/" /etc/pacman.d/mirrorlist; then
  mirror="stable"
elif grep -q "https://rc-mirror.omarchy.org/" /etc/pacman.d/mirrorlist; then
  mirror="rc"
elif grep -q "https://mirror.omarchy.org/" /etc/pacman.d/mirrorlist; then
  mirror="edge"
else
  mirror="unknown"
fi

if grep -q "https://pkgs.omarchy.org/stable/" /etc/pacman.conf; then
  pkgs="stable"
elif grep -q "https://pkgs.omarchy.org/edge/" /etc/pacman.conf; then
  pkgs="edge"
else
  pkgs="unknown"
fi

if [[ $mirror == $pkgs ]]; then
  echo $mirror
else
  echo "$mirror / $pkgs"
fi