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.

233 lines
6.7 KiB

5 years ago
4 years ago
5 years ago
5 years ago
4 years ago
5 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
4 years ago
5 years ago
4 years ago
5 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
3 years ago
5 years ago
4 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. ![screenshot](sshot.png)
  4. [![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/J3J11S7DZ)
  5. ## Table of Contents
  6. - [Current Functions](#current-functions)
  7. - [dwm_alsa](#dwm_alsa)
  8. - [dwm_pulse](#dwm_pulse)
  9. - [dwm_battery](#dwm_battery)
  10. - [dwm_countdown](#dwm_countdown)
  11. - [dwm_alarm](#dwm_alarm)
  12. - [dwm_keyboard](#dwm_keyboard)
  13. - [dwm_resources](#dwm_resources)
  14. - [dwm_cmus](#dwm_cmus)
  15. - [dwm_mpc](#dwm_mpc)
  16. - [dwm_spotify](#dwm_mpc)
  17. - [dwm_date](#dwm_date)
  18. - [dwm_mail](#dwm_mail)
  19. - [dwm_weather](#dwm_weather)
  20. - [dwm_networkmanager](#dwm_networkmanager)
  21. - [dwm_wpa](#dwm_wpa)
  22. - [dwm_vpn](#dwm_vpn)
  23. - [dwm_ccurse](#dwm_ccurse)
  24. - [dwm_transmission](#dwm_transmission)
  25. - [dwm_backlight](#dwm_backlight)
  26. - [dwm_connman](#dwm_connman)
  27. - [dwm_loadavg](#dwm_loadavg)
  28. - [dwm_currency](#dwm_currency)
  29. - [dwm_solar_panel](#dwm_solar_panel)
  30. - [Installation](#installation)
  31. - [Reccomendations](#reccomendations)
  32. - [Usage](#usage)
  33. - [Customizing](#customizing)
  34. - [Contributing](#contributing)
  35. - [Acknowledgements](#acknowledgements)
  36. ### dwm_alsa
  37. Displays the current master volume of ALSA
  38. ```
  39. [🔉 55%]
  40. ```
  41. Dependencies: ```alsa-utils```
  42. ### dwm_pulse
  43. Displays the current master volume of PulseAudio
  44. ```
  45. [🔉 55%]
  46. ```
  47. Dependencies: ```pamixer```
  48. ### dwm_battery
  49. Displays battery level and status
  50. ```
  51. [🔋 100% full]
  52. ```
  53. ### dwm_countdown
  54. Displays the status of [countdown](https://github.com/joestandring/countdown)
  55. ```
  56. [⏳ 00:10:00]
  57. ```
  58. Dependencies: ```countdown.sh```
  59. ### dwm_alarm
  60. Displays upcoming alarms from [alarm](https://github.com/joestandring/alarm)
  61. ```
  62. [⏰ 22:30:00]
  63. ```
  64. Dependencies: ```alarm.sh```
  65. ### dwm_keyboard
  66. Displays the current keyboard layout
  67. ```
  68. [⌨ gb]
  69. ```
  70. Dependencies: ```xorg-setxkbmap```
  71. ### dwm_resources
  72. Displays information regarding memory, CPU temperature, and storage
  73. ```
  74. [🖥 MEM 1.3Gi/15Gi CPU 45C STO 2.3G/200G: 2%]
  75. ```
  76. ### dwm_cmus
  77. Displays current cmus status, artist, track, position, duration, and shuffle
  78. ```
  79. [▶ The Unicorns - Tuff Ghost 0:43/2:56 🔀]
  80. ```
  81. Dependencies: ```cmus```
  82. ### dwm_mpc
  83. Displays current mpc status, artist, track, position, duration, and shuffle
  84. ```
  85. [▶ The Unicorns - Tuff Ghost 0:43/2:56 🔀]
  86. ```
  87. Dependencies: ```mpc```
  88. ### dwm_spotify
  89. Displays current Spotify status, artist, track, and duration
  90. Either the official Spotify client or spotifyd can be used. Unfortunately, only spotifyd can provide track position and shuffle status
  91. ```
  92. [▶ The Unicorns - Tuff Ghost 0:43/2:56 🔀]
  93. ```
  94. Dependencies: ```spotify/spotifyd, playerctl```
  95. ### dwm_date
  96. Displays the current date and time
  97. ```
  98. [🕰 Mon 06-05-19 21:31:58]
  99. ```
  100. ### dwm_mail
  101. Displays the current number of emails in an inbox
  102. ```
  103. [📫 2]
  104. ```
  105. ### dwm_weather
  106. Displays the current weather provided by [wttr.in](https://wttr.in)
  107. Please remember wttr.in has a limited number of requests, so this module may occasionally not be able to recieve weather information when experiencing high traffic.
  108. ```
  109. [☀ +20°C]
  110. ```
  111. ### dwm_networkmanager
  112. Displays the current network connection, private IP, and public IP using NetworkManager
  113. ```
  114. [🌐 enp7s0: 192.168.0.1/24 | 185.199.109.153]
  115. ```
  116. Dependencies: ```NetworkManager, curl```
  117. ### dwm_wpa
  118. Displays the current network connection and private IP using wpa_cli
  119. ```
  120. [襤 My-Wifi 192.168.0.3]
  121. ```
  122. Dependencies: ```wpa_cli```
  123. ### dwm_vpn
  124. Displays the current VPN connections with OpenVPN or Wireguard
  125. ```
  126. [🔒 Sweden - Stockholm]
  127. ```
  128. Dependencies: ```NetworkManager, NetworkManager-openvpn (for OpenVPN connections)```
  129. ### dwm_ccurse
  130. Displays the next appointment from calcurse
  131. ```
  132. [💡 18/04/19 19:00 20:00 Upload dwm_ccurse]
  133. ```
  134. Dependencies: ```calcurse```
  135. ### dwm_transmission
  136. Displays the current status of a torrent with transmission-remote
  137. ```
  138. [⏬ archlinux-2019.06.01... | 92% 1min ⬆3.4 ⬇1.5]
  139. ```
  140. Dependencies: ```transmission-remote```
  141. ### dwm_backlight
  142. Displays the current backlight level with xbacklight
  143. ```
  144. [☀ 80]
  145. ```
  146. Dependencies: ```xbacklight```
  147. ### dwm_connman
  148. Shows network information IP, SSID, WLan strength (if connected to WLan) using connman.
  149. ```
  150. [🌐 192.169.189.12 HomeNetworkName 53%]
  151. ```
  152. Dependencies: ```connman```
  153. ### dwm_loadavg
  154. Displays the average system load
  155. ```
  156. [⏱ 0.14 0.17 0.18]
  157. ```
  158. ### dwm_solar_panel
  159. Displays how much power is being produced from your solar panels
  160. ```
  161. [💡 3.012 W ]
  162. ```
  163. ### dwm_currency
  164. Displays the current rate of your currency in comparison to the USD provided by [rate.sx](http://rate.sx/)
  165. ```
  166. [💡 1.225 ]
  167. ```
  168. Dependencies: ```curl```
  169. ## Installation
  170. 1. Clone and enter the repository:
  171. ```
  172. $ git clone https://github.com/joestandring/dwm-bar
  173. $ cd dwm-bar
  174. ```
  175. 2. Make the script executable
  176. ```
  177. $ chmod +x dwm_bar.sh
  178. ```
  179. ## Recommendations
  180. To make the most out of Unicode support, consider using a font that includes many Unicode characters. For example:
  181. * [Nerd Fonts](https://github.com/ryanoasis/nerd-fonts)
  182. * [Siji](https://github.com/stark/siji)
  183. * [Font Awesome](https://fontawesome.com/)
  184. While not always necessary, it's a good idea to specify these fonts in your dwm config.
  185. ## Quick Start
  186. Simply run the script and dwm should display your bar:
  187. ```
  188. $ ./dwm_bar.sh
  189. ```
  190. 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.
  191. 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/:
  192. ```
  193. # Statusbar
  194. /home/$USER/dwm-bar/dwm_bar.sh &
  195. # Start dwm
  196. exec dwm
  197. ```
  198. ## Customizing
  199. dwm-bar is completely modular, meaning you can mix and match functions to your heart's content. It's functions are located in the bar-functions/ subdirectory and included in dwm_bar.sh
  200. If you want to make your own function, for example, dwm_myfunction.sh, you should create it in the bar-functions/ subdirectory before including it in dwm_bar.sh and adding it to the xsetroot command:
  201. ```
  202. # Import the modules
  203. . "$DIR/bar-functions/dwm_myfucntion"
  204. while true
  205. do
  206. xsetroot -name "$(dwm_myfunction)"
  207. sleep 1
  208. done
  209. ```
  210. 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:
  211. ```
  212. [📫 0]
  213. ```
  214. Whereas, if it is not set it will display:
  215. ```
  216. [MAIL 0]
  217. ```
  218. ## Contributing
  219. See [CONTRIBUTING.md](CONTRIBUTING.md) before contributing.
  220. ## Acknowledgements
  221. Code for some functions was modified from:
  222. * [Klemens Nanni](https://notabug.org/kl3)
  223. * [@boylemic](https://github.com/boylemic/configs/blob/master/dwm_status)
  224. * [Parket Johnson](https://github.com/ronno/scripts/blob/master/xsetcmus)
  225. * [suckless.org](https://dwm.suckless.org/status_monitor/)
  226. * [@mcallistertyler95](https://github.com/mcallistertyler95/dwm-bar)