From b1c097d6bd0c0b0d0286c6636fe7fda610dfbd45 Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Sat, 18 Aug 2018 11:01:07 -0400 Subject: [PATCH] Adjust naming convention and fix usage (which was not even consistent with the previous convention) --- bin/khatus | 6 +++--- bin/khatus_bar | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/khatus b/bin/khatus index 8ae2039..87b137a 100755 --- a/bin/khatus +++ b/bin/khatus @@ -207,9 +207,9 @@ main() { | stdbuf -o L tee \ >(stdbuf -o L "$bin"/khatus_bar \ -F "$MSG_FS" \ - -v opt_mpd_song_max_chars=10 \ - -v opt_net_interfaces_to_show="${opts['--net_interfaces_to_show']}" \ - -v opt_pulseaudio_sink="${opts['--pulseaudio_sink']}" \ + -v Opt_Mpd_Song_Max_Chars=10 \ + -v Opt_Net_Interfaces_To_Show="${opts['--net_interfaces_to_show']}" \ + -v Opt_Pulseaudio_Sink="${opts['--pulseaudio_sink']}" \ | "$bin"/khatus_actuate_status_bar_to_xsetroot_name \ ) \ >(stdbuf -o L "$bin"/khatus_monitor_energy \ diff --git a/bin/khatus_bar b/bin/khatus_bar index a3601f2..323134c 100755 --- a/bin/khatus_bar +++ b/bin/khatus_bar @@ -3,7 +3,7 @@ # Naming convention: # Variables: # - global, builtin : ALLCAPS -# - global, public : CamelCase +# - global, public : Camel_Snake_Man_Bear_Pig # - global, private : _snake_case_prefixed_underscore # - local : snake_case # Functions: @@ -222,7 +222,7 @@ function make_status_net( \ sep \ ) { number_of_net_interfaces_to_show = \ - split(opt_net_interfaces_to_show, net_interfaces_to_show, ",") + split(Opt_Net_Interfaces_To_Show, net_interfaces_to_show, ",") io = "khatus_sensor_net_addr_io" wi = "khatus_sensor_net_wifi_status" out = "" @@ -257,7 +257,7 @@ function make_status_screen_brightness( src, key) { } function make_status_volume( sink, mu, vl, vr, show) { - sink = opt_pulseaudio_sink + sink = Opt_Pulseaudio_Sink cache_get(mu, "khatus_sensor_volume", "mute" Kfs sink, 5) cache_get(vl, "khatus_sensor_volume", "vol_left" Kfs sink, 5) cache_get(vr, "khatus_sensor_volume", "vol_right" Kfs sink, 5) @@ -303,7 +303,7 @@ function make_status_mpd_state_known(symbol, s, song, time, percentage) { song = cache_get_fmt_def(s, "song" , 5, "%s", "?") time = cache_get_fmt_def(s, "play_time_minimal_units", 5, "%s", "?") percent = cache_get_fmt_def(s, "play_time_percentage" , 5, "%s", "?") - song = substr(song, 1, opt_mpd_song_max_chars) + song = substr(song, 1, Opt_Mpd_Song_Max_Chars) return sprintf("%s %s %s %s", symbol, time, percent, song) } -- 2.20.1