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.

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