A collection of custom Rust scripts for personal usage.
Run ./install.sh to install all. This deploys:
- Rust scripts to
$CARGO_HOME/bin/ - Shell scripts to
~/.bin/
rustto compile the rust scriptsscrotforbin/screenlockiwconfigfornetinfo(pkg:wireless_tools)iwfornetinfopw-dumpforbin/fix_xonar_outputandbin/change_sink
There's the ./install.sh script, which does all of the work for you.
- It copies all shell scripts into your
~/.binfolder. - It compiles the rust scripts and copies them over to your
~/.binfolder. - Make sure to add your
~/.binto your path.
If you want to adjust the target directory (~/.bin), update the BIN_FOLDER variable in the install.sh script.
For the shell scripts:
- Just copy any script from the
./shellfolder you like to your target directory.
For the rust code:
Option 1:
- Run
cargo install --path ./ - Add the
$CARGO_HOME/binto your$PATH, which by default is~/.cargo/bin.
Option 2:
- Run
cargo build --locked --release - Copy the binaries you want from the
./target/release/folder to your target directory.
There're two hooks, which automatically deploy the project when pulling new commits.
Great for syncing changes between multiple machines.
Screenlock trigger on sleep via a systemd service looks like this:
[Unit]
Description=Lock the screen
Before=sleep.target
[Service]
User=%i
Group=%i
Type=forking
Environment=DISPLAY=:0
ExecStart=/home/%i/.cache/cargo/bin/blur 5 -vvv
[Install]
WantedBy=sleep.target