dwm-bar for archlinux
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.

208 lines
5.8 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_loadavg](#dwm_loadavg)
  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_loadavg
  143. Displays the average system load
  144. ```
  145. [⏱ 0.14 0.17 0.18]
  146. ```
  147. ## Installation
  148. 1. Clone and enter the repository:
  149. ```
  150. $ git clone https://github.com/joestandring/dwm-bar
  151. $ cd dwm-bar
  152. ```
  153. 2. Make the script executable
  154. ```
  155. $ chmod +x dwm_bar.sh
  156. ```
  157. ## Reccomendations
  158. To make the most out of unicode support, consider using a font that inludes many unicode charachters. For example:
  159. * [Nerd Fonts](https://github.com/ryanoasis/nerd-fonts)
  160. * [Siji](https://github.com/stark/siji)
  161. While not always neccessary, it's a good idea to specify these fonts in your dwm config.
  162. ## Quick Start
  163. Simply run the script and dwm should display your bar:
  164. ```
  165. $ ./dwm_bar.sh
  166. ```
  167. 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.
  168. 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/:
  169. ```
  170. # Statusbar
  171. /home/$USER/dwm-bar/dwm_status.sh &
  172. # Start dwm
  173. exec dwm
  174. ```
  175. ## Customizing
  176. 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
  177. 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:
  178. ```
  179. # Import the modules
  180. . "$DIR/bar-functions/dwm_myfucntion"
  181. while true
  182. do
  183. xsetroot -name "$(dwm_myfunction)"
  184. sleep 1
  185. done
  186. ```
  187. 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:
  188. ```
  189. [📫 0]
  190. ```
  191. Whereas, if it is not set it will display:
  192. ```
  193. [MAIL 0]
  194. ```
  195. ## Contributing
  196. See [CONTRIBUTING.md](CONTRIBUTING.md) before contributing.
  197. ## Acknowledgements
  198. Code for some functions was modified from:
  199. * [Klemens Nanni](https://notabug.org/kl3)
  200. * [@boylemic](https://github.com/boylemic/configs/blob/master/dwm_status)
  201. * [Parket Johnson](https://github.com/ronno/scripts/blob/master/xsetcmus)
  202. * [suckless.org](https://dwm.suckless.org/status_monitor/)
  203. * [@mcallistertyler95](https://github.com/mcallistertyler95/dwm-bar)