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.

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