You are not logged in.

#251 2012-06-12 01:06:31

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,024

Re: dminiwm snapwm & bipolarbar

stlarch wrote:

I wasn't sure about the dots at first, but I kind of like it now. I was just wondering if you ever figured out why my colors changed? And like I said, I noticed a slight increase in cpu usage. It's not much but it seems to be slightly higher than before and than in dwm with a similar setup. I'm not sure how to test it exactly. Running top, it seems to be causing X to use more? Anybody else have the color change? Here's my config.h if you want to test it and see if you notice something I'm missing. https://docs.google.com/file/d/0ByfkpBn … edit?pli=1
Thanks. Sorry, all out of ten dollar notes.

I can change SHOWNUMOPEN back to using a number and a : if that's prefered, I don't use it here, I was just trying different things. Any suggestion for an alternative to try would be appreciated, I can't find many wm's that show the number of open windows in a bar. Websearch
I had made a change to how the colours worked and stopped &0 from working while I was at it, so see if a git pull fixes that for you. Thanks for reminding me it needed looking at. I keep swapping conky's around with the different things I work on so the colours keep changing around here. It's one of the reasons I changed some_sorta_bar to take input from a pipe.
It could be drawing little rectangles for SHOWNUMOPEN that adds a bit to the resources used. It seems pretty much the same here. Maybe, now there's a buffer, XDrawImageString isn't the lightest way to go. As time permits I'll see if I can lighten the load. It's the first time I've built one of these and to be honest I'm a bit suprised it works as well as it does. It's been in slow evolution for a while smile

Cheers


You're just jealous because the voices only talk to me.

Offline

#252 2012-06-12 03:32:21

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,250

Re: dminiwm snapwm & bipolarbar

I use monocle quite a bit on this netbook, so I like having the number of open windows. I personally like the dots better but whatever you decide is ok for me. I can't think of anything better. The colors are back to where they were too. Thanks for that and everything else. I think you're doing a great job on this. It's awesome.

Offline

#253 2012-06-12 08:27:54

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,024

Re: dminiwm snapwm & bipolarbar

There was a problem with some_sorta_bar reported on github. I don't know if I've fixed it yet but I did find that if a colour was marked right before the right aligned text
e.g &3&R
the right aligned text would be added to the centered text and nothing would be shown on the right, so I fixed that [edit: for both centered and right aligned text]. If right alignment was not working as advertised a git pull should fix it.

edit2: The buffer gets cleared before a text update now.

Cheers

Last edited by moetunes (2012-06-12 08:52:12)


You're just jealous because the voices only talk to me.

Offline

#254 2012-06-12 23:58:00

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,024

Re: dminiwm snapwm & bipolarbar

I think I've sorted the github issue for some_sorta_bar, if anyone using it has a problem with text not showing or segfaults can you let me know. It displays one line of text, so if you have a newline in your text what's after that won't show.
I have taken advantage of the buffer in some_sorta_bar and snapwm so they both should be lighter on resources now, less of a cpu spike when they update the text.

Cheers


You're just jealous because the voices only talk to me.

Offline

#255 2012-06-14 20:12:59

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,024

Re: dminiwm snapwm & bipolarbar

Some some_sorta_bar news.

There were a couple of confusing comments on github, turns out they weren't about a real issue afaict, so that's all good. The real issues were some text on the far right not showing and having a non marking & in the right aligned text ending the text that was shown. They've been sorted now and I changed how it watches for X events so now when the bar is covered/uncovered by a window the text always shows.
I always thought doing something twice would naturally add to the resources used but it turns out the double buffer drops the cpu use. Who'd've thunk it.

Cheers


You're just jealous because the voices only talk to me.

Offline

#256 2012-06-14 21:09:00

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,250

Re: dminiwm snapwm & bipolarbar

I just updated snapwm (I didn't realize you updated it again). Whatever you did, it seems to have worked. I notice the lower cpu usage here now too. Thanks.

Offline

#257 2012-06-18 01:27:18

Shrak
Member
Registered: 2011-07-14
Posts: 12

Re: dminiwm snapwm & bipolarbar

Been trying this for a few days and I may switch over from DWM for a while as I'm really liking it. I do have one question though about the Window title in the bar, is it meant to be aligned right and not left? Just seems weird for short titled windows to have the title near the middle of the bar, then have long ones max it out and look like they're left aligned again.

Offline

#258 2012-06-18 03:35:10

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,024

Re: dminiwm snapwm & bipolarbar

Shrak wrote:

Been trying this for a few days and I may switch over from DWM for a while as I'm really liking it. I do have one question though about the Window title in the bar, is it meant to be aligned right and not left? Just seems weird for short titled windows to have the title near the middle of the bar, then have long ones max it out and look like they're left aligned again.

Yep it's right aligned. I tried a few different ways to show the current windows' name and never found something that I thought worked well 100% of the time. I settled on having it right aligned 'cause here most of the time the windows' name is shortish and except for stlarch not wanting to show it at all no ones commented on it. I'll see if I can find a practical way of offering an option to left align it.

Cheers


You're just jealous because the voices only talk to me.

Offline

#259 2012-06-18 04:08:18

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,024

Re: dminiwm snapwm & bipolarbar

@shrak & everybody else
I added a new define to snapwm's config.h so the current windows' name in the bar can be left aligned.

#define LA_WINDOWNAME   0  /* 1=Dont't 0=Left align current window name in bar */

I still want it right aligned so i think it'll be a good compromise. wink

Cheers


You're just jealous because the voices only talk to me.

Offline

#260 2012-06-18 04:23:12

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,250

Re: dminiwm snapwm & bipolarbar

Cool. I might want to use it on a bigger screen and I think I would rather have it left aligned too, so thanks for that.

Offline

#261 2012-06-18 04:44:37

Shrak
Member
Registered: 2011-07-14
Posts: 12

Re: dminiwm snapwm & bipolarbar

Awesome, thanks.

Offline

#262 2012-06-18 08:10:03

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,250

Re: dminiwm snapwm & bipolarbar

I was trying to make a PKGBUILD for snapwm. I'm using the one for monsterwm made by ivoarch and I just modified it a bit. I got it to work but I'm getting a warning during the build that I wasn't getting before. I'm not sure what it means exactly (I'm not a programmer). I was wondering if you could take a look at it and see what you think. I'm not sure if you want or need to modify the makefile or if something is wrong with the PKGBUILD? Monster's makefile is quite a bit different. If you would rather do it and submit it, that's fine or I can. It doesn't matter to me. Just let me know, see ya.

#Maintained by stlarch <stlarchie@gmail.com>
pkgname=snapwm-git
pkgver=20120618
pkgrel=1
pkgdesc="Minimal, lightweight dynamic tiling window manager"
url="https://github.com/moetunes/Nextwm/"
arch=('i686' 'x86_64')
license=('custom')
depends=('libx11')
makedepends=('git')
md5sums=('')

_gitroot="git://github.com/moetunes/Nextwm.git"
_gitname="Nextwm"
_gitbranch="master"

build() {
        cd "${srcdir}"
        msg "Connecting to GIT server...."
        if [ -d ${_gitname} ] ; then
                cd ${_gitname} && git pull
                msg "The local files are updated."
        else
                git clone ${_gitroot} ${_gitname} -b ${_gitbranch}
        fi

        msg "GIT checkout done or server timeout"
        rm -rf "${srcdir}/${_gitname}-build"
        git clone "${srcdir}/${_gitname}" "${srcdir}/${_gitname}-build"
        cd "${srcdir}/${_gitname}-build"

        if [ -e $startdir/config.h ]
        then
                msg "Using custom config.h."
                cp ${startdir}/config.h .
        else
                msg "Using default config.h."
                cp "${srcdir}/${_gitname}/config.h.def" "${srcdir}/${_gitname}-build/config.h"
        fi
}

package() {
        cd "${srcdir}/${_gitname}-build"
        make PREFIX=/usr DESTDIR="${pkgdir}" install
        install -Dm644 "README.md" "${pkgdir}/usr/share/doc/${pkgname}/README.md"
}

I wasn't real clear how to do the pkgver or md5sums for a git package? I just used todays date for the pkgver and left the md5sums like he had it ('')? And I just put 'custom' for the license.

edit:I added the line to install the README.md to /usr/share/doc/snapwm-git.

edit:hmmm, I forgot about the .snapwmrc too. I'm not sure how to handle that. If you use the default config.h., it will build and install but probably won't start because of the path (/home/pnewm/.snapwmrc)?

It almost seems more convoluted using a PKGBUILD here? I thought some might want it though? Anyway, whatever you think is best.

And could a mod please change my post count to 1,000,000 (just for a day)? tongue

Last edited by stlarch (2012-06-18 19:52:01)

Offline

#263 2012-06-18 21:00:08

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,024

Re: dminiwm snapwm & bipolarbar

A thousand posts in a year and a half! That's showing community spirit, well done stlarch.

A PKGBUILD could be a good idea, but I'd have to change how I use github and from what I know I'll have to hard code the path for snapwmrc to something like the users home dir instead of having it as something each user can define for themselves. That shouldn't be hard to do.
Anybody not happy with ~/.snapwmrc for the rc path? Maybe ~/.config/snapwmrc ?
I think, since the makefile is still pretty much the same as catwm's, starting from this PKGBUILD might be best.


You're just jealous because the voices only talk to me.

Offline

#264 2012-06-18 22:40:10

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,024

Re: dminiwm snapwm & bipolarbar

Some snapwm news.

I changed the RC FILE from being a path declared in the config.h to $HOME/.config/snapwm/rc.conf and put a generic config.h.def file in github instead of having it as I use config.h. That should help with a PKGBUILD I think.

Cheers


You're just jealous because the voices only talk to me.

Offline

#265 2012-06-19 03:32:33

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,250

Re: dminiwm snapwm & bipolarbar

Ok then. (I just watched part of Raising Arizona) I'll give it a try. I'm getting a build error right now though. I tried it with the default config.h.def and get the same thing:

make
gcc -g -std=c99 -pedantic -Wall   -c -o snapwm.o snapwm.c
In file included from snapwm.c:174:0:
config.h:62:42: warning: ISO C forbids empty initializer braces [-pedantic]
config.h:62:26: error: zero or negative size array ‘convenience’
config.h:69:40: warning: ISO C forbids empty initializer braces [-pedantic]
config.h:69:25: error: zero or negative size array ‘positional’
make: *** [snapwm.o] Error 1

Offline

#266 2012-06-19 04:03:23

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,024

Re: dminiwm snapwm & bipolarbar

I pushed a change to the Makefile then fixed the config.h.def and pushed again. It should be fine now.
I had a go at making a PKGBUILD

pkgname=snapwm-git
pkgver=20120619
pkgrel=1
pkgdesc="It's minimal and dynamic"
url="https://github.com/moetunes/Nextwm"
license=('MIT')
depends=('libx11')
makedepends=('gcc' 'make' 'git')
arch=(i686 x86_64)
source=()
md5sums=()
options=(!libtool)
 
_gitroot="git://github.com/moetunes/Nextwm.git"
_gitname="Nextwm"
 
build() {
    msg "Connecting to GIT server...."

    # if local repo already exist
    if [[ -d $srcdir/$_gitname ]] ; then
        cd $srcdir/$_gitname
        git pull origin || return 1
        msg "The local files are updated."
        # else clone
    else
        git clone $_gitroot || return 1
    fi

    msg "GIT checkout done"
    msg "Starting make..."

    # build directory
    cd $srcdir/$_gitname
    if [[ -e $startdir/config.h ]]
    then
        msg "Using custom config.h."
        cp ${startdir}/config.h .
    else
        msg "Using default config.h."
        cp "${srcdir}/${_gitname}/config.h.def" "${srcdir}/${_gitname}/config.h"
    fi

    make DESTDIR=${pkgdir} install || return 1
}

It looks for a config.h in the same directory as the PKGBUILD and uses that or copies the config.h.def to config.h . Seems to work ok here for a first PKGBUILD.

Cheers


You're just jealous because the voices only talk to me.

Offline

#267 2012-06-19 04:53:33

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,024

Re: dminiwm snapwm & bipolarbar

@stlarch if they're empty you'll have to change the convenience and positional in config.h to have a 'None' entry

static const Convenience convenience[] = { \
    /*  class     desktop follow 1=Don't 0=Change the desktop*/
    { "None",   0,   0 },
};

until I can come up with something different...


You're just jealous because the voices only talk to me.

Offline

#268 2012-06-19 07:12:31

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,250

Re: dminiwm snapwm & bipolarbar

Thanks. I missed that somehow. It builds now but I'm getting some warnings that I don't get just using make:

snapwm.c: In function ‘add_window’:
snapwm.c:335:21: warning: ‘c’ may be used uninitialized in this function [-Wmaybe-uninitialized]
snapwm.c: In function ‘maprequest’:
snapwm.c:593:27: warning: array subscript is below array bounds [-Warray-bounds]
snapwm.c:594:20: warning: array subscript is below array bounds [-Warray-bounds]
snapwm.c:595:22: warning: array subscript is below array bounds [-Warray-bounds]
snapwm.c:596:20: warning: array subscript is below array bounds [-Warray-bounds]
snapwm.c:597:23: warning: array subscript is below array bounds [-Warray-bounds]
snapwm.c:598:25: warning: array subscript is below array bounds [-Warray-bounds]

I'm not sure if what they mean or if it's important.
I made a few changes to the PKGBUILD too. The || return 1 part isn't needed anymore so I removed that, and added PREFIX=/usr to the make install line (I think that's the way it should be) and just cleaned up a few things to make it more consistent. I changed the description just to maybe help people find it easier when searching? And I added the line to install the README to /usr/share/doc/snapwm. I'll go ahead and submit it to the aur. If you would rather take it over, just let me know and I'll hand it over.

#Maintained by stlarch <stlarchie@gmail.com>
pkgname=snapwm-git
pkgver=20120619
pkgrel=1
pkgdesc="Minimal, lightweight, dynamic tiling window manager."
url="https://github.com/moetunes/Nextwm"
license=('MIT')
depends=('libx11')
makedepends=('gcc' 'make' 'git')
arch=('i686' 'x86_64')
source=()
md5sums=()
options=(!libtool)

_gitroot="git://github.com/moetunes/Nextwm.git"
_gitname="Nextwm"

build() {
    msg "Connecting to GIT server...."

    # if local repo already exist
    if [[ -d ${srcdir}/${_gitname} ]] ; then
        cd ${srcdir}/${_gitname}
        git pull origin
        msg "The local files are updated."
        # else clone
    else
        git clone ${_gitroot}
    fi
    
    msg "GIT checkout done"
    msg "Starting make..."

    # build directory
    cd ${srcdir}/${_gitname}
    if [[ -e ${startdir}/config.h ]]
    then
        msg "Using custom config.h."
        cp ${startdir}/config.h .
    else
        msg "Using default config.h."
        cp "${srcdir}/${_gitname}/config.h.def" "${srcdir}/${_gitname}/config.h"
    fi

    make PREFIX=/usr DESTDIR=${pkgdir} install
    install -Dm644 "README.md" "${pkgdir}/usr/share/doc/${pkgname}/README.md"
}

I was trying to figure out how to cp the rc.conf to $HOME/.config/snapwm if one doesn't exist already. I was trying to use an install.snapwm-git but I can't seem to get it right. I'll keep trying and see if I can come up with something. But I think it's ok for now. It starts ok, you just get a warning. I think it's pretty self explanatory.

snapwm

Last edited by stlarch (2012-06-19 07:46:46)

Offline

#269 2012-06-19 09:38:06

Unia
Member
From: The Netherlands
Registered: 2010-03-30
Posts: 2,474
Website

Re: dminiwm snapwm & bipolarbar

^ You need snapwm-git.install. AFAIK you can't directly copy it, but just give the user a hint on how to. That's how most packages do it


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#270 2012-06-19 10:05:21

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,024

Re: dminiwm snapwm & bipolarbar

@stlarch the PKGBUILD works fine, cheers for that, keep up the good work wink
About the rc.conf, I know nothing about makepkg but if the Readme can be installed somewhere why not copy the sample.rc.conf to ~/.config/snapwm and have a msg line about it? That won't mess with an existing rc.conf and creates the snapwm directory in .config if it's not already there.
About the errors, I backed of the gcc optimizations in the makefile and that removed the [-Warray-bounds] warnings. The [-Wmaybe-uninitialized] warning is ok as I've set things up so 'c' doesn't get initilized if it already exists. I'll see if I can find a different method maybe. I guess the compiler doesn't check all the calls to the function and who can blame it... I dunno what's different between make and makepkg with the gcc options I'm just rolling with it for now.

Cheers

Last edited by moetunes (2012-06-19 10:08:50)


You're just jealous because the voices only talk to me.

Offline

#271 2012-06-19 16:09:41

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,250

Re: dminiwm snapwm & bipolarbar

Unia wrote:

^ You need snapwm-git.install. AFAIK you can't directly copy it, but just give the user a hint on how to. That's how most packages do it

Yeah, I meant snapwm-git.install not install.snapwm-git (it was late when I wrote that tongue )

moetunes wrote:

About the rc.conf, I know nothing about makepkg but if the Readme can be installed somewhere why not copy the sample.rc.conf to ~/.config/snapwm and have a msg line about it? That won't mess with an existing rc.conf and creates the snapwm directory in .config if it's not already there.

Yeah, I thought of that but it would actually create ~/.config/snapwm-git/ instead of ~/.config/snapwm if I used something like

install -Dm644 "sample.rc.conf" "$HOME/.config/${pkgname}/sample.rc.conf"

and I don't think you should use

install -Dm644 "sample.rc.conf" "$HOME/.config/snapwm/sample.rc.conf"

.
So, I think the right thing to do for now is install the sample.rc.conf to /usr/share/snapwm-git and let the user create the directory and copy the file. I included an install with a nice message telling the user what to do. I'll try to add something to the wiki later reflecting the changes. Cheers

Offline

#272 2012-06-19 17:49:03

Crunch
Member
From: -+-
Registered: 2011-02-17
Posts: 56

Re: dminiwm snapwm & bipolarbar

I seem to have a problem with moving windows to a new tag, it always crashes X. But only started recently on my laptop, desktop is still working perfectly as it should.


Registered Linux user #536591.

Offline

#273 2012-06-19 19:41:48

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,024

Re: dminiwm snapwm & bipolarbar

Crunch wrote:

I seem to have a problem with moving windows to a new tag, it always crashes X. But only started recently on my laptop, desktop is still working perfectly as it should.

You used the PKGBUILD?
Here if it is built with make it works like it always has but with makepkg there's that problem with

snapwm.c:335:21: warning: ‘c’ may be used uninitialized in this function [-Wmaybe-uninitialized]

which I thought was ok but seems to lead to the crash when moving windows between desktops.
Moving down a couple of directories and running make clean && make then moving back up a couple of directories and running makepkg -f and then installing has it working fine.
Don't use makepkg to make the binary atm.


You're just jealous because the voices only talk to me.

Offline

#274 2012-06-19 20:00:21

Crunch
Member
From: -+-
Registered: 2011-02-17
Posts: 56

Re: dminiwm snapwm & bipolarbar

Used Git and Make as per the wiki, didn't know there was a pkgbuild made for it yet.


Registered Linux user #536591.

Offline

#275 2012-06-19 20:39:10

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,024

Re: dminiwm snapwm & bipolarbar

Crunch wrote:

Used Git and Make as per the wiki, didn't know there was a pkgbuild made for it yet.

I just cloned the repo and built and ran it and it was fine here, but since it is inconsistant I'll change the approach for that function. You said "But only started recently on my laptop", when roughly was recently?


You're just jealous because the voices only talk to me.

Offline

Board footer

Powered by FluxBB