#1 Le 29/03/2010, à 18:08
- DaveNull
WMII et fond d'écran
Bonjour à tous.
Voilà mon problème. Mineur, mais un peu agaçant quand-même.
J'utilise wmii depuis un moment déjà, et j'ai un peu bidouillé dans les fichiers de conf', à savoir ~/.wmii3.5/rc.wmii et ~/.wmii3.5/wmiirc.
Cependant, chose que j'avais le flemme de résoudre, quand j'essaie de configurer un fond d'écran, eh ben ça l'affiche une demi seconde au lancement de wmii, puis plus rien, background noir.
Sûrement un conflit dans les fichiers de conf'...
Je vous les poste :
rc.wmii :
#!/usr/bin/env wmii9rc
# WMII Configuration
confpath=`{echo $WMII_CONFPATH | sed 'y/:/ /'}
oldpath=$path
path=($PLAN9/bin $path)
# Sanity checks
if(echo $0 | grep -s '(^|/)rc\.wmii\.local$') {
echo >[1=2] Fatal: This file must not be named rc.wmii.local
exit badname
}
fn config_whatis {
prog = `{@{path=$confpath whatis $1} | grep -v '^fn|=' || echo /dev/null}
shift; echo $prog $*
}
if(! test -x $PLAN9/bin/read) {
echo 'Can''t find the ''read'' command' >[1=2]
xmessage -file - <<'!'
path=$oldpath
exec `{config_whatis wmiirc}
}
rc.wmii can't run:
You have a Plan 9 utilities installed, but are missing the 'read' command.
This likely means that you have an out-of-date 9base installed.
wmiirc will be run instead.
!
# Configurables
MODKEY=Mod1
UP=k
DOWN=j
LEFT=h
RIGHT=l
#WMII_FONT='-*-fixed-medium-r-*-*-13-*-*-*-*-*-*-*'
#WMII_NORMCOLORS=('#888888' '#222222' '#333333')
#WMII_FOCUSCOLORS=('#ffffff' '#285577' '#4C7899')
#WMII_BACKGROUND='#333333'
#WMII_TERM=(xterm)
# Column Rules
wmiir write /colrules <<!
/./ -> 60+40
!
# Tagging Rules
wmiir write /tagrules <<!
/XMMS.*/ -> ~
/MPlayer.*/ -> ~
/.*/ -> sel
/.*/ -> 1
!
# Status Bar Info
fn status { echo -n `{uptime | sed 's/.*://; s/,//g'} '|' `{date} }
fn viewtitle { echo $* }
# Convenience Functions
fn wmiimenu {
dmenu -b -fn $WMII_FONT \
-nf $WMII_NORMCOLORS(1) -nb $WMII_NORMCOLORS(2) \
-sf $WMII_FOCUSCOLORS(1) -sb $WMII_FOCUSCOLORS(2)
}
fn 9menu {
wmii9menu -font $WMII_FONT \
-^(nf nb br)^$WMII_NORMCOLORS \
-^(sf sb br)^$WMII_FOCUSCOLORS $*
}
fn proglist {
/bin/ls -lL `{echo $* | sed 'y/:/ /'} >[2]/dev/null \
| awk '$1 ~ /^[^d].*x/ && NF > 2 { print $NF }' \
| sort | uniq
}
fn actionlist {
{ proglist $WMII_CONFPATH
getfuns Action
} | sort | uniq
}
fn run_command { @{
rfork ns
path=$oldpath
eval exec $* &
}
}
fn getfuns { env | sed -n 's/^fn#'^$1^'-([^=]+).*/\1/p' }
fn initkeys { getfuns Key | wmiir write /keys }
fn read_tags { wmiir ls /tag | sed 's,/,,; /^sel$/d' }
fn 'fn?' {rc -c 'whatis '$1 >[2]/dev/null | grep -s '^fn ' }
# Events
fn Event-Start {
switch($1) {
case wmiirc
rm -f $progs_file
exit
}
}
fn Event-Key { Key-$1 $1 }
fn Event-CreateTag { echo $WMII_NORMCOLORS `{viewtitle $*} | wmiir create /lbar/$"* }
fn Event-DestroyTag { wmiir remove /lbar/$"* }
fn Event-FocusTag { wmiir xwrite /lbar/$"* $WMII_FOCUSCOLORS `{viewtitle $*} }
fn Event-UnfocusTag { wmiir xwrite /lbar/$"* $WMII_NORMCOLORS `{viewtitle $*} }
fn Event-UrgentTag { shift; wmiir xwrite /lbar/$"* '*'$"* }
fn Event-NotUrgentTag { shift; wmiir xwrite /lbar/$"* $"* }
fn Event-LeftBarClick { shift; wmiir xwrite /ctl view $* }
fn Event-ClientMouseDown {
client = $1; button = $2
if(~ $button 3) {
do=`{9menu -initial $menulast Nop Delete Fullscreen}
switch($do) {
case Delete
wmiir xwrite /client/$client/ctl kill
case Fullscreen
wmiir xwrite /client/$client/ctl Fullscreen on
}
if(! ~ $#do 0)
menulast = $do;
}
}
menulast = Nop
fn Action {
cmd=$1 action=Action-$cmd { shift
if('fn?' $action)
$action $*
if not
run_command `{config_whatis $cmd} $*
} &
}
# Actions
fn Action-rehash {
if(test -d /proc/$pid)
for(i in $WMII_NS_DIR/proglist.*) {
id=`{echo $i | sed 's/.*\.(.*)/\1/'} \
if(! test -d /proc/$id) rm $i
}
proglist $PATH >$progs_file
}
fn Action-quit { wmiir xwrite /ctl quit }
fn Action-exec { wmiir xwrite /ctl exec $* }
fn Action-status {
flag x -; flag r -
if(wmiir remove /rbar/status >[2]/dev/null)
sleep 2
echo $WMII_NORMCOLORS | wmiir create /rbar/status
while(status | wmiir write /rbar/status)
sleep 1
}
# Source Variables, &c
local = `{config_whatis rc.wmii.local}
. <{awk '//;
/^# Overrides/ {
print "xmessage -file - <<!"
print "rc.wmii: Warning:"
print " Your rc.wmii.local contains an ''# Overrides'' line."
print " This line has a deprecated special meaning. Functions"
print " you wish to override should be defined in a function"
print " called Action-overridekeys"
print "!"
exit
}' $local </dev/null}
# Key Bindings
fn key {
key=()
for(k in Key-$*) if(! 'fn?' $k) key = ($key $k)
~ $#key 0
}
key $MODKEY-Control-t || fn $key {
switch(`{wmiir read /keys | wc -l}) {
case 0 1
initkeys
wmiir xwrite /ctl grabmod $MODKEY
case *
wmiir xwrite /keys $MODKEY-Control-t
wmiir xwrite /ctl grabmod Mod3
}
}
key $MODKEY-$LEFT || fn $key { wmiir xwrite /tag/sel/ctl select left }
key $MODKEY-$RIGHT || fn $key { wmiir xwrite /tag/sel/ctl select right }
key $MODKEY-$DOWN || fn $key { wmiir xwrite /tag/sel/ctl select down }
key $MODKEY-$UP || fn $key { wmiir xwrite /tag/sel/ctl select up }
key $MODKEY-Shift-$LEFT || fn $key { wmiir xwrite /tag/sel/ctl send sel left }
key $MODKEY-Shift-$RIGHT || fn $key { wmiir xwrite /tag/sel/ctl send sel right }
key $MODKEY-Shift-$DOWN || fn $key { wmiir xwrite /tag/sel/ctl send sel down }
key $MODKEY-Shift-$UP || fn $key { wmiir xwrite /tag/sel/ctl send sel up }
key $MODKEY-f || fn $key { wmiir xwrite /client/sel/ctl Fullscreen toggle }
key $MODKEY-space || fn $key { wmiir xwrite /tag/sel/ctl select toggle }
key $MODKEY-Shift-space || fn $key { wmiir xwrite /tag/sel/ctl send sel toggle }
key $MODKEY-d || fn $key { wmiir xwrite /tag/sel/ctl colmode sel default }
key $MODKEY-s || fn $key { wmiir xwrite /tag/sel/ctl colmode sel stack }
key $MODKEY-m || fn $key { wmiir xwrite /tag/sel/ctl colmode sel max }
key $MODKEY-Shift-c || fn $key { wmiir xwrite /client/sel/ctl kill }
key $MODKEY-a || fn $key { Action `{actionlist | wmiimenu} & }
key $MODKEY-p || fn $key { ifs=() { run_command `{wmiimenu <$progs_file} & } }
key $MODKEY-Return || fn $key { run_command $WMII_TERM & }
key $MODKEY-t || fn $key { wmiir xwrite /ctl view `{read_tags | wmiimenu} & }
key $MODKEY-Shift-t || fn $key {
sel = `{wmiir read /client/sel/ctl | sed 1q} \
wmiir xwrite /client/$sel/tags `{read_tags | wmiimenu} &
}
key $MODKEY-^`{seq 0 9}|| fn $key { wmiir xwrite /ctl view `{echo $1 | sed 's/.*-//'} }
key Shift-$MODKEY-^`{seq 0 9} || fn $key {
wmiir xwrite /client/sel/tags `{echo $1 | sed 's/.*-//'}
}
# WM Configuration
wmiir write /ctl <<!
grabmod $MODKEY
border 2
font $WMII_FONT
focuscolors $WMII_FOCUSCOLORS
normcolors $WMII_NORMCOLORS
!
xsetroot -solid $WMII_BACKGROUND
# Source Overrides
. <{awk '/^# Overrides/, 0' $local </dev/null}
if('fn?' Action-overridekeys)
Action-overridekeys
if not
. `{config_whatis overridekeys}
# Misc Setup
progs_file=$WMII_NS_DIR/proglist.$pid
Action status
Action rehash
# Tag Bar Setup
ifs='#
'{ for(bar in `{comm -23 <{wmiir ls /lbar} <{read_tags}})
wmiir remove /lbar/$bar
seltag=`{wmiir read /tag/sel/ctl | sed 1q}
for(tag in `{read_tags}) {
if(~ $tag $seltag)
echo $WMII_FOCUSCOLORS `{viewtitle $tag} | wmiir create /lbar/$tag
if not
echo $WMII_NORMCOLORS `{viewtitle $tag} | wmiir create /lbar/$tag
}
}
# Keygrab Setup
initkeys
if(echo Start wmiirc | ! wmiir write /event >[2]/dev/null)
exit write
# Event Loop
wmiir read /event |
while(*=`{read}) {
event = $1; shift
Event-$event $*
} >[2]/dev/null </dev/null
wmiirc :
#!/bin/sh -f
# Configure wmii
# on vire le beep
#if [ -x /usr/bin/numlockx ]; then
# exec /usr/bin/numlockx on
#fi
#fond d'écran...
./.startupwmii.sh&
#xwinwrap -ni -fs -s -st -sp -b -nf -- /usr/lib/xscreensaver/glcells -window-id WID
#on vire les bips
xset -b
# Configuration Variables
MODKEY=Mod4
UP=k
DOWN=j
LEFT=h
RIGHT=l
# Colors tuples: "<text> <background> <border>"
#WMII_NORMCOLORS='#888888 #222222 #333333'
#WMII_FOCUSCOLORS='#ffffff #285577 #4c7899'
#WMII_BACKGROUND='#333333'
WMII_FOCUSCOLORS='#54FF54 #000000 #73A5FF'
# WMII_BACKGROUND='#000000'
WMII_NORMCOLORS='#A8A8A8 #000000 #A07040'
WMII_FONT='-*-fixed-medium-r-*-*-13-*-*-*-*-*-*-*'
#set -- $(echo $WMII_NORMCOLORS $WMII_FOCUSCOLORS)
#WMII_MENU="dmenu -b -fn '$WMII_FONT' -nf '$1' -nb '$2' -sf '$4' -sb '$5'"
#WMII_9MENU="wmii9menu -font '$WMII_FONT' -nf '$1' -nb '$2' -sf '$4' -sb '$5' -br '$6'"
WMII_TERM="urxvt"
# Column Rules
wmiir write /colrules <<!
/.*/ -> 58+42
!
# Tagging Rules
wmiir write /tagrules <<!
/XMMS.*/ -> ~
/MPlayer.*/ -> ~
/.*/ -> sel
/.*/ -> 1
!
# Status Bar Info
status() {
echo '|' $(acpi) '|' $(uptime | sed 's/.*://; s/,//g') '|' $(date)
}
# Event processing
# Processed later by `wmiiloop' and evaled.
# Duplicate the eval line and replace 'eval' with 'echo' for details.
eventstuff() {
cat <<'!'
# Events
Event Start
case "$1" in
wmiirc)
exit;
esac
Event Key
fn=$(echo "$@" | sed 's/[^a-zA-Z_0-9]/_/g')
Key_$fn "$@"
Event CreateTag
echo "$WMII_NORMCOLORS" "$@" | wmiir create "/lbar/$@"
Event DestroyTag
wmiir remove "/lbar/$@"
Event FocusTag
wmiir xwrite "/lbar/$@" "$WMII_FOCUSCOLORS" "$@"
Event UnfocusTag
wmiir xwrite "/lbar/$@" "$WMII_NORMCOLORS" "$@"
Event UrgentTag
shift
wmiir xwrite "/lbar/$@" "*$@"
Event NotUrgentTag
shift
wmiir xwrite "/lbar/$@" "$@"
Event LeftBarClick
shift
wmiir xwrite /ctl view "$@"
# Actions
Action quit
wmiir xwrite /ctl quit
Action exec
wmiir xwrite /ctl exec "$@"
Action rehash
proglist $PATH >$progsfile
Action status
set +xv
if wmiir remove /rbar/status 2>/dev/null; then
sleep 2
fi
echo "$WMII_NORMCOLORS" | wmiir create /rbar/status
while status | wmiir write /rbar/status; do
sleep 1
done
Event ClientMouseDown
client=$1; button=$2
case "$button" in
3)
do=$(eval $WMII_9MENU -initial "${menulast:-SomeRandomName}" Nop Delete Fullscreen)
case "$do" in
Delete)
wmiir xwrite /client/$client/ctl kill;;
Fullscreen)
wmiir xwrite /client/$client/ctl Fullscreen on;;
esac
menulast=${do:-"$menulast"}
esac
# Key Bindings
Key $MODKEY-Control-t
case $(wmiir read /keys | wc -l | tr -d ' \t\n') in
0|1)
echo -n $Keys | tr ' ' '\012' | wmiir write /keys
wmiir xwrite /ctl grabmod $MODKEY;;
*)
wmiir xwrite /keys $MODKEY-Control-t
wmiir xwrite /ctl grabmod Mod3;;
esac
Key $MODKEY-space
wmiir xwrite /tag/sel/ctl select toggle
Key $MODKEY-d
wmiir xwrite /tag/sel/ctl colmode sel default
Key $MODKEY-s
wmiir xwrite /tag/sel/ctl colmode sel stack
Key $MODKEY-m
wmiir xwrite /tag/sel/ctl colmode sel max
Key $MODKEY-a
Action $(actionlist | eval $WMII_MENU) &
Key $MODKEY-p
sh -c "$(eval $WMII_MENU <$progsfile)" &
Key $MODKEY-t
wmiir xwrite /ctl "view $(tagsmenu)" &
Key $MODKEY-Return
eval $WMII_TERM &
Key $MODKEY-Shift-space
wmiir xwrite /tag/sel/ctl send sel toggle
Key $MODKEY-f
wmiir xwrite /client/sel/ctl Fullscreen toggle
Key $MODKEY-Shift-c
wmiir xwrite /client/sel/ctl kill
Key $MODKEY-Shift-t
wmiir xwrite "/client/$(wmiir read /client/sel/ctl)/tags" "$(tagsmenu)" &
Key $MODKEY-$LEFT
wmiir xwrite /tag/sel/ctl select left
Key $MODKEY-$RIGHT
wmiir xwrite /tag/sel/ctl select right
Key $MODKEY-$DOWN
wmiir xwrite /tag/sel/ctl select down
Key $MODKEY-$UP
wmiir xwrite /tag/sel/ctl select up
Key $MODKEY-Shift-$LEFT
wmiir xwrite /tag/sel/ctl send sel left
Key $MODKEY-Shift-$RIGHT
wmiir xwrite /tag/sel/ctl send sel right
Key $MODKEY-Shift-$DOWN
wmiir xwrite /tag/sel/ctl send sel down
Key $MODKEY-Shift-$UP
wmiir xwrite /tag/sel/ctl send sel up
!
for i in 0 1 2 3 4 5 6 7 8 9; do
cat <<!
Key $MODKEY-$i
wmiir xwrite /ctl view "$i"
Key $MODKEY-Shift-$i
wmiir xwrite /client/sel/tags "$i"
!
done
}
# WM Configuration
wmiir write /ctl << EOF
font $WMII_FONT
focuscolors $WMII_FOCUSCOLORS
normcolors $WMII_NORMCOLORS
grabmod $MODKEY
border 1
EOF
export WMII_MENU WMII_9MENU WMII_FONT WMII_TERM
export WMII_FOCUSCOLORS WMII_SELCOLORS WMII_NORMCOLORS
# Feed events to `wmiiloop' for processing
eval "$(eventstuff | sed 's/^[ ]//' | { . wmiiloop; })"
echo "$Keys" | tr ' ' '\n' | wmiir write /keys
# Functions
Action() {
action=$1; shift
if [ -n "$action" ]; then
Action_$action "$@" \
|| conf_which $action "$@"
fi
}
proglist() {
paths=$(echo "$@" | sed 'y/:/ /')
ls -lL $paths 2>/dev/null \
| awk '$1 ~ /^[^d].*x/ && NF > 2 { print $NF }' \
| sort | uniq
}
# Misc
progsfile="$WMII_NS_DIR/.proglist"
Action status &
proglist $PATH >$progsfile &
xsetroot -solid "$WMII_BACKGROUND" &
# Setup Tag Bar
seltag="$(wmiir read /tag/sel/ctl 2>/dev/null)"
wmiir ls /lbar |
while read bar; do
wmiir remove "/lbar/$bar"
done
wmiir ls /tag | sed -e 's|/||; /^sel$/d' |
while read tag; do
if [ "X$tag" = "X$seltag" ]; then
echo "$WMII_FOCUSCOLORS" "$tag" | wmiir create "/lbar/$tag"
else
echo "$WMII_NORMCOLORS" "$tag" | wmiir create "/lbar/$tag"
fi
done
# More functions
tagsmenu() {
wmiir ls /tag | sed 's|/||; /^sel$/d' | eval $WMII_MENU
}
actionlist() {
{ proglist $WMII_CONFPATH
echo -n $Actions | tr ' ' '\012'
} | sort | uniq
}
conf_which() {
which=$(which which)
prog=$(PATH="$WMII_CONFPATH" $which $1); shift
[ -n "$prog" ] && $prog "$@"
}
# Stop any running instances of wmiirc
echo Start wmiirc | wmiir write /event || exit 1
wmiir read /event |
while read event; do
set -- $event
event=$1; shift
Event_$event $@
done 2>/dev/null
~/.startupwmii :
#!/bin/bash
#/usr/bin/feh --bg-scale /home/files/Wallpapers/091031131131_36.jpg &
xloadimage -onroot /home/files/Wallpapers/.x/080808165544_85(1440x900).jpg&
/usr/bin/yeahconsole &
#xwinwrap -ni -fs -s -st -sp -b -nf -- /usr/lib/xscreensaver/glcells -window-id WID
(oui, j'ai essayé plusieurs programmes pour afficher un fond d'écran, et xloadimage marche bien.)
Pouvez-vous éclairer ma lanterne ?
timezone[Europe/Paris]
Hors ligne
#2 Le 29/03/2010, à 19:23
- helly
Re : WMII et fond d'écran
Perso moi j'ai mis la commande dans mon wmiirc , ça marche très bien
Archlinux-wmii-dwb.
Un problème résolu ? Faites le savoir en mettant [résolu] à côté du titre de votre topic.
Un problème non résolu ? Faites le savoir en insultant ceux qui cherchent à vous aider.
Un site bleu super remasterised©, un wiki cherchant des volontaires pour traduire un site.
Hors ligne
#3 Le 29/03/2010, à 19:25
- DaveNull
Re : WMII et fond d'écran
marche pas
Surement un conflit...
timezone[Europe/Paris]
Hors ligne
#4 Le 29/03/2010, à 19:28
- helly
Re : WMII et fond d'écran
Il faut coller la commande vers le début du wmiirc
Archlinux-wmii-dwb.
Un problème résolu ? Faites le savoir en mettant [résolu] à côté du titre de votre topic.
Un problème non résolu ? Faites le savoir en insultant ceux qui cherchent à vous aider.
Un site bleu super remasterised©, un wiki cherchant des volontaires pour traduire un site.
Hors ligne
#5 Le 29/03/2010, à 20:04
- DaveNull
Re : WMII et fond d'écran
marche pas
timezone[Europe/Paris]
Hors ligne
#6 Le 29/03/2010, à 20:22
- DaveNull
Re : WMII et fond d'écran
Si c'est bon, ça marche, en utilisant nitrogen. J'ai ajouté en début de wmiirc la ligne suivante :
[ "`ps aux | grep nitrogen | grep -v grep`" = "" ] && nitrogen --restore & yeahconsole &
(soluce en partie trouvée ici : http://www.facebook.com/note.php?note_id=187250896826, comme quoi, on peut trouver des trucs intéressants sur FB, bien que ce soit la première fois pour moi. Pour ceux qui ne seraient pas inscrits sur FB, je met une copie de la page sur mon serveur : http://she0gorath.kicks-ass.net/machins/wmiifb.html)
timezone[Europe/Paris]
Hors ligne
#7 Le 18/05/2010, à 07:09
- Bratas
Re : WMII et fond d'écran
Salut, je suis nouveau sur linux et je vourais mettre mon cmd en fon d ecran jai presque reussi mais il n' est pas transparant et je voudrai quil face tous mon ecran et l ombrage a 80 % merci
/home/chantemesse/Bureau/Capture.png
Hors ligne
#8 Le 18/05/2010, à 07:10
- Bratas
Re : WMII et fond d'écran
Je voulais mettre une capture mais je me souvien plus comment on fai
Hors ligne
#9 Le 31/07/2010, à 21:01
- DaveNull
Re : WMII et fond d'écran
Ah désolé, j'avais pas vu que tu avais répondu ici.
Pour poster une image, tu dois d'abord l'héberger sur un hébergeur d'images, comme http://pix.toile-libre.org/, imagehacks, ou encore http://she0gorath.kicks-ass.net/pix/ (sur mon serveur, ou http://pix.louiz.org/ (serveur d'un autre membre du forum)...
Ensuite tu copies dans ton post le bout de code que l'hébergeur te fournit.
Exemple : tu met [url=http://she0gorath.kicks-ass.net/pix/?img=1276303310.jpg][img]http://she0gorath.kicks-ass.net/pix/upload/thumb/1276303310.jpg[/img][/url]
Ça te met :
Dernière modification par She0gorath (Le 31/07/2010, à 21:01)
timezone[Europe/Paris]
Hors ligne