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.

148 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
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_battery](#dwm_battery)
  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. - [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](https://github.com/joestandring/countdown)```
  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_battery
  58. Displays battery level and status
  59. ```
  60. [🔌 55 Charging]
  61. ```
  62. ### dwm_cmus
  63. displays current cmus status, artist, track, position, duration, and shuffle
  64. ```
  65. [▶ The Unicorns - Tuff Ghost 0:43/2:56 🔀]
  66. ```
  67. Dependencies: ```cmus```
  68. ### dwm_date
  69. Displays the current date and time
  70. ```
  71. [🕰 Mon 06-05-19 21:31:58]
  72. ```
  73. ### dwm_mail
  74. Displays the current number of emails in an inbox
  75. ```
  76. [📫 2]
  77. ```
  78. ### dwm_weather
  79. Displays the current weather provided by [wttr.in](https://wttr.in)
  80. ```
  81. [☀ +20°C]
  82. ```
  83. ### dwm_network
  84. Displays the current network connection/SSID, private IP, and public IP
  85. ```
  86. [🌐 enp7s0: 192.168.0.1/24 | 185.199.109.153]
  87. ```
  88. Dependencies: ```NetworkManager, curl```
  89. ### dwm_vpn
  90. Displays the current VPN connection
  91. ```
  92. [🔒 Sweden - Stockholm]
  93. ```
  94. Dependencies: ```NetworkManager-openvpn```
  95. ## Installation
  96. 1. Clone and enter the repository:
  97. ```
  98. $ git clone https://github.com/joestandring/dwm-bar
  99. $ cd dwm-bar
  100. ```
  101. 2. Make the script executable
  102. ```
  103. $ chmod +x dwm_bar.sh
  104. ```
  105. ## Quick Start
  106. Simply run the script and dwm should display your bar:
  107. ```
  108. $ ./dwm_bar.sh
  109. ```
  110. 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.
  111. 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/:
  112. ```
  113. # Statusbar
  114. /home/$USER/dwm-bar/dwm_status.sh &
  115. # Start dwm
  116. exec dwm
  117. ```
  118. ## Customizing
  119. 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
  120. 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:
  121. ```
  122. # Import the modules
  123. . "$DIR/functions/dwm_myfucntion"
  124. while true
  125. do
  126. xsetroot -name "$(dwm_myfunction)"
  127. sleep 1
  128. done
  129. ```
  130. 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:
  131. ```
  132. [📫 0]
  133. ```
  134. Whereas, if it is not set it will display:
  135. ```
  136. [MAI 0]
  137. ```
  138. ## Acknowledgements
  139. Code for some functions was modified from:
  140. * [Klemens Nanni](https://notabug.org/kl3)
  141. * [@boylemic](https://github.com/boylemic/configs/blob/master/dwm_status)
  142. * [Parket Johnson](https://github.com/ronno/scripts/blob/master/xsetcmus)
  143. * [suckless.org](https://dwm.suckless.org/status_monitor/)
  144. ## More to come!
  145. * dwm_bat function to display battery percentage and status
  146. * dwm_bluez function to show currently connected Bluetooth device using bluez