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.

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