You are not logged in.
Pages: 1
While I was searching for a good desktop panel I came accross Dzen.
So is it possible to add a Windows List to a Dzen2 panel?
Libertarian Arch Linux User
Offline
Yes, with a lot of use of wmctrl.
Offline
Any examples?
So far I've come up with something like this:
wmctrl -l | grep "0x[a-z0-9]* 0" | sed "s|.* $(hostname) \([a-zA-Z /0-9\-]*\)|\1|"
Libertarian Arch Linux User
Offline
Ok I've got something like:
#!/bin/sh
while true
do
IFS=$'\n'
echo -n "| "
for window in $(wmctrl -l | grep " [0-9]* " | sed "s|\(.*\) [0-9] $(hostname) \([a-zA-Z /0-9\-]*\)|\1////\2|")
do
id=$(echo $window | sed "s|\(.*\)////.*|\1|")
name=$(echo $window | sed "s|.*////\(.*\)|\1|")
echo -n "^ca(1,wmctrl -i -a ${id})${name}^ca() | "
done
echo
sleep 1
done
Last edited by matthewbauer (2009-12-13 15:55:04)
Libertarian Arch Linux User
Offline
This is neat. I was looking for something like this over the summer when I was messing with dzen, and it's nice to see a working script.
I'll keep this script in the vaults in case I wanna use dzen2 again. Thanks for posting matthew.
[nil]
[exists]
Offline
Pages: 1