summaryrefslogtreecommitdiff
path: root/install
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-01-28 16:45:16 +1100
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-01-28 16:45:16 +1100
commit587e29efe4584c8fa8016901302fd4214f78be66 (patch)
tree734816a3e818112cb706363478e6d3a6be7c1822 /install
parenttoggles: update communication (diff)
downloadcaelestia-cli-587e29efe4584c8fa8016901302fd4214f78be66.tar.gz
caelestia-cli-587e29efe4584c8fa8016901302fd4214f78be66.tar.bz2
caelestia-cli-587e29efe4584c8fa8016901302fd4214f78be66.zip
install scripts for all modules
Diffstat (limited to 'install')
-rwxr-xr-xinstall/discord.fish67
-rwxr-xr-xinstall/foot.fish13
-rwxr-xr-xinstall/fuzzel.fish28
-rwxr-xr-xinstall/hypr.fish16
-rwxr-xr-xinstall/safeeyes.fish12
-rwxr-xr-xinstall/scripts.fish17
-rwxr-xr-xinstall/shell.fish13
-rw-r--r--install/util.fish55
8 files changed, 221 insertions, 0 deletions
diff --git a/install/discord.fish b/install/discord.fish
new file mode 100755
index 0000000..c8f81d7
--- /dev/null
+++ b/install/discord.fish
@@ -0,0 +1,67 @@
+#!/bin/fish
+
+if test -z "$argv[1]"
+ echo 'Usage: caelestia install discord <client_config_folder_name>'
+ exit 1
+end
+
+. (dirname (status filename))/util.fish
+
+install-deps git
+
+set -l systemd $CONFIG/../systemd/user
+set -l client $CONFIG/../$argv[1]
+set -l discord $CONFIG/discord
+
+# Clone repo
+confirm-overwrite $discord
+git clone https://github.com/caelestia-dots/discord.git $discord
+
+# Install systemd service
+if test -d $systemd
+ log 'Installing systemd service...'
+
+ echo "[Service]
+Type=oneshot
+ExecStart=$discord/monitor/update.fish" > $systemd/discord-monitor-scheme.service
+ cp $discord/monitor/discord-monitor-scheme.path $systemd/discord-monitor-scheme.path
+
+ systemctl --user daemon-reload
+ systemctl --user enable --now discord-monitor-scheme.path
+ systemctl --user start discord-monitor-scheme.service
+end
+
+# Optionally install arRPC
+read -l -p "input 'Install arRPC? [Y/n] ' -n" confirm
+if test "$confirm" = 'n' -o "$confirm" = 'N'
+ log 'Skipping.'
+else
+ log 'Installing arRPC...'
+
+ install-deps npm
+ git clone 'https://github.com/OpenAsar/arrpc.git' $discord/arrpc
+ cd $discord/arrpc || exit
+ npm install
+
+ echo "[Unit]
+Description=arRPC Discord RPC daemon
+After=network.target
+
+[Service]
+Type=simple
+ExecStart=node $discord/arrpc/src
+Restart=on-failure
+WorkingDirectory=$discord/arrpc
+
+[Install]
+WantedBy=default.target" > $systemd/arrpc.service
+
+ systemctl --user daemon-reload
+ systemctl --user enable --now arrpc.service
+end
+
+# Link themes to client config
+confirm-overwrite $client/themes
+ln -s $discord/themes $client/themes
+
+log 'Done.'
diff --git a/install/foot.fish b/install/foot.fish
new file mode 100755
index 0000000..8e9c51e
--- /dev/null
+++ b/install/foot.fish
@@ -0,0 +1,13 @@
+#!/bin/fish
+
+. (dirname (status filename))/util.fish
+
+install-deps git foot inotify-tools
+
+set -l foot $CONFIG/../foot
+
+confirm-overwrite $foot
+git clone 'https://github.com/caelestia-dots/foot.git' $foot
+sed -i 's|$SRC|'$foot'|g' $foot/foot.ini
+
+log 'Done.'
diff --git a/install/fuzzel.fish b/install/fuzzel.fish
new file mode 100755
index 0000000..eb3bf3b
--- /dev/null
+++ b/install/fuzzel.fish
@@ -0,0 +1,28 @@
+#!/bin/fish
+
+. (dirname (status filename))/util.fish
+
+install-deps git fuzzel-git
+
+set -l systemd $CONFIG/../systemd/user
+set -l fuzzel $CONFIG/../fuzzel
+
+# Clone repo
+confirm-overwrite $fuzzel
+git clone 'https://github.com/caelestia-dots/fuzzel.git' $fuzzel
+
+# Install systemd service
+if test -d $systemd
+ log 'Installing systemd service...'
+
+ echo "[Service]
+Type=oneshot
+ExecStart=$fuzzel/monitor/update.fish" > $systemd/fuzzel-monitor-scheme.service
+ cp $fuzzel/monitor/fuzzel-monitor-scheme.path $systemd/fuzzel-monitor-scheme.path
+
+ systemctl --user daemon-reload
+ systemctl --user enable --now fuzzel-monitor-scheme.path
+ systemctl --user start fuzzel-monitor-scheme.service
+end
+
+log 'Done.'
diff --git a/install/hypr.fish b/install/hypr.fish
new file mode 100755
index 0000000..4ff9088
--- /dev/null
+++ b/install/hypr.fish
@@ -0,0 +1,16 @@
+#!/bin/fish
+
+. (dirname (status filename))/util.fish
+
+install-deps git uwsm hyprland-git hyprpaper-git hyprlock-git hypridle-git polkit-gnome gnome-keyring wl-clipboard wireplumber
+install-optional-deps 'gammastep (night light)' 'wlogout (secondary session menu)' 'grimblast-git (screenshot freeze)' 'hypricker-git (colour picker)' 'foot (terminal emulator)' 'firefox (web browser)' 'vscodium-bin (IDE)' 'thunar (file manager)' 'nemo (secondary file manager)' 'fuzzel (secondary app launcher)'
+
+set -l hypr $CONFIG/../hypr
+
+confirm-overwrite $hypr
+git clone 'https://github.com/caelestia-dots/hypr.git' $hypr
+
+sudo pacman -S --needed --noconfirm ydotool
+systemctl --user enable --now ydotool.service
+
+log 'Done.'
diff --git a/install/safeeyes.fish b/install/safeeyes.fish
new file mode 100755
index 0000000..93da2d2
--- /dev/null
+++ b/install/safeeyes.fish
@@ -0,0 +1,12 @@
+#!/bin/fish
+
+. (dirname (status filename))/util.fish
+
+install-deps git dart-sass aylurs-gtk-shell-git alsa-utils libappindicator-gtk3
+
+set -l safeeyes $CONFIG/safeeyes
+
+confirm-overwrite $safeeyes
+git clone 'https://github.com/caelestia-dots/safeeyes.git' $safeeyes
+
+log 'Done.'
diff --git a/install/scripts.fish b/install/scripts.fish
new file mode 100755
index 0000000..d31049d
--- /dev/null
+++ b/install/scripts.fish
@@ -0,0 +1,17 @@
+#!/bin/fish
+
+. (dirname (status filename))/util.fish
+
+install-deps git hyprland-git hyprpaper-git okolors-git imagemagick wl-clipboard fuzzel-git socat foot jq
+install-optional-deps 'vesktop-bin (discord client)' 'btop (system monitor)' 'wf-recorder (screen recorder)' 'grim (screenshot tool)' 'firefox (web browser)' 'spotify-adblock (music player)'
+
+set -l dist $CONFIG/scripts
+
+confirm-overwrite $dist
+
+git clone 'https://github.com/caelestia-dots/scripts.git' $dist
+
+mkdir -p ~/.local/bin
+ln -s $dist/main.fish ~/.local/bin/caelestia
+
+log 'Done.'
diff --git a/install/shell.fish b/install/shell.fish
new file mode 100755
index 0000000..ac3e228
--- /dev/null
+++ b/install/shell.fish
@@ -0,0 +1,13 @@
+#!/bin/fish
+
+. (dirname (status filename))/util.fish
+
+install-deps git dart-sass libastal-meta npm curl libnotify ttf-material-symbols-variable-git ttf-jetbrains-mono-nerd ttf-rubik-vf pacman-contrib
+install-optional-deps 'uwsm (for systems using uwsm)' 'yay (AUR package management)' 'fd (launcher file search)' 'wl-clipboard (clipboard support)' 'foot (opening stuff in terminal)'
+
+set -l shell $CONFIG/shell
+
+confirm-overwrite $shell
+git clone 'https://github.com/caelestia-dots/shell.git' $shell
+
+log 'Done.'
diff --git a/install/util.fish b/install/util.fish
new file mode 100644
index 0000000..3f54c86
--- /dev/null
+++ b/install/util.fish
@@ -0,0 +1,55 @@
+. (dirname (status filename))/../util.fish
+
+function confirm-overwrite -a path
+ if test -e $path
+ read -l -p "input '$(realpath $path) already exists. Overwrite? [y/N] ' -n" confirm
+ if test "$confirm" = 'y' -o "$confirm" = 'Y'
+ log 'Continuing.'
+ rm -rf $path
+ else
+ log 'Exiting.'
+ exit
+ end
+ end
+end
+
+function install-deps
+ # All dependencies already installed
+ pacman -Q $argv &> /dev/null && return
+
+ # Get AUR helper or install if none
+ which yay > /dev/null && set -l helper yay || set -l helper paru
+ if ! which paru > /dev/null
+ warn 'No AUR helper found'
+ read -l -p "input 'Install yay? [Y/n] ' -n" confirm
+ if test "$confirm" = 'n' -o "$confirm" = 'N'
+ warn "Manually install yay or paru and try again."
+ warn "Alternatively, install the dependencies '$argv' manually and try again."
+ exit
+ else
+ sudo pacman -S --needed git base-devel
+ git clone https://aur.archlinux.org/yay.git
+ cd yay
+ makepkg -si
+ cd ..
+ rm -rf yay
+
+ # First use, see https://github.com/Jguer/yay?tab=readme-ov-file#first-use
+ yay -Y --gendb
+ yay -Y --devel --save
+ end
+ end
+
+ # Install
+ log "Installing dependencies '$argv'"
+ $helper -S --needed --noconfirm $argv
+end
+
+function install-optional-deps
+ for dep in $argv
+ if ! pacman -Q $dep &> /dev/null
+ read -l -p "input 'Install $dep? [Y/n] ' -n" confirm
+ test "$confirm" != 'n' -a "$confirm" != 'N' && install-deps (cut -f 1 -d ' ' $dep)
+ end
+ end
+end