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.

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