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.

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