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.

99 lines
3.1 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. #export IDENTIFIER="un"
  15. # Change the charachter(s) used to seperate modules. If two are used, they will be placed at the start and end.
  16. export SEP1=""
  17. export SEP2="|"
  18. # Import the modules
  19. . "$DIR/bar-functions/dwm_countdown.sh"
  20. . "$DIR/bar-functions/dwm_alarm.sh"
  21. . "$DIR/bar-functions/dwm_transmission.sh"
  22. . "$DIR/bar-functions/dwm_cmus.sh"
  23. . "$DIR/bar-functions/dwm_mpc.sh"
  24. . "$DIR/bar-functions/dwm_spotify.sh"
  25. . "$DIR/bar-functions/dwm_resources.sh"
  26. . "$DIR/bar-functions/dwm_battery.sh"
  27. . "$DIR/bar-functions/dwm_mail.sh"
  28. . "$DIR/bar-functions/dwm_backlight.sh"
  29. . "$DIR/bar-functions/dwm_alsa.sh"
  30. . "$DIR/bar-functions/dwm_pulse.sh"
  31. . "$DIR/bar-functions/dwm_weather.sh"
  32. . "$DIR/bar-functions/dwm_vpn.sh"
  33. . "$DIR/bar-functions/dwm_networkmanager.sh"
  34. . "$DIR/bar-functions/dwm_keyboard.sh"
  35. . "$DIR/bar-functions/dwm_ccurse.sh"
  36. . "$DIR/bar-functions/dwm_date.sh"
  37. . "$DIR/bar-functions/dwm_connman.sh"
  38. . "$DIR/bar-functions/dwm_loadavg.sh"
  39. . "$DIR/bar-functions/dwm_currency.sh"
  40. parallelize() {
  41. while true
  42. do
  43. printf "Running parallel processes\n"
  44. dwm_weather &
  45. dwm_networkmanager &
  46. sleep 5
  47. done
  48. }
  49. parallelize &
  50. # Update dwm status bar every second
  51. while true
  52. do
  53. # Append results of each func one by one to the upperbar string
  54. upperbar=""
  55. # upperbar="$upperbar$(dwm_connman)"
  56. # upperbar="$upperbar$(dwm_countdown)"
  57. # upperbar="$upperbar$(dwm_alarm)"
  58. # upperbar="$upperbar$(dwm_transmission)"
  59. # upperbar="$upperbar$(dwm_cmus)"
  60. # upperbar="$upperbar$(dwm_mpc)"
  61. # upperbar="$upperbar$(dwm_spotify)"
  62. # upperbar="$upperbar$(dwm_resources)"
  63. upperbar="$upperbar$(dwm_battery)"
  64. # upperbar="$upperbar$(dwm_mail)"
  65. # upperbar="$upperbar$(dwm_backlight)"
  66. # upperbar="$upperbar$(dwm_alsa)"
  67. upperbar="$upperbar$(dwm_pulse)"
  68. # upperbar="$upperbar${__DWM_BAR_WEATHER__}"
  69. # upperbar="$upperbar$(dwm_vpn)"
  70. # upperbar="$upperbar${__DWM_BAR_NETWORKMANAGER__}"
  71. upperbar="$upperbar$(dwm_keyboard)"
  72. # upperbar="$upperbar$(dwm_ccurse)"
  73. upperbar="$upperbar$(dwm_date)"
  74. # upperbar="$upperbar$(dwm_loadavg)"
  75. # upperbar="$upperbar$(dwm_currency)"
  76. # Append results of each func one by one to the lowerbar string
  77. # lowerbar=""
  78. # lowerbar="$lowerbar$(dwm_resources)"
  79. #lowerbar="$lowerbar$(dwm_ccurse)"
  80. #lowerbar="$lowerbar${__DWM_BAR_WEATHER__}"
  81. #lowerbar="$lowerbar$(dwm_alarm)"
  82. xsetroot -name "$upperbar"
  83. # Uncomment the line below to enable the lowerbar
  84. # xsetroot -name "$upperbar;$lowerbar"
  85. sleep 1
  86. done