blob: 269a1b045dcc51d835d73734b9054e29257875ac (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
 | #!/bin/bash
#
# Conky wrapper
#
# Start multiple conky instances
function xconky_start {
  # Default one
  conky &
  # Give time for networking
  sleep 60
  # Load weather data first
  weather &> /dev/null
  # Clear cache
  brweather --clean-cache
  # Weather
  conky -c ~/.conky/weather/conkyrc &
}
# Battery level if on laptop
function xconky_battery {
  if laptop-detect; then
    echo '${color grey}${color grey}Power: ${battery BAT1} ${battery_bar 6}$'
  fi
}
# Show home usage
function xconky_fs_home {
  echo "~/ \$color\${fs_free $HOME}/\${fs_size $HOME} \${fs_bar 6 $HOME}"
}
# Parse
if [ -z "$1" ] || [ "$1" == "start" ]; then
  xconky_start
elif [ "$1" == "battery" ]; then
  xconky_battery
elif [ "$1" = "fs_home" ]; then
  xconky_fs_home
fi
 |