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.
 
Joe Standring 1288a205f0
Remove "More to come" from contents
4 years ago
bar-functions Add dwm_mpc 4 years ago
LICENSE Initial commit 5 years ago
README.md Remove "More to come" from contents 4 years ago
dwm_bar.sh Add dwm_mpc 4 years ago
sshot.png Added screenshot 5 years ago

README.md

dwm-bar

A modular statusbar for DWM screenshot

Table of Contents

dwm_alsa

Displays the current master volume of ALSA

[🔉 55%]

Dependencies: alsa-utils

dwm_pulse

Displays the current master volume of PulseAudio

[🔉 55%]

Dependencies: pamixer

dwm_battery

Displays battery level and status

[🔋 100% full]

dwm_countdown

Displays the status of countdown

[⏳ 00:10:00]

Dependencies: countdown.sh

dwm_alarm

Displays upcoming alarms from alarm

[⏰ 22:30:00]

Dependencies: alarm.sh

dwm_keyboard

Displays the current keyboard layout

[⌨ gb]

Dependencies: xorg-setxkbmap

dwm_resources

Displays information regarding memory, CPU temperature, and storage

[🖥 MEM 1.3Gi/15Gi CPU 45C STO 2.3G/200G: 2%]

dwm_cmus

displays current cmus status, artist, track, position, duration, and shuffle

[▶ The Unicorns - Tuff Ghost 0:43/2:56 🔀]

Dependencies: cmus

dwm_mpc

displays current mpc status, artist, track, position, duration, and shuffle

[▶ The Unicorns - Tuff Ghost 0:43/2:56 🔀]

Dependencies: mpc

dwm_date

Displays the current date and time

[🕰 Mon 06-05-19 21:31:58]

dwm_mail

Displays the current number of emails in an inbox

[📫 2]

dwm_weather

Displays the current weather provided by wttr.in

[☀ +20°C]

dwm_network

Displays the current network connection, private IP, and public IP

[🌐 enp7s0: 192.168.0.1/24 | 185.199.109.153]

Dependencies: NetworkManager, curl

dwm_vpn

Displays the current VPN connection

[🔒 Sweden - Stockholm]

Dependencies: NetworkManager-openvpn

dwm_ccurse

Displays the next appointment from calcurse

[💡 18/04/19 19:00 20:00 Upload dwm_ccurse]

Dependencies: calcurse

dwm_transmission

Displays the current status of a torrent with transmission-remote

[⏬ archlinux-2019.06.01... | 92% 1min ⬆3.4 ⬇1.5]

Dependencies: transmission-remote

dwm_backlight

Displays the current backlight level with xbacklight

[☀ 80]

Dependencies: xbacklight

Installation

  1. Clone and enter the repository:
$ git clone https://github.com/joestandring/dwm-bar
$ cd dwm-bar
  1. Make the script executable
$ chmod +x dwm_bar.sh

Reccomendations

To make the most out of unicode support, consider using a font that inludes many unicode charachters. For example:

While not always neccessary, it's a good idea to specify these fonts in your dwm config.

Quick Start

Simply run the script and dwm should display your bar:

$ ./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/:

# Statusbar
/home/$USER/dwm-bar/dwm_status.sh &

# Start dwm
exec dwm

Customizing

dwm-bar is completley modular, meaning you can mix and match functions to your hearts content. It's functions are located in the bar-functions/ subdirectory and included in dwm_bar.sh If you want to make your own function, for example dwm_myfunction.sh, you should create it in the bar-functions/ subdirectory before including it in dwm_bar.sh and adding it to the xsetroot command:

# Import the modules
. "$DIR/bar-functions/dwm_myfucntion"

while true
do
    xsetroot -name "$(dwm_myfunction)"
    sleep 1
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:

[MAIL 0]

Acknowledgements

Code for some functions was modified from: