#!/usr/bin/env bash

if [[ "$SXMO_WM" ]]; then
	PRIV=doas
	UPDATE="$PRIV sh -c 'apk update && apk upgrade -aiv && apk fix'"
	COPY_COMMAND="wl-copy"
	PASTE_COMMAND="wl-paste"
	WIFI=wlan0
elif [[ -d /gnu ]]; then
	PRIV=sudo
	UPDATE="$PRIV su - -c 'guix pull --branch=master && guix system reconfigure /etc/config.scm && guix package -u'; guix pull --branch=master && guix home reconfigure ~/.config/guix/home.scm && guix package -u"
	COPY_COMMAND="wl-copy"
	PASTE_COMMAND="wl-paste"
	WIFI=wlp2s0
else
	PRIV=sudo
	UPDATE="$PRIV sh -c 'apt update && apt upgrade && apt autoremove'"
	COPY_COMMAND="xclip -i -selection clipboard"
	PASTE_COMMAND="xclip -o -selection clipboard"
	WIFI=wlp2s0
fi
