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.

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