Add desktop branch ...

... that assumes a running GNOME on X11
This commit is contained in:
Alexander Hess 2026-08-16 23:33:16 +02:00
commit 46b9bacd18
Signed by: alexander
GPG key ID: B46EDB4DFC26805D
2 changed files with 32 additions and 9 deletions

View file

@ -16,10 +16,11 @@ XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}"
# Each branch's first commit sets the default to its own name # Each branch's first commit sets the default to its own name
# => Overridable via the environment (e.g., done by `dotfiles-update`) # => Overridable via the environment (e.g., done by `dotfiles-update`)
DOTFILES_BRANCH="${DOTFILES_BRANCH:-main}" DOTFILES_BRANCH="${DOTFILES_BRANCH:-desktop}"
DOTFILES_DIR="${DOTFILES_DIR:-$XDG_DATA_HOME/dotfiles}" DOTFILES_DIR="${DOTFILES_DIR:-$XDG_DATA_HOME/dotfiles}"
DOTFILES_HTTPS="${DOTFILES_HTTPS:-https://code.webartifex.de/alexander/dotfiles}" DOTFILES_HTTPS="${DOTFILES_HTTPS:-https://code.webartifex.de/alexander/dotfiles}"
DOTFILES_SSH="${DOTFILES_SSH:-git@git.webartifex.de:alexander/dotfiles.git}"
BACKUPS_DIR="$XDG_STATE_HOME/dotfiles-backups" BACKUPS_DIR="$XDG_STATE_HOME/dotfiles-backups"
BACKUP_DIR="$BACKUPS_DIR/$(date +%Y%m%d-%H%M%S)" BACKUP_DIR="$BACKUPS_DIR/$(date +%Y%m%d-%H%M%S)"
@ -129,6 +130,18 @@ _git checkout --force "$DOTFILES_BRANCH"
_git config --local status.showUntrackedFiles no _git config --local status.showUntrackedFiles no
# Prefer `ssh` for syncing, but only if this machine may have access,
# which we proxy with the presence of a default private key file
for _key in id_ed25519 id_ecdsa id_rsa; do
if [ -f "$HOME/.ssh/$_key" ]; then
_git remote set-url origin "$DOTFILES_SSH"
echo "The dotfiles now sync via: $DOTFILES_SSH"
break
fi
done
unset _key
if command -v batcat >/dev/null 2>&1 && ! command -v bat >/dev/null 2>&1; then if command -v batcat >/dev/null 2>&1 && ! command -v bat >/dev/null 2>&1; then
ln -sf "$(command -v batcat)" "$XDG_BIN_HOME/bat" ln -sf "$(command -v batcat)" "$XDG_BIN_HOME/bat"
fi fi

View file

@ -26,7 +26,7 @@ If I told you to go here and copy/paste my public `ssh` keys
either [here](.ssh/authorized_keys_webartifex) either [here](.ssh/authorized_keys_webartifex)
or [here](https://code.webartifex.de/alexander.keys). or [here](https://code.webartifex.de/alexander.keys).
Read [this](https://code.webartifex.de/alexander/dotfiles/src/branch/main/.ssh#how-the-keys-are-managed) Read [this](https://code.webartifex.de/alexander/dotfiles/src/branch/desktop/.ssh#how-the-keys-are-managed)
for how the keys are managed. for how the keys are managed.
@ -35,18 +35,28 @@ Read [this](https://code.webartifex.de/alexander/dotfiles/src/branch/main/.ssh#h
Simply run: Simply run:
```sh ```sh
curl https://code.webartifex.de/alexander/dotfiles/raw/branch/main/.local/bin/dotfiles-install > dotfiles-install && sh ./dotfiles-install && rm ./dotfiles-install curl https://code.webartifex.de/alexander/dotfiles/raw/branch/desktop/.local/bin/dotfiles-install > dotfiles-install && sh ./dotfiles-install && rm ./dotfiles-install
``` ```
or or
```sh ```sh
wget https://code.webartifex.de/alexander/dotfiles/raw/branch/main/.local/bin/dotfiles-install -O dotfiles-install && sh ./dotfiles-install && rm ./dotfiles-install wget https://code.webartifex.de/alexander/dotfiles/raw/branch/desktop/.local/bin/dotfiles-install -O dotfiles-install && sh ./dotfiles-install && rm ./dotfiles-install
``` ```
This downloads a simple [installation script](.local/bin/dotfiles-install) This downloads a simple [installation script](.local/bin/dotfiles-install)
and then executes it. and then executes it.
The script's only dependency is [`git`](https://git-scm.com/). Besides [git](https://git-scm.com/), the script assumes
a [Debian](https://www.debian.org/) 13 desktop
with [GNOME](https://www.gnome.org/) 48+
on [X11](https://www.x.org/),
though older GNOME versions
and [Wayland](https://wayland.freedesktop.org/) should mostly work,
except for some X11-only stuff.
Further, it uses
[`python3`](https://www.python.org/) with `pip`
to generate the [color palette](.local/bin/color-palette)
and enables a few `systemd` user units.
So, it should not be too hard to get this going. So, it should not be too hard to get this going.
The repository is cloned as a bare repository into `~/.local/share/dotfiles` The repository is cloned as a bare repository into `~/.local/share/dotfiles`
@ -56,12 +66,12 @@ Afterwards, the files can be managed with the
[`dotfiles` alias](.config/shell/aliases), [`dotfiles` alias](.config/shell/aliases),
for example, `dotfiles status` or `dotfiles pull`. for example, `dotfiles status` or `dotfiles pull`.
The above commands install the *main* variant. The above commands install the *desktop* variant.
To install the *desktop* variant, To install the *main* variant,
switch to the [desktop](https://code.webartifex.de/alexander/dotfiles/src/branch/desktop) branch first. switch to the [main](https://code.webartifex.de/alexander/dotfiles/src/branch/main) branch first.
Normally, I advise against executing shell scripts from the internet, Normally, I advise against executing shell scripts from the internet,
but this one is short enough to be read even by beginners. but this one is still short enough to be read in a few minutes.
So, convince yourself that it is not harmful! So, convince yourself that it is not harmful!