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.

190 lines
5.3 KiB

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