You are not logged in.

#1 2018-11-08 20:49:19

judd1
Member
Registered: 2015-09-04
Posts: 162

Battery indicator inside dwm-sss

Good evening, I would like to add a battery indicator in dwm-sss https://github.com/joeiddon/dwm_sss, reading the wiki of arch and dwm, I really do not realize how to do it and I'm not sure what can be done.

In addition to date, time and temperature of CPU, I would lack a battery indicator. My dwm-sss https://postimg.cc/HJycwBKz

I wish I could achieve it, I would need help so that they can guide me and I am grateful.

~/.xinitrc

#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx 

if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
  done
  unset f
fi

export GTK2_RC_FILES="$HOME/.gtkrc-2.0"

xrdb -merge ~/.xresources

/home/judd/dwm_sss-master/dwm-sss &

# Autostart section
chromium &
exec dwm

Last edited by judd1 (2018-11-08 21:22:26)

Offline

#2 2018-11-08 21:53:40

/dev/zero
Member
From: Melbourne, Australia
Registered: 2011-10-20
Posts: 1,195
Website

Re: Battery indicator inside dwm-sss

judd1 wrote:

Good evening, I would like to add a battery indicator in dwm-sss https://github.com/joeiddon/dwm_sss, reading the wiki of arch and dwm, I really do not realize how to do it and I'm not sure what can be done.

In addition to date, time and temperature of CPU, I would lack a battery indicator. My dwm-sss https://postimg.cc/HJycwBKz

I wish I could achieve it, I would need help so that they can guide me and I am grateful.

Since dwm_sss is just a simple bash script, you might be willing to grab ideas from other places. In particular, I use dwm and my configs include a battery status monitor:

https://notabug.org/cryptarch/dwm.git

Have a look at the wrapper script xsetroot.sh for how to visualise a percentage as a bar indicator, and have a look at xsetroot.d/battery.sh for how to capture the information you want.

(It depends on acpi.)

It's under an MIT license so steal the whole lot if it appeals to you wink

Edit: fix typo

Last edited by /dev/zero (2018-11-08 21:54:06)

Offline

#3 2018-11-08 22:04:46

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 26,057
Website

Re: Battery indicator inside dwm-sss


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#4 2018-11-09 14:01:01

judd1
Member
Registered: 2015-09-04
Posts: 162

Re: Battery indicator inside dwm-sss

@/dev/zero
@jasonwryan

I am very grateful to you for the time and material you gave me.

At the moment I continue with the previous configuration, it is simple, and I want to install the battery indicator right away, it gets too complicated, I will keep on fiddling, (while my cervicals and eyes are left), step by step.

When I have something concrete, I'll post.
forgive my english ...

My respects.

Last edited by judd1 (2018-11-09 14:12:15)

Offline

Board footer

Powered by FluxBB