Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document dependencies #2

Open
BlueDrink9 opened this issue Aug 12, 2024 · 2 comments
Open

Document dependencies #2

BlueDrink9 opened this issue Aug 12, 2024 · 2 comments

Comments

@BlueDrink9
Copy link

Thanks for this. Just a note, this seems to depend on qt6-base-dev (ubuntu) / qt6-qtbase-devel (fedora).

Also might be helpful to just point people to an install.sh like this, that creates the systemd service too:

#!/bin/bash

# Variables
SERVICE_NAME="fakwin.service"
SERVICE_DIR="$HOME/.config/systemd/user"
SERVICE_PATH="$SERVICE_DIR/$SERVICE_NAME"
EXECUTABLE="$HOME/.local/bin/fakwin"

# Build the binary
mkdir -p build
cd build
cmake ..
make
mkdir -p "$(dirname "$EXECUTABLE")"
mv fakwin "$EXECUTABLE"

# Ensure the service directory exists
mkdir -p "$SERVICE_DIR"

# Create the service file
cat << EOF > "$SERVICE_PATH"
[Unit]
Description=Run fakwin binary to fix shutdowns on custom WM plasma.

# For running before shutdown
DefaultDependencies=no
Before=shutdown.target reboot.target halt.target poweroff.target

[Service]
ExecStart=$EXECUTABLE
Restart=always
Type=simple

[Install]
# run before shutdown
WantedBy=shutdown.target
EOF

# Reload systemd to recognize the new service
systemctl --user daemon-reload
# Enable the service to start on boot or before shutdown
systemctl --user enable "$SERVICE_NAME"
# Start the service immediately (optional)
systemctl --user start "$SERVICE_NAME"
@DMaroo
Copy link
Owner

DMaroo commented Aug 15, 2024

Hey, thanks for the point about dependencies. I'll add a note for the same. Thank you for the script as well, but I would rather let people choose how they want to run this script (whether they want to use a systemd service or something else).

And in any case, this is a just a temporary fix. I would rather wish that users complain to the upstream, urging them to fix it, than make the hacky fix a simple click-to-install solution. :)

@BlueDrink9
Copy link
Author

Fair point!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants