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.

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