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.

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