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.

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