Skip to content
This repository has been archived by the owner on Jan 5, 2018. It is now read-only.

Commit

Permalink
removed color coding, adjust for new laptop
Browse files Browse the repository at this point in the history
  • Loading branch information
Jente Hidskes committed Sep 22, 2013
1 parent 631c492 commit fb6eeff
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 59 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ AUDLIB = `pkg-config --cflags --libs glib-2.0 dbus-glib-1 audclient`
AUDFLAG = -DAUD

LIBS = -liw -lasound -lX11 ${MPDLIB} ${AUDLIB}
CPPFLAGS = ${MPDFLAG} ${AUDFLAG} ${CLKFLAG}
CPPFLAGS = ${MPDFLAG} ${AUDFLAG}
CFLAGS = -Os -pedantic -Wall -Wextra -Wno-format-zero-length ${CPPFLAGS}

${PROG}: ${PROG}.c ${PROG}.h
Expand Down
32 changes: 0 additions & 32 deletions PKGBUILD

This file was deleted.

6 changes: 3 additions & 3 deletions dwmst.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ char *get_net(char *buf) {
char *get_volume(char *buf) {
long vol = 0, max = 0, min = 0;
int mute = 0, realvol = 0;

snd_mixer_t *handle;
snd_mixer_elem_t *pcm_mixer, *mas_mixer;
snd_mixer_selem_id_t *vol_info, *mute_info;
Expand Down Expand Up @@ -202,7 +202,7 @@ char *get_battery(char *buf) {
int main(void) {
Display *dpy;
Window root;
char status[201], music[100], skype[7], net[30], volume[14], battery[48];
char status[201], music[100], skype[7], net[30], volume[14], battery[35];
int netloops = 60, musicloops = 10;

dpy = XOpenDisplay(NULL);
Expand Down Expand Up @@ -244,7 +244,7 @@ int main(void) {
get_volume(volume);
get_battery(battery);

sprintf(status, "%s %s %s %s%s ", music, skype, net, volume, battery);
sprintf(status, "%s %s %s %s %s", music, skype, net, volume, battery);

XStoreName(dpy, root, status);
XFlush(dpy);
Expand Down
46 changes: 23 additions & 23 deletions dwmst.h
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
#define WIRED_DEVICE "enp3s0"
#define WIRELESS_DEVICE "wlp5s0"
#define WIRED_DEVICE "enp9s0"
#define WIRELESS_DEVICE "wlp3s0"
#define BAT_LOW_P 11
#define BAT_LOW_T 3
#define INTERVAL 1
#define VOL_CH "Master"

#define SKYPE_LOCK "/home/jente/.Skype/jente_etnej/main.lock"
#define BATT_NOW "/sys/class/power_supply/BAT0/charge_now"
#define BATT_FULL "/sys/class/power_supply/BAT0/charge_full"
#define BATT_STAT "/sys/class/power_supply/BAT0/status"
#define BATT_VOLT "/sys/class/power_supply/BAT0/voltage_now"
#define BATT_CNOW "/sys/class/power_supply/BAT0/current_now"
#define BATT_NOW "/sys/class/power_supply/BAT1/energy_now"
#define BATT_FULL "/sys/class/power_supply/BAT1/energy_full"
#define BATT_STAT "/sys/class/power_supply/BAT1/status"
#define BATT_VOLT "/sys/class/power_supply/BAT1/voltage_now"
#define BATT_CNOW "/sys/class/power_supply/BAT1/power_now"

#ifdef MPD
#define MPD_STR "\x02%s \x01 - \x02 %s"
#define MPD_P_STR "\x01Paused: \x02 %s \x01 - \x02 %s"
#define MPD_STR "%s - %s"
#define MPD_P_STR "Paused: %s - %s"
#define MPD_S_STR ""
#define NO_MPD_STR "\x01Geen verbinding"
#define NO_MPD_STR "Geen verbinding"
#endif
#ifdef AUD
#define AUD_STR "\x02%s"
#define AUD_P_STR "\x01%s"
#define AUD_STR "%s"
#define AUD_P_STR "%s"
#define AUD_S_STR ""
#endif
#define SKYPE_STR "\x02Skype"
#define SKYPE_STR "Skype"
#define NO_SKYPE_STR ""
#define LAN_STR "\x01Verbonden"
#define WLAN_STR "\x01%s \x02%d%%"
#define NO_CON_STR "\x01Geen verbinding"
#define VOL_STR "\x01Volume \x02%d%%"
#define VOL_MUTE_STR "\x01Volume \x02M"
#define BAT_FULL_STR "\x01 Batterij\x02 F"
#define BAT_STR "\x01 Batterij\x02 D %d%%\x01, \x02%02d:%02d resterend"
#define BAT_LOW_STR "\x01 Batterij\x02 D %d%%\x01, \x02%02d:%02d resterend"
#define BAT_CHRG_STR "\x01 Batterij\x02 C %d%%\x01, \x02%02d:%02d tot opgeladen"
#define BAT_UNK_STR "\x01 Batterij\x02 U"
#define LAN_STR "Verbonden"
#define WLAN_STR "%s %d%%"
#define NO_CON_STR "Geen verbinding"
#define VOL_STR "Volume %d%%"
#define VOL_MUTE_STR "Volume M"
#define BAT_FULL_STR "Batterij F"
#define BAT_STR "Batterij D%d%%, %02d:%02d"
#define BAT_LOW_STR "Batterij D%d%%, %02d:%02d"
#define BAT_CHRG_STR "Batterij C%d%%, %02d:%02d"
#define BAT_UNK_STR "Batterij U"

0 comments on commit fb6eeff

Please sign in to comment.