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.

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