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.

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