From 94e05c9a61db35e8c9843f6c1f6bb0147a9c73d3 Mon Sep 17 00:00:00 2001 From: Honney Date: Tue, 9 Jun 2026 21:32:59 +0200 Subject: [PATCH] fix to install and autostart --- install.sh | 74 ++++++++++------------------------ scripts/autostart/autostart.sh | 7 +++- 2 files changed, 27 insertions(+), 54 deletions(-) diff --git a/install.sh b/install.sh index 859e8fa..10bc87a 100755 --- a/install.sh +++ b/install.sh @@ -1,61 +1,29 @@ SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)" WALLPAPER_DIR=$(scripts/install/wallpaper_dir.sh) -if [ -e "$SCRIPT_DIR/user_config/monitor.conf" ]; then - echo "User monitor.conf allready exists" -else - echo "Creating User monitor.conf" - cp "$SCRIPT_DIR/examples/monitor.conf.example" "$SCRIPT_DIR/user_config/monitor.conf" -fi +copy_missing() { + local dest="$1" + local filename + filename="$(basename "$dest")" + local src="$SCRIPT_DIR/examples/$filename.example" -if [ -e "$SCRIPT_DIR/user_config/input.conf" ]; then - echo "User input.conf allready exists" -else - echo "Creating User input.conf" - cp "$SCRIPT_DIR/examples/input.conf.example" "$SCRIPT_DIR/user_config/input.conf" -fi + if [ -e "$dest" ]; then + echo "Already exists: $dest" + else + echo "Creating: $dest" + cp "$src" "$dest" + fi +} -if [ -e "$SCRIPT_DIR/user_config/workspace.conf" ]; then - echo "User workspace.conf allready exists" -else - echo "Creating User workspace.conf" - cp "$SCRIPT_DIR/examples/workspace.conf.example" "$SCRIPT_DIR/user_config/workspace.conf" -fi - -if [ -e "$SCRIPT_DIR/scripts/autostart/workspace" ]; then - echo "User workspace allready exists" -else - echo "Creating User workspace" - cp "$SCRIPT_DIR/examples/workspace.example" "$SCRIPT_DIR/scripts/autostart/workspace" -fi - -if [ -e "$SCRIPT_DIR/user_config/input.conf" ]; then - echo "User input.conf allready exists" -else - echo "Creating User input.conf" - cp "$SCRIPT_DIR/examples/input.conf.example" "$SCRIPT_DIR/user_config/input.conf" -fi - -if [ -e "$SCRIPT_DIR/hyprlock.conf" ]; then - echo "User hyprlock.conf allready exists" -else - echo "Creating User monitor.conf" - cp "$SCRIPT_DIR/examples/hyprlock.conf.example" "$SCRIPT_DIR/hyprlock.conf" -fi - -if [ -e "$SCRIPT_DIR/hyprpaper.conf" ]; then - echo "User hyprpaper.conf allready exists" -else - echo "Creating User hyprpaper.conf" - cp "$SCRIPT_DIR/examples/hyprpaper.conf.example" "$SCRIPT_DIR/hyprpaper.conf" -fi - -if [ -e "$SCRIPT_DIR/config/autostart.conf" ]; then - echo "User autostart.conf allready exists" -else - echo "Creating User autostart.conf" - cp "$SCRIPT_DIR/examples/autostart.conf.example" "$SCRIPT_DIR/config/autostart.conf" -fi +copy_missing "$SCRIPT_DIR/user_config/monitor.conf" +copy_missing "$SCRIPT_DIR/user_config/input.conf" +copy_missing "$SCRIPT_DIR/user_config/workspace.conf" +copy_missing "$SCRIPT_DIR/scripts/autostart/workspace" +copy_missing "$SCRIPT_DIR/user_config/bind.conf" +copy_missing "$SCRIPT_DIR/user_config/input.conf" +copy_missing "$SCRIPT_DIR/hyprlock.conf" +copy_missing "$SCRIPT_DIR/hyprpaper.conf" +copy_missing "$SCRIPT_DIR/config/autostart.conf" echo "The script will now install dependencies via pacman" sudo pacman -S --needed hyprland-qt-support hyprcursor hypridle hyprlock hypridle \ No newline at end of file diff --git a/scripts/autostart/autostart.sh b/scripts/autostart/autostart.sh index 2f3b28b..22931f6 100755 --- a/scripts/autostart/autostart.sh +++ b/scripts/autostart/autostart.sh @@ -98,4 +98,9 @@ while true; do fi sleep 0.5 -done \ No newline at end of file +done + +hyprctl dispatch workspace 4 +hyprctl dispatch workspace 3 +hyprctl dispatch workspace 2 +hyprctl dispatch workspace 1 \ No newline at end of file