- Added the $IDENTIFIER value that determines if unicode or plaintext is
used for function identifiers
- Cleaned up scripts with the help of shellchecker
- Fixed dwm_status so that other drives mounted within /home are ignored
- Replaced unicode codes with actual unicode in the source. For some
reason the codes didnt work on my Void machine
- Updated readme
* Fully modular! If you don't want to use a function, no worries.
* Lightweight! dwm-bar is written entirely in POSIX-compliant shell script so need to install a hundred different packages to get it working.
* Options! You can decide to use either unicode symbols or plaintext for module identifiers with the ```IDENTIFIER``` value.
## Current Functions
## Current Functions
### dwm_alsa
### dwm_alsa
Displays the current master volume of ALSA
Displays the current master volume of ALSA
@ -71,11 +75,12 @@ $ cd dwm-bar
```
```
$ chmod +x dwm_bar.sh
$ chmod +x dwm_bar.sh
```
```
## Usage
## Quick Start
Simply run the script and dwm should display your bar:
Simply run the script and dwm should display your bar:
```
```
$ ./dwm_bar.sh
$ ./dwm_bar.sh
```
```
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.
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/:
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/:
```
```
# Statusbar
# Statusbar
@ -97,6 +102,14 @@ do
sleep 1
sleep 1
done
done
```
```
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:
```
[📫 0]
```
Whereas, if it is not set it will display:
```
[MAI 0]
```
## Acknowledgements
## Acknowledgements
Code for some functions was modified from:
Code for some functions was modified from:
* [Klemens Nanni](https://notabug.org/kl3)
* [Klemens Nanni](https://notabug.org/kl3)
@ -104,8 +117,8 @@ Code for some functions was modified from:
# Import functions with "$include /route/to/module"
# Import functions with "$include /route/to/module"
# It is reccomended that you place functions in the subdirectory ./functions and use: . "$DIR/modules/dwm_example.sh"
# It is recommended that you place functions in the subdirectory ./functions and use: . "$DIR/modules/dwm_example.sh"
# Store the directory the script is running from
# Store the directory the script is running from
LOC=$(readlink -f "$0")
LOC=$(readlink -f "$0")
DIR=$(dirname "$LOC")
DIR=$(dirname "$LOC")
# Change the appearance of the module identifier. if this is set to "unicode", then symbols will be used as identifiers instead of text. E.g. [📪 0] instead of [MAIL 0].
# Requires a font with adequate unicode character support