diff options
author | dianshi <dianshi@main.lv> | 2020-07-18 18:31:13 +0100 |
---|---|---|
committer | dianshi <dianshi@main.lv> | 2020-07-18 18:31:13 +0100 |
commit | e00d2439c9a327198845303d293fb0e0a4a4439f (patch) | |
tree | d9d39479f49f0d2983cb6c3f84b607818d446118 /obacklight | |
parent | 167af45ab98240f9930424dec6784ccb875f7b04 (diff) | |
download | osystem-e00d2439c9a327198845303d293fb0e0a4a4439f.tar.gz osystem-e00d2439c9a327198845303d293fb0e0a4a4439f.zip |
obacklight argument parsing is working
Diffstat (limited to 'obacklight')
-rw-r--r-- | obacklight/obacklight.ml | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/obacklight/obacklight.ml b/obacklight/obacklight.ml index 6360574..f5eb296 100644 --- a/obacklight/obacklight.ml +++ b/obacklight/obacklight.ml @@ -3,14 +3,14 @@ open Arg (* Sett default path to sysfs *) -let default_sysfs_dir = ref "/sys" +let default_sysfs_dir = ref "/sys" let default_backlight_path = ref (String.concat "" (List.append [!default_sysfs_dir] ["/class/backlight/intel_backlight"])) let default_backlight_maxbrightness_path = ref (String.concat "" (List.append [!default_backlight_path] ["/max_brightness"])) let default_backlight_brightness_path = ref (String.concat "" (List.append [!default_backlight_path] ["/brightness"])) -let set_backlight_path () = default_backlight_path := (String.concat "" (List.append [!default_sysfs_dir] ["/class/backlight/intel_backlight"])) -let set_backlight_maxbrightness_path () = default_backlight_maxbrightness_path := (String.concat "" (List.append [!default_backlight_path] ["/max_brightness"])) -let set_backlight_brightness_path () = default_backlight_brightness_path := (String.concat "" (List.append [!default_backlight_path] ["/brightness"])) +let set_backlight_path () = default_backlight_path := (String.concat "" (List.append [!default_sysfs_dir] ["/class/backlight/intel_backlight"])) +let set_backlight_maxbrightness_path () = default_backlight_maxbrightness_path := (String.concat "" (List.append [!default_backlight_path] ["/max_brightness"])) +let set_backlight_brightness_path () = default_backlight_brightness_path := (String.concat "" (List.append [!default_backlight_path] ["/brightness"])) let print_debug () = @@ -32,7 +32,7 @@ end let main = begin - (* + let speclist = [ ("-s",Arg.String (set_sysfs_dir),"Sysfs directory") @@ -41,7 +41,7 @@ begin let _ = Arg.parse speclist print_endline usage_msg in (* If there is not argument print value of default path *) (* If there is 1 argument set value to brigthness *) - *) + print_debug (); end |