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.

111 lines
3.2 KiB

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](dwm-bar.png)
  4. ## Table of Contents
  5. - [Current Functions](#current-functions)
  6. - [dwm_alsa](#dwm_alsa)
  7. - [dwm_countdown](#dwm_countdown)
  8. - [dwm_keyboard](#dwm_keyboard)
  9. - [dwm_resources](#dwm_resources)
  10. - [dwm_cmus](#dwm_cmus)
  11. - [dwm_date](#dwm_date)
  12. - [dwm_mail](#dwm_mail)
  13. - [dwm_weather](#dwm_weather)
  14. - [Installation](#installation)
  15. - [Usage](#usage)
  16. - [Customizing](#customizing)
  17. - [Acknowledgements](#acknowledgements)
  18. - [More to come!](#more-to-come)
  19. ## Current Functions
  20. ### dwm_alsa
  21. Displays the current master volume of ALSA
  22. ```
  23. [🔉 55]
  24. ```
  25. Dependencies: ```alsa-utils```
  26. ### dwm_countdown
  27. Displays the status of [countdown](https://github.com/joestandring/countdown)
  28. ```
  29. [⏳ 00:10:00]
  30. ```
  31. Dependeincies: ```[countdown](https://github.com/joestandring/countdown)```
  32. ### dwm_keyboard
  33. Displays the current keyboard layout
  34. ```
  35. [⌨ gb]
  36. ```
  37. Dependencies: ```xorg-setxkbmap```
  38. ### dwm_resources
  39. Displays information regarding memory, CPU temperature, and storage
  40. ```
  41. [🖥 MEM 1.3Gi/15Gi CPU 45C STO 2.3G/200G: 2%]
  42. ```
  43. ### dwm_cmus
  44. displays current cmus status, artist, track, position, duration, and shuffle
  45. ```
  46. [▶ The Unicorns - Tuff Ghost 0:43/2:56 🔀]
  47. ```
  48. Dependencies: ```cmus```
  49. ### dwm_date
  50. Displays the current date and time
  51. ```
  52. [🕰 Mon 06-05-19 21:31:58]
  53. ```
  54. ### dwm_mail
  55. Displays the current number of emails in an inbox
  56. ```
  57. [📫 2]
  58. ```
  59. ### dwm_weather
  60. Displays the current weather provided by [wttr.in](https://wttr.in)
  61. ```
  62. [☀ +20°C]
  63. ```
  64. ## Installation
  65. 1. Clone and enter the repository:
  66. ```
  67. $ git clone https://github.com/joestandring/dwm-bar
  68. $ cd dwm-bar
  69. ```
  70. 2. Make the script executable
  71. ```
  72. $ chmod +x dwm_bar.sh
  73. ```
  74. ## Usage
  75. Simply run the script and dwm should display your bar:
  76. ```
  77. $ ./dwm_bar.sh
  78. ```
  79. 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/:
  80. ```
  81. # Statusbar
  82. /home/$USER/dwm-bar/dwm_status.sh &
  83. # Start dwm
  84. exec dwm
  85. ```
  86. ## Customizing
  87. 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
  88. 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:
  89. ```
  90. # Import the modules
  91. . "$DIR/functions/dwm_myfucntion"
  92. while true
  93. do
  94. xsetroot -name "$(dwm_myfunction)"
  95. sleep 1
  96. done
  97. ```
  98. ## Acknowledgements
  99. Code for some functions was modified from:
  100. * [Klemens Nanni](https://notabug.org/kl3)
  101. * [@boylemic](https://github.com/boylemic/configs/blob/master/dwm_status)
  102. * [Parket Johnson](https://github.com/ronno/scripts/blob/master/xsetcmus)
  103. * [suckless.org](https://dwm.suckless.org/status_monitor/)
  104. ## More to come!
  105. * Ability to choose between showing unicode charachters or plaintext for identifiers in the bar
  106. * dwm_pulse function to control pulseaudio sound
  107. * dwm_bat function to display battery percentage and status
  108. * dwm_notifs function to show the last recieved notification in the bar
  109. * The ability to show network speeds and SSID in dwm_network