Skip to content

Commit

Permalink
Moved install scripts to separate directory and cleaned them up a bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAlexDev23 committed Sep 14, 2024
1 parent f1d38fc commit 35bd83f
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 46 deletions.
24 changes: 17 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ AUR: `power-options-gtk` or `power-options-gtk-git` for bleeding edge

```bash
git clone https://github.com/TheAlexDev23/power-options/ --depth=1
cd power-options
chmod +x ./install-gtk.sh
cd power-options/scripts
chmod +x *.sh
# Run as local user, will require sudo password
./install-gtk.sh
```
Expand All @@ -102,8 +102,8 @@ AUR: `power-options-webview` or `power-options-webview-git` for bleeding edge
# dioxus-cli is required
cargo install dioxus-cli
git clone https://github.com/TheAlexDev23/power-options/ --depth=1
cd power-options
chmod +x ./install-webview.sh
cd power-options/scripts
chmod +x *.sh
# Run as local user, will require sudo password
./install-webview.sh
```
Expand All @@ -114,10 +114,10 @@ AUR: `power-options-daemon` or `power-options-daemon-git` for bleeding edge

```bash
git clone https://github.com/TheAlexDev23/power-options/ --depth=1
cd power-options
chmod +x ./install-webview.sh
cd power-options/scripts
chmod +x *.sh
# Run as local user, will require sudo password
./install-daemon-only.sh
./install-daemon.sh
```

## Dependencies
Expand All @@ -142,6 +142,16 @@ GTK frontend:
- yad
- libadwaita

## Updating

If you've installed using the AUR, your package manager should handle the
updates.

If you've installed using install scripts, simply pull the latest changes and
re-run the install scripts again. **Important, do not run ./uninstall.sh if you
want to keep your profiles**


## Limitations
- Network configuration only works on intel cards and cards that use iwlwifi
- Resolution and refresh rate control only works on X11 (other options should
Expand Down
2 changes: 1 addition & 1 deletion crates/power-daemon-mgr/dev-tmp-install-clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cargo build
sudo rm /usr/lib/systemd/system/power-options.service
sudo cp ../../target/debug/power-daemon-mgr -f /usr/bin/
sudo power-daemon-mgr -vvv generate-base-files --path / --program-path /usr/bin/power-daemon-mgr --verbose-daemon
sudo power-daemon-mgr -vvv generate-configt-files --path /
sudo power-daemon-mgr -vvv generate-config-files --path /
sudo systemctl restart acpid
sudo systemctl daemon-reload
sudo systemctl restart power-options
27 changes: 0 additions & 27 deletions install-gtk.sh

This file was deleted.

File renamed without changes.
17 changes: 17 additions & 0 deletions scripts/install-gtk.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

set -e

./install-daemon.sh

pushd crates/frontend-gtk
cargo build --release
popd

sudo cp -f target/release/frontend-gtk /usr/bin/power-options-gtk

sudo cp -f icon.png /usr/share/icons/power-options.png

sudo cp -f install/power-options-gtk.desktop /usr/share/applications/

echo "If you see D-Bus related issues, please restart your system."
12 changes: 1 addition & 11 deletions install-webview.sh → scripts/install-webview.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,17 @@

set -e

pushd crates/power-daemon-mgr
cargo build --release
popd
./install-daemon.sh

pushd crates/frontend-webview
dx build --release
popd

sudo cp -f target/release/power-daemon-mgr /usr/bin/
sudo cp -f target/release/frontend /usr/bin/power-options-webview

sudo target/release/power-daemon-mgr -v generate-base-files --path / --program-path /usr/bin/power-daemon-mgr

sudo mkdir /usr/lib/power-options-webview
sudo cp -r crates/frontend-webview/assets /usr/lib/power-options-webview

sudo systemctl restart acpid
sudo systemctl daemon-reload
sudo systemctl enable power-options
sudo systemctl start power-options

sudo cp -f icon.png /usr/share/icons/power-options.png

sudo cp -f install/power-options-webview.desktop /usr/share/applications/
Expand Down
File renamed without changes.

0 comments on commit 35bd83f

Please sign in to comment.