dwm script when bell/urgent and things

This commit is contained in:
Frank Villaro-Dixon 2013-10-05 01:59:41 +02:00
parent 8e84e818fb
commit 30f07e03d8
6 changed files with 27 additions and 4 deletions

9
Utils/urgent.sh Executable file
View file

@ -0,0 +1,9 @@
#!/bin/bash
LIGHT=/sys/class/leds/tpacpi\:\:thinklight/brightness
echo 255 > $LIGHT
sleep .3
echo 0 > $LIGHT
sleep .3
echo 255 > $LIGHT
sleep .3
echo 0 > $LIGHT

3
bashrc
View file

@ -99,6 +99,8 @@ alias la='ls -lah'
alias sudp='sudo' #fuck tpyos :p
alias sudpo='sudo'
alias halt='sudo poweroff'
#alias pacman='pacman-color'
alias pacmacn='pacman'
# '[r]emove [o]rphans' - recursively remove ALL orphaned packages
@ -152,6 +154,7 @@ alias op='xdg-open'
alias o='octave'
alias cdu='cdu -idh'
alias dus='du -sh * | sort -h'
alias im='dtach -A /dev/shm/im profanity'
# }}}

View file

@ -18,6 +18,8 @@ static const Bool topbar = True; /* False means bottom bar */
/* tagging */
static const char *tags[] = { "web", "mails", "term", "chat", "media", "misc", "misc2", };
static const char *urgent_cmd = "/home/frank/Programmation/dotfiles/Utils/urgent.sh";
static const Rule rules[] = {
/* xprop(1):
* WM_CLASS(STRING) = instance, class

View file

@ -2059,8 +2059,18 @@ updatewmhints(Client *c) {
wmh->flags &= ~XUrgencyHint;
XSetWMHints(dpy, c->win, wmh);
}
else
else { /* FIXME FRANK */
//strcpy(stext, "YopYop");
if(urgent_cmd && wmh->flags &XUrgencyHint) {
if(fork() == 0) {
system(urgent_cmd);
exit(EXIT_SUCCESS);
}
}
//drawbar(selmon);
c->isurgent = (wmh->flags & XUrgencyHint) ? True : False;
}
if(wmh->flags & InputHint)
c->neverfocus = !wmh->input;
else

View file

@ -66,6 +66,7 @@ set text_flowed
ignore "Authentication-Results:"
ignore "DomainKey-Signature:"
ignore "DKIM-Signature:"
my_hdr X-URL: http://frank.villaro-dixon.eu
hdr_order Date From To Cc
alternative_order text/plain text/html *
auto_view text/html

View file

@ -1,9 +1,7 @@
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{frank_tex}
\title{\textbf{<+TITLE+>}}
\author{Frank Villaro-Dixon}
\date{}
\begin{document}