Simplify mirror/pkgs to just channel

This commit is contained in:
David Heinemeier Hansson
2025-11-22 10:50:23 +01:00
parent f6cd5e076d
commit 88a1141301
5 changed files with 27 additions and 28 deletions

View File

@@ -5,11 +5,11 @@ sudo cp -f ~/.local/share/omarchy/default/pacman/pacman.conf /etc/pacman.conf
if [[ $1 == "edge" ]]; then if [[ $1 == "edge" ]]; then
sudo cp -f ~/.local/share/omarchy/default/pacman/mirrorlist-edge /etc/pacman.d/mirrorlist sudo cp -f ~/.local/share/omarchy/default/pacman/mirrorlist-edge /etc/pacman.d/mirrorlist
sudo sed -i 's|https://pkgs.omarchy.org/.*$arch|https://pkgs.omarchy.org/edge/$arch|' /etc/pacman.conf sudo sed -i 's|https://pkgs.omarchy.org/.*$arch|https://pkgs.omarchy.org/edge/$arch|' /etc/pacman.conf
echo "Setting mirror and pkgs channel to edge" echo "Setting channel to edge"
else else
sudo cp -f ~/.local/share/omarchy/default/pacman/mirrorlist-stable /etc/pacman.d/mirrorlist sudo cp -f ~/.local/share/omarchy/default/pacman/mirrorlist-stable /etc/pacman.d/mirrorlist
sudo sed -i 's|https://pkgs.omarchy.org/.*$arch|https://pkgs.omarchy.org/stable/$arch|' /etc/pacman.conf sudo sed -i 's|https://pkgs.omarchy.org/.*$arch|https://pkgs.omarchy.org/stable/$arch|' /etc/pacman.conf
echo "Setting mirror and pkgs channel to stable" echo "Setting channel to stable"
fi fi
echo echo

23
bin/omarchy-version-channel Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
if grep -q "https://stable-mirror.omarchy.org/" /etc/pacman.d/mirrorlist; then
mirror="stable"
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

View File

@@ -1,9 +0,0 @@
#!/bin/bash
if grep -q "https://stable-mirror.omarchy.org/" /etc/pacman.d/mirrorlist; then
echo "stable"
elif grep -q "https://mirror.omarchy.org/" /etc/pacman.d/mirrorlist; then
echo "edge"
else
echo "unknown"
fi

View File

@@ -1,9 +0,0 @@
#!/bin/bash
if grep -q "https://pkgs.omarchy.org/stable/" /etc/pacman.conf; then
echo "stable"
elif grep -q "https://pkgs.omarchy.org/edge/" /etc/pacman.conf; then
echo "edge"
else
echo "unknown"
fi

View File

@@ -76,15 +76,9 @@
}, },
{ {
"type": "command", "type": "command",
"key": "│ ├󱞠", "key": "│ ├󰔫",
"keyColor": "blue", "keyColor": "blue",
"text": "mirror=$(omarchy-version-mirror); echo \"$mirror\"" "text": "channel=$(omarchy-version-channel); echo \"$channel\""
},
{
"type": "command",
"key": "│ ├",
"keyColor": "blue",
"text": "pkgs=$(omarchy-version-pkgs); echo \"$pkgs\""
}, },
{ {
"type": "kernel", "type": "kernel",