diff --git a/brightness.nim b/brightness.nim index 4286029..5e37bcc 100644 --- a/brightness.nim +++ b/brightness.nim @@ -47,7 +47,7 @@ proc brightnessDown() = proc getBrightness*(run_once: bool = false) = var last_pcnt: float = 0 while true: - let current = parseInt(strip(readFile("/sys/class/backlight/" & backlight & "actual_brightness"))) + let current = parseInt(strip(readFile("/sys/class/backlight/" & backlight & "/actual_brightness"))) let pcnt = (current/limit)*100 if pcnt != last_pcnt: let text = getDesign(pcnt) diff --git a/compile_all.sh b/compile_all.sh index 9750910..177c78a 100644 --- a/compile_all.sh +++ b/compile_all.sh @@ -1,5 +1,26 @@ #!/bin/bash +dont_compile="./base.nim" +req_ssl=("./translate.nim" "./tides.nim") for f in ./*.nim; do - nim c $f + if [[ $f == $dont_compile ]]; then + echo "Not compiling $f" + continue + fi + compiled=0 + for i in "${req_ssl[@]}" + do + if [[ $f == $i ]]; then + echo "Compiling $f with SSL" + nim c -d:ssl $f + compiled=1 + break + fi + done + if [[ $compiled == 1 ]]; then + continue + else + echo "Compiling $f" + nim c $f + fi done