sites

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit acde9cf323ada48ed5c0bc400c26152a1c4f462c
parent a29f67d27854bbe93bff17465339407c749818c0
Author: Christoph Lohmann <20h@r-36.net>
Date:   Sun, 26 Feb 2012 12:50:13 +0100

Resolving the dependency on webconverger.org.
Diffstat:
Mdwm.suckless.org/tutorial.md | 5+++--
Adwm.suckless.org/xinitrc.example | 49+++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 52 insertions(+), 2 deletions(-)

diff --git a/dwm.suckless.org/tutorial.md b/dwm.suckless.org/tutorial.md @@ -84,11 +84,12 @@ Using the tools of X.org, this can be set using: There are various tools and methods to populate this text with useful information from your system or services running on your system. A barebone for doing this in C is [dwmstatus](http://dwm.suckless.org/dwmstatus/). -See the [xinitrc](http://git.webconverger.org/?p=home.git;a=blob_plain;f=.xinitrc) +See the [xinitrc](http://dwm.suckless.org/xinitrc.example) example for how to do it using a script. Launching --------- -To launch dwm, ideally you should setup an [xinitrc](http://git.webconverger.org/?p=home.git;a=blob_plain;f=.xinitrc). +To launch dwm, ideally you should setup an +[xinitrc](http://dwm.suckless.org/xinitrc.example). diff --git a/dwm.suckless.org/xinitrc.example b/dwm.suckless.org/xinitrc.example @@ -0,0 +1,49 @@ +#!/bin/bash +# Taken from: +# https://raw.github.com/kaihendry/Kai-s--HOME/master/.xinitrc +# +# for terminus font in Archlinux :( +xset +fp /usr/share/fonts/local +xset fp rehash + +xset -b # disable bell +eval `/usr/bin/ssh-agent` + +if test -f /usr/lib/openssh/x11-ssh-askpass # Archlinux +then + SSH_ASKPASS=/usr/lib/openssh/x11-ssh-askpass ssh-add < /dev/null +fi + +if test -f /usr/lib/ssh/x11-ssh-askpass # Debian +then + SSH_ASKPASS=/usr/lib/ssh/x11-ssh-askpass ssh-add < /dev/null +fi + +# 1280x720 = 720p X220 +hash fswebcam && fswebcam -q --no-banner -r 1280x720 ~/private/login-photos/$(date +%Y-%m-%dT%H).jpg & + +xrdb -merge $HOME/.Xresources +xmodmap ~/.Xmodmap +setxkbmap -layout gb -option ctrl:nocaps + +hash chromium && chromium & + +while true +do + VOL=$(amixer get Master | tail -1 | sed 's/.*\[\([0-9]*%\)\].*/\1/') + LOCALTIME=$(date +%Z\=%Y-%m-%dT%H:%M) + OTHERTIME=$(TZ=Europe/London date +%Z\=%H:%M) + IP=$(for i in `ip r`; do echo $i; done | grep -A 1 src | tail -n1) # can get confused if you use vmware + TEMP="$(($(cat /sys/class/thermal/thermal_zone0/temp) / 1000))C" + + if acpi -a | grep off-line > /dev/null + then + BAT="Bat. $(acpi -b | awk '{ print $4 " " $5 }' | tr -d ',')" + xsetroot -name "$IP $BAT $VOL $TEMP $LOCALTIME $OTHERTIME" + else + xsetroot -name "$IP $VOL $TEMP $LOCALTIME $OTHERTIME" + fi + sleep 20s +done & + +exec dwm