You are not logged in.

#251 2008-08-12 14:43:03

leo2501
Member
From: Buenos Aires, Argentina
Registered: 2007-07-07
Posts: 658

Re: The wmii thread

TjPhysicist wrote:

Nope dwm still displaying "dwm-5.1".

can you post what are you fedding to it? and how are you doing that?


Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery

Offline

#252 2008-08-12 21:14:17

TjPhysicist
Member
From: Waterloo, Canada
Registered: 2008-04-12
Posts: 126
Website

Re: The wmii thread

I use gdm. I have this in my xinitrc as well as my .Xclient (the thing executed by gdm when i choose to load up a Xinit session)

#!/bin/sh
# $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f $userresources ]; then
    xrdb -merge $userresources
fi

if [ -f $usermodmap ]; then
    xmodmap $usermodmap
fi

# start some nice programs
exec /usr/local/bin/dwm-exec | dwm
#gnome-session &
#xclock -geometry 50x50-1+1 &
#xterm -geometry 80x50+494+51 &
#xterm -geometry 80x20+494-0 &
#exec xterm -geometry 80x66+0+0 -name login

and this is /usr/local/bin/dwm-exec

#!/bin/bash
feh --bg-scale /home/tharihar/.wallpaper.jpg

while true
do
echo -n $(mpc | awk '/-/ {print $0}') ' ' '['$(mpc|awk '/play/ {print $3,$4}')']' '|' $(date +"%a, %b %e | %I:%M:%s %p") '|' $(vol_info)
sleep 60
done

just like in yours. And I get this in my status bar

[] | Tue, Aug 12 | 05:00:06 PM | 26%

Now why the hell is the mpc song inifo missing. and before you ask me, yes i do have a song playing right now.  This is what my echo -n $(mpc | awk '/-/ {print $0}') ' ' '['$(mpc|awk '/play/ {print $3,$4}')']'  looks like to normal pipers.

Righteous Brothers, The - Unchained Melody   [1:10/3:36 (32%)]

Last edited by TjPhysicist (2008-08-12 21:26:55)


-Tj
Now reborn as Tjh_ (to keep it similar to my username in other places)

Offline

#253 2008-08-12 22:41:26

leo2501
Member
From: Buenos Aires, Argentina
Registered: 2007-07-07
Posts: 658

Re: The wmii thread

I don't know if this helps, but why you don't try this:

move this line to .xinit:
feh --bg-scale /home/tharihar/.wallpaper.jpg

instead that have it in the /usr/local/bin/dwm-exec, because i think you dont like that in the bar-feeding script, and maybe dwm doesn't like it too tongue


Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery

Offline

#254 2008-08-12 23:04:21

Mimi
Member
From: Germany
Registered: 2008-06-06
Posts: 39

Re: The wmii thread

echo -n $(mpc | awk '/-/ {print $0}') ' ' '['$(mpc|awk '/play/ {print $3,$4}')']' '|' $(date +"%a, %b %e | %I:%M:%s %p")

This doesn't work at all, I just get "dwm-5.1" and EOF. Everything works fine if i drop the "-n".

Did you try startx?


It is what you make it. Even if you don't know what to make it.

Offline

#255 2008-08-13 01:58:20

TjPhysicist
Member
From: Waterloo, Canada
Registered: 2008-04-12
Posts: 126
Website

Re: The wmii thread

Mimi wrote:
echo -n $(mpc | awk '/-/ {print $0}') ' ' '['$(mpc|awk '/play/ {print $3,$4}')']' '|' $(date +"%a, %b %e | %I:%M:%s %p")

This doesn't work at all, I just get "dwm-5.1" and EOF. Everything works fine if i drop the "-n".

Did you try startx?

It kinda worked thx. Kinda, cuz it sometimes screws up the mpc display again, As in it jst display [] instead of song info. although it works fine if i just use xinitrc rather than gdm.
-Tj

Last edited by TjPhysicist (2008-08-13 02:22:18)


-Tj
Now reborn as Tjh_ (to keep it similar to my username in other places)

Offline

#256 2008-08-15 11:00:05

TjPhysicist
Member
From: Waterloo, Canada
Registered: 2008-04-12
Posts: 126
Website

Re: The wmii thread

actually i have one question how do you get the volume buttons to work in dwm or wmii? If i do a showkeys, and press the button it says "113" for mute. But xmodmap shows me 113 is Alt_R, Meta_R. And reassigning this screws up the Mod1 thru 4 keys...

-Tj


-Tj
Now reborn as Tjh_ (to keep it similar to my username in other places)

Offline

#257 2008-08-16 06:10:40

jbromley
Member
From: Pasadena, CA
Registered: 2007-02-04
Posts: 268

Re: The wmii thread

TjPhysicist wrote:

actually i have one question how do you get the volume buttons to work in dwm or wmii? If i do a showkeys, and press the button it says "113" for mute. But xmodmap shows me 113 is Alt_R, Meta_R. And reassigning this screws up the Mod1 thru 4 keys...

showkeys shows kernel key codes, which, as you have seen, are not the same key codes used by X. For finding out what keys are in X, use xev.

Offline

#258 2009-02-02 20:09:11

chillu
Member
Registered: 2009-01-18
Posts: 33

Re: The wmii thread

I just tricked out my wmii status bar by adding cmus status and current song, free space on ~/, uptime, date but I still have a few more I want to add:
A. Download/Upload rate on eth0
B. CPU0/1 Usage
C. Memory Usage (free -m reports nearly 99% memory usage?!!! The memory usage bar in gnome, I remember, used to show something like 500M) Is there a "sane" memory usage indicator? Or should I just live with free -m?

I do understand that /proc/net/dev contains information for A. But to get the rate I have to transfer delta/time delta.. how?

Offline

#259 2009-05-03 23:10:39

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: The wmii thread

Hmm.. just tried out wmii-hg and i love it... but there is one thing that i really need to make it my primary WM. Right now i can move windows to my 2nd Monitor, which is great.

But - if i change tags it will change them on both screens, which means that my 2nd monitor doesnt show the window anymore.

Usecase: Have mplayer on 2nd screen while i work on my 1st one... but thats impossible since i have to do everything on the same tag, which sucks... Is there a solution to this?


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#260 2009-05-04 14:11:12

jordi
Member
Registered: 2006-12-16
Posts: 103
Website

Re: The wmii thread

Rasi wrote:

Hmm.. just tried out wmii-hg and i love it... but there is one thing that i really need to make it my primary WM. Right now i can move windows to my 2nd Monitor, which is great.

But - if i change tags it will change them on both screens, which means that my 2nd monitor doesnt show the window anymore.

Usecase: Have mplayer on 2nd screen while i work on my 1st one... but thats impossible since i have to do everything on the same tag, which sucks... Is there a solution to this?

You can assign more than one tag to a window (shift + mod + t and then assign the tag prefixed with a +, e.g.  +1 and then +2)

I often work on tag 1 -3 and have mplayer on the second monitor with tags 1,2,3

Offline

#261 2009-05-30 22:35:12

rusty99
Member
Registered: 2009-03-18
Posts: 253

Re: The wmii thread

A couple of days messing around with Wmii and I'm seriously impressed, everything feels very intuitive.
One thing I did notice (using wmii-hg 2471) without plan9port installed was I couldn't multi tag, but, and personally I like this 'bug', commands like cat .wmii-hg/history.actions >ha.txt would run from the status bar smile

It's also awesome that resizing of windows can be done with the keyboard and not just the mouse now, while reading over this thread I see it was mentioned a few times. Not sure when this was implented but it works with both rc.wmii and wmiirc.

Offline

#262 2009-06-03 18:29:44

eol
Member
Registered: 2009-05-30
Posts: 23

Re: The wmii thread

rusty99 wrote:

It's also awesome that resizing of windows can be done with the keyboard and not just the mouse now, while reading over this thread I see it was mentioned a few times. Not sure when this was implented but it works with both rc.wmii and wmiirc.

How do you do that?
Last time I used wmii, that wasn't possible and since then, no new wmii version came out.
I would be impressed to see a keyboard shortcut in a wmiirc that could resize the width of a column!

Offline

#263 2009-06-03 20:21:24

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: The wmii thread

eol wrote:
rusty99 wrote:

It's also awesome that resizing of windows can be done with the keyboard and not just the mouse now, while reading over this thread I see it was mentioned a few times. Not sure when this was implented but it works with both rc.wmii and wmiirc.

How do you do that?
Last time I used wmii, that wasn't possible and since then, no new wmii version came out.
I would be impressed to see a keyboard shortcut in a wmiirc that could resize the width of a column!

I do this too.. using wmii-hg from aur.


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#264 2009-06-03 22:03:30

rusty99
Member
Registered: 2009-03-18
Posts: 253

Re: The wmii thread

This is what worked for me. In a 3 pane layout, 2 on the left and 1 on the right it's easiest to resize from the top left, and vice versa.
In a 4 pane layout, 2 left, 2 right it's easiest to resize from top left and top right.

    Key $MODKEY-Control-$LEFT
        wmiir xwrite /tag/sel/ctl grow sel sel right -1
    Key $MODKEY-Control-$RIGHT
        wmiir xwrite /tag/sel/ctl grow sel sel right 1
    Key $MODKEY-Control-$DOWN
        wmiir xwrite /tag/sel/ctl grow sel sel down 1
    Key $MODKEY-Control-$UP
        wmiir xwrite /tag/sel/ctl grow sel sel down -1

Offline

#265 2009-06-04 19:31:29

respite
Member
From: Los Angeles
Registered: 2008-03-26
Posts: 12

Re: The wmii thread

Anyone have an elegant way of displaying the weather in the status bar?

Ive been using this perl script to get the weather forecast on the console.

http://spinning-yarns.org/michael/sw/perl/weather

I was thinking of adding this to my status bar info in my wmiirc, but not sure what to do to have it run once every 15 minutes.

echo -n $(weather | sed -n "4 p" | head -c 5)

Screaming obscenities since 1979.

Offline

#266 2009-06-05 13:41:11

eol
Member
Registered: 2009-05-30
Posts: 23

Re: The wmii thread

To Rusty99 and Rasi : you're right guys, I didn't use a recent enough snapshot,
any snapshot after the 20/05/2008 one is able to do it.
Thanks for light!

Offline

#267 2009-06-07 08:53:00

rusty99
Member
Registered: 2009-03-18
Posts: 253

Re: The wmii thread

respite wrote:

Anyone have an elegant way of displaying the weather in the status bar?
Ive been using this perl script to get the weather forecast on the console.
http://spinning-yarns.org/michael/sw/perl/weather
I was thinking of adding this to my status bar info in my wmiirc, but not sure what to do to have it run once every 15 minutes.

echo -n $(weather | sed -n "4 p" | head -c 5)

I use plan9port with wmii so if you don't have it installed the syntax will differ slightly.
The standard status bar in wmiirc will give you a template to work from.

As you want to run this as a seperate timed task it's probably easiest to create a new bar so you can define the update interval rather than using cron and/or a bash script.

fn weather {
    echo -n `{weather | sed -n "4 p" | head -c 5}
}

You'll then need to add a few more lines so the bar gets removed if it exists, recreated and updated at 15 mins.

fn Action-weather {
    flag x -; flag r -
    if(wmiir remove /rbar/weather >[2]/dev/null)
        sleep 2
    echo $wmiinormcol | wmiir create /rbar/weather
    while(weather | wmiir write /rbar/weather)
        sleep 1
}

Its the last sleep command that defines the update interval for the bar.

Lastly you need to add one more line so the bar gets autoloaded on login

Action weather &

N.B You can use any color you like for the output by adding a new color entry to wmiirc and replacing $wmiinormcol with the name of it, $wmiiweathercol for example.

Offline

#268 2009-06-16 18:54:00

respite
Member
From: Los Angeles
Registered: 2008-03-26
Posts: 12

Re: The wmii thread

Thank you for the suggestion rusty99, but I really want to avoid having another bar. I tried using dzen and having conky pipe all the info to it, but i could not figure out how to keep wmii from arranging programs on top of it.

For others interested, here is a workaround that im somewhat happy with.

I found a weather script written for conky which is better suited for my needs in this thread here.

#!/bin/sh

METRIC=1  # 0 for F, 1 for C

curl -s http://rss.accuweather.com/rss/liveweather_rss.asp\?metric\=${METRIC}\&locCode\=$1 \
| sed -n '/Currently:/ s/.*: \(.*\): \([0-9]*\)\([CF]\).*/\2°\3, \L\1/p'

I set the script to run in the status bar section in my wmiirc.

# Status Bar Info
status() {
        echo -n $(uptime | sed 's/.*://; s/,//g') '|' $(date "+%a %h %d %l:%M %Z %Y") '|' $(weather2 90028)
}

Also in wmiirc i changed the action for the status bar to update every 60 seconds. This way the weather server is not getting hammered, and the clock still shows the correct time.

        Action status
                set +xv
                if wmiir remove /rbar/status 2>/dev/null; then
                        sleep 1
                fi
                echo "$WMII_NORMCOLORS" | wmiir create /rbar/status
                while status | wmiir write /rbar/status; do
                        sleep 60
                done

While i feel its a bit excessive to update the weather once a minute, its the best solution ive come up with so far.

Last edited by respite (2009-06-16 18:58:01)


Screaming obscenities since 1979.

Offline

#269 2009-07-09 13:59:44

custom
Member
From: Nuremberg
Registered: 2009-03-29
Posts: 5

Re: The wmii thread

Hi,
after some playing around with xmonad and dwm i am back at wmii-3.6. What i found pretty cool in xmonad and dwm is, changing the size of master area via $MOD-l and $MOD-h. Is this also possible in wmii? I found nothing about that neither on suckless.org nor on wmii`s manpage.

The other thing i didnt found anything about:
Is it possible to position the status bar on top of the screen?
Thanks for advice.

Offline

#270 2009-07-09 17:01:03

tom5760
Member
From: Philadelphia, PA, USA
Registered: 2006-02-05
Posts: 283
Website

Re: The wmii thread

EDIT: I also made my own simple wmii Python config.  Check it out here http://github.com/tom5760/wipi/tree.  Its inspired by decurtis' Python config.  Feel free to check it out and play with it.

custom wrote:

Hi,
after some playing around with xmonad and dwm i am back at wmii-3.6. What i found pretty cool in xmonad and dwm is, changing the size of master area via $MOD-l and $MOD-h. Is this also possible in wmii? I found nothing about that neither on suckless.org nor on wmii`s manpage.

You need to use a checkout from mercurial to get this, but you can do the following:

wmiir xwrite /tag/sel/ctl nudge sel sel up

You can replace "up" with left, right, or down.  Also, you can add a number at the end to specify a percentage to grow.

custom wrote:

The other thing i didnt found anything about:
Is it possible to position the status bar on top of the screen?
Thanks for advice.

wmiir xwrite /ctl bar on top

Check out the wmii manual in the mercurial repository.

Last edited by tom5760 (2009-07-10 22:13:11)

Offline

#271 2009-07-09 17:40:56

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,000
Website

Re: The wmii thread

Does anyone know how to have a tabbed layout in wmii, or alternatively having all titlebars always on top in stacked mode?


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#272 2009-07-10 09:41:04

jordi
Member
Registered: 2006-12-16
Posts: 103
Website

Re: The wmii thread

Anyone else got a problem with notification-daemon?

(<unknown>:7503): Wnck-WARNING **: Someone set a weird number of desktops in _NET_NUMBER_OF_DESKTOPS, assuming the value is 1


Wnck-CRITICAL **: wnck_window_is_on_workspace: assertion `WNCK_IS_WORKSPACE (workspace)' failed
aborting...

It works only on Tag '1'

notify-osd does work though

Offline

#273 2009-07-10 10:50:45

N30N
Member
Registered: 2007-04-08
Posts: 273

Re: The wmii thread

Dieter@be wrote:

alternatively having all titlebars always on top in stacked mode?

You could rotate the window stack order apon a window getting focus. Of course implementation would depend on what scripting/programming language your using to configure wmii. But basicly you'd need to have it listen to /event for windows getting focus, check if the column is a stack and then move each window from the bottom to the top will you reach the focused window.

Offline

#274 2009-07-15 14:20:17

cdwillis
Member
From: /home/usa
Registered: 2008-11-20
Posts: 294

Re: The wmii thread

Is there any way to move the status bar to the top of the screen? It's really simple to do that with dwm, but I've been looking around and can't find any way to do it with wmii.

Offline

#275 2009-07-15 16:01:32

tom5760
Member
From: Philadelphia, PA, USA
Registered: 2006-02-05
Posts: 283
Website

Re: The wmii thread

cdwillis wrote:

Is there any way to move the status bar to the top of the screen?

I just posted this a few messages ago.  You can do it with:

wmiir xwrite /ctl bar on top

This might only work with wmii-hg, but I'm not sure.

Offline

Board footer

Powered by FluxBB