Skip to content

Commit

Permalink
removed unused features, updated config directory
Browse files Browse the repository at this point in the history
  • Loading branch information
PTFOPlayer committed Mar 18, 2023
1 parent 5663337 commit 56ea44f
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 71 deletions.
4 changes: 2 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ sudo cp target/release/screenpad_rs /usr/bin
sudo cp ./src/brightness.sh /usr/bin/brightness.sh
sudo cp ./src/current.sh /usr/bin/current.sh
sudo cp ./screenpad_rs.service /etc/systemd/system/
sudo mkdir /usr/share/screenpad_rs
sudo echo 100 > /usr/share/screenpad_rs/brightness
sudo mkdir /var/screenpad_rs/
sudo echo 100 > /var/screenpad_rs/brightness
Binary file added screenpad_rs_binaries.tar
Binary file not shown.
Binary file removed screenpad_rs_binaries.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion src/brightness.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
echo "$@" | sudo tee '/sys/class/leds/asus::screenpad/brightness'
echo "$@" > /usr/share/screenpad_rs/brightness
echo "$@" > /var/screenpad_rs/brightness
2 changes: 1 addition & 1 deletion src/current.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cat /usr/share/screenpad_rs/brightness
cat /var/screenpad_rs/brightness
49 changes: 0 additions & 49 deletions src/installer.rs

This file was deleted.

18 changes: 0 additions & 18 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use std::{
thread::sleep,
time::Duration,
};
mod installer;

lazy_static! {
static ref ARGS:Vec<String> = {
Expand All @@ -17,12 +16,6 @@ lazy_static! {
};
static ref ARG_1:String = ARGS[1].clone();
static ref ARG_2:String = ARGS[2].clone();

// change this to true if you want to use build in installer
// installer installs Plippos Asus-wmi-screenpad
// please do not use it
static ref INSTALLER_STATUS: bool = false;
// static ref INSTALLER_STATUS: bool = true;
}

fn main() {
Expand All @@ -31,17 +24,6 @@ fn main() {

fn arg_parser() {
match ARG_1.as_str() {
"--install" | "-i" => {
if *INSTALLER_STATUS {
if installer::install_asus_wmi() {
println!("After reboot run:\n sudo chmod a+w '/sys/class/leds/asus::screenpad/brightness'", )
} else {
println!("Error installing")
}
} else {
println!("installer disabled, you can enable it by commenting line 19 and uncommenting line 20")
}
}
"--brightness" | "-b" => {
let brightness = ARG_2.as_str();
let b_int: i32 = match brightness.parse() {
Expand Down

0 comments on commit 56ea44f

Please sign in to comment.