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.

128 lines
3.9 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. # dwm-bar
  2. A modular statusbar for DWM
  3. ## Table of Contents
  4. - [Features](#features)
  5. - [Current Functions](#current-functions)
  6. - [dwm_alsa](#dwm_alsa)
  7. - [dwm_countdown](#dwm_countdown)
  8. - [dwm_keyboard](#dwm_keyboard)
  9. - [dwm_resources](#dwm_resources)
  10. - [dwm_cmus](#dwm_cmus)
  11. - [dwm_date](#dwm_date)
  12. - [dwm_mail](#dwm_mail)
  13. - [dwm_weather](#dwm_weather)
  14. - [Installation](#installation)
  15. - [Usage](#usage)
  16. - [Customizing](#customizing)
  17. - [Acknowledgements](#acknowledgements)
  18. - [More to come!](#more-to-come)
  19. ## Features
  20. * Fully modular! If you don't want to use a function, no worries.
  21. * Lightweight! dwm-bar is written entirely in POSIX-compliant shell script so need to install a hundred different packages to get it working.
  22. * Options! You can decide to use either unicode symbols or plaintext for module identifiers with the ```IDENTIFIER``` value.
  23. ## Current Functions
  24. ### dwm_alsa
  25. Displays the current master volume of ALSA
  26. ```
  27. [🔉 55]
  28. ```
  29. ### dwm_pulse
  30. Displays the current master volume of PulseAudio
  31. ```
  32. [🔉 55]
  33. ```
  34. Dependencies: ```alsa-utils```
  35. ### dwm_countdown
  36. Displays the status of [countdown](https://github.com/joestandring/countdown)
  37. ```
  38. [⏳ 00:10:00]
  39. ```
  40. Dependeincies: ```[countdown](https://github.com/joestandring/countdown)```
  41. ### dwm_keyboard
  42. Displays the current keyboard layout
  43. ```
  44. [⌨ gb]
  45. ```
  46. Dependencies: ```xorg-setxkbmap```
  47. ### dwm_resources
  48. Displays information regarding memory, CPU temperature, and storage
  49. ```
  50. [🖥 MEM 1.3Gi/15Gi CPU 45C STO 2.3G/200G: 2%]
  51. ```
  52. ### dwm_cmus
  53. displays current cmus status, artist, track, position, duration, and shuffle
  54. ```
  55. [▶ The Unicorns - Tuff Ghost 0:43/2:56 🔀]
  56. ```
  57. Dependencies: ```cmus```
  58. ### dwm_date
  59. Displays the current date and time
  60. ```
  61. [🕰 Mon 06-05-19 21:31:58]
  62. ```
  63. ### dwm_mail
  64. Displays the current number of emails in an inbox
  65. ```
  66. [📫 2]
  67. ```
  68. ### dwm_weather
  69. Displays the current weather provided by [wttr.in](https://wttr.in)
  70. ```
  71. [☀ +20°C]
  72. ```
  73. ## Installation
  74. 1. Clone and enter the repository:
  75. ```
  76. $ git clone https://github.com/joestandring/dwm-bar
  77. $ cd dwm-bar
  78. ```
  79. 2. Make the script executable
  80. ```
  81. $ chmod +x dwm_bar.sh
  82. ```
  83. ## Quick Start
  84. Simply run the script and dwm should display your bar:
  85. ```
  86. $ ./dwm_bar.sh
  87. ```
  88. Most likely, you will need to change some values for functions to get them to work - these are outlined with a comment for functions where this is likely the case.
  89. If you would like your bar to be displayed when X starts, add this to your .xinitrc file before launching dwm. For example, if the script is located in /home/$USER/dwm-bar/:
  90. ```
  91. # Statusbar
  92. /home/$USER/dwm-bar/dwm_status.sh &
  93. # Start dwm
  94. exec dwm
  95. ```
  96. ## Customizing
  97. dwm-bar is completley modular, meaning you can mix and match functions to your hearts content. It's functions are located in the functions/ subdirectory and included in dwm_bar.sh
  98. If you want to make your own function, for example dwm_myfunction.sh, you should create it in the functions/ subdirectory before including it in dwm_bar.sh and adding it to the xsetroot command:
  99. ```
  100. # Import the modules
  101. . "$DIR/functions/dwm_myfucntion"
  102. while true
  103. do
  104. xsetroot -name "$(dwm_myfunction)"
  105. sleep 1
  106. done
  107. ```
  108. You can also decide to use unicode or plaintext identifiers for functions by altering the ```$IDENTIFIER``` value. For example, set to ```"unicode"```, ```dwm_mail``` will display:
  109. ```
  110. [📫 0]
  111. ```
  112. Whereas, if it is not set it will display:
  113. ```
  114. [MAI 0]
  115. ```
  116. ## Acknowledgements
  117. Code for some functions was modified from:
  118. * [Klemens Nanni](https://notabug.org/kl3)
  119. * [@boylemic](https://github.com/boylemic/configs/blob/master/dwm_status)
  120. * [Parket Johnson](https://github.com/ronno/scripts/blob/master/xsetcmus)
  121. * [suckless.org](https://dwm.suckless.org/status_monitor/)
  122. ## More to come!
  123. * dwm_bat function to display battery percentage and status
  124. * dwm_notifs function to show the last recieved notification in the bar
  125. * dwm_bluez function to show currently connected Bluetooth device using bluez
  126. * The ability to show network speeds and SSID in dwm_network