]>
git.r.bdr.sh - rbdr/dotfiles/blob - status-right.sh
2 # This script prints a string will be evaluated for text attributes (but not shell commands) by tmux. It consists of a bunch of segments that are simple shell scripts/programs that output the information to show. For each segment the desired foreground and background color can be specified as well as what separator to use. The script the glues together these segments dynamically so that if one script suddenly does not output anything (= nothing should be shown) the separator colors will be nicely handled.
4 # The powerline root directory.
7 # Source global configurations.
8 source " ${cwd} /config.sh"
10 # Source lib functions.
11 source " ${cwd} /lib.sh"
13 segments_path
= " ${cwd} / ${segments_dir} "
15 # Mute this statusbar?
16 mute_status_check
"right"
19 # Comment/uncomment the register function call to enable or disable a segment.
22 pwd +=([ "script" ]= " ${segments_path} /pwd.sh" )
23 pwd +=([ "foreground" ]= "colour211" )
24 pwd +=([ "background" ]= "colour89" )
25 pwd +=([ "separator" ]= " ${separator_left_bold} " )
26 #register_segment "pwd"
29 load
+=([ "script" ]= " ${segments_path} /load.sh" )
30 load
+=([ "foreground" ]= "colour7" )
31 load
+=([ "background" ]= "colour0" )
32 load
+=([ "separator" ]= " ${separator_left_bold} " )
33 register_segment
"load"
36 if [ " $PLATFORM " == "mac" ]; then
37 battery
+=([ "script" ]= " ${segments_path} /battery_mac.sh" )
39 battery
+=([ "script" ]= " ${segments_path} /battery.sh" )
41 battery
+=([ "foreground" ]= "colour7" )
42 battery
+=([ "background" ]= "colour1" )
43 battery
+=([ "separator" ]= " ${separator_left_bold} " )
44 #register_segment "battery"
47 weather
+=([ "script" ]= " ${segments_path} /weather_yahoo.sh" )
48 #weather+=(["script"]="${segments_path}/weather_google.sh")
49 weather
+=([ "foreground" ]= "colour7" )
50 weather
+=([ "background" ]= "colour12" )
51 weather
+=([ "separator" ]= " ${separator_left_bold} " )
52 register_segment
"weather"
55 date_day
+=([ "script" ]= " ${segments_path} /date_day.sh" )
56 date_day
+=([ "foreground" ]= "colour0" )
57 date_day
+=([ "background" ]= "colour7" )
58 date_day
+=([ "separator" ]= " ${separator_left_bold} " )
59 register_segment
"date_day"
62 date_full
+=([ "script" ]= " ${segments_path} /date_full.sh" )
63 date_full
+=([ "foreground" ]= "colour0" )
64 date_full
+=([ "background" ]= "colour15" )
65 date_full
+=([ "separator" ]= " ${separator_left_thin} " )
66 date_full
+=([ "separator_fg" ]= "colour0" )
67 register_segment
"date_full"
70 time +=([ "script" ]= " ${segments_path} /time.sh" )
71 time +=([ "foreground" ]= "colour0" )
72 time +=([ "background" ]= "colour7" )
73 time +=([ "separator" ]= " ${separator_left_thin} " )
74 time +=([ "separator_fg" ]= "colour0" )
75 register_segment
"time"
77 # Print the status line in the order of registration above.
78 print_status_line_right