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.

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