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.

194 lines
5.4 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
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. - [More to come!](#more-to-come)
  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_mpc
  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_network
  105. Displays the current network connection, private IP, and public IP
  106. ```
  107. [🌐 enp7s0: 192.168.0.1/24 | 185.199.109.153]
  108. ```
  109. Dependencies: ```NetworkManager, curl```
  110. ### dwm_vpn
  111. Displays the current VPN connection
  112. ```
  113. [🔒 Sweden - Stockholm]
  114. ```
  115. Dependencies: ```NetworkManager-openvpn```
  116. ### dwm_ccurse
  117. Displays the next appointment from calcurse
  118. ```
  119. [💡 18/04/19 19:00 20:00 Upload dwm_ccurse]
  120. ```
  121. Dependencies: ```calcurse```
  122. ### dwm_transmission
  123. Displays the current status of a torrent with transmission-remote
  124. ```
  125. [⏬ archlinux-2019.06.01... | 92% 1min ⬆3.4 ⬇1.5]
  126. ```
  127. Dependencies: ```transmission-remote```
  128. ### dwm_backlight
  129. Displays the current backlight level with xbacklight
  130. ```
  131. [☀ 80]
  132. ```
  133. Dependencies: ```xbacklight```
  134. ## Installation
  135. 1. Clone and enter the repository:
  136. ```
  137. $ git clone https://github.com/joestandring/dwm-bar
  138. $ cd dwm-bar
  139. ```
  140. 2. Make the script executable
  141. ```
  142. $ chmod +x dwm_bar.sh
  143. ```
  144. ## Reccomendations
  145. To make the most out of unicode support, consider using a font that inludes many unicode charachters. For example:
  146. * [Nerd Fonts](https://github.com/ryanoasis/nerd-fonts)
  147. * [Siji](https://github.com/stark/siji)
  148. While not always neccessary, it's a good idea to specify these fonts in your dwm config.
  149. ## Quick Start
  150. Simply run the script and dwm should display your bar:
  151. ```
  152. $ ./dwm_bar.sh
  153. ```
  154. 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.
  155. 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/:
  156. ```
  157. # Statusbar
  158. /home/$USER/dwm-bar/dwm_status.sh &
  159. # Start dwm
  160. exec dwm
  161. ```
  162. ## Customizing
  163. 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
  164. 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:
  165. ```
  166. # Import the modules
  167. . "$DIR/bar-functions/dwm_myfucntion"
  168. while true
  169. do
  170. xsetroot -name "$(dwm_myfunction)"
  171. sleep 1
  172. done
  173. ```
  174. 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:
  175. ```
  176. [📫 0]
  177. ```
  178. Whereas, if it is not set it will display:
  179. ```
  180. [MAIL 0]
  181. ```
  182. ## Acknowledgements
  183. Code for some functions was modified from:
  184. * [Klemens Nanni](https://notabug.org/kl3)
  185. * [@boylemic](https://github.com/boylemic/configs/blob/master/dwm_status)
  186. * [Parket Johnson](https://github.com/ronno/scripts/blob/master/xsetcmus)
  187. * [suckless.org](https://dwm.suckless.org/status_monitor/)
  188. ## More to come!
  189. * dwm_bluez function to show currently connected Bluetooth device using bluez
  190. * dwm_mpd