You are not logged in.

#326 2012-08-11 17:05:29

c00kiemon5ter
Member
From: Greece
Registered: 2010-06-01
Posts: 562
Website

Re: dminiwm snapwm & bipolarbar

it's just a silly warning, if you change line 160 from

client *c,*t, *dummy = head;

to

client *c = NULL, *t, *dummy = head;

it will go away

about the size difference, they probably use different options (env vars)
makepkg is reading /etc/makepkg.conf and reusing those vars with Makefile's


.:[ git me! ] :.

Offline

#327 2012-08-11 17:12:27

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

Re: dminiwm snapwm & bipolarbar

Thank you for that, c00kie!

Offline

#328 2012-08-11 18:48:16

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

Re: dminiwm snapwm & bipolarbar

I went ahead and made a PKGBUILD for bipolarbar too. Don't stop me now, I'm on a roll. tongue It's in the AUR also (bipolarbar-git). I know it's not a big deal or that much different from using the git method but I just thought it would mainly get more exposure in the AUR and get more people to use it, report bugs, etc. And some people might prefer it that way. It only took a few minutes to do. Hope that's ok. See ya.

Offline

#329 2012-08-11 20:09:42

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

Re: dminiwm snapwm & bipolarbar

@stlarch, cheers for the pkgbuilds.
Unfortunately, while c00kiemon5ters' fix removes the warning, building dminiwm with makepkg will have the wm crashing when moving a window to another desktop. Works fine just using the Makefile though...
Had the same situation with snapwm(unsuprisingly) so I will make some adjustments and make sure dminiwm can function properly when used with makepkg.
Since I use the same simple Makefile for everything I'll make sure bipolarbar builds ok with makepkg too.

Cheers


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

Offline

#330 2012-08-11 20:32:34

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

Re: dminiwm snapwm & bipolarbar

@stlarch, I just had a look at the PKGBUILD for bipolarbar and it won't work copying an existing bipolarbar.c to keep the colours etc, there'll never be any upgrades..., so I will put the defines into a config.h.def so it's easier to keep colours etc when upgrading.

Cheers


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

Offline

#331 2012-08-11 20:32:51

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

Re: dminiwm snapwm & bipolarbar

Sorry to make more work for you. That's one of the things I was afraid of. tongue I didn't notice the crashing before but you're right, I'm getting it too. One other thing I noticed with dminiwm+bipolarbar is that when using a gtk app, the open window number count doesn't get cleared in fullscreen if you close the app with MODKEY+c. If I use the app's menu to close it, it does. It's the same for all gtk apps that I've tested. It works fine for urxvt though.

Last edited by stlarch (2012-08-11 20:52:32)

Offline

#332 2012-08-11 20:37:59

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

Re: dminiwm snapwm & bipolarbar

moetunes wrote:

@stlarch, I just had a look at the PKGBUILD for bipolarbar and it won't work copying an existing bipolarbar.c to keep the colours etc, there'll never be any upgrades..., so I will put the defines into a config.h.def so it's easier to keep colours etc when upgrading.

I made it where if you copy a working bipolarbar.c into the $startdir, then it will copy it to the $srcdir or else use the existing bipolarbar.c, so it should work (I tested it), but if you want to do a config.h, that's fine too. It will be easy to change.

edit: I may have to leave here soon (or will have to) and I might be away for a couple days if I don't respond. Grandson No.1 should be here any time now! Thanks for everything.

Last edited by stlarch (2012-08-11 20:44:03)

Offline

#333 2012-08-11 21:05:48

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

Re: dminiwm snapwm & bipolarbar

There's a config.h.def for bipolarbar now, should make things a bit easier with updates.
I'll see what's up with dminiwm not updating properly, I probably just left a line out somewhere...

Good luck with the grandson stlarch. smile

Cheers


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

Offline

#334 2012-08-11 21:29:24

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

Re: dminiwm snapwm & bipolarbar

Dminiwm will work ok with makepkg now and I had just left a line out so it should update properly when using Mod1+c now.

Cheers


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

Offline

#335 2012-08-14 06:16:34

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

Re: dminiwm snapwm & bipolarbar

Some snapwm news.

I moved the keyboard shortcuts and apps settings out of config.h and into files in ~/.config/snapwm, key.conf and apps.conf. There's sample files for each to get people started, key.conf is mandatory but there doesn't need to be an apps.conf.
It won't build with a current config.h so that'll have to be removed and except for default values there's only the number of desktops and whether to left align the current windows' name that should be edited in the config.h.def file. (I'll move them to the rc file soon).
The current rc.conf stays the same.
So, pretty much everything in the running window manager can be changed anytime now.

Edit: That should just about cover this feature request.

If there are any bugs, problems or whatever feel free to speak up.

Cheers

Last edited by moetunes (2012-08-14 08:23:43)


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

Offline

#336 2012-08-14 15:35:21

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

Re: dminiwm snapwm & bipolarbar

Hey. I'm having a few problems with the new setup. I like to use Super for my modkeys. Is there a way to change the keys in DESKTOPCHANGE? And maybe add ShftSuper and CtrlSuper as possible modkeys? I think that will solve my problems with that. I noticed that the kill_client was missing. I added that to my key.conf and it works fine. I'm having problems launching dmenu too. I'm getting an error about colors? I'll try to mess around with that and see if it's something I'm doing.
Still no grandson. sad It seems he changed his mind so we are still waiting. We've been in and out of the hospital so again I may be away if I don't respond. Thanks

Last edited by stlarch (2012-08-14 18:13:09)

Offline

#337 2012-08-14 18:57:52

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

Re: dminiwm snapwm & bipolarbar

I'll see if I can come up with a better option for the mod keys. It might be easiest to seperate the three functions in DESKTOPCHANGE so choices aren't limited.
What's the line you have for dmenu that fails? The sample.keys.conf has a line for dmenu_run that works fine here on three comps, is your CMD for it similar?.


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

Offline

#338 2012-08-14 19:14:17

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

Re: dminiwm snapwm & bipolarbar

Here's what I have for dmenu:

CMD dmenucmd;dmenu_run;-i;-b;-nb;#000000;-nf;#7f7f7f;-sb;#1c678c;-sf;#cccccc;-fn;-*-terminusmodx-medium-r-*-*-12-*-*-*-*-*-*-*;NULL;

Offline

#339 2012-08-14 19:38:44

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

Re: dminiwm snapwm & bipolarbar

That looks fine, I think the problem is I wasn't expecting commands that long so the buffer will need increasing so the command isn't cut short.
Check back in a bit (if the grandson doesn't have another false start wink ), the fixes shouldn't take long once I can make a start.


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

Offline

#340 2012-08-15 04:06:17

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

Re: dminiwm snapwm & bipolarbar

@stlarch, your dmenu command should run fine now,I just had to increase some storage space for longer commands.
I seperated the three commands in DESKTOPCHANGE so different keys can be used, see the sample file, and I added to the Mod keys that can be used.

# Possible Mods are Alt, CtrlAlt, ShftAlt, Super, ShftSuper, CtrlSuper

Thanks for pointing out the missing kill_client function in the key file, that's in the sample file now.

rc.conf has changed a little. Most importantly it is now semi colon seperated. An easy way to change it is:

sed -i 's/,/;/g' ~/.config/snapwm/rc.conf

but make sure, if you use multiple fonts, to edit the FONTNAME line to be comma seperated again.

The number of desktops is now set in rc.conf and should be first.

DESKTOPS 6

it defaults to 4 if that line is missing, there's a maximum of ten and how many there are can be changed in the running wm. If the keys for changing desktops above the number of desktops aren't commented out it doesn't matter they just don't get used.

Whether the text in the bar showing the current windows' name should be left aligned moved to rc.conf

LEFT_WINDOWNAME 0

0 = left aligned, 1 = right aligned. The default is to left align it so that line isn't necessary if that's how you want it.

The only thing left in config.h now that someone might want to change is whether to have the bar or not, the rest in there are just some default values to help make sure the wm will start ok.
So unless someone wants to never have the bar there's no point in keeping a config.h.

It all seems to be working smoothly so far, as time permits I'll try to refine the file reading so I am sure that'll change tongue

Edit: I've made sure it'll work using fixed font. Dunno how I missed that...

Cheers

Last edited by moetunes (2012-08-15 07:13:31)


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

Offline

#341 2012-08-15 16:29:53

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

Re: dminiwm snapwm & bipolarbar

Thank you! Everything seems good here now. I like what you did with it. Keep up the good work!

Offline

#342 2012-08-15 18:53:55

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

Re: dminiwm snapwm & bipolarbar

I'll update the PKGBUILD for snapwm-git later tonight if I can. Sorry. Just use git for now. And moe, I changed the license for bipolarbar, are snapwm and dminiwm GPL2 also or MIT? Thanks

Offline

#343 2012-08-15 20:05:34

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

Re: dminiwm snapwm & bipolarbar

Snapwm and dminiwm are mit licensed since that's what catwm uses and they're forks of it, everything else of mine is gpl'd.

Here's how I have the three conf files as a reference:

RC.CONF

DESKTOPS 6
BARTHEME #665522;#002030;#003040;#001020;
TEXTTHEME #000055;#776644;#998866;#887733;#999999;#66aa99;#aa9944;
WINDOWTHEME #443311;#002030;
BORDERWIDTH 2
MASTERSIZE 55
ATTACHASIDE 1
TOPSTACK 1
DEFAULTMODE 4
UF_WIN_ALPHA 65
FOLLOWMOUSE 1
CLICKTOFOCUS 0
LEFT_WINDOWNAME 1
WINDOWNAMELENGTH 65
TOPBAR 0
SHOW_BAR 0
SHOWNUMOPEN 0
MODENAME ;;;;;
DESKTOP_NAMES Ë;¾;´;©;Ê;à;
FONTNAME "-*-stlarch-medium-r-*-*-10-*-*-*-*-*-*-*,-*-terminusmod.icons-medium-r-*-*-12-*-*-*-*-*-*-*"

KEY.CONF

# Possible Mods are Alt, CtrlAlt, ShftAlt, Super, ShftSuper, CtrlSuper

CMD thunarcmd;thunar;NULL;
#CMD dmenucmd;dmenu_run;-i;-b;-nb;#000000;-nf;#7f7f7f;-sb;#1c678c;-sf;#cccccc;-fn;-*-terminusmodx-medium-r-*-*-12-*-*-*-*-*-*-*;NULL;
CMD dmenucmd;dmenu_run;-i;-nb;#666622;-nf;white;NULL;
CMD urxvtccmd;urxvtc;NULL;
CMD xtermcmd;xterm;NULL;
CMD firefoxcmd;firefox;NULL;
CMD mailcmd;thunderbird;NULL;
CMD volupcmd;/home/pnewm/.bin/volup;NULL;
CMD voldowncmd;/home/pnewm/.bin/voldown;NULL;
CMD prevolupcmd;/home/pnewm/.bin/prevolup;NULL;
CMD prevoldowncmd;/home/pnewm/.bin/prevoldown;NULL;
CMD volswhatcmd;/home/pnewm/.bin/volumes_what;NULL;
CMD shutdowncmd;sudo;shutdown;-h;now;NULL;
CMD rebootcmd;sudo;reboot;NULL;

KEY Alt;1;change_desktop;0;
KEY Alt;2;change_desktop;1;
KEY Alt;3;change_desktop;2;
KEY Alt;4;change_desktop;3;
KEY Alt;5;change_desktop;4;
KEY Alt;6;change_desktop;5;
KEY Alt;7;change_desktop;6;
KEY Alt;8;change_desktop;7;
KEY Alt;9;change_desktop;8;
KEY Alt;F10;change_desktop;9;

KEY ShftAlt;1;follow_client_to_desktop;0;
KEY ShftAlt;2;follow_client_to_desktop;1;
KEY ShftAlt;3;follow_client_to_desktop;2;
KEY ShftAlt;4;follow_client_to_desktop;3;
KEY ShftAlt;5;follow_client_to_desktop;4;
KEY ShftAlt;6;follow_client_to_desktop;5;
KEY ShftAlt;7;follow_client_to_desktop;6;
KEY ShftAlt;8;follow_client_to_desktop;7;
KEY ShftAlt;9;follow_client_to_desktop;8;
KEY ShftAlt;F10;follow_client_to_desktop;9;

KEY ShftSuper;1;client_to_desktop;0;
KEY ShftSuper;2;client_to_desktop;1;
KEY ShftSuper;3;client_to_desktop;2;
KEY ShftSuper;4;client_to_desktop;3;
KEY ShftSuper;5;client_to_desktop;4;
KEY ShftSuper;6;client_to_desktop;5;
KEY ShftSuper;7;client_to_desktop;6;
KEY ShftSuper;8;client_to_desktop;7;
KEY ShftSuper;9;client_to_desktop;8;
KEY ShftSuper;F10;client_to_desktop;9;

KEY Alt;a;rotate_mode;1;
KEY Alt;h;resize_master;10;
KEY Alt;j;next_win;
KEY Alt;k;prev_win;
KEY Alt;l;resize_master;-10;
KEY Alt;p;resize_stack;10;
KEY Alt;o;resize_stack;-10;
KEY Alt;u;update_config;
KEY Alt;v;spawn;dmenucmd;
KEY Alt;Up;spawn;volupcmd;
KEY Alt;Down;spawn;voldowncmd;
KEY Alt;Tab;last_desktop;
KEY Alt;Return;spawn;urxvtccmd;

KEY ShftAlt;m;more_master;1;
KEY ShftAlt;l;more_master;-1;
KEY ShftAlt;k;move_down;10;
KEY ShftAlt;j;move_up;-10;
KEY ShftAlt;o;move_left;-10;
KEY ShftAlt;p;move_right;10;
KEY ShftAlt;v;switch_mode;0;
KEY ShftAlt;f;switch_mode;1;
KEY ShftAlt;h;switch_mode;2;
KEY ShftAlt;g;switch_mode;3;
KEY ShftAlt;c;switch_mode;4;
KEY ShftAlt;Return;swap_master;

KEY Super;b;toggle_bar;
KEY Super;Right;rotate_desktop;1;
KEY Super;Left;rotate_desktop;-1;
KEY Super;t;spawn;xtermcmd;
KEY Super;h;spawn;thunarcmd;
KEY Super;f;spawn;firefoxcmd;
KEY Super;e;spawn;mailcmd;
KEY Super;v;spawn;volswhatcmd;
KEY Super;Up;spawn;prevolupcmd;
KEY Super;Down;spawn;prevoldowncmd;


KEY CtrlAlt;q;quit;
KEY CtrlAlt;s;spawn;shutdowncmd;
KEY CtrlAlt;r;spawn;rebootcmd;

APPS.CONF

DESKTOP Thunar;2;0;
DESKTOP Firefox;3;0;
DESKTOP Thunderbird;5;1;
DESKTOP MPlayer;4;0;
DESKTOP Pysol;6;0;

POSITION Thunar;100;100;800;400;
POSITION URxvt;100;320;820;400;
POSITION Xchat;320;60;950;500;

I'll redo the wiki this morning so it'll be useful as a point of reference again.

Cheers


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

Offline

#344 2012-08-15 20:39:01

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

Re: dminiwm snapwm & bipolarbar

I tried to update the PKGBUILD and it builds and installs ok, but it wont start up. I'm not getting any errors or anything. All I did was add the part where it installs the new files to /usr/share/snapwm-git/, and I changed the snapwm-git.install a little. Here's the PKGBUILD:

#Maintained by stlarch <stlarchie@gmail.com>
pkgname=snapwm-git
pkgver=20120815
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)
install="${pkgname}.install"

_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"
        install -Dm644 "sample.apps.conf" "${pkgdir}/usr/share/${pkgname}/sample.apps.conf"
        install -Dm644 "sample.key.conf" "${pkgdir}/usr/share/${pkgname}/sample/key.conf"
        install -Dm644 "sample.rc.conf" "${pkgdir}/usr/share/${pkgname}/sample.rc.conf"
}

and the snapwm-git.install:

post_install() {
        echo "To make changes, edit config.h, copy it to the startdir and run makepkg -fi."
        echo "The sample.apps.conf, sample.key.conf, and sample.rc.conf config files are in /usr/share/snapwm-git/"
        echo "Copy the config files to ~/.config/snapwm/ and edit to suit."
}

I wasn't exactly sure how to word the .install file?

Last edited by stlarch (2012-08-15 20:40:42)

Offline

#345 2012-08-15 21:27:22

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

Re: dminiwm snapwm & bipolarbar

Ok, it starts if I use the default config.h.def instead of using a custom config.h. I guess there's no piont in using a custom one now obviously. Sorry, I'm having trouble concentrating on anything else right now. So I guess I should change the PKGBUILD and .install to reflect that. I wasn't exactly clear on your previous post, are you going to remove the config.h altogether?

Offline

#346 2012-08-15 22:51:19

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

Re: dminiwm snapwm & bipolarbar

The config.h is just used now to hold some default values in case there's some missing conf files.
There's no reason to keep/use an old config.h and the wm won't run if an old config.h is used and it has keyboard shortcuts in it.

To put it another way, there's no files that need editing before building the wm, everything is in the conf files in ~/.config/snapwm/ .

It might be best if I change the file on git from config.h.def to config.h and the PKGBUILD doesn't do anything with config.h. I'll do that now. That should be the end of any major changes for that.


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

Offline

#347 2012-08-15 23:41:07

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

Re: dminiwm snapwm & bipolarbar

So the PKGBUILD could be

#Maintained by stlarch <stlarchie@gmail.com>
pkgname=snapwm-git
pkgver=20120816
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)
install="${pkgname}.install"

_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}

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

and the .install could be

post_install() {
	echo "Create the directory ~/.config/snapwm/ and copy"
	echo "the three sample files in /usr/share/snapwm-git/"
	echo " to ~/.config/snapwm/{rc.conf,key.conf,apps.conf}"
	echo " and edit them to suit."
	echo "README.md is located in /usr/share/doc/snapwm-git/."
}

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

Offline

#348 2012-08-16 00:32:33

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

Re: dminiwm snapwm & bipolarbar

I should probably explain the latest changes a bit more.
snapwm still does the same window manager functions but it starts differently now.
Instead of having to edit files before building and being limited to those choices unless it's rebuilt, snapwm now reads up to three files at startup to set all configuration choices and all those choices can be changed anytime with an edit and a keyboard shortcut.

Unless you don't want to use keyboard shortcuts, ~/.config/snapwm/key.conf is mandatory. There's a sample.key.conf file with all the window manager functions set to defaults. It works similarly to how the keys and commands worked in the old config.h but with a simpler syntax.

rc.conf is the same as before, except for now using a semi-colon as a delimeter to match the other confs. The default number of desktops is 4, there can be 10, or the first option in rc.conf can set the number of desktops to whatever is needed.

apps.conf works similarly to how setting apps position/desktop was in the old config.h but with a simpler syntax.

I've updated the wiki if the sample files aren't enough to start from, I tried to make the logic and syntax simple to suit me, so I think it'll be straight forward enough.

Cheers

Last edited by moetunes (2012-08-16 00:34:05)


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

Offline

#349 2012-08-16 02:38:37

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

Re: dminiwm snapwm & bipolarbar

That makes sense to me. I just thought I should double-check with you first before changing it. The wording in your .install file is better too. I updated the AUR. Thank you.

Offline

#350 2012-08-16 19:25:29

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

Re: dminiwm snapwm & bipolarbar

Sorry for the long post. Well, I've been thinking about the PKGBUILD's. They work but I don't think they are correct and don't work the way they should. I still go back and forth between using the git method and using abs, mostly for testing. And I've been in the (bad)habit of just deleting the /pkg and /src and then using makepkg -i again, but that's kinda silly. I think it should work with makepkg -fi and not having to delete anything. They are missing the ${gitname}-build part of it, like in the monsterwm-git example I used earlier. I think this is the recommended way of doing it, as many others I've seen do this and it's in the example one in /usr/share/pacman. If I use that, for dminiwm and bipolarbar, I can just make the changes I want to config.h and then run makepkg -fi. It's easier and more straightfoward. For snapwm, just run makepkg -fi to update. Obviously, that won't work on the current PKGBUILD's. You can run makepkg -efi to make local changes but the /src will never get updated. Here's what I've been using for bipolarbar-git; it seems to do what I want:

#Maintained by stlarch <stlarchie@gmail.com>
pkgname=bipolarbar-git
pkgver=20120816
pkgrel=1
pkgdesc="Status bar for dminiwm, monsterwm, or maybe others that can show two sets of information at different timings."
url="https://github.com/moetunes/bipolarbar"
license=('GPL2')
depends=('libx11')
makedepends=('gcc' 'make' 'git')
arch=('i686' 'x86_64')
source=()
md5sums=()
options=(!libtool)
install="${pkgname}.install"

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

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}
        fi

        msg "GIT checkout done."
        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}-build/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"
}
post_install() {
        echo "To make changes, copy /src/bipolarbar-build/config.h to startdir and edit to suit."
        echo "Then run makepkg -fi."
}

The one for dminiwm is pretty much the same.

Here's the one for snapwm (it's the same but without the part where it copies the config.h.def to config.h):

#Maintained by stlarch <stlarchie@gmail.com>
pkgname=snapwm-git
pkgver=20120816
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)
install="${pkgname}.install"

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

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}
        fi

        msg "GIT checkout done."
        rm -rf "${srcdir}/${_gitname}-build"
        git clone "${srcdir}/${_gitname}" "${srcdir}/${_gitname}-build"
}

package() {
        cd "${srcdir}/${_gitname}-build"
        make PREFIX=/usr DESTDIR=${pkgdir} install
        install -Dm644 "README.md" "${pkgdir}/usr/share/doc/${pkgname}/README.md"
        install -Dm644 "sample.rc.conf" "${pkgdir}/usr/share/${pkgname}/sample.rc.conf"
        install -Dm644 "sample.key.conf" "${pkgdir}/usr/share/${pkgname}/sample.key.conf"
        install -Dm644 "sample.apps.conf" "${pkgdir}/usr/share/${pkgname}/sample.apps.conf"
}
post_install() {
        echo "Create the directory ~/.config/snapwm/ and copy the three sample files in /usr/share/snapwm-git/"
        echo "to ~/.config/snapwm/ {rc.conf,key.conf,apps.conf} and edit them to suit."
        echo "README.md is located in /usr/share/doc/snapwm-git/."
        echo "To update, run makepkg -fi."
}

Does this seem reasonable? Anybody else have an opinion? Thanks

Last edited by stlarch (2012-08-16 19:30:52)

Offline

Board footer

Powered by FluxBB