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.

178 lines
4.9 KiB

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