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.

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