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.

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