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.

217 lines
6.1 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
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. ```
  106. [☀ +20°C]
  107. ```
  108. ### dwm_networkmanager
  109. Displays the current network connection, private IP, and public IP using NetworkManager
  110. ```
  111. [🌐 enp7s0: 192.168.0.1/24 | 185.199.109.153]
  112. ```
  113. Dependencies: ```NetworkManager, curl```
  114. ### dwm_wpa
  115. Displays the current network connection and private IP using wpa_cli
  116. ```
  117. [襤 My-Wifi 192.168.0.3]
  118. ```
  119. Dependancies: ```wpa_cli```
  120. ### dwm_vpn
  121. Displays the current VPN connection
  122. ```
  123. [🔒 Sweden - Stockholm]
  124. ```
  125. Dependencies: ```NetworkManager-openvpn```
  126. ### dwm_ccurse
  127. Displays the next appointment from calcurse
  128. ```
  129. [💡 18/04/19 19:00 20:00 Upload dwm_ccurse]
  130. ```
  131. Dependencies: ```calcurse```
  132. ### dwm_transmission
  133. Displays the current status of a torrent with transmission-remote
  134. ```
  135. [⏬ archlinux-2019.06.01... | 92% 1min ⬆3.4 ⬇1.5]
  136. ```
  137. Dependencies: ```transmission-remote```
  138. ### dwm_backlight
  139. Displays the current backlight level with xbacklight
  140. ```
  141. [☀ 80]
  142. ```
  143. Dependencies: ```xbacklight```
  144. ### dwm_connman
  145. Shows network information IP, SSID, WLan strength (if connected to WLan) using connman.
  146. ```
  147. [🌐 192.169.189.12 HomeNetworkName 53%]
  148. ```
  149. Dependencies: ```connman```
  150. ### dwm_loadavg
  151. Displays the average system load
  152. ```
  153. [⏱ 0.14 0.17 0.18]
  154. ```
  155. ## Installation
  156. 1. Clone and enter the repository:
  157. ```
  158. $ git clone https://github.com/joestandring/dwm-bar
  159. $ cd dwm-bar
  160. ```
  161. 2. Make the script executable
  162. ```
  163. $ chmod +x dwm_bar.sh
  164. ```
  165. ## Recommendations
  166. To make the most out of unicode support, consider using a font that inludes many unicode charachters. For example:
  167. * [Nerd Fonts](https://github.com/ryanoasis/nerd-fonts)
  168. * [Siji](https://github.com/stark/siji)
  169. * [Font Awesome](https://fontawesome.com/)
  170. While not always neccessary, it's a good idea to specify these fonts in your dwm config.
  171. ## Quick Start
  172. Simply run the script and dwm should display your bar:
  173. ```
  174. $ ./dwm_bar.sh
  175. ```
  176. 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.
  177. 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/:
  178. ```
  179. # Statusbar
  180. /home/$USER/dwm-bar/dwm_bar.sh &
  181. # Start dwm
  182. exec dwm
  183. ```
  184. ## Customizing
  185. 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
  186. 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:
  187. ```
  188. # Import the modules
  189. . "$DIR/bar-functions/dwm_myfucntion"
  190. while true
  191. do
  192. xsetroot -name "$(dwm_myfunction)"
  193. sleep 1
  194. done
  195. ```
  196. 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:
  197. ```
  198. [📫 0]
  199. ```
  200. Whereas, if it is not set it will display:
  201. ```
  202. [MAIL 0]
  203. ```
  204. ## Contributing
  205. See [CONTRIBUTING.md](CONTRIBUTING.md) before contributing.
  206. ## Acknowledgements
  207. Code for some functions was modified from:
  208. * [Klemens Nanni](https://notabug.org/kl3)
  209. * [@boylemic](https://github.com/boylemic/configs/blob/master/dwm_status)
  210. * [Parket Johnson](https://github.com/ronno/scripts/blob/master/xsetcmus)
  211. * [suckless.org](https://dwm.suckless.org/status_monitor/)
  212. * [@mcallistertyler95](https://github.com/mcallistertyler95/dwm-bar)