dwm-bar for archlinux
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.

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