Configuration file for dwm-bar on macbook air
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
2.7 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
  1. #!/bin/sh
  2. # A modular status bar for dwm
  3. # Joe Standring <git@joestandring.com>
  4. # GNU GPLv3
  5. # Dependencies: xorg-xsetroot
  6. # Import functions with "$include /route/to/module"
  7. # It is recommended that you place functions in the subdirectory ./bar-functions and use: . "$DIR/bar-functions/dwm_example.sh"
  8. # Store the directory the script is running from
  9. LOC=$(readlink -f "$0")
  10. DIR=$(dirname "$LOC")
  11. # Change the appearance of the module identifier. if this is set to "unicode", then symbols will be used as identifiers instead of text. E.g. [📪 0] instead of [MAIL 0].
  12. # Requires a font with adequate unicode character support
  13. export IDENTIFIER="unicode"
  14. # Change the charachter(s) used to seperate modules. If two are used, they will be placed at the start and end.
  15. export SEP1="["
  16. export SEP2="]"
  17. # Import the modules
  18. . "$DIR/bar-functions/dwm_countdown.sh"
  19. . "$DIR/bar-functions/dwm_alarm.sh"
  20. . "$DIR/bar-functions/dwm_transmission.sh"
  21. . "$DIR/bar-functions/dwm_cmus.sh"
  22. . "$DIR/bar-functions/dwm_mpc.sh"
  23. . "$DIR/bar-functions/dwm_spotify.sh"
  24. . "$DIR/bar-functions/dwm_resources.sh"
  25. . "$DIR/bar-functions/dwm_battery.sh"
  26. . "$DIR/bar-functions/dwm_mail.sh"
  27. . "$DIR/bar-functions/dwm_backlight.sh"
  28. . "$DIR/bar-functions/dwm_alsa.sh"
  29. . "$DIR/bar-functions/dwm_pulse.sh"
  30. . "$DIR/bar-functions/dwm_weather.sh"
  31. . "$DIR/bar-functions/dwm_vpn.sh"
  32. . "$DIR/bar-functions/dwm_networkmanager.sh"
  33. . "$DIR/bar-functions/dwm_keyboard.sh"
  34. . "$DIR/bar-functions/dwm_ccurse.sh"
  35. . "$DIR/bar-functions/dwm_date.sh"
  36. . "$DIR/bar-functions/dwm_connman.sh"
  37. . "$DIR/bar-functions/dwm_loadavg.sh"
  38. . "$DIR/bar-functions/dwm_currency.sh"
  39. parallelize() {
  40. while true
  41. do
  42. printf "Running parallel processes\n"
  43. dwm_weather &
  44. dwm_networkmanager &
  45. sleep 5
  46. done
  47. }
  48. parallelize &
  49. # Update dwm status bar every second
  50. while true
  51. do
  52. # Append results of each func one by one to a string
  53. dispstr=""
  54. dispstr="$dispstr$(dwm_connman)"
  55. dispstr="$dispstr$(dwm_countdown)"
  56. dispstr="$dispstr$(dwm_alarm)"
  57. dispstr="$dispstr$(dwm_transmission)"
  58. dispstr="$dispstr$(dwm_cmus)"
  59. dispstr="$dispstr$(dwm_mpc)"
  60. dispstr="$dispstr$(dwm_spotify)"
  61. dispstr="$dispstr$(dwm_resources)"
  62. dispstr="$dispstr$(dwm_battery)"
  63. dispstr="$dispstr$(dwm_mail)"
  64. dispstr="$dispstr$(dwm_backlight)"
  65. dispstr="$dispstr$(dwm_alsa)"
  66. dispstr="$dispstr$(dwm_pulse)"
  67. dispstr="$dispstr${__DWM_BAR_WEATHER__}"
  68. dispstr="$dispstr$(dwm_vpn)"
  69. dispstr="$dispstr${__DWM_BAR_NETWORKMANAGER__}"
  70. dispstr="$dispstr$(dwm_keyboard)"
  71. dispstr="$dispstr$(dwm_ccurse)"
  72. dispstr="$dispstr$(dwm_date)"
  73. dispstr="$dispstr$(dwm_loadavg)"
  74. dispstr="$dispstr$(dwm_currency)"
  75. xsetroot -name "$dispstr"
  76. sleep 1
  77. done