You are not logged in.
I would like to see it LuX
Offline
Me too, LuX. In which language is it implemented?
I'm also known as zmv on IRC.
Offline
Hi!
SoleSoul wrote:Now the default layout is "stack". How can I change it back to "default"?
wmiir xwrite /ctl colmode default
Thank you dengu for this solution which I was looking for too, but please note that it doesn't fully work. As explained in /usr/share/doc/wmii/wmii.pdf, putting "wmiir xwrite /ctl colmode default" in your wmiirc makes the default layout to be "default" only for newly created columns, not for the initial one. You have to put in your wmiirc (for example in the beginning of it, just after "# Column rules") the following two commands:
wmiir xwrite /ctl colmode default
wmiir xwrite /tag/sel/ctl colmode sel default
Regards,
LuX.
Offline
Hi!
Me too, LuX. In which language is it implemented?
It is just a few command lines in the wmiirc file, hence a part of a dash script.
------ EDIT ------
1) Instead of editing wmiirc, it is recommanded by Kris Maglione to use wmiirc_local.
Thus I have modified the method in order to use only ~/.wmii/wmiirc_local and the default /etc/wmii/wmiirc.
2) The first method given below uses pmount to mount USB pens instead of thunar-volman, the volume manager shipped with Thunar. This is nice if you don't want to use thunar-volman (for example because you actually use another file manager). On the other hand if you're really using Thunar it is much better to use thunar-volman instead of pmount: because it avoids an unnecessary dependence, but most of all because a USB pen mounted with pmount cannot be unmounted inside Thunar with thunar-volman, which is a pain. Thus I have been looking for a second method, which I also report below, in order to replace pmount with thunar-volman.
3) According to Kris Maglione there exists at least one more method which avoids both using pmount and any file manager. It consists in mounting USB pens only by mean of hal and dbus-send (see here). I had some issue when I tried to use it, but it is pretty interesting though and I rubbed some ideas there for my second method.
4) Alltogether, this makes a pretty long post!
-----------------------
From now on, I assume that you are using wmii-3.9.2, and your ~/.wmii directory only contains history files and possibly a wmiirc_local file. The following two possible ~/.wmii/wmiirc_local files will then give to wmii a basic ability to deal with USB pens as described in my post #377.
WARNING: After the USB pen is plugged in it might take some time (5 to 10 seconds on my relatively slow laptop) until it appears on the right bar. Be patient!
Method 1
Uses pmount (must be installed with pacman) + an arbitrary (optionnal) file manager
Note: The (remove|create|update)StatusBars functions above and the status action which calls them are a nice trick posted earlier in this thread by Alexandrite, in order to easily add to the right bar several interactive buttons devoted to various tasks.
For sake of simplicity the minimal wmiirc_local file that I'm posting here only creates one button for displaying time, and the buttons needed to manage usb pens. However in my own wmiirc_local file I have added other interactive buttons, and in order to control easily their order in the right bar I always give them names starting with a two digit number (like the udev rules). This is the reason why the name of the buttons created by checkUSB start with '60usb-' instead of simply 'usb-' or anything else, and of course this trick is not at all mandatory.
### Useful functions
# Status bars
# (functions called by the 'status' action)
removeStatusBars() {
for i in $(wmiir ls /rbar); do
if [ "/rbar/$i" != "$noticebar" ]; then
wmiir remove /rbar/$i
fi
done
}
createStatusBars() {
echo "$WMII_NORMCOLORS" | wmiir create /rbar/90time
}
updateStatusBars() {
echo -n "$(date +'%T')" | wmiir write /rbar/90time
checkUSB
}
# Manage USB pens
checkUSB() {
local usbdev
# create a button and pmount usb pens when plugged in
for i in $(ls -1 /dev/disk/by-id 2> /dev/null); do
if [ "$i" != "${i##usb-}" ]; then
usbdev="$(ls -l /dev/disk/by-id/$i)"
usbdev=${usbdev##*/}
if [ -z "$(wmiir ls /rbar | grep 60usb-$usbdev)" ]; then
if pmount $usbdev ; then
echo -n "$WMII_FOCUSCOLORS $usbdev" | wmiir create /rbar/60usb-$usbdev
thunar /media/$usbdev & # You can replace thunar by pcmanfm or anything else
fi
fi
fi
done
# focus/unfocus/remove the buttons when the usb pens are
# mounted/unmounted/unplugged
for i in $(wmiir ls /rbar); do
usbdev="${i##60usb-}"
if [ "$usbdev" != "$i" ]; then
if [ ! -e /dev/$usbdev ]; then
wmiir remove /rbar/60usb-$usbdev
elif [ -n "$(mount | grep /dev/$usbdev\ )" ]; then
echo -n "$WMII_FOCUSCOLORS $usbdev" | wmiir write /rbar/60usb-$usbdev
else
echo -n "$WMII_NORMCOLORS $usbdev" | wmiir write /rbar/60usb-$usbdev
fi
fi
done
}
### Events
local_events() {
cat <<'!'
# Bar clicks
Event RightBarClick
shift
case "$@" in
60*)
if [ -z "$(pmount | grep /dev/${@##60usb-}\ )" ]; then
pmount /dev/${@##60usb-}
else
echo -n "$WMII_NORMCOLORS ${@##60usb-}" | wmiir write /rbar/$@
fi ;;
esac
# Actions
Action status
set +xv
if removeStatusBars 2>/dev/null; then
true
fi
createStatusBars
while updateStatusBars; do
sleep 1
done
!
}
Method 2 (my favourite )
Uses thunar-volman to mount USB pens, hal and dbus-sent to unmount them (and to check whether or not they are mounted) + an arbitrary file manager (but since thunar-volman is mandatory, thunar is the most natural here).
Note: The same 'note' as in the method 1 is valid for this second method too.
Important! In order to give to thunar the possiblity to manage volume (by mean of thunar-volman) it is necessary that you start wmii together with a ck-launch-session. Thus your .xinitrc file should typically contain:
until ck-launch-session wmii; do
true
done
instead of the classical:
until wmii; do
true
done
Now here is the alternate wmiirc_local file to put in ~/.wmii:
### Useful functions
# Status bars
# (functions called by the 'status' action)
removeStatusBars() {
for i in $(wmiir ls /rbar); do
if [ "/rbar/$i" != "$noticebar" ]; then
wmiir remove /rbar/$i
fi
done
}
createStatusBars() {
echo "$WMII_NORMCOLORS" | wmiir create /rbar/90time
}
updateStatusBars() {
echo -n "$(date +'%T')" | wmiir write /rbar/90time
checkUSB
}
# Manage USB pens
checkUSB() {
local dev
local udi
# create a button and mount usb pens when plugged in
for id in $(ls -1 /dev/disk/by-id 2> /dev/null); do
if [ "$id" != "${id##usb-}" ]; then
dev="$(ls -l /dev/disk/by-id/$id)"
dev=${dev##*/}
if [ -z "$(wmiir ls /rbar | grep 60usb-$dev)" ]; then
udi=$(hal-find-by-property --key block.device --string /dev/$dev)
if [ "$(hal-get-property --udi $udi --key volume.is_mounted)" = "false" ]; then
thunar-volman -a $udi
fi
if [ "$(hal-get-property --udi $udi --key volume.is_mounted)" = "true" ]; then
echo -n "$WMII_FOCUSCOLORS $dev" | wmiir create /rbar/60usb-$dev
fi
fi
fi
done
# focus/unfocus/remove the buttons when the usb pens are
# mounted/unmounted/unplugged
for i in $(wmiir ls /rbar); do
dev="${i##60usb-}"
udi=$(hal-find-by-property --key block.device --string /dev/$dev)
if [ "$dev" != "$i" ]; then
if [ ! -e /dev/$dev ]; then
wmiir remove /rbar/60usb-$dev
elif [ "$(hal-get-property --udi $udi --key volume.is_mounted)" = "true" ]; then
echo -n "$WMII_FOCUSCOLORS $dev" | wmiir write /rbar/60usb-$dev
else
echo -n "$WMII_NORMCOLORS $dev" | wmiir write /rbar/60usb-$dev
fi
fi
done
}
toggleUSB() {
local udi=$(hal-find-by-property --key block.device --string "/dev/$1")
if [ "$(hal-get-property --udi $udi --key volume.is_mounted)" = "false" ]; then
thunar-volman -a $udi
else
dbus-send --system --print-reply --dest=org.freedesktop.Hal $udi org.freedesktop.Hal.Device.Volume.Unmount array:string:
fi
}
### Events
local_events() {
cat <<'!'
# Bar clicks
Event RightBarClick
shift
case "$@" in
60*)
toggleUSB ${@##60usb-} ;;
esac
# Actions
Action status
set +xv
if removeStatusBars 2>/dev/null; then
true
fi
createStatusBars
while updateStatusBars; do
sleep 1
done
!
}
Hope this helps,
LuX.
Last edited by LuX (2010-07-21 10:35:23)
Offline
Am using the latest version of wmii (3.9.2-1) and I note a difference to the old version (3.6). By default the new version puts multiple clients in one column into "stack" mode, rather than "default" mode. I have checked the wmiirc file and cannot seem to find any statement that is forcing this behaviour. Has anyone else noted this and if so is there a way to force it to actually be in column "default" mode?
Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.
Offline
@lagagnon: See post #380, right on this page...
Offline
DOH! Hit me over the head with a mallet perhaps I should learn to read! Thanks LuX and dengu!
Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.
Offline
Hello list!
Although wimenu provides a simple and efficient way to access every programs using $Mod1-p as default key binding, it happens that I can't remember the name of a program and would prefer a more classical menu such as those based on xdg, provided by most desktop managers.
What I'm looking for is the following feature: some key binding (say $Mod1-Shift-p) displays with wimenu the list all available non empty categories (among "Accessories", "Game", "Multimedia", "Office", "System", and so on), and the selection of one of these categories then displays (via wimenu again) the list of all available programs in this category.
I can figure out how to write a script which would implement this feature by combining xdg_menu and wimenu, but I don't want to re-invent the wheel: did anybody in this list already write such a script?
Regards,
LuX.
Offline
LuX: not exactly similar but there are some ideas on this dmenu thread: https://bbs.archlinux.org/viewtopic.php?id=80145
Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.
Offline
LuX: not exactly similar but there are some ideas on this dmenu thread: https://bbs.archlinux.org/viewtopic.php?id=80145
Very nice link, thank you, lagagnon!
Following it I discovered that recent versions of dmenu have a vertical mode. This is more convenient for what I'm looking for, than the horizontal mode of wimenu (my very little screen can display only a few menu entries on a line). Thus I wrote a bash script which displays "ordinary" (that is: based on xdg) menus and submenus in wmii, using dmenu instead of wimenu, and I'm happy with it.
Last edited by LuX (2010-08-09 13:29:56)
Offline
I seem to be having some issues with wmii. For some reason wmii refuses to open Chromium in a managed (non-floating) layer despite explicit tag rules. How can I correct this behaviour.
Offline
Zerimas: no problems doing that here with wmii 3.9.2-1 and Chromium 5.0.375...
Perhaps show us what you have in your wmiirc file?
Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.
Offline
Hi guys, I haven't posted on this forum in ages, but I just thought I'd share my wmiirc with you all, it is written in Chicken Scheme and is based on the example from the wmii egg. You can find it here http://github.com/ZaneA/Dotfiles/blob/master/wmiirc.scm. Pretty standard wmiirc feature wise, but I tried to clean up the example and seperate out the status stuff, so it's easy to add new status items now. Keybindings are pretty standard iirc. I also added the ability to evaluate scheme forms by pressing MOD+Shift+: and entering some scheme, and the returned value is place on the lbar. I plan to extend/create a small library of functions that could be useful in a desktop environment, and use them with this eval feature. So far I just have a small run macro that can be used like
(run "uptime" as "hash" on "server:22")
Offline
@HashBox: that's pretty awesome; thanks! I'm using it at the moment, since the Ruby wmiirc is a little broken.
Now, about the Ruby wmiirc: when using it with TwinView, it leaves space on the second monitor for the bar. I'm not sure exactly when it started, but it occurs in the current wmii (3.9.2-1) from the repos and didn't at some point before.
Anyone else have the same trouble (or, better yet, a fix)?
Offline
My usual modus operandi with wmii is to have two terminals in the left column and the browser (Opera) in the right column - the right one being somewhat wider. When I boot I have all three apps launched from my .xinitrc and I specify the column width in my wmiirc file. By default all three apps launch on one clumn underneath each other - so I then have to send Opera to the right column. How can I launch Opera and have it automatically sent to the rightmost column?
Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.
Offline
i'm having some issues with using the wmiirc_local file using wmii 3.9.2-2. no matter what i do to it or put in it, every time i try to start wmii there are no tags and nothing in the lbar or rbar. i even tried just copying /etc/wmii/wmiirc to ~/.wmii/wmiirc_local and not editing it at all and it still causes this behavior. wmii seems pretty nice from what i've been able to gather but not being able to use any local configuration is driving me nuts. any ideas?
while you home relaxed I'm squeezin Macs bustin off caps those coward cats with gold and platinum plaques get taxed and i do jooks and sling pies to make cream rise it's all about these green guys front and your whole team dies how i'm livin? so far swell you can't scar L head of the cartel sellin more cakes than Carvel
Offline
also using 3.9.2-2, wmii freeze when started (fresh install, so i might have forgotten something), but is showing black background and white white bottom bar without info in it, it's not responding to any keys. i have used wmii before so i am familiar with how it is supposed to work.
Xorg.0.log shows no errors.
anyone else having these problems?
(sorry for bad english)
Offline
There's someway to start programs in a layout (e.g. two row , one split in two columns) at the startup?
Offline
I'm having the same issue with wmii. It doesn't respond to any key shortcut Like M+Return.
Offline
I'm having an issue where Chromium by default always starts in the floating layer. I can, of course, move it to the non-floating layer with Mod-Shift-Space. However, this is very annoying. Additionally, after I have made Chromium a non-floating window, if I then move it to another view via Mod-Shift-t, it becomes a floating window again. The following is the relevant section of ~/.wmii/wmii_local file:
# Tagging rules
wmiir write /tagrules <<!
/Chromium.*/ -> internet
/.*/ -> sel
!
Is there any particular reason that Chromium always gets placed on the floating layer by default? I haven't noticed this with any other applications.
Last edited by aclindsa (2011-01-29 16:44:15)
Offline
My usual modus operandi with wmii is to have two terminals in the left column and the browser (Opera) in the right column - the right one being somewhat wider. When I boot I have all three apps launched from my .xinitrc and I specify the column width in my wmiirc file. By default all three apps launch on one clumn underneath each other - so I then have to send Opera to the right column. How can I launch Opera and have it automatically sent to the rightmost column?
I finally joined the suckless.org dev mailing list (which deals with both dwm, wmii and dmenu topics) and got this response to the question above, in case Arch users of wmii are interested:
Assuming your browser takes longer to start than your terminal, this should do:
wmiir read /event | grep -m 2 CreateClient && wmiir xwrite /client/sel send right
Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.
Offline
Hey everybody, I'm having the same problem as Napsy did a few months ago:
When I choose my session and login, the buttom bar appears but the keyboard doesn't work. If I go with my mouse pointer to the left or right screen border, the resize cursor appears. There is no font on the screen just the buttom bar and the background.
I have wmii 3.9.2-2, but I usually use xmonad. Xmonad works just fine. Unfortunately, it looks like Napsy's problem was resolved by switching the login shell from zsh to bash -- mine is already bash.
Ideas? Suggestions?
Offline
Offline
Hey everybody, I'm having the same problem as Napsy did a few months ago:
napsy wrote:When I choose my session and login, the buttom bar appears but the keyboard doesn't work. If I go with my mouse pointer to the left or right screen border, the resize cursor appears. There is no font on the screen just the buttom bar and the background.
I have wmii 3.9.2-2, but I usually use xmonad. Xmonad works just fine. Unfortunately, it looks like Napsy's problem was resolved by switching the login shell from zsh to bash -- mine is already bash.
Ideas? Suggestions?
Try running `startx -- :1` from a Linux virtual terminal instead of going through a graphical login manager.
Offline
Try running `startx -- :1` from a Linux virtual terminal instead of going through a graphical login manager.
Thanks for the tip, but it has exactly the same result. Here's the logfile:
http://pastebin.com/AUi1LE92
Offline