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.

215 lines
6.0 KiB

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