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.

170 lines
4.8 KiB

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