dkeg
Re: dkeg
Shaded looks nice too. Good bar, Great music on the bar, lol.
Thank You!
(I remember when debian "non-gui" installer scared me. #never-forget)
(I remember when debian "non-gui" installer scared me. #never-forget)
Re: dkeg
might be an older version you're looking at. A bit lighter, trySnap wrote:That's what I've got.
Any suggestion for boldblack? I'm really crap at matching good well balanced color sets. The ones I'm currently trying suck.
Code: Select all
#define bg #10141a
#define blk #12161d
Code: Select all
#define bg #0c1014
#define blk #0e1217
Work hard; Complain less
Re: dkeg
Changing things up, using an infobar again. Updated to stay current. Have a conditional to check for the wm (used pidsley's wm function from env-info), displaying an infobar based on wm, and/or geometry for such.
This is for herbstluftwm, using herbstclient to read the current workspace. I have set highlights for memory and battery when under specified limit.
This is for herbstluftwm, using herbstclient to read the current workspace. I have set highlights for memory and battery when under specified limit.
Work hard; Complain less
- ChefIronBelly
- Approved BBQer
- Posts: 1044
- Joined: Mon Jan 13, 2014 6:01 am
- Location: Michigan
Re: dkeg
awesome
(1/1) Installing: LinuxBBQ...................................[69%]==============[/]
- ivanovnegro
- Minister of Truth
- Posts: 5450
- Joined: Wed Oct 17, 2012 11:12 pm
Re: dkeg
^^ Oh yes. Forget Gnome Shell, that minimalism there looks a little bit like the Shell for CLI wizards.
- franksinistra
- Ivana Fukalot
- Posts: 1093
- Joined: Mon Jan 27, 2014 2:03 am
- Location: 印尼国
Re: dkeg
haha wux, I could be a hipster .... maybe. I do like coffee.
frank, uh, I'll take that as a compliment? haha.
Alright, so I think I've got this thing updated. If things get to hot, too high, or too low, color changes as specified. There is different output and geometry based on wm session, colors of course are taken from xrdb.
It's cool for now, like everything else right? But I am happy with it for what it is. Always have the popup notification info scripts as a fallback.
frank, uh, I'll take that as a compliment? haha.
Alright, so I think I've got this thing updated. If things get to hot, too high, or too low, color changes as specified. There is different output and geometry based on wm session, colors of course are taken from xrdb.
It's cool for now, like everything else right? But I am happy with it for what it is. Always have the popup notification info scripts as a fallback.
Work hard; Complain less
- franksinistra
- Ivana Fukalot
- Posts: 1093
- Joined: Mon Jan 27, 2014 2:03 am
- Location: 印尼国
- ivanovnegro
- Minister of Truth
- Posts: 5450
- Joined: Wed Oct 17, 2012 11:12 pm
Re: dkeg
^ Indeed, Viva el Dkeg!
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: dkeg
^^^ oh man, that's a whole lot of inspiration -- color changes depending on values. actually there should be something that xsetroots everything red when battery falls below 10% :D nice homework for tonight...
..gnutella..
Re: dkeg
Excellent! Had conditionals set previously, this is mainly a change in the output style. Also, the code is cleaner. I got bored over the long weekend, and my back was out, so couldn't do any work in the yard.
When my battery is less than 10, it shows purple (red 11-20), and my window borders also change color.
Let me know what you come up with.
When my battery is less than 10, it shows purple (red 11-20), and my window borders also change color.
Let me know what you come up with.
Work hard; Complain less
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: dkeg
^ Maybe a daemon?
/usr/local/bin/batwatch
/etc/init.d/batwatch
then make it available
and it should be working for X. I would refrain from setting hsetroot because there's no universal way to revert this behaviour after the charger has been plugged in, so we have to live with notifications. No warranty, I don't even know if it works.
/usr/local/bin/batwatch
Code: Select all
#!/bin/bash
# make notifications appear in X
export DISPLAY=:0
# lsb functions
. /lib/lsb/init-functions
# commands for X session - edit as you wish
# I would not use hsetroot because there is no automated
# way of reverting to the originally set wallpaper.
# I kept it here for demonstration purposes.
LOW_COMMAND_X='hsetroot -solid "#ff0000" && notify-send -u critical "Battery low!"'
CRITICAL_X='hsetroot -solid "#ffffff" && notify-send -u critical "Poweroff!"'
# the path to your battery. It should (!) be BAT0, but kernels sometimes
# count from BAT1, so we use a wildcard. It will work, anyway.
CAP=`cat /sys/class/power_supply/BAT*/charge_now`
while true; do
# check if X is running and set DISPLAY
if [ $(($CAP+0)) -le "60000" ]; then
eval $LOW_COMMAND_X 2>&1
log_action_msg "Battery low!"
elif [ $(($CAP+0)) -le "20000" ]; then
eval $CRITICAL_X 2>&1
log_action_msg "Prepare for poweroff!"
fi
sleep 10s
done
Code: Select all
#!/bin/sh
### BEGIN INIT INFO
# Provides: batwatch
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Checks for battery charge
# Description: Warns user if battery low.
### END INIT INFO
. /lib/lsb/init-functions
[ -f /etc/default/rcS ] && . /etc/default/rcS
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
DAEMON=/usr/local/bin/batwatch
DESC="battery watcher"
NAME=batwatch
PIDFILE=/var/run/batwatch.pid
# make sure pid is empty
rm -f $PIDFILE
test -f $DAEMON || exit 0
case "$1" in
start)
log_action_msg "Starting $DESC" "$NAME"
start-stop-daemon --start --background --quiet --oknodo --make-pidfile --pidfile $PIDFILE --exec $DAEMON
# log_end_msg $?
;;
stop)
log_action_msg "Stopping $DESC" "$NAME"
start-stop-daemon --stop --quiet --remove-pidfile --pidfile $PIDFILE
rm -f $PIDFILE
;;
reload|force-reload|restart)
log_action_msg "Restarting $DESC" "$NAME"
$0 stop
$0 start
;;
status)
status_of_proc $DAEMON $NAME $CONF && exit 0 || exit $?
;;
*)
log_action_msg "Usage: /etc/init.d/batwatch {start|stop|restart|force-reload|status}"
exit 2
;;
esac
exit 0
Code: Select all
sudo update-rc batwatch defaults
..gnutella..
- ChefIronBelly
- Approved BBQer
- Posts: 1044
- Joined: Mon Jan 13, 2014 6:01 am
- Location: Michigan
Re: dkeg
^^ cool thanks, something to munch on later.
(1/1) Installing: LinuxBBQ...................................[69%]==============[/]
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: dkeg
well apparently "/sys/class/power_supply/BAT0/" is the battery path on newer Linuxen (I have a few boxes that point at BAT1 *sometimes*), and anyway not the damned /proc or where it was stored before.
..gnutella..