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.

185 lines
5.1 KiB

5 years ago
5 years ago
5 years ago
5 years ago
4 years ago
5 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
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_date](#dwm_date)
  16. - [dwm_mail](#dwm_mail)
  17. - [dwm_weather](#dwm_weather)
  18. - [dwm_network](#dwm_network)
  19. - [dwm_vpn](#dwm_vpn)
  20. - [dwm_ccurse](#dwm_ccurse)
  21. - [dwm_transmission](#dwm_transmission)
  22. - [dwm_backlight](#dwm_backlight)
  23. - [Installation](#installation)
  24. - [Reccomendations](#reccomendations)
  25. - [Usage](#usage)
  26. - [Customizing](#customizing)
  27. - [Acknowledgements](#acknowledgements)
  28. - [More to come!](#more-to-come)
  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_date
  82. Displays the current date and time
  83. ```
  84. [🕰 Mon 06-05-19 21:31:58]
  85. ```
  86. ### dwm_mail
  87. Displays the current number of emails in an inbox
  88. ```
  89. [📫 2]
  90. ```
  91. ### dwm_weather
  92. Displays the current weather provided by [wttr.in](https://wttr.in)
  93. ```
  94. [☀ +20°C]
  95. ```
  96. ### dwm_network
  97. Displays the current network connection, private IP, and public IP
  98. ```
  99. [🌐 enp7s0: 192.168.0.1/24 | 185.199.109.153]
  100. ```
  101. Dependencies: ```NetworkManager, curl```
  102. ### dwm_vpn
  103. Displays the current VPN connection
  104. ```
  105. [🔒 Sweden - Stockholm]
  106. ```
  107. Dependencies: ```NetworkManager-openvpn```
  108. ### dwm_ccurse
  109. Displays the next appointment from calcurse
  110. ```
  111. [💡 18/04/19 19:00 20:00 Upload dwm_ccurse]
  112. ```
  113. Dependencies: ```calcurse```
  114. ### dwm_transmission
  115. Displays the current status of a torrent with transmission-remote
  116. ```
  117. [⏬ archlinux-2019.06.01... | 92% 1min ⬆3.4 ⬇1.5]
  118. ```
  119. Dependencies: ```transmission-remote```
  120. ### dwm_backlight
  121. Displays the current backlight level with xbacklight
  122. ```
  123. [☀ 80]
  124. ```
  125. Dependencies: ```xbacklight```
  126. ## Installation
  127. 1. Clone and enter the repository:
  128. ```
  129. $ git clone https://github.com/joestandring/dwm-bar
  130. $ cd dwm-bar
  131. ```
  132. 2. Make the script executable
  133. ```
  134. $ chmod +x dwm_bar.sh
  135. ```
  136. ## Reccomendations
  137. To make the most out of unicode support, consider using a font that inludes many unicode charachters. For example:
  138. * [Nerd Fonts](https://github.com/ryanoasis/nerd-fonts)
  139. * [Siji](https://github.com/stark/siji)
  140. While not always neccessary, it's a good idea to specify these fonts in your dwm config.
  141. ## Quick Start
  142. Simply run the script and dwm should display your bar:
  143. ```
  144. $ ./dwm_bar.sh
  145. ```
  146. 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.
  147. 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/:
  148. ```
  149. # Statusbar
  150. /home/$USER/dwm-bar/dwm_status.sh &
  151. # Start dwm
  152. exec dwm
  153. ```
  154. ## Customizing
  155. 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
  156. 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:
  157. ```
  158. # Import the modules
  159. . "$DIR/bar-functions/dwm_myfucntion"
  160. while true
  161. do
  162. xsetroot -name "$(dwm_myfunction)"
  163. sleep 1
  164. done
  165. ```
  166. 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:
  167. ```
  168. [📫 0]
  169. ```
  170. Whereas, if it is not set it will display:
  171. ```
  172. [MAIL 0]
  173. ```
  174. ## Acknowledgements
  175. Code for some functions was modified from:
  176. * [Klemens Nanni](https://notabug.org/kl3)
  177. * [@boylemic](https://github.com/boylemic/configs/blob/master/dwm_status)
  178. * [Parket Johnson](https://github.com/ronno/scripts/blob/master/xsetcmus)
  179. * [suckless.org](https://dwm.suckless.org/status_monitor/)
  180. ## More to come!
  181. * dwm_bluez function to show currently connected Bluetooth device using bluez
  182. * dwm_mpd